From: Ralf Jung Date: Thu, 8 Oct 2015 19:27:08 +0000 (+0200) Subject: make the new style also work for blog posts X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/cf8145d8e8cb87e75171718c88355137d1a900ef?hp=56d4ba025a1ac4a2a69e05b1d79f2e9bde199883 make the new style also work for blog posts --- diff --git a/_config.yml b/_config.yml index 37bb42d..37a8410 100644 --- a/_config.yml +++ b/_config.yml @@ -23,7 +23,7 @@ defaults: - scope: path: "" # all files in the project values: - layout: "default" + layout: "page" - scope: path: "" type: "posts" diff --git a/_layouts/default.html b/_layouts/default.html index b373206..aba9c6c 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -5,7 +5,7 @@ - {{ page.title }}{% if page.subtitle %} - {{ page.subtitle }}{% endif %} + {% if page.pretitle %}{{ page.pretitle }} • {% endif %}{{ page.title }} {% if page.excerpt %}{% endif %} @@ -22,10 +22,6 @@
-
-

{{ page.title }}

-
- {{ content }}
diff --git a/_layouts/page.html b/_layouts/page.html new file mode 100644 index 0000000..9397774 --- /dev/null +++ b/_layouts/page.html @@ -0,0 +1,8 @@ +--- +layout: default +--- +
+

{{ page.title }}

+
+ +{{ content }} diff --git a/_layouts/post.html b/_layouts/post.html index 5ed4c68..d6500b9 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -1,12 +1,17 @@ --- layout: default -title: "Ralf's Ramblings" +pretitle: "Ralf's Ramblings" rss: true --- -
+
Permalink • {{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}
-

{{ page.subtitle }}

+

{{ page.pretitle }}

+
+

{{ page.title }}

+
+ + {{ content }} diff --git a/blog/index.html b/blog/index.html index a0d8f1a..7ab9194 100644 --- a/blog/index.html +++ b/blog/index.html @@ -1,5 +1,4 @@ --- -layout: default title: "Ralf's Ramblings" slug: Blog rss: true diff --git a/style.scss b/style.scss index 0fa1fa7..c01d011 100644 --- a/style.scss +++ b/style.scss @@ -34,20 +34,15 @@ h4 { $navi-width: 11em; $navi-indent: 1.2em; $frame-max-width: 50em; -$intrusion-width: 0.8em; +$intrusion-width: 1.0em; $outer-margin: 0.8em; $full-content-width: $frame-max-width + $navi-width + 2*$outer-margin + $intrusion-width; -$frame-color: #121212; -$title-color: #08f; -$navi-color: #36ff00; -$current-color: #ffa700; -$background-color: white; +$background-color: white; $text-color: #313131; -$code-background-color: #505050; -$light-text-color: #888; -$link-color: #268BD2; - +$light-text-color: #808080; +$code-background-color: #F7F7F7; +$link-color: #268BD2; /* General page structure */ body { /* This centers us in the page, and handles the "too wide" case */ @@ -132,7 +127,7 @@ body { /* This centers us in the page, and handles the "too wide" case */ } /* Small screens */ -@media screen and (max-width:#{ $frame-max-width } ) { +@media screen and (max-width:#{ $frame-max-width + 2*$outer-margin } ) { body, #-frame, #-title, #-content, #-navi { margin: 0; padding: 0; @@ -203,22 +198,43 @@ body { /* This centers us in the page, and handles the "too wide" case */ /* Content styling */ #-content { - .subtitle .side { + .side { float: right; color: $light-text-color; } - code { - padding: 0.1em 0.2em; + #-pretitle, .subtitle { + h1 { + display: inline-block; + font-size: 165%; + } + .side { + margin-left: 0.5em; + margin-top: 0.9em; + } + } + .subtitle { + margin-top: 1.5em; + } + + #-title { + clear: both; + } + + pre, code { + background-color: $code-background-color; font-family: monospace; font-size: 82%; } + code { + padding: 0.1em 0.2em; + } pre { padding: 0.6em; } pre code { - background-color: $code-background-color; padding: 0; + font-size: 100%; } p { @@ -227,7 +243,7 @@ body { /* This centers us in the page, and handles the "too wide" case */ } a { text-decoration: none; - color:$link-color; + color: $link-color; } a:hover, a:focus { text-decoration: underline;