4 changed files with 115 additions and 62 deletions
@ -1,30 +1,29 @@
|
||||
{% macro render_blog_post(post, from_index=false) %} |
||||
|
||||
<div class="post-preview"> |
||||
<div class="row"> |
||||
<div class="col-md-4"> |
||||
{% if from_index %}<h2><a href="{{ post|url }}"><img style="margin-top:11%" src="{{post.thumbnail}}"/></a></h2>{% else %}<h2><img style="margin-top:11%" src="{{post.thumbnail}}"/></h2>{% endif %} |
||||
</div> |
||||
<div class="col-md-8"> |
||||
{% if from_index %}<a href="{{ post|url }}"><h2 class="post-title">{{ post.title }}</h2></a> |
||||
{% if from_index %} |
||||
<div class="post-preview"> |
||||
<div class="row"> |
||||
<div class="col-md-4"> |
||||
{% if from_index %}<h2><a href="{{ post|url }}"><img style="margin-top:11%" src="{{post.thumbnail}}"/></a></h2>{% else %}<h2><img style="margin-top:11%" src="{{post.thumbnail}}"/></h2>{% endif %} |
||||
</div> |
||||
<div class="col-md-8"> |
||||
{% if from_index %}<a href="{{ post|url }}"><h2 class="post-title">{{ post.title }}</h2></a> |
||||
{% else %} |
||||
<h2 class="post-title">{{ post.title }}</h2> |
||||
{% endif %} |
||||
<p class="post-meta" style="font-size:0.9em;"> |
||||
Posted on {{ post.pub_date }} by {% if post.twitter_handle %}<a href="https://twitter.com/{{ post.twitter_handle }}">{{ post.author or post.twitter_handle }}</a>{% else %}{{ post.author }} {% endif %} |
||||
</p> |
||||
<p class="post-subtitle"> |
||||
<p> |
||||
{{ post.abstract }} |
||||
</p> |
||||
</p> |
||||
</div> |
||||
</div> |
||||
<hr> |
||||
</div> |
||||
{% else %} |
||||
<h2 class="post-title">{{ post.title }}</h2> |
||||
{{ post.body }} |
||||
{% endif %} |
||||
|
||||
<p class="post-meta" style="font-size:0.9em;"> |
||||
Posted on {{ post.pub_date }} by {% if post.twitter_handle %}<a href="https://twitter.com/{{ post.twitter_handle }}">{{ post.author or post.twitter_handle }}</a>{% else %}{{ post.author }} {% endif %} |
||||
</p> |
||||
<p class="post-subtitle"> |
||||
<p> |
||||
{% if from_index %} |
||||
{{ post.abstract }} |
||||
{% else %} |
||||
{{ post.body }} |
||||
{% endif %} |
||||
</p> |
||||
</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<hr> |
||||
|
||||
{% endmacro %} |
||||
|
@ -1,6 +1,45 @@
|
||||
{% extends "layout.html" %} |
||||
{% block title %}{{ this.title }}{% endblock %} |
||||
<header> |
||||
<h1>{{ self.title() }}</h1> |
||||
<nav> |
||||
<ul class="nav navbar-nav"> |
||||
<li{% if this._path == '/' %} class="active"{% endif |
||||
%}><a href="{{ '/'|url }}">ungleich.ch</a></li> |
||||
{% for href, title in [ |
||||
['/u/blog', 'the new ungleich blog'], |
||||
] %} |
||||
<li{% if this.is_child_of(href) %} class="active"{% endif |
||||
%}><a href="{{ href|url }}">{{ title }}</a></li> |
||||
{% endfor %} |
||||
</ul> |
||||
</nav> |
||||
</header> |
||||
{% block body %} |
||||
<h2>{{ this.title }}</h2> |
||||
{{ this.body }} |
||||
<header class="intro-header" style="background-image: url('/u/static/images/home-bg.jpg');"> |
||||
<div class="container"> |
||||
<div class="row"> |
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> |
||||
<div class="site-heading"> |
||||
<h1>{{ this.title }}</h1> |
||||
<hr class="small"> |
||||
<span class="subheading"></span> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</header> |
||||
<div class="container"> |
||||
<div class="row"> |
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> |
||||
<div class="app app-blog span8"> |
||||
<article> |
||||
<div class="blog-content"> |
||||
{{ this.body }} |
||||
</div> |
||||
</article> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{% endblock %} |
||||
|
Loading…
Reference in new issue