Skip to content

Commit

Permalink
updated for docker for native and 404 links. fixes prakhar1989#28
Browse files Browse the repository at this point in the history
  • Loading branch information
prakhar1989 committed Jun 25, 2016
2 parents 85de6c7 + 3d946a2 commit 935f107
Show file tree
Hide file tree
Showing 6 changed files with 353 additions and 523 deletions.
245 changes: 83 additions & 162 deletions README.md

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions build/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel='shortcut icon' href='favicon.ico'/>
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="Learn to build and deploy your distributed applications easily to the cloud with Docker">
<meta name="author" content="Prakhar Srivastav">
<meta name="keywords" content="docker, docker tutorial, docker guide, containers, getting started, beginners">
<meta property="og:locale" content="en_US">
<meta property="og:site_name" content="Docker for Beginners">
<meta property="og:title" content="Docker for Beginners"/>
<meta property="og:type" content="article"/>
<meta property="og:locale" content="en_US"/>
<meta property="og:url" content="http://prakhar.me/docker-curriculum"/>
<meta property="og:description" content="Learn to build and deploy your distributed applications easily to the cloud with Docker"/>
<meta property="og:image" content="https://raw.githubusercontent.com/prakhar1989/docker-curriculum/master/images/logo.png"/>
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@prakharsriv9">
<meta name="twitter:creator" content="@prakharsriv9">
<meta name="twitter:title" content="Docker for Beginners"/>
<meta name="twitter:description" content="Learn to build and deploy your distributed applications easily to the cloud with Docker"/>
<meta name="twitter:image" content="https://raw.githubusercontent.com/prakhar1989/docker-curriculum/master/images/logo.png"/>
34 changes: 13 additions & 21 deletions build/markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ body{
color:#444;
font-family:Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman',
"Hiragino Sans GB", "STXihei", "微软雅黑", serif;
font-size:12px;
line-height:1.5em;
font-size:1.2em;
line-height:1.4;
background:#fefefe;
width: 45em;
margin: 10px auto;
padding: 1em;
outline: 1300px solid #FAFAFA;
Expand All @@ -33,8 +32,9 @@ span.backtick {
a::-moz-selection{background:rgba(255,255,0,0.3);color:#0645ad}
a::selection{background:rgba(255,255,0,0.3);color:#0645ad}

p{
margin:1em 0;
p {
margin:1em 0;
line-height: 1.5;
}

img{
Expand All @@ -44,12 +44,12 @@ max-width:100%;
h1,h2,h3,h4,h5,h6{
font-weight:normal;
color:#111;
line-height:1em;
}

h4,h5,h6{ font-weight: bold; }
h1{ font-size:2.5em; }
h2{ font-size:2em; border-bottom:1px solid silver; padding-bottom: 5px; }
h3{ font-size:1.5em; }
h2{ font-size:1.6em; border-bottom:1px solid silver; padding-bottom: 5px; }
h3{ font-size:1.4em; }
h4{ font-size:1.2em; }
h5{ font-size:1em; }
h6{ font-size:0.9em; }
Expand All @@ -63,13 +63,13 @@ border-left: 0.5em #EEE solid;
hr { display: block; height: 2px; border: 0; border-top: 1px solid #aaa;border-bottom: 1px solid #eee; margin: 1em 0; padding: 0; }


pre , code, kbd, samp {
color: #000;
font-family: monospace;
font-size: 0.88em;
pre , code, kbd, samp {
color: #000;
font-family: monospace;
font-size: 1.1em;
border-radius:3px;
background-color: #F8F8F8;
border: 1px solid #CCC;
border: 1px solid #CCC;
}
pre { padding: 5px 12px; overflow-x: auto; }
pre code { border: 0px !important; padding: 0;}
Expand All @@ -96,14 +96,6 @@ img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
table { border-collapse: collapse; border-spacing: 0; }
td { vertical-align: top; }

@media only screen and (min-width: 480px) {
body{font-size:14px;}
}

@media only screen and (min-width: 768px) {
body{font-size:16px;}
}

@media print {
* { background: transparent !important; color: black !important; filter:none !important; -ms-filter: none !important; }
body{font-size:12pt; max-width:100%; outline:none;}
Expand Down
14 changes: 7 additions & 7 deletions build/md2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,17 @@ def modify_body(self, body):
body = fork.pre_body + body + analytics.script
return body

def run(self, mdfile, parser, wholefile=False):
def get_header(self):
'''returns header for the generated file'''
with open("header.html") as f:
return f.read()

def run(self, mdfile, parser, wholefile=False):
''' return full html and body html for view. '''
self.mdfile = mdfile

contents = self.get_contents(wholefile)

body = self.convert_markdown(contents, parser)

html = u'<!DOCTYPE html>'
html += '<html><head><meta charset="utf-8">'
html += "<link rel='shortcut icon' href='favicon.ico'/>"
html = self.get_header()
html += self.get_stylesheet(parser)
html += self.get_javascript()
html += self.get_highlight()
Expand Down
39 changes: 6 additions & 33 deletions build/template.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
/* to allow side-by-side code blocks */
.join {
height: 0;
margin: 0;
}
.join + pre {
width: 45%;
float:left;
display: inline-block;
margin-top: 0;
margin-bottom: 0;
}
pre + pre {
display: inline-block;
width: 45%;
float: right;
margin-top: 0;
margin-bottom: 0;
}
pre + .clear {
margin: 0;
height: 0;
clear: both;
}
ul ul {
margin-top: 0;
margin-bottom: 0;
}

/* Fork me on Github*/
img.github {
position: absolute;
Expand All @@ -49,9 +20,11 @@ img.github {

/* "Responsive" */
body {
width: 90%;
max-width: 50em;
}
box-sizing: border-box;
max-width: 960px;
font-family: "Avenir", "Avenir Next", "Helvetica Neue", "Segoe UI", "Verdana", sans-serif;
min-height: 100%;
position: relative; }

/* make tables pretty */
table {
Expand All @@ -76,4 +49,4 @@ table {
table tr th :first-child, table tr td :first-child {
margin-top: 0; }
table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }
margin-bottom: 0; }
Loading

0 comments on commit 935f107

Please sign in to comment.