From a0ac63cb5281c536a4a317c83e099b9e51657418 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 8 Oct 2015 21:50:29 +0200 Subject: [PATCH] make blog titles clickable; some more style tunes --- _plugins/readmes.rb | 4 +-- _posts/2015-10-10-welcome.md | 2 +- blog/index.html | 2 +- style.scss | 64 +++++++++++++++++++----------------- 4 files changed, 38 insertions(+), 34 deletions(-) diff --git a/_plugins/readmes.rb b/_plugins/readmes.rb index 6b8c80e..f702589 100644 --- a/_plugins/readmes.rb +++ b/_plugins/readmes.rb @@ -12,7 +12,7 @@ module Jekyll content = File.read(src, self.merged_file_read_opts({})).each_line.to_a - self.data['layout'] = 'default' + self.data['layout'] = 'page' self.data['title'] = content[0].match(/^#* ?(.*)\n$/)[1] slug = self.data['title'].match(/^([^:]*):.*$/) if slug @@ -23,7 +23,7 @@ module Jekyll end end - class CategoryPageGenerator < Generator + class ReadmePageGenerator < Generator safe true def generate(site) diff --git a/_posts/2015-10-10-welcome.md b/_posts/2015-10-10-welcome.md index c3f71a9..c4c3950 100644 --- a/_posts/2015-10-10-welcome.md +++ b/_posts/2015-10-10-welcome.md @@ -1,5 +1,5 @@ --- -subtitle: Welcome +title: Welcome categories: meta --- diff --git a/blog/index.html b/blog/index.html index 7ab9194..70032ce 100644 --- a/blog/index.html +++ b/blog/index.html @@ -10,7 +10,7 @@ rss: true {% if num_posts >= 0 %}
Permalink • {{ post.date | date: "%b %-d, %Y" }}{% if post.author %} • {{ post.author }}{% endif %}{% if post.meta %} • {{ post.meta }}{% endif %}
-

{{ post.subtitle }}

+

{{ post.title }}

{{ post.content }} {% endif %} diff --git a/style.scss b/style.scss index c01d011..914f5f9 100644 --- a/style.scss +++ b/style.scss @@ -3,12 +3,42 @@ hide: true --- @charset "utf-8"; +/* Variables */ +$navi-width: 11em; +$navi-indent: 1.2em; +$frame-max-width: 50em; +$intrusion-width: 1.0em; +$outer-margin: 0.8em; +$full-content-width: $frame-max-width + $navi-width + 2*$outer-margin + $intrusion-width; + +$background-color: white; +$text-color: #313131; +$light-text-color: #808080; +$code-background-color: #F7F7F7; +$link-color: #268BD2; + /* General Fonts */ html, body, div, p { font-family: DejaVu Sans, Verdana, Arial, sans-serif; font-size: 12pt; + color: $text-color; +} +/* Links */ +a { + text-decoration: none; + color: $link-color; +} +a:hover, a:focus { + text-decoration: underline; } /* Header Size & Spacing */ +h1, h2, h3, h4 { + color: $text-color; + + a { + color: $text-color; + } +} h1 { margin-top: 0.1em; font-size: 200%; @@ -31,32 +61,19 @@ h4 { } /* Layout and Color stuff */ -$navi-width: 11em; -$navi-indent: 1.2em; -$frame-max-width: 50em; -$intrusion-width: 1.0em; -$outer-margin: 0.8em; -$full-content-width: $frame-max-width + $navi-width + 2*$outer-margin + $intrusion-width; - -$background-color: white; -$text-color: #313131; -$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 */ padding: 0; margin: 0 auto; - color: $text-color; background-color: $background-color; max-width: calc(#{$full-content-width + $navi-width} + 1px); /* add the right-hand "navi" for centering - and the border... ;-) */ } #-frame { /* Add a frame, full height */ margin: 0 $navi-width; - padding-top: 1em; + padding-top: $outer-margin; border-left: solid $text-color 1px; - min-height: calc(100vh); + min-height: calc(100vh - #{$outer-margin}); } /* The content of the frame */ @@ -66,7 +83,7 @@ body { /* This centers us in the page, and handles the "too wide" case */ #-content { margin-left: $intrusion-width; padding: $outer-margin; - padding-top: 1px; /* If we use 0 here, things get ugly. What?!? */ + padding-top: 1px; /* If we use 0 here, some paddings add up things get ugly. What?!? */ } /* Navigation menu */ @@ -97,14 +114,11 @@ body { /* This centers us in the page, and handles the "too wide" case */ /* Always have a border, for the width to stay constant */ border: solid transparent 1px; - color: $link-color; font-size:110%; - text-decoration: none; text-align: left; } a.current { - padding-top: 0.1em; - margin: 0.05em 0; + padding: 0.05em 0.1em; border: solid $text-color 1px; border-right: solid $background-color 1px; background-color: $background-color; @@ -114,9 +128,6 @@ body { /* This centers us in the page, and handles the "too wide" case */ border-bottom: solid $text-color 1px; margin-bottom: 0.3em; } - a:hover, a:focus { - text-decoration: underline; - } } /* Medium-size screens */ @@ -241,11 +252,4 @@ body { /* This centers us in the page, and handles the "too wide" case */ margin: 0.5em 0; line-height: 1.3; } - a { - text-decoration: none; - color: $link-color; - } - a:hover, a:focus { - text-decoration: underline; - } } -- 2.30.2