Skip to content

Instantly share code, notes, and snippets.

@wouterj
Created January 28, 2014 16:05
Show Gist options
  • Select an option

  • Save wouterj/8670531 to your computer and use it in GitHub Desktop.

Select an option

Save wouterj/8670531 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<!-- ... -->
</head>
<body class="page">
<!-- ... -->
{% block hero_unit_wrapper -%}
<section class="page__sub-header article--featured grid grid--center">
{% block hero_unit -%}
<h1 class="sub-header__content grid__item one-half">{% block hero_unit_title %}{% endblock %}</h1>
{%- endblock %}
</section>
{% endblock -%}
<div class="page__main article-list grid">
{% block content_wrapper -%}
{% block content -%}{%- endblock %}
{%- endblock %}
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="/js/bigtext.js"></script>
<script>
$('.sub-header__content').bigtext();
</script>
</body>
</html>
---
layout: default
title: Home
generator: pagination
use:
- posts
---
{% block hero_unit_title -%}
{% set hero_post = page.pagination.items|first %}
<div>{{ hero_post.title|replace({' \\ ': '</div><div>'})|raw }}</div>
{%- endblock %}
{% block content -%}
<!--
{% for post in page.pagination.items %}
--><article class="article grid__item one-half">
<header class="article__header">
<time class="article__time">{{ post.date|date('d/M') }}</time>
<h1 class="article__title"><a href="{{ post.url }}">{{ post.title|replace({' \\': ''}) }}</a></h1>
</header>
<img src="http://placehold.it/100" class="article__thumbnail">
<p class="article__excerpt">
{{ post.blocks.content|split("\n\n")[0]|replace({"<p>": "", "</p>": ""})|raw }}
</p>
</article><!--
{% endfor %}
-->
{%- endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment