diff --git a/themes/kwant/templates/base.tmpl b/themes/kwant/templates/base.tmpl index 3b18c73b7110ed71b18918d7e99217ffecfc57d0..6f158ebe5114d1aa2721c88040fb917533232ad7 100644 --- a/themes/kwant/templates/base.tmpl +++ b/themes/kwant/templates/base.tmpl @@ -13,7 +13,7 @@ <!-- Menubar --> -<nav class="navbar navbar-default navbar-static-top" role="navigation"> +<nav class="navbar navbar-default" role="navigation"> <div class="container"><!-- This keeps the margins nice --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> @@ -22,7 +22,7 @@ <span class="icon-bar"></span> <span class="icon-bar"></span> </button> - <a class="navbar-brand" href="{{ abs_link(_link("root", None, lang)) }}"> + <p><a class="navbar-brand" href="{{ abs_link(_link("root", None, lang)) }}"></p> {% if logo_url %} <img src="{{ logo_url }}" alt="{{ blog_title }}" id="logo"> {% endif %} diff --git a/themes/kwant/templates/post_header.tmpl b/themes/kwant/templates/post_header.tmpl new file mode 100644 index 0000000000000000000000000000000000000000..e5bd7de9debed3f353e6ae9d729b18d5463fad72 --- /dev/null +++ b/themes/kwant/templates/post_header.tmpl @@ -0,0 +1,55 @@ +{# -*- coding: utf-8 -*- #} +{% import 'post_helper.tmpl' as helper with context %} +{% import 'comments_helper.tmpl' as comments with context %} + +{% macro html_title() %} +{% if title and not post.meta('hidetitle') %} + <h1 class="p-name entry-title" itemprop="headline name">{{ post.title()|e }}</h1> +{% endif %} +{% endmacro %} + +{% macro html_translations(post) %} + {% if post.translated_to|length > 1 %} + <div class="metadata posttranslations translations"> + <h3 class="posttranslations-intro">{{ messages("Also available in:") }}</h3> + {% for langname in translations|sort %} + {% if langname != lang and post.is_translation_available(langname) %} + <p><a href="{{ post.permalink(langname) }}" rel="alternate" hreflang="{{ langname }}">{{ messages("LANGUAGE", langname) }}</a></p> + {% endif %} + {% endfor %} + </div> + {% endif %} +{% endmacro %} + +{% macro html_sourcelink() %} + {% if show_sourcelink %} + <p class="sourceline"><a href="{{ post.source_link() }}" id="sourcelink">{{ messages("Source") }}</a></p> + {% endif %} +{% endmacro %} + +{% macro html_post_header() %} + <header> + {{ html_title() }} + <div class="metadata"> + <p class="byline author vcard"><span class="byline-name fn"> + {% if author_pages_generated %} + <a href="{{ _link('author', post.author()) }}">{{ post.author()|e }}</a> + {% else %} + {{ post.author()|e }} + {% endif %} + </span></p> + <p class="dateline"><a href="{{ post.permalink() }}" rel="bookmark"><time class="published dt-published" datetime="{{ post.formatted_date('webiso') }}" itemprop="datePublished" title="{{ post.formatted_date(date_format)|e }}">{{ post.formatted_date(date_format)|e }}</time></a></p> + {% if not post.meta('nocomments') and site_has_comments %} + <p class="commentline">{{ comments.comment_link(post.permalink(), post._base_path) }} + {% endif %} + {{ html_sourcelink() }} + {% if post.meta('link') %} + <p class="linkline"><a href="{{ post.meta('link') }}">{{ messages("Original site") }}</a></p> + {% endif %} + {% if post.description() %} + <meta name="description" itemprop="description" content="{{ post.description()|e }}"> + {% endif %} + </div> + {{ html_translations(post) }} + </header> +{% endmacro %}