Improve all templates: blog/page/blog-post
This commit is contained in:
parent
3740799f86
commit
84e1ae8eda
4 changed files with 118 additions and 65 deletions
|
@ -3,6 +3,19 @@
|
|||
{% from "macros/pagination.html" import render_pagination %}
|
||||
{% block title %}{{ this.title }}{% endblock %}
|
||||
{% block 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>ungleich blog</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">
|
||||
|
|
|
@ -57,44 +57,46 @@
|
|||
</div>
|
||||
</nav>
|
||||
<!-- Navigation END -->
|
||||
<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>ungleich blog</h1>
|
||||
<hr class="small">
|
||||
<span class="subheading"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
<div class="page">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
<footer>
|
||||
© Copyright 2019 by <a href="https://ungleich.ch">ungleich</a>.
|
||||
</footer>
|
||||
<hr />
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<ul class="list-inline text-center">
|
||||
<li>
|
||||
<a href="https://twitter.com/ungleich">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.linkedin.com/company/ungleich-gmbh">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/ungleich">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright">
|
||||
Copyright © ungleich GmbH 2019
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% macro render_blog_post(post, from_index=false) %}
|
||||
|
||||
{% if from_index %}
|
||||
<div class="post-preview">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
@ -10,21 +10,20 @@
|
|||
{% 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>
|
||||
{% if from_index %}
|
||||
{{ post.abstract }}
|
||||
{% else %}
|
||||
{{ post.body }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ post.body }}
|
||||
{% endif %}
|
||||
|
||||
{% 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>
|
||||
<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 a new issue