Browse Source

More work on the basic template

main
Lakshmi Vyasarajan 14 years ago
parent
commit
f4b03e8c7f
6 changed files with 62 additions and 13 deletions
  1. +8
    -0
      hyde/layouts/basic/content/about.html
  2. +15
    -1
      hyde/layouts/basic/content/index.html
  3. +20
    -2
      hyde/layouts/basic/content/media/css/site.css
  4. +6
    -0
      hyde/layouts/basic/content/portfolio/index.html
  5. +2
    -10
      hyde/layouts/basic/layout/listing.j2
  6. +11
    -0
      hyde/layouts/basic/layout/macros.j2

+ 8
- 0
hyde/layouts/basic/content/about.html View File

@@ -0,0 +1,8 @@
---
extends: base.j2
default_block: main
title: About BASIC
description: The default hyde template
---

Ha Ha

+ 15
- 1
hyde/layouts/basic/content/index.html View File

@@ -1,6 +1,20 @@
---
extends: base.j2
default_block: main
title: BASIC - A hyde website
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&hellip;</a>

--- endif

</section>

+ 20
- 2
hyde/layouts/basic/content/media/css/site.css View File

@@ -42,12 +42,12 @@ table {
}

a {
color: black;
color: #666;
text-decoration: underline;
}

a:hover{
color: red;
color: #222;
}

body{
@@ -190,12 +190,30 @@ footer{
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{
font-size: 24px;
line-height: 36px;
border-bottom: 1px solid #ccc;
}

.blog_excerpt h3{
margin-bottom: 24px;
}

section.content{
padding: 12px;
}


+ 6
- 0
hyde/layouts/basic/content/portfolio/index.html View File

@@ -0,0 +1,6 @@
---
extends: base.j2
default_block: main
title: BASIC - Portfolio
description: Portfolio page in the BASIC hyde template
---

+ 2
- 10
hyde/layouts/basic/layout/listing.j2 View File

@@ -1,20 +1,12 @@
{% extends "base.j2" %}
{% from "macros.j2" import render_excerpt with context %}
{% block main %}
{% block page_title %}<h1 class="title">{{ resource.meta.title }}</h1>{% endblock %}

<ul class="listing clear">
{% for res in resource.node.walk_resources_sorted_by_time() %}
{% refer to res.url as post %}
<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>
{% endfor %}
</ul>

+ 11
- 0
hyde/layouts/basic/layout/macros.j2 View File

@@ -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 %}

Loading…
Cancel
Save