From 5b4c14b7f71bdb17b396438839faf7ce71d82cb2 Mon Sep 17 00:00:00 2001 From: Merlin Date: Tue, 25 Jun 2013 23:47:04 +0200 Subject: [PATCH] Refresh the starter template. * Conform to changes from the newest Hyde version. * Clean up Markdown and add explanations. * Increase font sizes. * Remove HTML5 shiv and hgroup element (deprecated). * Other minor improvements. --- .../starter/content/advanced/grouper.html | 4 ++-- .../starter/content/advanced/overview.html | 19 +++++++++++++------ .../starter/content/advanced/sorter.html | 2 +- .../starter/content/advanced/tagger.html | 2 +- .../starter/content/media/css/style.css | 14 ++++++-------- hyde/layouts/starter/layout/base.j2 | 8 +------- hyde/layouts/starter/layout/macros.j2 | 9 ++++----- hyde/layouts/starter/site.yaml | 2 +- 8 files changed, 29 insertions(+), 31 deletions(-) diff --git a/hyde/layouts/starter/content/advanced/grouper.html b/hyde/layouts/starter/content/advanced/grouper.html index 3dcee8e..c249664 100644 --- a/hyde/layouts/starter/content/advanced/grouper.html +++ b/hyde/layouts/starter/content/advanced/grouper.html @@ -23,7 +23,7 @@ Walking all groups and subgroups *{{ grp.description }}* {% for res in res_walker %} - * [{{ res.slug|capitalize|replace("-"," ") }}]({{ res.full_url }}) \ + * [{{ res.slug|capitalize|replace("-"," ") }}]({{ res.full_url }}) ({{ res.name }}) {% endfor %} @@ -37,7 +37,7 @@ Listing only the specific (sub)group ------------------------------------ {% for res in site.content.walk_resources_grouped_by_advanced() %} - * [{{ res.slug|capitalize|replace("-"," ") }}]({{ res.full_url }}) \ + * [{{ res.slug|capitalize|replace("-"," ") }}]({{ res.full_url }}) ({{ res.name }}) {% endfor %} diff --git a/hyde/layouts/starter/content/advanced/overview.html b/hyde/layouts/starter/content/advanced/overview.html index 4faa02e..ac35984 100644 --- a/hyde/layouts/starter/content/advanced/overview.html +++ b/hyde/layouts/starter/content/advanced/overview.html @@ -20,16 +20,21 @@ the same way as the basic part, building on the knowledge of the previous, so it is recommended that you follow them in the listed order. -{# List all resources from a group, sort them by index and list their tags. #} +{# List all resources from a group, sort them by index and list their tags. + Sometimes you'll have to add HTML to a Markdown file for styling + or adding some special features, and Markdown is OK with that. +#} +
    {% for res in resource.node.walk_resources_sorted_by_learning_order() %} -{{ loop.index }}. \ - [{{ res.slug|capitalize|replace("-"," ") }}]({{ res.full_url }}) \ - {% if res.name == "overview.html" %}*(this file)*{% endif %} \ {# - Sometimes you'll have to add HTML tags to a Markdown file for styling - or adding some special features, and Markdown is OK with that. + res.slug|capitalize|replace("-"," ") is just an example of how different + commands can be chained together, but many times it will be much easier + just to use meta data if a resource has it, like here -> res.meta.title #} +
  1. {{ res.meta.title }} + {% if res.name == "overview.html" %}(this file) {% endif %} + tags: {% for tag in res.meta.tags %} {# @@ -39,6 +44,8 @@ so it is recommended that you follow them in the listed order. {{ tag }}{% if tag != res.meta.tags[-1] %},{% endif %} {% endfor %} +
  2. {% endfor %} +
{{ macros.render_bottom_article_nav() }} diff --git a/hyde/layouts/starter/content/advanced/sorter.html b/hyde/layouts/starter/content/advanced/sorter.html index a529985..f7a7cf9 100644 --- a/hyde/layouts/starter/content/advanced/sorter.html +++ b/hyde/layouts/starter/content/advanced/sorter.html @@ -23,7 +23,7 @@ You can list and sort by name all your content files. Also, some new Jinja filters were used to style the output. #} {% for res in site.content.walk_resources_sorted_by_name() %} - * [{{ res.slug|capitalize|replace("-"," ") }}]({{ res.full_url }}) \ + * [{{ res.slug|capitalize|replace("-"," ") }}]({{ res.full_url }}) ({{ res.name }}) {% endfor %} diff --git a/hyde/layouts/starter/content/advanced/tagger.html b/hyde/layouts/starter/content/advanced/tagger.html index 435fb4d..65bea04 100644 --- a/hyde/layouts/starter/content/advanced/tagger.html +++ b/hyde/layouts/starter/content/advanced/tagger.html @@ -25,7 +25,7 @@ Listing by tags {# ... and get all resurces tagged with that node. #} {% for res in resource.node.walk_resources_tagged_with(tag) %} - * [{{ res.slug|capitalize|replace("-"," ") }}]({{ res.full_url }}) \ + * [{{ res.slug|capitalize|replace("-"," ") }}]({{ res.full_url }}) ({{ res.name }}) {% endfor %} diff --git a/hyde/layouts/starter/content/media/css/style.css b/hyde/layouts/starter/content/media/css/style.css index 56f2330..4be44d3 100644 --- a/hyde/layouts/starter/content/media/css/style.css +++ b/hyde/layouts/starter/content/media/css/style.css @@ -14,7 +14,7 @@ body { min-height: 700px; background: url('../img/background.jpg') top left no-repeat; position: relative; - font-size: 14px; + font-size: 16px; font-family: Tahoma, sans-serif; } @@ -58,7 +58,7 @@ header h1 span { color: #f1ee00; } -header h2 { +header p { font-size: 28px; font-weight: normal; letter-spacing: 11px; @@ -101,8 +101,7 @@ nav, aside { } #content { - /*font-size: 14px;*/ - line-height: 22px; + line-height: 1.5em; position: absolute; top: 350px; left: 180px; @@ -121,16 +120,15 @@ nav, aside { #content h2 { font-weight: bold; - font-size: 17px; + font-size: 18px; font-family: Tahoma, sans-serif; margin-bottom: 22px; - color: white; border-bottom: 1px dashed #888; } #content code { display: block; - font-family: 'DejaVu Sans Mono', 'Liberation Mono', 'Courier New'; + font-family: monospace; font-size: 12px; background-color: #222; padding: 5px 10px; @@ -142,7 +140,7 @@ nav, aside { } #content .tags { - font-size: 8px; + font-size: 14px; color: #888; } diff --git a/hyde/layouts/starter/layout/base.j2 b/hyde/layouts/starter/layout/base.j2 index 16ceaa3..56e71c3 100644 --- a/hyde/layouts/starter/layout/base.j2 +++ b/hyde/layouts/starter/layout/base.j2 @@ -7,17 +7,11 @@ | {{ resource.meta.title}}{%-endif %} -
-

Hyde Starter Kit

-

Know your tool

-
+

Know your tool