Browse Source

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.
main
Merlin 11 years ago
committed by Lakshmi Vyasarajan
parent
commit
5b4c14b7f7
8 changed files with 29 additions and 31 deletions
  1. +2
    -2
      hyde/layouts/starter/content/advanced/grouper.html
  2. +13
    -6
      hyde/layouts/starter/content/advanced/overview.html
  3. +1
    -1
      hyde/layouts/starter/content/advanced/sorter.html
  4. +1
    -1
      hyde/layouts/starter/content/advanced/tagger.html
  5. +6
    -8
      hyde/layouts/starter/content/media/css/style.css
  6. +1
    -7
      hyde/layouts/starter/layout/base.j2
  7. +4
    -5
      hyde/layouts/starter/layout/macros.j2
  8. +1
    -1
      hyde/layouts/starter/site.yaml

+ 2
- 2
hyde/layouts/starter/content/advanced/grouper.html View File

@@ -23,7 +23,7 @@ Walking all groups and subgroups
*{{ grp.description }}* *{{ grp.description }}*


{% for res in res_walker %} {% for res in res_walker %}
* [{{ res.slug|capitalize|replace("-"," ") }}]({{ res.full_url }}) \
* [{{ res.slug|capitalize|replace("-"," ") }}]({{ res.full_url }})
({{ res.name }}) ({{ res.name }})
{% endfor %} {% endfor %}


@@ -37,7 +37,7 @@ Listing only the specific (sub)group
------------------------------------ ------------------------------------


{% for res in site.content.walk_resources_grouped_by_advanced() %} {% 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 }}) ({{ res.name }})
{% endfor %} {% endfor %}




+ 13
- 6
hyde/layouts/starter/content/advanced/overview.html View File

@@ -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. 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.
#}
<ol>
{% for res in resource.node.walk_resources_sorted_by_learning_order() %} {% 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
#} #}
<li><a href="{{ res.full_url }}">{{ res.meta.title }}</a>
{% if res.name == "overview.html" %}(this file) {% endif %}

<span class="tags">tags: <span class="tags">tags:
{% for tag in res.meta.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 %} {{ tag }}{% if tag != res.meta.tags[-1] %},{% endif %}
{% endfor %} {% endfor %}
</span> </span>
</li>
{% endfor %} {% endfor %}
</ol>


{{ macros.render_bottom_article_nav() }} {{ macros.render_bottom_article_nav() }}

+ 1
- 1
hyde/layouts/starter/content/advanced/sorter.html View File

@@ -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. Also, some new Jinja filters were used to style the output.
#} #}
{% for res in site.content.walk_resources_sorted_by_name() %} {% 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 }}) ({{ res.name }})
{% endfor %} {% endfor %}




+ 1
- 1
hyde/layouts/starter/content/advanced/tagger.html View File

@@ -25,7 +25,7 @@ Listing by tags


{# ... and get all resurces tagged with that node. #} {# ... and get all resurces tagged with that node. #}
{% for res in resource.node.walk_resources_tagged_with(tag) %} {% 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 }}) ({{ res.name }})
{% endfor %} {% endfor %}




+ 6
- 8
hyde/layouts/starter/content/media/css/style.css View File

@@ -14,7 +14,7 @@ body {
min-height: 700px; min-height: 700px;
background: url('../img/background.jpg') top left no-repeat; background: url('../img/background.jpg') top left no-repeat;
position: relative; position: relative;
font-size: 14px;
font-size: 16px;
font-family: Tahoma, sans-serif; font-family: Tahoma, sans-serif;
} }


@@ -58,7 +58,7 @@ header h1 span {
color: #f1ee00; color: #f1ee00;
} }


header h2 {
header p {
font-size: 28px; font-size: 28px;
font-weight: normal; font-weight: normal;
letter-spacing: 11px; letter-spacing: 11px;
@@ -101,8 +101,7 @@ nav, aside {
} }


#content { #content {
/*font-size: 14px;*/
line-height: 22px;
line-height: 1.5em;
position: absolute; position: absolute;
top: 350px; top: 350px;
left: 180px; left: 180px;
@@ -121,16 +120,15 @@ nav, aside {


#content h2 { #content h2 {
font-weight: bold; font-weight: bold;
font-size: 17px;
font-size: 18px;
font-family: Tahoma, sans-serif; font-family: Tahoma, sans-serif;
margin-bottom: 22px; margin-bottom: 22px;
color: white;
border-bottom: 1px dashed #888; border-bottom: 1px dashed #888;
} }


#content code { #content code {
display: block; display: block;
font-family: 'DejaVu Sans Mono', 'Liberation Mono', 'Courier New';
font-family: monospace;
font-size: 12px; font-size: 12px;
background-color: #222; background-color: #222;
padding: 5px 10px; padding: 5px 10px;
@@ -142,7 +140,7 @@ nav, aside {
} }


#content .tags { #content .tags {
font-size: 8px;
font-size: 14px;
color: #888; color: #888;
} }




+ 1
- 7
hyde/layouts/starter/layout/base.j2 View File

@@ -7,17 +7,11 @@
| {{ resource.meta.title}}{%-endif %}</title> | {{ resource.meta.title}}{%-endif %}</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="stylesheet" href="{{ media_url('css/style.css') }}"> <link rel="stylesheet" href="{{ media_url('css/style.css') }}">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->
</head> </head>
<body> <body>
<header> <header>
<hgroup>
<h1><span>Hyde</span> Starter Kit</h1> <h1><span>Hyde</span> Starter Kit</h1>
<h2>Know your tool</h2>
</hgroup>
<p>Know your tool</p>
</header> </header>
<nav> <nav>
{# Move main menu rendering away from the base layout. This {# Move main menu rendering away from the base layout. This


+ 4
- 5
hyde/layouts/starter/layout/macros.j2 View File

@@ -3,10 +3,10 @@
#} #}
{% macro render_basic_menu() -%} {% macro render_basic_menu() -%}
<ul class="basic"> <ul class="basic">
{% for menu_item in menu -%}
<li><a {% if (menu_item.url == resource.url) %}class="selected" {% endif -%}
{% for menu_item in menu %}
<li><a {% if (menu_item.url == resource.relative_path) %}class="selected" {% endif -%}
href="{{ content_url(menu_item.url) }}">{{ menu_item.title }}</a></li> href="{{ content_url(menu_item.url) }}">{{ menu_item.title }}</a></li>
{%- endfor %}
{% endfor %}
</ul> </ul>
{%- endmacro %} {%- endmacro %}


@@ -19,8 +19,7 @@
<ul class="advanced"> <ul class="advanced">
{% for res in site.content.walk_resources_sorted_by_index() %} {% for res in site.content.walk_resources_sorted_by_index() %}
<li><a {% if (res.url == resource.url) %}class="selected" {% endif -%} <li><a {% if (res.url == resource.url) %}class="selected" {% endif -%}
href="{{ res.full_url }}">{{ res.meta.title }}
</a></li>
href="{{ res.full_url }}">{{ res.meta.title }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{%- endmacro %} {%- endmacro %}


+ 1
- 1
hyde/layouts/starter/site.yaml View File

@@ -26,7 +26,7 @@ context:
project: project:
name: Hyde name: Hyde
url: "http://hyde.github.com" url: "http://hyde.github.com"
install: "http://hyde.github.com/install.html"
install: "https://github.com/hyde/hyde#installation"
menu: menu:
- title: Home - title: Home
url: index.html url: index.html


Loading…
Cancel
Save