summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/list.html12
-rw-r--r--layouts/_default/single.html24
-rw-r--r--layouts/partials/head.html1
-rw-r--r--static/css/print.css19
4 files changed, 38 insertions, 18 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 7659d47..c362b25 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,15 +1,15 @@
{{ partial "head.html" . }}
<body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
-{{ partial "sidebar.html" . }}
+ {{ partial "sidebar.html" . }}
<div class="content container">
<ul class="posts">
- {{ range .Data.Pages }}
- <li>
- <span><a href="{{ .Permalink }}">{{ .Title }}</a> <time class="pull-right post-list">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></span>
- </li>
- {{ end }}
+ {{ range .Data.Pages }}
+ <li>
+ <span><a href="{{ .Permalink }}">{{ .Title }}</a> <time class="pull-right post-list">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></span>
+ </li>
+ {{ end }}
</ul>
</div>
</body>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 96c9f94..26149e7 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,19 +1,19 @@
- {{ partial "head.html" . }}
- <body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
- {{ partial "sidebar.html" . }}
+{{ partial "head.html" . }}
+<body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
+ {{ partial "sidebar.html" . }}
- <div class="content container">
- <div class="post">
- <h1>{{ .Title }}</h1>
- <span class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
- {{ .Content }}
- </div>
+ <div class="content container">
+ <div class="post">
+ <h1>{{ .Title }}</h1>
+ <span class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
+ {{ .Content }}
+ </div>
- {{ if and (isset .Site.Params "disqusShortname") (ne .Site.Params.disqusShortname "") }}
+ {{ if .Site.Params.disqusShortname }}
<h2>Comments</h2>
{{ partial "disqus" . }}
{{ end }}
</div>
- </body>
-</html>
+</body>
+</html> \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 110c99e..447a27c 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -15,6 +15,7 @@
{{ end }}
<!-- CSS -->
+ <link rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/poole.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/syntax.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/hyde.css">
diff --git a/static/css/print.css b/static/css/print.css
new file mode 100644
index 0000000..da8f1df
--- /dev/null
+++ b/static/css/print.css
@@ -0,0 +1,19 @@
+.sidebar {
+ display: none !important;
+}
+
+.content {
+ margin: 0 auto;
+ width: 100%;
+ float: none;
+ display: initial;
+}
+
+.container {
+ width: 100%;
+ float: none;
+ display: initial;
+ padding-left: 1rem;
+ padding-right: 1rem;
+ margin: 0 auto;
+}