@@ -0,0 +1,8 @@ | |||||
--- | |||||
extends: base.j2 | |||||
default_block: main | |||||
title: About BASIC | |||||
description: The default hyde template | |||||
--- | |||||
Ha Ha |
@@ -1,6 +1,20 @@ | |||||
--- | --- | ||||
extends: base.j2 | |||||
default_block: main | |||||
title: BASIC - A hyde website | title: BASIC - A hyde website | ||||
description: Home page for the BASIC hyde template | description: Home page for the BASIC hyde template | ||||
--- | --- | ||||
Ha Ha | |||||
{% from "macros.j2" import render_excerpt with context %} | |||||
<section class="blog_excerpt"> | |||||
{% set latest = site.content.walk_resources_sorted_by_time()|first %} | |||||
--- if latest: | |||||
{{ render_excerpt(latest, 'post') }} | |||||
<a class="button white medium" | |||||
href="{{ content_url(latest.url) }}">Read more…</a> | |||||
--- endif | |||||
</section> |
@@ -42,12 +42,12 @@ table { | |||||
} | } | ||||
a { | a { | ||||
color: black; | |||||
color: #666; | |||||
text-decoration: underline; | text-decoration: underline; | ||||
} | } | ||||
a:hover{ | a:hover{ | ||||
color: red; | |||||
color: #222; | |||||
} | } | ||||
body{ | body{ | ||||
@@ -190,12 +190,30 @@ footer{ | |||||
color: #000; | color: #000; | ||||
} | } | ||||
.blog_excerpt{ | |||||
padding-bottom: 24px; | |||||
} | |||||
.blog_excerpt .post time{ | |||||
float: none; | |||||
clear: left; | |||||
} | |||||
.blog_excerpt .button{ | |||||
float: right; | |||||
} | |||||
.blog_excerpt h3, | |||||
h1.title{ | h1.title{ | ||||
font-size: 24px; | font-size: 24px; | ||||
line-height: 36px; | line-height: 36px; | ||||
border-bottom: 1px solid #ccc; | border-bottom: 1px solid #ccc; | ||||
} | } | ||||
.blog_excerpt h3{ | |||||
margin-bottom: 24px; | |||||
} | |||||
section.content{ | section.content{ | ||||
padding: 12px; | padding: 12px; | ||||
} | } | ||||
@@ -0,0 +1,6 @@ | |||||
--- | |||||
extends: base.j2 | |||||
default_block: main | |||||
title: BASIC - Portfolio | |||||
description: Portfolio page in the BASIC hyde template | |||||
--- |
@@ -1,20 +1,12 @@ | |||||
{% extends "base.j2" %} | {% extends "base.j2" %} | ||||
{% from "macros.j2" import render_excerpt with context %} | |||||
{% block main %} | {% block main %} | ||||
{% block page_title %}<h1 class="title">{{ resource.meta.title }}</h1>{% endblock %} | {% block page_title %}<h1 class="title">{{ resource.meta.title }}</h1>{% endblock %} | ||||
<ul class="listing clear"> | <ul class="listing clear"> | ||||
{% for res in resource.node.walk_resources_sorted_by_time() %} | {% for res in resource.node.walk_resources_sorted_by_time() %} | ||||
{% refer to res.url as post %} | |||||
<li> | <li> | ||||
<article> | |||||
<h3><a href="{{ content_url(res.url) }}">{{ res.meta.title }}</a></h3> | |||||
<a href="{{ content_url(res.url) }}">{{ post.image|markdown|typogrify }}</a> | |||||
{{ post.excerpt|markdown|typogrify }} | |||||
<time datetime="{{ res.meta.created.strftime('%Y-%m-%d') }}"> | |||||
Posted: {{ res.meta.created.strftime('%a, %d %b %Y') }} | |||||
</time> | |||||
</article> | |||||
{{ render_excerpt(res) }} | |||||
</li> | </li> | ||||
{% endfor %} | {% endfor %} | ||||
</ul> | </ul> |
@@ -0,0 +1,11 @@ | |||||
{% macro render_excerpt(res, class=None) %} | |||||
{% refer to res.url as post %} | |||||
<article {{'class='~class if class }}> | |||||
<h3><a href="{{ content_url(res.url) }}">{{ res.meta.title }}</a></h3> | |||||
<a href="{{ content_url(res.url) }}">{{ post.image|markdown|typogrify }}</a> | |||||
{{ post.excerpt|markdown|typogrify }} | |||||
<time datetime="{{ res.meta.created.strftime('%Y-%m-%d') }}"> | |||||
Posted: {{ res.meta.created.strftime('%a, %d %b %Y') }} | |||||
</time> | |||||
</article> | |||||
{% endmacro %} |