From a80ebb6f0e0537a1b6492edf3c2275ce56baa7d9 Mon Sep 17 00:00:00 2001 From: Merlin Date: Fri, 6 Jan 2012 13:17:19 +0100 Subject: [PATCH] Updates and improves the "starter" template. * Cleans up CSS. * Handles page title endings more elegantly. * Renders the advanced menu below the basic one. * Corrects and updates content. * Explains how to generate and serve the template. * Makes it more straightforward to contribute. --- hyde/layouts/starter/content/about.html | 12 ++++-- .../starter/content/advanced/grouper.html | 2 +- .../starter/content/advanced/overview.html | 2 +- .../starter/content/advanced/sorter.html | 2 +- .../starter/content/advanced/tagger.html | 2 +- hyde/layouts/starter/content/first-steps.html | 6 +-- .../starter/content/media/css/style.css | 37 +++++++----------- hyde/layouts/starter/layout/base.j2 | 17 ++++---- hyde/layouts/starter/layout/macros.j2 | 39 ++++++++++++------- hyde/layouts/starter/site.yaml | 2 - 10 files changed, 62 insertions(+), 59 deletions(-) diff --git a/hyde/layouts/starter/content/about.html b/hyde/layouts/starter/content/about.html index 7f9de05..33a6a22 100644 --- a/hyde/layouts/starter/content/about.html +++ b/hyde/layouts/starter/content/about.html @@ -1,6 +1,6 @@ --- extends: base.j2 -title_ending: "| About" +title: About default_block: content --- @@ -14,8 +14,14 @@ write: hyde -s folder_name create -l starter -To check for the newest version, to download it separately or to report -a bug, please visit Hyde Starter Kit's [GitHub page][3]. +To build and serve the template, type: + + cd folder_name + hyde gen + hyde serve + +To check for the newest version, download it separately, report a bug +or contribute, please visit Hyde Starter Kit's [GitHub page][3]. Attributions diff --git a/hyde/layouts/starter/content/advanced/grouper.html b/hyde/layouts/starter/content/advanced/grouper.html index 2aa7309..3dcee8e 100644 --- a/hyde/layouts/starter/content/advanced/grouper.html +++ b/hyde/layouts/starter/content/advanced/grouper.html @@ -1,6 +1,6 @@ --- index: 3 -title_ending: "| Grouping" +title: Grouping tags: - sort - group diff --git a/hyde/layouts/starter/content/advanced/overview.html b/hyde/layouts/starter/content/advanced/overview.html index f5505fe..4faa02e 100644 --- a/hyde/layouts/starter/content/advanced/overview.html +++ b/hyde/layouts/starter/content/advanced/overview.html @@ -1,6 +1,6 @@ --- index: 1 -title_ending: "| Advanced topics" +title: Advanced topics tags: - sort - group diff --git a/hyde/layouts/starter/content/advanced/sorter.html b/hyde/layouts/starter/content/advanced/sorter.html index 557645f..a529985 100644 --- a/hyde/layouts/starter/content/advanced/sorter.html +++ b/hyde/layouts/starter/content/advanced/sorter.html @@ -1,6 +1,6 @@ --- index: 2 -title_ending: "| Sorting" +title: Sorting tags: - sort learning_order: 1 diff --git a/hyde/layouts/starter/content/advanced/tagger.html b/hyde/layouts/starter/content/advanced/tagger.html index 8bb6d9d..435fb4d 100644 --- a/hyde/layouts/starter/content/advanced/tagger.html +++ b/hyde/layouts/starter/content/advanced/tagger.html @@ -1,6 +1,6 @@ --- index: 4 -title_ending: "| Tagging" +title: Tagging tags: - sort - tag diff --git a/hyde/layouts/starter/content/first-steps.html b/hyde/layouts/starter/content/first-steps.html index fa363d2..355df23 100644 --- a/hyde/layouts/starter/content/first-steps.html +++ b/hyde/layouts/starter/content/first-steps.html @@ -1,6 +1,6 @@ --- extends: base.j2 -title_ending: "| First steps" +title: First steps --- {# In-file metadata. Supplements data from the site's configuration file and node (folder) level data in "meta.yaml" files. @@ -77,8 +77,8 @@ content with Jinja templates. While searching and navigating this template you'll find more files and sections than mentioned on this page (something like **meta.yaml** -files, the **content/advanced** folder or other Jinja templates). They -are files needed for the [advanced topics](advanced/overview.html) so +files, the **content/advanced** folder or other Jinja templates). Those +files are needed for the [advanced topics](advanced/overview.html) so just ignore them at the beginning. They will start to make sense while you're working through the template or will be explicitly explained when the right time comes. diff --git a/hyde/layouts/starter/content/media/css/style.css b/hyde/layouts/starter/content/media/css/style.css index 5a6345b..56f2330 100644 --- a/hyde/layouts/starter/content/media/css/style.css +++ b/hyde/layouts/starter/content/media/css/style.css @@ -13,10 +13,8 @@ body { width: 980px; min-height: 700px; background: url('../img/background.jpg') top left no-repeat; - font-size: 14px; position: relative; - - font-size: 62.5%; + font-size: 14px; font-family: Tahoma, sans-serif; } @@ -33,11 +31,11 @@ a:hover, a:focus { } p, ul, ol { - margin-bottom: 1.6em; + margin-bottom: 22px; } ul, ol { - margin-left: 2em; + margin-left: 28px; } header { @@ -82,7 +80,7 @@ nav a:visited { text-decoration: none; color: white; text-transform: uppercase; - font-size: 2.8em; + font-size: 28px; } nav a.selected { @@ -97,23 +95,14 @@ nav ul li { list-style-type: none; } -aside { - position: absolute; - top: 550px; - right: 120px; - width: 140px; - text-align: right; - font-size: 1em; -} - nav, aside { /* to line up with the header */ padding-right: 5px; } #content { - font-size: 1.4em; - line-height: 1.6em; + /*font-size: 14px;*/ + line-height: 22px; position: absolute; top: 350px; left: 180px; @@ -123,18 +112,18 @@ nav, aside { #content h1 { font-weight: normal; - font-size: 2em; + font-size: 28px; font-family: Anton, Tahoma, sans-serif; text-transform: uppercase; - margin-bottom: 0.8em; + margin-bottom: 22px; color: white; } #content h2 { font-weight: bold; - font-size: 1.2em; + font-size: 17px; font-family: Tahoma, sans-serif; - margin-bottom: 1.33em; + margin-bottom: 22px; color: white; border-bottom: 1px dashed #888; } @@ -142,10 +131,10 @@ nav, aside { #content code { display: block; font-family: 'DejaVu Sans Mono', 'Liberation Mono', 'Courier New'; - font-size: 1.2em; + font-size: 12px; background-color: #222; padding: 5px 10px; - margin-bottom: 1.33em; + margin-bottom: 20px; border-top: 1px solid #444; border-right: 1px solid #333; border-bottom: 1px solid #222; @@ -153,7 +142,7 @@ nav, aside { } #content .tags { - font-size: 0.8em; + font-size: 8px; color: #888; } diff --git a/hyde/layouts/starter/layout/base.j2 b/hyde/layouts/starter/layout/base.j2 index 9c79ef8..16ceaa3 100644 --- a/hyde/layouts/starter/layout/base.j2 +++ b/hyde/layouts/starter/layout/base.j2 @@ -1,8 +1,10 @@ - - Hyde Starter Kit {{ resource.meta.title_ending }} + + Hyde Starter Kit {% if resource.meta.title-%} + | {{ resource.meta.title}}{%-endif %}