Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/nikola
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b07ef5dca4d3
Choose a base ref
...
head repository: getnikola/nikola
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e50f7289e7d5
Choose a head ref
  • 2 commits
  • 7 files changed
  • 1 contributor

Commits on Sep 7, 2015

  1. more simplification

    ralsina committed Sep 7, 2015
    Copy the full SHA
    f00cca5 View commit details
  2. jinjified

    ralsina committed Sep 7, 2015
    Copy the full SHA
    e50f728 View commit details
1 change: 1 addition & 0 deletions nikola/data/themes/base-jinja/templates/listing.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
{% import 'crumbs.tmpl' as ui with context %}

{% block content %}
{{ ui.bar(crumbs) }}
{% if folders or files %}
1 change: 1 addition & 0 deletions nikola/data/themes/base/templates/listing.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%namespace name="ui" file="crumbs.tmpl" import="bar"/>

<%block name="content">
${ui.bar(crumbs)}
%if folders or files:
4 changes: 2 additions & 2 deletions nikola/data/themes/bootstrap3-jinja/templates/authors.tmpl
Original file line number Diff line number Diff line change
@@ -2,10 +2,9 @@
{% extends 'base.tmpl' %}

{% block content %}
<article class="authorindex">
{% if items %}
<h2>{{ messages("Authors") }}</h2>
{% endif %}
{% if items %}
<ul class="list-inline">
{% for text, link in items %}
{% if text not in hidden_authors %}
@@ -14,4 +13,5 @@
{% endfor %}
</ul>
{% endif %}
</article>
{% endblock %}
89 changes: 15 additions & 74 deletions nikola/data/themes/bootstrap3-jinja/templates/base_helper.tmpl
Original file line number Diff line number Diff line change
@@ -1,74 +1,9 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base-jinja/templates/base_helper.tmpl' %}
{% extends 'base/templates/base_helper.tmpl' %}
{% import 'annotation_helper.tmpl' as notes with context %}
{% macro html_headstart() %}
<!DOCTYPE html>
<html

{% if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) or (comment_system == 'facebook') %}
prefix='
{% if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) %}
og: http://ogp.me/ns#
{% endif %}
{% if use_open_graph %}
article: http://ogp.me/ns/article#
{% endif %}
{% if comment_system == 'facebook' %}
fb: http://ogp.me/ns/fb#
{% endif %}
'
{% endif %}

{% if is_rtl %}
dir="rtl"
{% endif %}

lang="{{ lang }}">
<head>
<meta charset="utf-8">
{% if use_base_tag %}
<base href="{{ abs_link(permalink) }}">
{% endif %}
{% if description %}
<meta name="description" content="{{ description }}">
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1">
{% if title == blog_title %}
<title>{{ blog_title|e }}</title>
{% else %}
<title>{{ title|e }} | {{ blog_title|e }}</title>
{% endif %}

{{ html_stylesheets() }}
<meta content="{{ theme_color }}" name="theme-color">
{{ html_feedlinks() }}
<link rel="canonical" href="{{ abs_link(permalink) }}">

{% if favicons %}
{% for name, file, size in favicons %}
<link rel="{{ name }}" href="{{ file }}" sizes="{{ size }}"/>
{% endfor %}
{% endif %}

{% if comment_system == 'facebook' %}
<meta property="fb:app_id" content="{{ comment_system_id }}">
{% endif %}

{% if prevlink %}
<link rel="prev" href="{{ prevlink }}" type="text/html">
{% endif %}
{% if nextlink %}
<link rel="next" href="{{ nextlink }}" type="text/html">
{% endif %}

{{ mathjax_config }}
{% if use_cdn %}
<!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
{% else %}
<!--[if lt IE 9]><script src="{{ url_replacer(permalink, '/assets/js/html5.js', lang) }}"></script><![endif]-->
{% endif %}

{{ extra_head_data }}
{% macro html_headstart() %}
{{ parent.html_headstart() }}
{% endmacro %}

{% macro late_load_js() %}
@@ -98,7 +33,6 @@ lang="{{ lang }}">
{{ social_buttons_code }}
{% endmacro %}


{% macro html_stylesheets() %}
{% if use_bundles %}
{% if use_cdn %}
@@ -132,6 +66,18 @@ lang="{{ lang }}">
{% endif %}
{% endmacro %}

{% macro html_feedlinks() %}
{{ parent.html_feedlinks() }}
{% endmacro %}

{% macro html_translations() %}
{% for langname in translations|sort %}
{% if langname != lang %}
<li><a href="{{ abs_link(_link("root", None, langname)) }}" rel="alternate" hreflang="{{ langname }}">{{ messages("LANGUAGE", langname) }}</a></li>
{% endif %}
{% endfor %}
{% endmacro %}

{% macro html_navigation_links() %}
{% for url, text in navigation_links[lang] %}
{% if isinstance(url, tuple) %}
@@ -154,8 +100,3 @@ lang="{{ lang }}">
{% endif %}
{% endfor %}
{% endmacro %}


{% macro html_feedlinks() %}
{{ parent.html_feedlinks() }}
{% endmacro %}
55 changes: 9 additions & 46 deletions nikola/data/themes/bootstrap3-jinja/templates/post.tmpl
Original file line number Diff line number Diff line change
@@ -2,58 +2,21 @@
{% import 'post_helper.tmpl' as helper with context %}
{% import 'post_header.tmpl' as pheader with context %}
{% import 'comments_helper.tmpl' as comments with context %}
{% import 'base/templates/post.tmpl' as base with context %}
{% extends 'base.tmpl' %}

