Browse Source

various small formatting fixes & h-entry experiments

transformations
rra 7 years ago
parent
commit
8ca9518d6f
  1. 43
      themes/varia/templates/article.html
  2. 24
      themes/varia/templates/base.html
  3. 14
      themes/varia/templates/syndication.html

43
themes/varia/templates/article.html

@ -1,30 +1,26 @@
{% extends "base.html" %}
{% block head %}
{{ super() }}
{% if article.description %}
<meta name="description" content="{{article.description}}" />
{% endif %}
{{ super() }}
{% if article.description %}
<meta name="description" content="{{article.description}}" />
{% endif %}
{% if article.tags or article.category or article.keywords %}
<meta name="keywords" content="{{ [article.tags|join(', '), article.category, article.keywords]|join(', ') }}" />
{% endif %}
{% if article.tags or article.category or article.keywords %}
<meta name="keywords" content="{{ [article.tags|join(', '), article.category, article.keywords]|join(', ') }}" />
{% endif %}
{% endblock %}
<div class="file type_folder">
<a title="../" href="/log/" id="link0" class="type_folder"><img alt="../" src="/icons/back.png" class="type_folder"></a>
</br>
<span class="filename">../</span>
{% block content %}
<section id="content" class="body h-entry">
<header id="banner">
{% block content %}
<header id="banner">
{% for p in pages %}
{% if p.title == 'header' %}
<div id="title">{{ p.content }}</div>
{% endif %}
{% endfor %}
</header>
</header>
<section id="content" class="body h-entry">
<div class="entry-title p-name">
{{ article.title }}
</div>
@ -37,7 +33,6 @@
{% set thumb_size =''%}
{% endif %}
<img src="{{ article.featured_image | replace('images','images'+thumb_size) }}">
</a>
{% endif %}
</div>
@ -57,24 +52,20 @@
{% if article.translations %}
<div class="article-translation">
{% for translation in article.translations %}
{% if translation.lang == 'nl' %}
<a href="{{ translation.url }}">Lees dit artikel in het Nederlands</a>
{% if translation.lang == 'nl' %}<a href="{{ translation.url }}">Lees dit artikel in het Nederlands</a>
{% endif %}
{% if translation.lang == 'en' %}
<a href="{{ translation.url }}">Read this article in English</a>
{% if translation.lang == 'en' %}<a href="{{ translation.url }}">Read this article in English</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
</div>
<div class="entry-content-container">
<div class="entry-content-container">
<div class="entry-content e-content">
{{ article.content }}
<div class="separator"><hr></div>
</div><!-- /.entry-content -->
</div><!-- /.entry-content-container -->
</section>
</div><!-- /.entry-content-container -->
</section>
{% endblock %}

24
themes/varia/templates/base.html

@ -2,14 +2,14 @@
<html lang="{{ DEFAULT_LANG }}">
<head>
{% block head %}
<title>{% block title %}{{ SITENAME }} {{SITESUBTITLE}}{% endblock title %}</title>
<meta charset="utf-8" />
<link rel="icon" href="{{ SITEURL}}/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="{{ SITEURL }}/favicon.ico" type="image/x-icon">
{% from 'syndication.html' import syndication with context %}
{{ syndication(article) }}
<link rel="stylesheet" type="text/css" href="/{{ THEME_STATIC_DIR }}css/pygment.css" />
<link rel="stylesheet" type="text/css" href="/{{ THEME_STATIC_DIR }}css/{{ CSS_FILE }}" />
<title>{% block title %}{{ SITENAME }} {{SITESUBTITLE}}{% endblock title %}</title>
<meta charset="utf-8" />
<link rel="icon" href="{{ SITEURL}}/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="{{ SITEURL }}/favicon.ico" type="image/x-icon">
{% from 'syndication.html' import syndication with context %}
{{ syndication(article) }}
<link rel="stylesheet" type="text/css" href="/{{ THEME_STATIC_DIR }}css/pygment.css" />
<link rel="stylesheet" type="text/css" href="/{{ THEME_STATIC_DIR }}css/{{ CSS_FILE }}" />
{% endblock head %}
</head>
@ -17,11 +17,9 @@
<div id="translation">
{% if I18N_SUBSITES %}
{% for lang, url in I18N_SUBSITES.items() %}
{% if lang == 'nl' %}
<li{% if lang == DEFAULT_LANG %} class="active"{% endif %}><a href="/">{{ lang }}</a></li>
{% if lang == 'nl' %}<li>{% if lang == DEFAULT_LANG %} class="active"{% endif %}><a href="/">{{ lang }}</a></li>
{% endif %}
{% if lang == 'en' %}
<li{% if lang == DEFAULT_LANG %} class="active"{% endif %}><a href="/{{ lang }}/">{{ lang }}</a></li>
{% if lang == 'en' %}<li>{% if lang == DEFAULT_LANG %} class="active"{% endif %}><a href="/{{ lang }}/">{{ lang }}</a></li>
{% endif %}
{% endfor %}
{% endif %}
@ -30,9 +28,7 @@
<li><a href="feeds/all-{{ DEFAULT_LANG }}.rss.xml" type="application/rss+xml"><i class="fa fa-rss "></i>RSS</a></li>
{% endif %}
</div>
{% block content %}
{% endblock %}
</body>
</html>

14
themes/varia/templates/syndication.html

@ -27,24 +27,20 @@ serves as the default image for posts whose featured_image is not set. #}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %}">
<meta name="twitter:description" content="{% if article.summary %}{{article.summary|striptags}}{% endif %}">
{% if article.featured_image %}
{% if I18N_SUBSITES %}
{% for lang, url in I18N_SUBSITES.items() %}
{% if lang == 'en' %}
<!-- this is a dirty hack, FIXME -->
<meta property="og:image" content="http://varia.zone{{article.featured_image}}" />
<meta property="og:image:secure_url" content="https://varia.zone{{article.featured_image}}" />
<meta name="twitter:image" content="https://varia.zone{{article.featured_image}}" >
<meta property="og:image" content="http://varia.zone{{article.featured_image}}" />
<meta property="og:image:secure_url" content="https://varia.zone{{article.featured_image}}" />
<meta name="twitter:image" content="https://varia.zone{{article.featured_image}}" >
{% endif %}
{% endfor %}
{% endif %}
{% else %}
{% if FEATURED_IMAGE %}
{% if FEATURED_IMAGE %}
<meta property="og:image" content="{{FEATURED_IMAGE}}" />
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
{% endif %}
{% endif %}
{% endif %}

Loading…
Cancel
Save