Skip to content

Commit

Permalink
Updates templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Aug 10, 2016
1 parent 514f7aa commit 99a38df
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 86 deletions.
6 changes: 1 addition & 5 deletions layouts/404.html → layouts/404.html.twig
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">

{% include 'include/head.html' %}

<body>

<section id="main">
<div>
<h1 id="title">{{ page.title }}</h1>
</div>
</section>

</body>
</html>
</html>
15 changes: 3 additions & 12 deletions layouts/_default/list.html → layouts/_default/list.html.twig
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">

{% include 'include/head.html' %}

<body>

{% include 'include/sidebar.html' %}

<div class="content container">
<div class="posts">
{% for post in site.pages|filterBySection(page.pathname)|sortByDate %}
{% for post in site.pages|filterBySection(page.pathname)|sortByDate %}
<div class="post">
<h1 class="post-title">
<a href="{{ url(post) }}">
{{ post.title }}
</a>
<a href="{{ url(post) }}">{{ post.title }}</a>
</h1>

<span class="post-date">{{ post.date|date("j M Y") }}</span>

{{ post.content|excerpt }}
{{ post.content|excerpt }}
</div>
{% endfor %}
</div>
</div>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">

{% include 'include/head.html' %}

<body>

{% include 'include/sidebar.html' %}

<div class="content container">
<h1 class="page-title">{{ page.title }}</h1>
{{ page.content }}
{{ page.content }}
</div>

</body>
</html>
</html>
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">

{% include 'include/head.html' %}

<body>

{% include 'include/sidebar.html' %}

<div class="content container">
<h1 class="page-title">{{ page.singular|title }} "{{ page.title }}"</h1>
<ul>
{% for term in page.pages|sortByDate %}
{% for term in page.pages|sortByDate %}
<li>
<a href="{{ url(term) }}">{{ term.title }}</a>
</li>
{% endfor %}
{% endfor %}
</ul>
</div>

</body>
</html>
15 changes: 5 additions & 10 deletions layouts/_default/terms.html → layouts/_default/terms.html.twig
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
{% include 'include/head.html' %}

<body>

{% include 'include/sidebar.html' %}

<div class="content container">
<h1>{{ page.plural }}</h1>
<ul>
{% for name, term in page.terms %}
{% for name, term in page.terms %}
<li><h2><a href="{{ url(page.plural ~ '/' ~ name) }}">{{ name }}</a> ({{ term|length }})</h2>
<ul>
{% for page in term %}
{% for page in term %}
<li><a href="{{ url(page) }}">{{ page.title }}</a></li>
{% endfor %}
{% endfor %}
</ul>
</li>
{% endfor %}
{% endfor %}
</ul>
</div>

</body>
</html>
17 changes: 6 additions & 11 deletions layouts/blog/page.html → layouts/blog/page.html.twig
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">

{% include 'include/head.html' %}

<body>

{% include 'include/sidebar.html' %}

<div class="content container">
<h1 class="page-title">{{ page.title }}</h1>
{% if page.date %}
{% if page.date %}
<span class="post-date">{{ page.date|date("j M Y") }}</span>
{% endif %}
{{ page.content }}
{% endif %}
{{ page.content }}
<p>
{% for tag in page.tags %}
{% for tag in page.tags %}
<a href="{{ url('tags/' ~ tag) }}">#{{ tag }}</a>&nbsp;
{% endfor %}
{% endfor %}
</p>
</div>

</body>
</html>
</html>
25 changes: 10 additions & 15 deletions layouts/include/head.html → layouts/include/head.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,27 @@
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">

<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">

<title>
{% if page.title == "Home" %}
{{ site.title }} &middot; {{ site.baseline }}
{% else %}
{{ page.title }} &middot; {{ site.title }}
{% endif %}
{% if page.title == "Home" %}
{{ site.title }} &middot; {{ site.baseline }}
{% else %}
{{ page.title }} &middot; {{ site.title }}
{% endif %}
</title>

<!-- CSS -->
<link rel="stylesheet" href="{{ url() }}public/css/poole.css">
<link rel="stylesheet" href="{{ url() }}public/css/syntax.css">
<link rel="stylesheet" href="{{ url() }}public/css/hyde.css">
<link rel="stylesheet" href="{{ url(minify('public/css/poole.css')) }}">
<link rel="stylesheet" href="{{ url(minify('public/css/syntax.css')) }}">
<link rel="stylesheet" href="{{ url(minify('public/css/hyde.css')) }}">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">

<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ url() }}public/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="{{ url() }}public/favicon.ico">

<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">

<!-- Highlight JS -->
<link rel="stylesheet" href="https://highlightjs.org/static/demo/styles/monokai_sublime.css">
<script src="https://highlightjs.org/static/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
</head>
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ <h1>
</h1>
<p class="lead">{{ site.description }}</p>
</div>

<nav class="sidebar-nav">

{% for menu in site.menus.main|sortByWeight %}
{% for menu in site.menus.main|sortByWeight %}
<a class="sidebar-nav-item{% if page.pathname == menu.url %} active{% endif %}" href="{{ url(menu.url) }}">{{ menu.name }}</a>
{% endfor %}

{% endfor %}
</nav>

<p>Powered by <a href="{{ phpoole.url }}">{{ phpoole.poweredby }}</a> & <a href="http://hyde.getpoole.com">Hyde</a>.</p>
</div>
</div>
17 changes: 4 additions & 13 deletions layouts/index.html → layouts/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">

{% include 'include/head.html' %}

<body>

{% include 'include/sidebar.html' %}

<div class="content container">
<div class="posts">
{% for post in site.pages|filterBySection('blog')|sortByDate|slice(0, 5) %}
{% for post in site.pages|filterBySection('blog')|sortByDate|slice(0, 5) %}
<div class="post">
<h1 class="post-title">
<a href="{{ url(post) }}">
{{ post.title }}
</a>
<a href="{{ url(post) }}">{{ post.title }}</a>
</h1>

<span class="post-date">{{ post.date|date("j M Y") }}</span>

{{ post.content|excerpt }}
{{ post.content|excerpt }}
</div>
{% endfor %}
{% endfor %}
</div>
</div>

</body>
</html>
File renamed without changes.

0 comments on commit 99a38df

Please sign in to comment.