{% block extra_head %}
{{ super() }}
{% if post.meta('keywords') %}
<meta name="keywords" content="{{ post.meta('keywords')|e }}">
{% endif %}
{% if post.description() %}
<meta name="description" itemprop="description" content="{{ post.description() }}">
{% endif %}
<meta name="author" content="{{ post.author() }}">
{% if post.prev_post %}
<link rel="prev" href="{{ post.prev_post.permalink() }}" title="{{ post.prev_post.title()|e }}" type="text/html">
{% endif %}
{% if post.next_post %}
<link rel="next" href="{{ post.next_post.permalink() }}" title="{{ post.next_post.title()|e }}" type="text/html">
{% endif %}
{% if post.is_draft %}
<meta name="robots" content="noindex">
{% endif %}
{{ helper.open_graph_metadata(post) }}
{{ helper.twitter_card_information(post) }}
{{ helper.meta_translations(post) }}
{% endblock %}

{% block content %}
<article class="post-{{ post.meta('type') }} h-entry hentry postpage" itemscope="itemscope" itemtype="http://schema.org/Article">
{{ pheader.html_post_header() }}
<div class="e-content entry-content" itemprop="articleBody text">
{{ post.text() }}
</div>
<aside class="postpromonav">
<nav>
{{ helper.html_tags(post) }}
{{ helper.html_pager(post) }}
</nav>
</aside>
{% if not post.meta('nocomments') and site_has_comments %}
<section class="comments hidden-print">
<h2>{{ messages("Comments") }}</h2>
{{ comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path) }}
</section>
{% endif %}
{{ helper.mathjax_script(post) }}
</article>
{{ comments.comment_link_script() }}
{% endblock %}

{% block sourcelink %}
{% if show_sourcelink %}
<li>
<a href="{{ post.source_link() }}" id="sourcelink">{{ messages("Source") }}</a>
</li>
{% endif %}
{% endblock %}

{% block extra_head %}
{{ base.extra_head() }}
{% endblock %}

{% block content %}
{{ base.content() }}
{% endblock %}
4 changes: 2 additions & 2 deletions nikola/data/themes/bootstrap3/templates/authors.tmpl
Original file line number Diff line number Diff line change
@@ -2,10 +2,9 @@
<%inherit file="base.tmpl"/>

<%block name="content">
<article class="authorindex">
% if items:
<h2>${messages("Authors")}</h2>
% endif
% if items:
<ul class="list-inline">
% for text, link in items:
% if text not in hidden_authors:
@@ -14,4 +13,5 @@
% endfor
</ul>
% endif
</article>
</%block>
94 changes: 14 additions & 80 deletions nikola/data/themes/bootstrap3/templates/base_helper.tmpl
Original file line number Diff line number Diff line change
@@ -1,74 +1,9 @@
## -*- coding: utf-8 -*-
<%inherit file="base/templates/base_helper.tmpl"/>
<%namespace name="notes" file="annotation_helper.tmpl" import="*" />
<%def name="html_headstart()">
<!DOCTYPE html>
<html
\
% if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) or (comment_system == 'facebook'):
prefix='\
%if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']):
og: http://ogp.me/ns# \
%endif
%if use_open_graph:
article: http://ogp.me/ns/article# \
%endif
%if comment_system == 'facebook':
fb: http://ogp.me/ns/fb# \
%endif
'\
%endif
\
% if is_rtl:
dir="rtl" \
% endif
\
lang="${lang}">
<head>
<meta charset="utf-8">
% if use_base_tag:
<base href="${abs_link(permalink)}">
% endif
%if description:
<meta name="description" content="${description}">
%endif
<meta name="viewport" content="width=device-width, initial-scale=1">
%if title == blog_title:
<title>${blog_title|h}</title>
%else:
<title>${title|h} | ${blog_title|h}</title>
%endif

${html_stylesheets()}
<meta content="${theme_color}" name="theme-color">
${html_feedlinks()}
<link rel="canonical" href="${abs_link(permalink)}">

%if favicons:
%for name, file, size in favicons:
<link rel="${name}" href="${file}" sizes="${size}"/>
%endfor
%endif

% if comment_system == 'facebook':
<meta property="fb:app_id" content="${comment_system_id}">
% endif

%if prevlink:
<link rel="prev" href="${prevlink}" type="text/html">
%endif
%if nextlink:
<link rel="next" href="${nextlink}" type="text/html">
%endif

${mathjax_config}
%if use_cdn:
<!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
%else:
<!--[if lt IE 9]><script src="${url_replacer(permalink, '/assets/js/html5.js', lang)}"></script><![endif]-->
%endif

${extra_head_data}
<%def name="html_headstart()">
${parent.html_headstart()}
</%def>

<%def name="late_load_js()">
@@ -98,7 +33,6 @@ lang="${lang}">
${social_buttons_code}
</%def>


<%def name="html_stylesheets()">
%if use_bundles:
%if use_cdn:
@@ -132,6 +66,18 @@ lang="${lang}">
% endif
</%def>

<%def name="html_feedlinks()">
${parent.html_feedlinks()}
</%def>

<%def name="html_translations()">
%for langname in sorted(translations):
%if langname != lang:
<li><a href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li>
%endif
%endfor
</%def>

<%def name="html_navigation_links()">
%for url, text in navigation_links[lang]:
% if isinstance(url, tuple):
@@ -154,15 +100,3 @@ lang="${lang}">
% endif
%endfor
</%def>

<%def name="html_translations()">
%for langname in sorted(translations):
%if langname != lang:
<li><a href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li>
%endif
%endfor
</%def>

<%def name="html_feedlinks()">
${parent.html_feedlinks()}
</%def>