diff options
Diffstat (limited to 'nikola/data')
136 files changed, 2424 insertions, 852 deletions
diff --git a/nikola/data/samplesite/README.txt b/nikola/data/samplesite/README.txt index aeea39c..da0d685 100644 --- a/nikola/data/samplesite/README.txt +++ b/nikola/data/samplesite/README.txt @@ -1,6 +1,6 @@ -This folder contains the source used to generate a static site by nikola. +This folder contains the source used to generate a static site using Nikola. -Installation and documentation at http://getnikola.com +Installation and documentation at https://getnikola.com/ Configuration file for the site is `conf.py`. @@ -12,7 +12,7 @@ To see it:: nikola serve -And point your browser to http://localhost:8000 +And point your browser to http://localhost:8000/ To check all available commands:: diff --git a/nikola/data/samplesite/posts/1.rst b/nikola/data/samplesite/posts/1.rst index 7116a7a..9a55859 100644 --- a/nikola/data/samplesite/posts/1.rst +++ b/nikola/data/samplesite/posts/1.rst @@ -3,22 +3,25 @@ .. date: 2012-03-30 23:00:00 UTC-03:00 .. tags: nikola, python, demo, blog .. author: Roberto Alsina -.. link: http://getnikola.com +.. link: https://getnikola.com/ .. description: +.. category: nikola .. figure:: http://farm1.staticflickr.com/138/352972944_4f9d568680.jpg :target: http://farm1.staticflickr.com/138/352972944_4f9d568680_z.jpg?zz=1 :class: thumbnail :alt: Nikola Tesla Corner by nicwest, on Flickr -If you can see this in a web browser, it means you have managed to install Nikola, +If you can see this in a web browser, it means you managed to install Nikola, and build a site using it. Congratulations! -* You can read the manual `here </stories/handbook.html>`__ -* You can learn more about Nikola at http://getnikola.com -* You can see a demo photo gallery `here </galleries/demo/index.html>`__ -* Demo usage of listings `here </stories/listings-demo.html>`__ -* Demo of slideshows `here </stories/slides-demo.html>`__ -* Demo of Bootstrap `here </stories/bootstrap-demo.html>`__ +Next steps: -Send feedback to ralsina@netmanagers.com.ar! +* `Read the manual </stories/handbook.html>`__ +* `Visit the Nikola website to learn more <https://getnikola.com>`__ +* `See a demo photo gallery </galleries/demo/index.html>`__ +* `See a demo listing </stories/listings-demo.html>`__ +* `See a demo slideshow </stories/slides-demo.html>`__ +* `See a demo of the Bootstrap theme </stories/bootstrap-demo.html>`__ + +Send feedback to info@getnikola.com! diff --git a/nikola/data/samplesite/stories/1.rst b/nikola/data/samplesite/stories/1.rst index b662fae..abe1d0b 100644 --- a/nikola/data/samplesite/stories/1.rst +++ b/nikola/data/samplesite/stories/1.rst @@ -7,5 +7,5 @@ Hope you enjoy this software! -* Home page at http://getnikola.com -* Author's blog (and reason why Nikola exists): http://ralsina.me +* Home page at https://getnikola.com/ +* Author's blog (and reason why Nikola exists): http://ralsina.me/ diff --git a/nikola/data/samplesite/stories/bootstrap-demo.rst b/nikola/data/samplesite/stories/bootstrap-demo.rst index a7be1a9..481140a 100644 --- a/nikola/data/samplesite/stories/bootstrap-demo.rst +++ b/nikola/data/samplesite/stories/bootstrap-demo.rst @@ -2,7 +2,7 @@ .. slug: bootstrap-demo .. date: 2012-03-30 23:00:00 UTC-03:00 .. tags: bootstrap, demo -.. link: http://getnikola.com +.. link: https://getnikola.com .. description: diff --git a/nikola/data/samplesite/stories/upgrading-to-v6.txt b/nikola/data/samplesite/stories/upgrading-to-v6.txt deleted file mode 120000 index b514b70..0000000 --- a/nikola/data/samplesite/stories/upgrading-to-v6.txt +++ /dev/null @@ -1 +0,0 @@ -../../../../docs/upgrading-to-v6.txt
\ No newline at end of file diff --git a/nikola/data/symlink-test-link.txt b/nikola/data/symlink-test-link.txt new file mode 120000 index 0000000..bd0f6c1 --- /dev/null +++ b/nikola/data/symlink-test-link.txt @@ -0,0 +1 @@ +symlink-test-orig.txt
\ No newline at end of file diff --git a/nikola/data/symlink-test-orig.txt b/nikola/data/symlink-test-orig.txt new file mode 100644 index 0000000..6242bf3 --- /dev/null +++ b/nikola/data/symlink-test-orig.txt @@ -0,0 +1,4 @@ +NIKOLA_SYMLINKS=OK + +This is a test file for symlink detection, used to test compatibility with +Microsoft Windows. diff --git a/nikola/data/symlinked.txt b/nikola/data/symlinked.txt index 5a08781..aae8ea1 100644 --- a/nikola/data/symlinked.txt +++ b/nikola/data/symlinked.txt @@ -5,29 +5,21 @@ docs/sphinx/internals.txt docs/sphinx/manual.txt docs/sphinx/social_buttons.txt docs/sphinx/theming.txt -docs/sphinx/upgrading-to-v6.txt nikola/data/samplesite/stories/creating-a-theme.rst nikola/data/samplesite/stories/extending.txt nikola/data/samplesite/stories/internals.txt nikola/data/samplesite/stories/manual.rst nikola/data/samplesite/stories/social_buttons.txt nikola/data/samplesite/stories/theming.rst -nikola/data/samplesite/stories/upgrading-to-v6.txt +nikola/data/symlink-test-link.txt +nikola/data/themes/base/assets/js/moment-with-locales.min.js nikola/data/themes/base/messages/messages_cz.py -nikola/data/themes/bootstrap-jinja/assets/css/bootstrap-responsive.css -nikola/data/themes/bootstrap-jinja/assets/css/bootstrap-responsive.min.css -nikola/data/themes/bootstrap-jinja/assets/css/bootstrap.css -nikola/data/themes/bootstrap-jinja/assets/css/bootstrap.min.css nikola/data/themes/bootstrap-jinja/assets/css/colorbox.css nikola/data/themes/bootstrap-jinja/assets/css/images/controls.png nikola/data/themes/bootstrap-jinja/assets/css/images/loading.gif -nikola/data/themes/bootstrap-jinja/assets/css/theme.css -nikola/data/themes/bootstrap-jinja/assets/img/glyphicons-halflings-white.png -nikola/data/themes/bootstrap-jinja/assets/img/glyphicons-halflings.png -nikola/data/themes/bootstrap-jinja/assets/js/bootstrap.js -nikola/data/themes/bootstrap-jinja/assets/js/bootstrap.min.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-ar.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-bg.js +nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-bn.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-ca.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-cs.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-da.js @@ -52,7 +44,7 @@ nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-my.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-nl.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-no.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pl.js -nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js +nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-ro.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-ru.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-si.js @@ -63,9 +55,9 @@ nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-tr.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-uk.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-zh-CN.js nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-zh-TW.js -nikola/data/themes/bootstrap-jinja/assets/js/flowr.plugin.js nikola/data/themes/bootstrap-jinja/assets/js/jquery.colorbox-min.js nikola/data/themes/bootstrap-jinja/assets/js/jquery.colorbox.js +nikola/data/themes/bootstrap-jinja/assets/js/jquery.js nikola/data/themes/bootstrap-jinja/assets/js/jquery.min.js nikola/data/themes/bootstrap-jinja/assets/js/jquery.min.map nikola/data/themes/bootstrap-jinja/bundles @@ -74,6 +66,7 @@ nikola/data/themes/bootstrap/assets/css/images/controls.png nikola/data/themes/bootstrap/assets/css/images/loading.gif nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-ar.js nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-bg.js +nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-bn.js nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-ca.js nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-cs.js nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-da.js @@ -98,7 +91,7 @@ nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-my.js nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-nl.js nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-no.js nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-pl.js -nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js +nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-ro.js nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-ru.js nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-si.js @@ -111,6 +104,7 @@ nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-zh-CN.js nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-zh-TW.js nikola/data/themes/bootstrap/assets/js/jquery.colorbox-min.js nikola/data/themes/bootstrap/assets/js/jquery.colorbox.js +nikola/data/themes/bootstrap/assets/js/jquery.js nikola/data/themes/bootstrap/assets/js/jquery.min.js nikola/data/themes/bootstrap/assets/js/jquery.min.map nikola/data/themes/bootstrap3-jinja/assets/css/bootstrap-theme.css @@ -119,21 +113,11 @@ nikola/data/themes/bootstrap3-jinja/assets/css/bootstrap-theme.min.css nikola/data/themes/bootstrap3-jinja/assets/css/bootstrap.css nikola/data/themes/bootstrap3-jinja/assets/css/bootstrap.css.map nikola/data/themes/bootstrap3-jinja/assets/css/bootstrap.min.css -nikola/data/themes/bootstrap3-jinja/assets/css/docs.css -nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomCenter.png -nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomLeft.png -nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomRight.png -nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderMiddleLeft.png -nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderMiddleRight.png -nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopCenter.png -nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopLeft.png -nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopRight.png -nikola/data/themes/bootstrap3-jinja/assets/css/rst.css -nikola/data/themes/bootstrap3-jinja/assets/css/theme.css nikola/data/themes/bootstrap3-jinja/assets/fonts/glyphicons-halflings-regular.eot nikola/data/themes/bootstrap3-jinja/assets/fonts/glyphicons-halflings-regular.svg nikola/data/themes/bootstrap3-jinja/assets/fonts/glyphicons-halflings-regular.ttf nikola/data/themes/bootstrap3-jinja/assets/fonts/glyphicons-halflings-regular.woff +nikola/data/themes/bootstrap3-jinja/assets/fonts/glyphicons-halflings-regular.woff2 nikola/data/themes/bootstrap3-jinja/assets/js/bootstrap.js nikola/data/themes/bootstrap3-jinja/assets/js/bootstrap.min.js nikola/data/themes/bootstrap3-jinja/bundles @@ -147,5 +131,7 @@ nikola/data/themes/bootstrap3/assets/fonts/glyphicons-halflings-regular.eot nikola/data/themes/bootstrap3/assets/fonts/glyphicons-halflings-regular.svg nikola/data/themes/bootstrap3/assets/fonts/glyphicons-halflings-regular.ttf nikola/data/themes/bootstrap3/assets/fonts/glyphicons-halflings-regular.woff +nikola/data/themes/bootstrap3/assets/fonts/glyphicons-halflings-regular.woff2 nikola/data/themes/bootstrap3/assets/js/bootstrap.js nikola/data/themes/bootstrap3/assets/js/bootstrap.min.js +nikola/plugins/command/auto/livereload.js diff --git a/nikola/data/themes/base-jinja/templates/archiveindex.tmpl b/nikola/data/themes/base-jinja/templates/archiveindex.tmpl new file mode 100644 index 0000000..565732c --- /dev/null +++ b/nikola/data/themes/base-jinja/templates/archiveindex.tmpl @@ -0,0 +1,13 @@ +{# -*- coding: utf-8 -*- #} +{% extends 'index.tmpl' %} + +{% block extra_head %} + {{ super() }} + {% if translations|length > 1 and generate_atom %} + {% for language in translations %} + <link rel="alternate" type="application/atom+xml" title="Atom for the {{ archive_name }} section ({{ language }})" href="{{ _link("archive_atom", archive_name, language) }}"> + {% endfor %} + {% elif generate_atom %} + <link rel="alternate" type="application/atom+xml" title="Atom for the {{ archive_name }} archive" href="{{ _link("archive_atom", archive_name) }}"> + {% endif %} +{% endblock %} diff --git a/nikola/data/themes/base-jinja/templates/base.tmpl b/nikola/data/themes/base-jinja/templates/base.tmpl index 3768b9e..00ba9d7 100644 --- a/nikola/data/themes/base-jinja/templates/base.tmpl +++ b/nikola/data/themes/base-jinja/templates/base.tmpl @@ -14,7 +14,7 @@ <a href="#content" class="sr-only sr-only-focusable">{{ messages("Skip to main content") }}</a> <div id="container"> {{ header.html_header() }} - <main id="content"> + <main id="content" role="main"> {% block content %}{% endblock %} </main> {{ footer.html_footer() }} diff --git a/nikola/data/themes/base-jinja/templates/base_header.tmpl b/nikola/data/themes/base-jinja/templates/base_header.tmpl index 7947f68..9f79e72 100644 --- a/nikola/data/themes/base-jinja/templates/base_header.tmpl +++ b/nikola/data/themes/base-jinja/templates/base_header.tmpl @@ -16,7 +16,7 @@ {% endmacro %} {% macro html_site_title() %} - <h1 id="brand"><a href="{{ abs_link('/') }}" title="{{ blog_title }}" rel="home"> + <h1 id="brand"><a href="{{ abs_link(_link("root", None, lang)) }}" title="{{ blog_title }}" rel="home"> {% if logo_url %} <img src="{{ logo_url }}" alt="{{ blog_title }}" id="logo"> {% endif %} @@ -36,7 +36,7 @@ <ul> {% for suburl, text in url %} {% if rel_link(permalink, suburl) == "#" %} - <li class="active"><a href="{{ permalink }}">{{ text }}</a></li> + <li class="active"><a href="{{ permalink }}">{{ text }} <span class="sr-only">{{ messages("(active)", lang) }}</span></a></li> {% else %} <li><a href="{{ suburl }}">{{ text }}</a></li> {% endif %} @@ -44,7 +44,7 @@ </ul> {% else %} {% if rel_link(permalink, url) == "#" %} - <li class="active"><a href="{{ permalink }}">{{ text }}</a></li> + <li class="active"><a href="{{ permalink }}">{{ text }} <span class="sr-only">{{ messages("(active)", lang) }}</span></a></li> {% else %} <li><a href="{{ url }}">{{ text }}</a></li> {% endif %} diff --git a/nikola/data/themes/base-jinja/templates/base_helper.tmpl b/nikola/data/themes/base-jinja/templates/base_helper.tmpl index bd5d025..baa6810 100644 --- a/nikola/data/themes/base-jinja/templates/base_helper.tmpl +++ b/nikola/data/themes/base-jinja/templates/base_helper.tmpl @@ -2,28 +2,24 @@ {% macro html_headstart() %} <!DOCTYPE html> -<html - -{% if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) or (comment_system == 'facebook') %} +<html \ 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# +og: http://ogp.me/ns# article: http://ogp.me/ns/article# {% endif %} {% if comment_system == 'facebook' %} fb: http://ogp.me/ns/fb# {% endif %} -' +' \ +{% if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) %} +vocab="http://ogp.me/ns" \ {% endif %} - {% if is_rtl %} dir="rtl" {% endif %} lang="{{ lang }}"> - <head> +<head> <meta charset="utf-8"> {% if description %} <meta name="description" content="{{ description }}"> @@ -83,6 +79,10 @@ lang="{{ lang }}"> <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> {% endif %} {% endif %} + {% if needs_ipython_css %} + <link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css"> + {% endif %} {% endmacro %} {% macro html_feedlinks() %} @@ -97,13 +97,22 @@ lang="{{ lang }}"> <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ _link('rss', None) }}"> {% endif %} {% endif %} + {% if generate_atom %} + {% if translations|length > 1 %} + {% for language in translations %} + <link rel="alternate" type="application/atom+xml" title="Atom ({{ language }})" href="{{ _link('index_atom', None, language) }}"> + {% endfor %} + {% else %} + <link rel="alternate" type="application/atom+xml" title="Atom" href="{{ _link('index_atom', None) }}"> + {% endif %} + {% endif %} {% endmacro %} {% macro html_translations() %} <ul class="translations"> {% for langname in translations.keys() %} {% if langname != lang %} - <li><a href="{{ _link("index", None, langname) }}" rel="alternate" hreflang="{{ langname }}">{{ messages("LANGUAGE", langname) }}</a></li> + <li><a href="{{ abs_link(_link("root", None, langname)) }}" rel="alternate" hreflang="{{ langname }}">{{ messages("LANGUAGE", langname) }}</a></li> {% endif %} {% endfor %} </ul> diff --git a/nikola/data/themes/base-jinja/templates/comments_helper_disqus.tmpl b/nikola/data/themes/base-jinja/templates/comments_helper_disqus.tmpl index 8288bd4..0d40b0b 100644 --- a/nikola/data/themes/base-jinja/templates/comments_helper_disqus.tmpl +++ b/nikola/data/themes/base-jinja/templates/comments_helper_disqus.tmpl @@ -1,10 +1,4 @@ {# -*- coding: utf-8 -*- #} -<%! - import json - translations = { - 'es': 'es_ES', - } -%> {% macro comment_form(url, title, identifier) %} {% if comment_system_id %} @@ -17,7 +11,11 @@ disqus_title={{ title|tojson }}, disqus_identifier="{{ identifier }}", disqus_config = function () { - this.language = "{{ translations.get(lang, lang) }}"; + {% if lang == 'es' %} + this.language = "es_ES"; + {% else %} + this.language = "{{ lang }}"; + {% endif %} }; (function() { var dsq = document.createElement('script'); dsq.async = true; diff --git a/nikola/data/themes/base-jinja/templates/crumbs.tmpl b/nikola/data/themes/base-jinja/templates/crumbs.tmpl index eede9c2..970d509 100644 --- a/nikola/data/themes/base-jinja/templates/crumbs.tmpl +++ b/nikola/data/themes/base-jinja/templates/crumbs.tmpl @@ -5,7 +5,13 @@ <nav class="breadcrumbs"> <ul class="breadcrumb"> {% for link, text in crumbs %} - <li><a href="{{ link }}">{{ text }}</a></li> + {% if text != index_file %} + {% if link == '#' %} + <li>{{ text.rsplit('.html', 1)[0] }}</li> + {% else %} + <li><a href="{{ link }}">{{ text }}</a></li> + {% endif %} + {% endif %} {% endfor %} </ul> </nav> diff --git a/nikola/data/themes/base-jinja/templates/gallery.tmpl b/nikola/data/themes/base-jinja/templates/gallery.tmpl index 86eea12..0a53ebe 100644 --- a/nikola/data/themes/base-jinja/templates/gallery.tmpl +++ b/nikola/data/themes/base-jinja/templates/gallery.tmpl @@ -7,7 +7,7 @@ {% block content %} {{ ui.bar(crumbs) }} {% if title %} - <h1>{{ title }}</h1> + <h1>{{ title|e }}</h1> {% endif %} {% if post %} <p> @@ -34,3 +34,8 @@ {{ comments.comment_form(None, permalink, title) }} {% endif %} {% endblock %} + +{% block extra_head %} +{{ super() }} +<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml"> +{% endblock %} diff --git a/nikola/data/themes/base-jinja/templates/index.tmpl b/nikola/data/themes/base-jinja/templates/index.tmpl index 206fc34..fd9fcf4 100644 --- a/nikola/data/themes/base-jinja/templates/index.tmpl +++ b/nikola/data/themes/base-jinja/templates/index.tmpl @@ -3,15 +3,23 @@ {% import 'comments_helper.tmpl' as comments with context %} {% extends 'base.tmpl' %} +{% block extra_head %} + {{ super() }} + {% if posts and (permalink == '/' or permalink == '/' + index_file) %} + <link rel="prefetch" href="{{ posts[0].permalink() }}" type="text/html"> + {% endif %} +{% endblock %} + {% block content %} +{% block content_header %}{% endblock %} <div class="postindex"> {% for post in posts %} <article class="h-entry post-{{ post.meta('type') }}"> <header> - <h1 class="p-name entry-title"><a href="{{ post.permalink() }}" class="u-url">{{ post.title() }}</h1></a> + <h1 class="p-name entry-title"><a href="{{ post.permalink() }}" class="u-url">{{ post.title()|e }}</a></h1> <div class="metadata"> <p class="byline author vcard"><span class="byline-name fn">{{ post.author() }}</span></p> - <p class="dateline"><a href="{{ post.permalink() }}" rel="bookmark"><time class="published dt-published" datetime="{{ post.date.isoformat() }}" itemprop="datePublished" title="{{ messages("Publication date") }}">{{ post.formatted_date(date_format) }}</time></a></p> + <p class="dateline"><a href="{{ post.permalink() }}" rel="bookmark"><time class="published dt-published" datetime="{{ post.date.isoformat() }}" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</time></a></p> {% if not post.meta('nocomments') and site_has_comments %} <p class="commentline">{{ comments.comment_link(post.permalink(), post._base_path) }} {% endif %} diff --git a/nikola/data/themes/base-jinja/templates/list_post.tmpl b/nikola/data/themes/base-jinja/templates/list_post.tmpl index b90f237..166d8c4 100644 --- a/nikola/data/themes/base-jinja/templates/list_post.tmpl +++ b/nikola/data/themes/base-jinja/templates/list_post.tmpl @@ -9,7 +9,7 @@ {% if posts %} <ul class="postlist"> {% for post in posts %} - <li><a href="{{ post.permalink() }}" class="listtitle">{{ post.title() }}</a> <time class="listdate" datetime="{{ post.date.isoformat() }}" title="{{ messages("Publication date") }}">{{ post.formatted_date(date_format) }}</time></li> + <li><a href="{{ post.permalink() }}" class="listtitle">{{ post.title()|e }}</a> <time class="listdate" datetime="{{ post.date.isoformat() }}" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</time></li> {% endfor %} </ul> {% else %} diff --git a/nikola/data/themes/base-jinja/templates/post.tmpl b/nikola/data/themes/base-jinja/templates/post.tmpl index e6dc97b..28da35e 100644 --- a/nikola/data/themes/base-jinja/templates/post.tmpl +++ b/nikola/data/themes/base-jinja/templates/post.tmpl @@ -10,14 +10,17 @@ <meta name="keywords" content="{{ post.meta('keywords')|e }}"> {% endif %} {% if post.description() %} - <meta name="description" itemprop="description" content="{{ post.description() }}"> + <meta name="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() }}" type="text/html"> + <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() }}" type="text/html"> + <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) }} @@ -37,7 +40,7 @@ </nav> </aside> {% if not post.meta('nocomments') and site_has_comments %} - <section class="comments"> + <section class="comments hidden-print"> <h2>{{ messages("Comments") }}</h2> {{ comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path) }} </section> diff --git a/nikola/data/themes/base-jinja/templates/post_header.tmpl b/nikola/data/themes/base-jinja/templates/post_header.tmpl index 0ed40b9..00b6210 100644 --- a/nikola/data/themes/base-jinja/templates/post_header.tmpl +++ b/nikola/data/themes/base-jinja/templates/post_header.tmpl @@ -4,12 +4,12 @@ {% macro html_title() %} {% if title and not post.meta('hidetitle') %} - <h1 class="p-name entry-title" itemprop="headline name"><a href="{{ post.permalink() }}" class="u-url">{{ title|e }}</a></h1> + <h1 class="p-name entry-title" itemprop="headline name"><a href="{{ post.permalink() }}" class="u-url">{{ post.title()|e }}</a></h1> {% endif %} {% endmacro %} {% macro html_translations(post) %} - {% if translations|length > 1 %} + {% if post.translated_to|length > 1 %} <div class="metadata posttranslations translations"> <h3 class="posttranslations-intro">{{ messages("Also available in:") }}</h3> {% for langname in translations.keys() %} @@ -32,13 +32,13 @@ {{ html_title() }} <div class="metadata"> <p class="byline author vcard"><span class="byline-name fn">{{ post.author() }}</span></p> - <p class="dateline"><a href="{{ post.permalink() }}" rel="bookmark"><time class="published dt-published" datetime="{{ post.date.isoformat() }}" itemprop="datePublished" title="{{ messages("Publication date") }}">{{ post.formatted_date(date_format) }}</time></a></p> + <p class="dateline"><a href="{{ post.permalink() }}" rel="bookmark"><time class="published dt-published" datetime="{{ post.date.isoformat() }}" itemprop="datePublished" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</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><a href='{{ post.meta('link') }}'>{{ messages("Original site") }}</a></p> + <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() }}"> diff --git a/nikola/data/themes/base-jinja/templates/post_helper.tmpl b/nikola/data/themes/base-jinja/templates/post_helper.tmpl index 541cd31..ae0206b 100644 --- a/nikola/data/themes/base-jinja/templates/post_helper.tmpl +++ b/nikola/data/themes/base-jinja/templates/post_helper.tmpl @@ -14,7 +14,9 @@ {% if post.tags %} <ul itemprop="keywords" class="tags"> {% for tag in post.tags %} - <li><a class="tag p-category" href="{{ _link('tag', tag) }}" rel="tag">{{ tag }}</a></li> + {% if tag not in hidden_tags %} + <li><a class="tag p-category" href="{{ _link('tag', tag) }}" rel="tag">{{ tag }}</a></li> + {% endif %} {% endfor %} </ul> {% endif %} @@ -22,15 +24,15 @@ {% macro html_pager(post) %} {% if post.prev_post or post.next_post %} - <ul class="pager"> + <ul class="pager hidden-print"> {% if post.prev_post %} <li class="previous"> - <a href="{{ post.prev_post.permalink() }}" rel="prev" title="{{ post.prev_post.title() }}">{{ messages("Previous post") }}</a> + <a href="{{ post.prev_post.permalink() }}" rel="prev" title="{{ post.prev_post.title()|e }}">{{ messages("Previous post") }}</a> </li> {% endif %} {% if post.next_post %} <li class="next"> - <a href="{{ post.next_post.permalink() }}" rel="next" title="{{ post.next_post.title() }}">{{ messages("Next post") }}</a> + <a href="{{ post.next_post.permalink() }}" rel="next" title="{{ post.next_post.title()|e }}">{{ messages("Next post") }}</a> </li> {% endif %} </ul> @@ -39,15 +41,30 @@ {% macro open_graph_metadata(post) %} {% if use_open_graph %} - <meta name="og:title" content="{{ post.title()[:70]|e }}"> - <meta name="og:url" content="{{ abs_link(permalink) }}"> + <meta property="og:site_name" content="{{ blog_title|e }}"> + <meta property="og:title" content="{{ post.title()[:70]|e }}"> + <meta property="og:url" content="{{ abs_link(permalink) }}"> {% if post.description() %} - <meta name="og:description" content="{{ post.description()[:200]|e }}"> + <meta property="og:description" content="{{ post.description()[:200]|e }}"> {% else %} - <meta name="og:description" content="{{ post.text(strip_html=True)[:200]|e }}"> + <meta property="og:description" content="{{ post.text(strip_html=True)[:200]|e }}"> + {% endif %} + {% if post.previewimage %} + <meta property="og:image" content="{{ url_replacer(permalink, post.previewimage, lang, 'absolute') }}"> + {% endif %} + <meta property="og:type" content="article"> +{# Will only work with Pintrest and breaks everywhere else who expect a [Facebook] URI. #} +{# %if post.author(): #} +{# <meta property="article:author" content="{{ post.author() }}"> #} +{# %endif #} + {% if post.date.isoformat() %} + <meta property="article:published_time" content="{{ post.date.isoformat() }}"> + {% endif %} + {% if post.tags %} + {% for tag in post.tags %} + <meta property="article:tag" content="{{ tag }}"> + {% endfor %} {% endif %} - <meta name="og:site_name" content="{{ blog_title|e }}"> - <meta name="og:type" content="article"> {% endif %} {% endmacro %} diff --git a/nikola/data/themes/base-jinja/templates/post_list_directive.tmpl b/nikola/data/themes/base-jinja/templates/post_list_directive.tmpl index ceaec3f..92c1b7d 100644 --- a/nikola/data/themes/base-jinja/templates/post_list_directive.tmpl +++ b/nikola/data/themes/base-jinja/templates/post_list_directive.tmpl @@ -8,7 +8,7 @@ <li class="post-list-item"> {{ post.formatted_date(date_format) }} - <a href="{{ post.permalink(lang) }}">{{ post.title(lang) }}</a> + <a href="{{ post.permalink(lang) }}">{{ post.title(lang)|e }}</a> </li> {% endfor %} </ul> diff --git a/nikola/data/themes/base-jinja/templates/tag.tmpl b/nikola/data/themes/base-jinja/templates/tag.tmpl index 84f9e68..765c122 100644 --- a/nikola/data/themes/base-jinja/templates/tag.tmpl +++ b/nikola/data/themes/base-jinja/templates/tag.tmpl @@ -16,7 +16,18 @@ {% block content %} <article class="tagpage"> <header> - <h1>{{ title }}</h1> + <h1>{{ title|e }}</h1> + {% if description %} + <p>{{ description }}</p> + {% endif %} + {% if subcategories %} + {{ messages('Subcategories:') }} + <ul> + {% for name, link in subcategories %} + <li><a href="{{ link }}">{{ name }}</a></li> + {% endfor %} + </ul> + {% endif %} <div class="metadata"> {% if translations|length > 1 and generate_rss %} {% for language in translations %} @@ -32,7 +43,7 @@ {% if posts %} <ul class="postlist"> {% for post in posts %} - <li><a href="{{ post.permalink() }}" class="listtitle">{{ post.title() }}</a> <time class="listdate" datetime="{{ post.date.isoformat() }}" title="{{ messages("Publication date") }}">{{ post.formatted_date(date_format) }}</time></li> + <li><a href="{{ post.permalink() }}" class="listtitle">{{ post.title()|e }}</a> <time class="listdate" datetime="{{ post.date.isoformat() }}" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</time></li> {% endfor %} </ul> {% endif %} diff --git a/nikola/data/themes/base-jinja/templates/tagindex.tmpl b/nikola/data/themes/base-jinja/templates/tagindex.tmpl index af0a992..ee7d8b0 100644 --- a/nikola/data/themes/base-jinja/templates/tagindex.tmpl +++ b/nikola/data/themes/base-jinja/templates/tagindex.tmpl @@ -1,2 +1,24 @@ {# -*- coding: utf-8 -*- #} {% extends 'index.tmpl' %} + +{% block content_header %} + {% if subcategories %} + {{ messages('Subcategories:') }} + <ul> + {% for name, link in subcategories %} + <li><a href="{{ link }}">{{ name }}</a></li> + {% endfor %} + </ul> + {% endif %} +{% endblock %} + +{% block extra_head %} + {{ super() }} + {% if translations|length > 1 and generate_atom %} + {% for language in translations %} + <link rel="alternate" type="application/atom+xml" title="Atom for the {{ tag }} section ({{ language }})" href="{{ _link(kind + "_atom", tag, language) }}"> + {% endfor %} + {% elif generate_atom %} + <link rel="alternate" type="application/atom+xml" title="Atom for the {{ tag }} section" href="{{ _link("tag" + "_atom", tag) }}"> + {% endif %} +{% endblock %} diff --git a/nikola/data/themes/base-jinja/templates/tags.tmpl b/nikola/data/themes/base-jinja/templates/tags.tmpl index 7bcb7b2..4605fc9 100644 --- a/nikola/data/themes/base-jinja/templates/tags.tmpl +++ b/nikola/data/themes/base-jinja/templates/tags.tmpl @@ -7,14 +7,24 @@ <h1>{{ title }}</h1> </header> {% if cat_items %} - <h2>{{ messages("Categories") }}</h2> - <ul class="postlist"> - {% for text, link in cat_items %} - {% if text %} - <li><a class="reference" href="{{ link }}">{{ text }}</a></li> + {% if items %} + <h2>{{ messages("Categories") }}</h2> + {% endif %} + {% for text, full_name, path, link, indent_levels, indent_change_before, indent_change_after in cat_hierarchy %} + {% for i in range(indent_change_before) %} + <ul class="postlist"> + {% endfor %} + <li><a class="reference" href="{{ link }}">{{ text }}</a> + {% if indent_change_after <= 0 %} + </li> {% endif %} + {% for i in range(-indent_change_after) %} + </ul> + {% if i + 1 < indent_levels|length %} + </li> + {% endif %} + {% endfor %} {% endfor %} - </ul> {% if items %} <h2>{{ messages("Tags") }}</h2> {% endif %} @@ -22,7 +32,9 @@ {% if items %} <ul class="postlist"> {% for text, link in items %} - <li><a class="reference listtitle" href="{{ link }}">{{ text }}</a></li> + {% if text not in hidden_tags %} + <li><a class="reference listtitle" href="{{ link }}">{{ text }}</a></li> + {% endif %} {% endfor %} </ul> {% endif %} diff --git a/nikola/data/themes/base/assets/css/nikola_ipython.css b/nikola/data/themes/base/assets/css/nikola_ipython.css new file mode 100644 index 0000000..5ae5189 --- /dev/null +++ b/nikola/data/themes/base/assets/css/nikola_ipython.css @@ -0,0 +1,116 @@ +div.prompt { + padding: 0.6em; + font-size: 13px; + background-color: #E9E9E9; + margin-right: 1em; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +div.output_prompt { + /* 5px right shift to account for margin in parent container */ + margin: 0 5px 0 0px; +} + +div.output_area pre { + font-size: 13px; +} + +div.text_cell_render { + padding: 0px; + color: #333333; +} + +.rendered_html p { + text-align: left; +} + +.rendered_html ul { + margin: 0 0 12px 25px; +} + +.rendered_html :visited { + text-decoration: none; +} + +.rendered_html :link { + text-decoration: none; +} + +.rendered_html pre, .rendered_html code { + background-color: #DDDDDD; + padding-left: 0.5em; + padding-right: 0.5em; + padding-top: 0.05em; + padding-bottom: 0.05em; + margin: 1em 0em; + font-size: 14px; +} + +.page-content > .content p { + margin: 0 0 0px; +} + +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #408080; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #BC7A00 } /* Comment.Preproc */ +.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #B00040 } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BA2121 } /* Literal.String */ +.highlight .na { color: #7D9029 } /* Name.Attribute */ +.highlight .nb { color: #008000 } /* Name.Builtin */ +.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0000FF } /* Name.Function */ +.highlight .nl { color: #A0A000 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #19177C } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #BB6688 } /* Literal.String.Regex */ +.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #19177C } /* Name.Variable.Class */ +.highlight .vg { color: #19177C } /* Name.Variable.Global */ +.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ diff --git a/nikola/data/themes/base/assets/css/rst.css b/nikola/data/themes/base/assets/css/rst.css index 784308b..6e6de97 100644 --- a/nikola/data/themes/base/assets/css/rst.css +++ b/nikola/data/themes/base/assets/css/rst.css @@ -253,7 +253,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code { margin-right: 2em } pre.code .ln { color: grey; } /* line numbers */ -pre.code, code { background-color: #eeeeee } +pre.code, code { background-color: #eeeeee; } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } pre.code .literal.string, code .literal.string { color: #0C5404 } diff --git a/nikola/data/themes/base/assets/css/theme.css b/nikola/data/themes/base/assets/css/theme.css index 18b93db..3cb8628 100644 --- a/nikola/data/themes/base/assets/css/theme.css +++ b/nikola/data/themes/base/assets/css/theme.css @@ -1,7 +1,7 @@ @charset "UTF-8"; /* - Copyright © 2014 Daniel Aleksandersen and others. + Copyright © 2014-2015 Daniel Aleksandersen and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -33,11 +33,6 @@ body { line-height: 1.4; padding: 1em; } -@media print { - body { - font-family: Garamond, serif; - } -} #container { margin: 1em auto; @@ -283,3 +278,111 @@ img { overflow: visible; clip: auto; } + +pre.code, code { + white-space: pre; + word-wrap: normal; + overflow: auto; +} + +/* SOURCE: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ +@media print { + *, + *:before, + *:after { + background: transparent !important; + color: #000 !important; /* Black prints faster: http://www.sanbeiji.com/archives/953 */ + box-shadow: none !important; + text-shadow: none !important; + font-family: Garamond, Junicode, serif; + } + + body { + font-size: 12pt; + } + + a, + a:visited { + text-decoration: underline; + } + + a[href]:after { + content: " (" attr(href) ")"; + } + + abbr[title]:after { + content: " (" attr(title) ")"; + } + + /* + * Don't show links that are fragment identifiers, + * or use the `javascript:` pseudo protocol + */ + + a[href^="#"]:after, + a[href^="javascript:"]:after { + content: ""; + } + + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + + /* + * Printing Tables: + * http://css-discuss.incutio.com/wiki/Printing_Tables + */ + + thead { + display: table-header-group; + } + + tr, + img { + page-break-inside: avoid; + } + + img { + max-width: 100% !important; + } + + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + + h2, + h3 { + page-break-after: avoid; + } + + .hidden-print { + display: none !important; + } + + article .entry-title a[href]:after, + article .metadata a[href]:after, + article .tags a[href]:after { + content: ""; + } + + article .metadata .sourceline { + display: none; + } + + article .metadata .linkline a[href]:after { + content: " (" attr(href) ")"; + } + + #header { + display: none; + } + + .postpromonav { + padding: 0; + } +} diff --git a/nikola/data/themes/base/assets/js/fancydates.js b/nikola/data/themes/base/assets/js/fancydates.js new file mode 100644 index 0000000..d13b11b --- /dev/null +++ b/nikola/data/themes/base/assets/js/fancydates.js @@ -0,0 +1,20 @@ +function fancydates(fanciness, date_format) { + if (fanciness == 0) { + return; + } + + dates = $('time.published.dt-published'); + + i = 0; + l = dates.length; + + for (i = 0; i < l; i++) { + d = moment(dates[i].attributes.datetime.value); + if (fanciness == 1) { + o = d.local().format(date_format); + } else { + o = d.fromNow(); + } + dates[i].innerHTML = o; + } +} diff --git a/nikola/data/themes/base/assets/js/mathjax.js b/nikola/data/themes/base/assets/js/mathjax.js index 5e14369..6ef2dd7 100644 --- a/nikola/data/themes/base/assets/js/mathjax.js +++ b/nikola/data/themes/base/assets/js/mathjax.js @@ -5,12 +5,7 @@ window.onload = function () { setTimeout(function () { var script = document.createElement("script"); - if (location.protocol == 'https:') { - scriptbase = "https://c328740.ssl.cf1.rackcdn.com/"; - } else { - scriptbase = "http://cdn.mathjax.org/"; - } - script.src = scriptbase + "mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"; + script.src = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"; document.getElementsByTagName("body")[0].appendChild(script); },1) } diff --git a/nikola/data/themes/base/assets/xml/atom.xsl b/nikola/data/themes/base/assets/xml/atom.xsl new file mode 100644 index 0000000..cc052e0 --- /dev/null +++ b/nikola/data/themes/base/assets/xml/atom.xsl @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" version="1.0"> +<xsl:output method="xml"/> +<xsl:template match="/"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> +<head> +<meta charset="UTF-8"/> +<meta name="viewport" content="width=device-width"/> +<title><xsl:value-of select="feed/title"/> (Atom feed)</title> +<style><![CDATA[html{margin:0;padding:0;}body{color:hsl(180,1%,31%);font-family:Helvetica,Arial,sans-serif;font-size:17px;line-height:1.4;margin:5%;max-width:35rem;padding:0;}input{min-width:20rem;margin-left:.2rem;padding-left:.2rem;padding-right:.2rem;}ol{list-style-type:disc;padding-left:1rem;}h2{font-size:22px;font-weight:inherit;}]]></style> +</head> +<body> +<h1><xsl:value-of select="feed/title"/> (Atom feed)</h1> +<p>This is an Atom feed. To subscribe to it, copy its address and paste it when your feed reader asks for it. It will be updated periodically in your reader. New to feeds? <a href="https://duckduckgo.com/?q=how+to+get+started+with+rss+feeds" title="Search on the web to learn more">Learn more</a>.</p> +<p> +<label for="address">Atom feed address:</label> +<input><xsl:attribute name="id">address</xsl:attribute><xsl:attribute name="spellcheck">false</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="feed/link[@rel='self']/@href"/></xsl:attribute></input> +</p> +<p>Preview of the feed’s current headlines:</p> +<ol> +<xsl:for-each select="feed/entry"> +<li><h2><a><xsl:attribute name="href"><xsl:value-of select="link[@rel='alternate']/@href"/></xsl:attribute><xsl:value-of select="title"/></a></h2></li> +</xsl:for-each> +</ol> +</body> +</html> +</xsl:template> +</xsl:stylesheet> diff --git a/nikola/data/themes/base/assets/xml/rss.xsl b/nikola/data/themes/base/assets/xml/rss.xsl new file mode 100644 index 0000000..ee72301 --- /dev/null +++ b/nikola/data/themes/base/assets/xml/rss.xsl @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="1.0"> +<xsl:output method="xml"/> +<xsl:template match="/"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> +<head> +<meta charset="UTF-8"/> +<meta name="viewport" content="width=device-width"/> +<title><xsl:value-of select="rss/channel/title"/> (RSS)</title> +<style><![CDATA[html{margin:0;padding:0;}body{color:hsl(180,1%,31%);font-family:Helvetica,Arial,sans-serif;font-size:17px;line-height:1.4;margin:5%;max-width:35rem;padding:0;}input{min-width:20rem;margin-left:.2rem;padding-left:.2rem;padding-right:.2rem;}ol{list-style-type:disc;padding-left:1rem;}h2{font-size:22px;font-weight:inherit;}]]></style> +</head> +<body> +<h1><xsl:value-of select="rss/channel/title"/> (RSS)</h1> +<p>This is an <abbr title="Really Simple Syndication">RSS</abbr> feed. To subscribe to it, copy its address and paste it when your feed reader asks for it. It will be updated periodically in your reader. New to feeds? <a href="https://duckduckgo.com/?q=how+to+get+started+with+rss+feeds" title="Search on the web to learn more">Learn more</a>.</p> +<p> +<label for="address">RSS address:</label> +<input><xsl:attribute name="id">address</xsl:attribute><xsl:attribute name="spellcheck">false</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="rss/channel/atom:link[@rel='self']/@href"/></xsl:attribute></input> +</p> +<p>Preview of the feed’s current headlines:</p> +<ol> +<xsl:for-each select="rss/channel/item"> +<li><h2><a><xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute><xsl:value-of select="title"/></a></h2></li> +</xsl:for-each> +</ol> +</body> +</html> +</xsl:template> +</xsl:stylesheet> diff --git a/nikola/data/themes/base/messages/messages_ar.py b/nikola/data/themes/base/messages/messages_ar.py index f7ba16a..07c38b2 100644 --- a/nikola/data/themes/base/messages/messages_ar.py +++ b/nikola/data/themes/base/messages/messages_ar.py @@ -3,32 +3,37 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", - "Also available in:": "", - "Archive": "", - "Categories": "الأصناف", + "(active)": "", + "Also available in:": "أيضا متوفر في:", + "Archive": "الأرشيف", + "Categories": "فئات", "Comments": "التّعليقات", "LANGUAGE": "العربيّة", - "Languages:": "", + "Languages:": "اللغات", "More posts about %s": "المزيد من المقالات حول %s", - "Newer posts": "", - "Next post": "", - "No posts found.": "", - "Nothing found.": "", - "Older posts": "", - "Original site": "", - "Posted:": "", - "Posts about %s": "", - "Posts for year %s": "", + "Newer posts": "مقالات أحدث", + "Next post": "المقالة التالية", + "No posts found.": "لم يوجد مقالات.", + "Nothing found.": "لم يوجد شيء.", + "Older posts": "مقالات أقدم", + "Original site": "الموقع الأصلي", + "Posted:": "نشر:", + "Posts about %s": "مقالات عن s%", + "Posts for year %s": "مقالات سنة s%", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "", - "Previous post": "", - "Publication date": "", + "Previous post": "المقالة السابقة", + "Publication date": "تاريخ النشر", "RSS feed": "", - "Read in English": "", + "Read in English": "اقرأ بالعربية", "Read more": "قراءة المزيد", - "Skip to main content": "", - "Source": "", - "Tags and Categories": "", - "Tags": "", - "old posts, page %d": "", - "page %d": "", + "Skip to main content": "انتقل إلى المحتوى الرئيسي", + "Source": "المصدر", + "Subcategories:": "", + "Tags and Categories": "تصنيفات و فئات", + "Tags": "تصنيفات", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "مقالات قديمة, صفحة d%", + "page %d": "صفحة d%", } diff --git a/nikola/data/themes/base/messages/messages_az.py b/nikola/data/themes/base/messages/messages_az.py new file mode 100644 index 0000000..76c15fc --- /dev/null +++ b/nikola/data/themes/base/messages/messages_az.py @@ -0,0 +1,39 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "%d min remaining to read": "%d dəqiqəlik oxuma", + "(active)": "", + "Also available in:": "Həmçinin mövcuddur:", + "Archive": "Arxiv", + "Categories": "Kateqoriyalar", + "Comments": "Şərhlər", + "LANGUAGE": "Azərbaycan dili", + "Languages:": "Dillər:", + "More posts about %s": "%s ilə bağlı digər yazılar", + "Newer posts": "Yeni yazılar", + "Next post": "Növbəti yazı", + "No posts found.": "Heç bir yazı tapılmadı", + "Nothing found.": "Heç nə tapılmadı", + "Older posts": "Köhnə yazılar", + "Original site": "Original sayt", + "Posted:": "yazılma tarixi:", + "Posts about %s": "%s ilə bağlı yazılar", + "Posts for year %s": "%s ilindəki yazılar", + "Posts for {month} {day}, {year}": "{month} {day}, {year} üçün yazılar", + "Posts for {month} {year}": "{month} {year} üçün yazılar", + "Previous post": "Əvvəlki yazı", + "Publication date": "Buraxılış tarixi", + "RSS feed": "RSS", + "Read in English": "Azərbaycan dilində oxu", + "Read more": "Davamı", + "Skip to main content": "Əsas mövzuya keç", + "Source": "Mənbə", + "Subcategories:": "", + "Tags and Categories": "Teqlər və Kateqoriyalar", + "Tags": "Teqlər", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "köhnə yazılar, səhifə %s", + "page %d": "səhifə %d", +} diff --git a/nikola/data/themes/base/messages/messages_bg.py b/nikola/data/themes/base/messages/messages_bg.py index 28adb77..96ac878 100644 --- a/nikola/data/themes/base/messages/messages_bg.py +++ b/nikola/data/themes/base/messages/messages_bg.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", + "(active)": "", "Also available in:": "Също достъпно в:", "Archive": "Архив", "Categories": "Категории", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "Публиковано:", "Posts about %s": "Публикации относно %s", "Posts for year %s": "Публикации за %s година", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "Публикации за {month} {year}", "Previous post": "Предишна публикация", "Publication date": "", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "Прочети още", "Skip to main content": "", "Source": "Source", + "Subcategories:": "", "Tags and Categories": "Тагове и Категории", "Tags": "Тагове", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "стари публикации, страница %d", "page %d": "страница %d", } diff --git a/nikola/data/themes/base/messages/messages_ca.py b/nikola/data/themes/base/messages/messages_ca.py index 58c8577..f45b1a6 100644 --- a/nikola/data/themes/base/messages/messages_ca.py +++ b/nikola/data/themes/base/messages/messages_ca.py @@ -2,33 +2,38 @@ from __future__ import unicode_literals MESSAGES = { - "%d min remaining to read": "", + "%d min remaining to read": "% min recordar per a llegir", + "(active)": "", "Also available in:": "També disponibles en:", "Archive": "Arxiu", - "Categories": "", - "Comments": "", + "Categories": "Categories", + "Comments": "Comentaris", "LANGUAGE": "Català", - "Languages:": "", + "Languages:": "Llenguatges:", "More posts about %s": "Més entrades sobre %s", "Newer posts": "Entrades posteriors", "Next post": "Entrada següent", - "No posts found.": "", - "Nothing found.": "", + "No posts found.": "Publicació no trobada", + "Nothing found.": "No trobat", "Older posts": "Entrades anteriors", "Original site": "Lloc original", "Posted:": "Publicat:", "Posts about %s": "Entrades sobre %s", "Posts for year %s": "Entrades de l'any %s", - "Posts for {month} {year}": "", + "Posts for {month} {day}, {year}": "", + "Posts for {month} {year}": "Publicat en {month} {year}", "Previous post": "Entrada anterior", - "Publication date": "", - "RSS feed": "", + "Publication date": "Data de publicació", + "RSS feed": "Feed RSS", "Read in English": "Llegeix-ho en català", "Read more": "Llegeix-ne més", - "Skip to main content": "", + "Skip to main content": "Vés al comentari principal", "Source": "Codi", - "Tags and Categories": "", + "Subcategories:": "", + "Tags and Categories": "Etiquetes i Categories", "Tags": "Etiquetes", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "entrades antigues, pàgina %d", "page %d": "pàgina %d", } diff --git a/nikola/data/themes/base/messages/messages_cs.py b/nikola/data/themes/base/messages/messages_cs.py index 548c6d7..6e1bdd2 100644 --- a/nikola/data/themes/base/messages/messages_cs.py +++ b/nikola/data/themes/base/messages/messages_cs.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "%d min zbývajících", + "(active)": "", "Also available in:": "Dostupné také v", "Archive": "Archiv", "Categories": "Kategorie", @@ -19,16 +20,20 @@ MESSAGES = { "Posted:": "Zveřejněno:", "Posts about %s": "Příspěvky o %s", "Posts for year %s": "Příspěvky v roce %s", + "Posts for {month} {day}, {year}": "Příspěvky v {month} {day}, {year}", "Posts for {month} {year}": "Příspěvky v {month} {year}", "Previous post": "Předchozí příspěvek", "Publication date": "Datum zveřejnění", "RSS feed": "RSS zdroj", "Read in English": "Číst v češtině", "Read more": "Číst dál", - "Skip to main content": "", + "Skip to main content": "Přeskočit na hlavní obsah", "Source": "Zdroj", + "Subcategories:": "", "Tags and Categories": "Štítky a kategorie", "Tags": "Štítky", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "staré příspěvky, strana %d", "page %d": "strana %d", } diff --git a/nikola/data/themes/base/messages/messages_da.py b/nikola/data/themes/base/messages/messages_da.py index c5c82ee..73b71cb 100644 --- a/nikola/data/themes/base/messages/messages_da.py +++ b/nikola/data/themes/base/messages/messages_da.py @@ -2,33 +2,38 @@ from __future__ import unicode_literals MESSAGES = { - "%d min remaining to read": "", - "Also available in:": "", - "Archive": "", - "Categories": "", - "Comments": "", - "LANGUAGE": "", - "Languages:": "", - "More posts about %s": "", - "Newer posts": "", - "Next post": "", - "No posts found.": "", - "Nothing found.": "", - "Older posts": "", - "Original site": "", - "Posted:": "", - "Posts about %s": "", - "Posts for year %s": "", - "Posts for {month} {year}": "", - "Previous post": "", - "Publication date": "", - "RSS feed": "", - "Read in English": "", - "Read more": "", - "Skip to main content": "", - "Source": "", - "Tags and Categories": "", - "Tags": "", - "old posts, page %d": "", - "page %d": "", + "%d min remaining to read": "%d min. tilbage at læse", + "(active)": "", + "Also available in:": "Fås også i:", + "Archive": "Arkiv", + "Categories": "Kategorier", + "Comments": "Kommentarer", + "LANGUAGE": "Dansk", + "Languages:": "Sprog:", + "More posts about %s": "Yderligere indlæg om %s", + "Newer posts": "Nyere indlæg", + "Next post": "Næste indlæg", + "No posts found.": "Søgningen gav ingen resultater.", + "Nothing found.": "Søgningen gav ingen resultater.", + "Older posts": "Ældre indlæg", + "Original site": "Oprindeligt hjemmeside", + "Posted:": "Opslået:", + "Posts about %s": "Indlæg om %s", + "Posts for year %s": "Indlæg for %s", + "Posts for {month} {day}, {year}": "Indlæs for {month} {day}, {year}", + "Posts for {month} {year}": "Indlæg for {month} {year}", + "Previous post": "Tidligere indlæg", + "Publication date": "Udgivelsesdato", + "RSS feed": "RSS-nyhedskilde", + "Read in English": "Læs på dansk", + "Read more": "Læs mere", + "Skip to main content": "Hop direkte til hovedindhold", + "Source": "Kilde", + "Subcategories:": "", + "Tags and Categories": "Nøgleord og kategorier", + "Tags": "Nøgleord", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "gamle indlæg, side %d", + "page %d": "side %d", } diff --git a/nikola/data/themes/base/messages/messages_de.py b/nikola/data/themes/base/messages/messages_de.py index 6be6ad5..324dd14 100644 --- a/nikola/data/themes/base/messages/messages_de.py +++ b/nikola/data/themes/base/messages/messages_de.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "%d min verbleiben zum Lesen", + "(active)": "", "Also available in:": "Auch verfügbar in:", "Archive": "Archiv", "Categories": "Kategorien", @@ -19,16 +20,20 @@ MESSAGES = { "Posted:": "Veröffentlicht:", "Posts about %s": "Einträge über %s", "Posts for year %s": "Einträge aus dem Jahr %s", + "Posts for {month} {day}, {year}": "Einträge vom {day}. {month} {year}", "Posts for {month} {year}": "Einträge aus {month} {year}", "Previous post": "Vorheriger Eintrag", "Publication date": "Veröffentlichungsdatum", "RSS feed": "RSS-Feed", "Read in English": "Auf Deutsch lesen", "Read more": "Weiterlesen", - "Skip to main content": "", + "Skip to main content": "Springe zum Hauptinhalt", "Source": "Source", + "Subcategories:": "Unterkategorien:", "Tags and Categories": "Tags und Kategorien", "Tags": "Tags", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "Ältere Einträge, Seite %d", "page %d": "Seite %d", } diff --git a/nikola/data/themes/base/messages/messages_el.py b/nikola/data/themes/base/messages/messages_el.py index ce2fd89..68cf91f 100644 --- a/nikola/data/themes/base/messages/messages_el.py +++ b/nikola/data/themes/base/messages/messages_el.py @@ -3,32 +3,37 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", + "(active)": "", "Also available in:": "Διαθέσιμο και στα:", "Archive": "Αρχείο", "Categories": "Κατηγορίες", - "Comments": "", + "Comments": "Σχόλια", "LANGUAGE": "Ελληνικά", - "Languages:": "", + "Languages:": "Γλώσσες", "More posts about %s": "Περισσότερες αναρτήσεις για %s", "Newer posts": "Νεότερες αναρτήσεις", "Next post": "Επόμενη ανάρτηση", - "No posts found.": "", - "Nothing found.": "", + "No posts found.": "Δε βρέθηκαν αναρτήσεις", + "Nothing found.": "Δε βρέθηκε περιεχόμενο", "Older posts": "Παλαιότερες αναρτήσεις", "Original site": "Ιστοσελίδα αρχικής ανάρτησης", "Posted:": "Αναρτήθηκε:", "Posts about %s": "Αναρτήσεις για %s", "Posts for year %s": "Αναρτήσεις για το έτος %s", + "Posts for {month} {day}, {year}": "Αναρτήσεις στις {day} {month}, {year}", "Posts for {month} {year}": "Αναρτήσεις για τον {month} του {year}", "Previous post": "Προηγούμενη ανάρτηση", - "Publication date": "", + "Publication date": "Ημερομηνία δημοσίευσης", "RSS feed": "", "Read in English": "Διαβάστε στα Ελληνικά", "Read more": "Διαβάστε περισσότερα", "Skip to main content": "", "Source": "Πηγαίος κώδικας", + "Subcategories:": "", "Tags and Categories": "Ετικέτες και κατηγορίες", "Tags": "Ετικέτες", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "σελίδα παλαιότερων αναρτήσεων %d", "page %d": "σελίδα %d", } diff --git a/nikola/data/themes/base/messages/messages_en.py b/nikola/data/themes/base/messages/messages_en.py index df04974..29af257 100644 --- a/nikola/data/themes/base/messages/messages_en.py +++ b/nikola/data/themes/base/messages/messages_en.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "%d min remaining to read", + "(active)": "(active)", "Also available in:": "Also available in:", "Archive": "Archive", "Categories": "Categories", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "Posted:", "Posts about %s": "Posts about %s", "Posts for year %s": "Posts for year %s", + "Posts for {month} {day}, {year}": "Posts for {month} {day}, {year}", "Posts for {month} {year}": "Posts for {month} {year}", "Previous post": "Previous post", "Publication date": "Publication date", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "Read more", "Skip to main content": "Skip to main content", "Source": "Source", + "Subcategories:": "Subcategories:", "Tags and Categories": "Tags and Categories", "Tags": "Tags", + "Write your page here.": "Write your page here.", + "Write your post here.": "Write your post here.", "old posts, page %d": "old posts, page %d", "page %d": "page %d", } diff --git a/nikola/data/themes/base/messages/messages_eo.py b/nikola/data/themes/base/messages/messages_eo.py index 38b54e2..8938707 100644 --- a/nikola/data/themes/base/messages/messages_eo.py +++ b/nikola/data/themes/base/messages/messages_eo.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", + "(active)": "", "Also available in:": "Ankaŭ disponebla en:", "Archive": "Arĥivo", "Categories": "Kategorioj", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "Skribita:", "Posts about %s": "Artikoloj pri %s", "Posts for year %s": "Artikoloj de la jaro %s", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "Artikoloj skribitaj en {month} {year}", "Previous post": "Antaŭa artikolo", "Publication date": "", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "Legu plu", "Skip to main content": "", "Source": "Fonto", + "Subcategories:": "", "Tags and Categories": "Etikedoj kaj Kategorioj", "Tags": "Etikedoj", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "paĝo de malnovaj artikoloj %d", "page %d": "paĝo %d", } diff --git a/nikola/data/themes/base/messages/messages_es.py b/nikola/data/themes/base/messages/messages_es.py index 67de5aa..e3f0f03 100644 --- a/nikola/data/themes/base/messages/messages_es.py +++ b/nikola/data/themes/base/messages/messages_es.py @@ -2,33 +2,38 @@ from __future__ import unicode_literals MESSAGES = { - "%d min remaining to read": "restan %d minutos", + "%d min remaining to read": "quedan %d minutos de lectura", + "(active)": "(activo)", "Also available in:": "También disponible en:", "Archive": "Archivo", "Categories": "Categorías", "Comments": "Comentarios", "LANGUAGE": "Español", "Languages:": "Idiomas:", - "More posts about %s": "Más posts sobre %s", - "Newer posts": "Posts posteriores", - "Next post": "Siguiente post", - "No posts found.": "No se encontraron posts", - "Nothing found.": "No encontrado", - "Older posts": "Posts anteriores", + "More posts about %s": "Más publicaciones sobre %s", + "Newer posts": "Publicaciones posteriores", + "Next post": "Siguiente publicación", + "No posts found.": "No se encontraron publicaciones.", + "Nothing found.": "No se encontró nada.", + "Older posts": "Publicaciones anteriores", "Original site": "Sitio original", "Posted:": "Publicado:", - "Posts about %s": "Posts sobre %s", - "Posts for year %s": "Posts del año %s", + "Posts about %s": "Publicaciones sobre %s", + "Posts for year %s": "Publicaciones del año %s", + "Posts for {month} {day}, {year}": "Publicaciones de {day}, {month}, {year}", "Posts for {month} {year}": "Posts de {month} {year}", - "Previous post": "Post anterior", + "Previous post": "Publicación anterior", "Publication date": "Fecha de publicación", - "RSS feed": "feed RSS", + "RSS feed": "Canal RSS", "Read in English": "Leer en español", "Read more": "Leer más", - "Skip to main content": "", - "Source": "Código", - "Tags and Categories": "Tags y Categorías", - "Tags": "Tags", - "old posts, page %d": "posts antiguos, página %d", + "Skip to main content": "Ir al contenido principal", + "Source": "Código fuente", + "Subcategories:": "Subcategorías:", + "Tags and Categories": "Etiquetas y Categorías", + "Tags": "Etiquetas", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "publicaciones antiguas, página %d", "page %d": "página %d", } diff --git a/nikola/data/themes/base/messages/messages_et.py b/nikola/data/themes/base/messages/messages_et.py index 3a53c2f..c67cbb2 100644 --- a/nikola/data/themes/base/messages/messages_et.py +++ b/nikola/data/themes/base/messages/messages_et.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", + "(active)": "", "Also available in:": "Saadaval ka:", "Archive": "Arhiiv", "Categories": "Kategooriad", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "Postitatud:", "Posts about %s": "Postitused %s kohta", "Posts for year %s": "Postitused aastast %s", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "Postitused {year} aasta kuust {month} ", "Previous post": "Eelmine postitus", "Publication date": "", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "Loe veel", "Skip to main content": "", "Source": "Lähtekood", + "Subcategories:": "", "Tags and Categories": "Sildid ja kategooriad", "Tags": "Märksõnad", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "vanade postituste, leht %d", "page %d": "leht %d", } diff --git a/nikola/data/themes/base/messages/messages_eu.py b/nikola/data/themes/base/messages/messages_eu.py index 6920552..1588cd6 100644 --- a/nikola/data/themes/base/messages/messages_eu.py +++ b/nikola/data/themes/base/messages/messages_eu.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", + "(active)": "", "Also available in:": "Eskuragarria hemen ere:", "Archive": "Artxiboa", "Categories": "Kategoriak", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "Argitaratuta:", "Posts about %s": "%s-ri buruzko postak", "Posts for year %s": "%s. urteko postak", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "{year}ko {month}ren postak", "Previous post": "Aurreko posta", "Publication date": "", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "Irakurri gehiago", "Skip to main content": "", "Source": "Iturria", + "Subcategories:": "", "Tags and Categories": "Etiketak eta Kategoriak", "Tags": "Etiketak", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "Post zaharren, orria %d", "page %d": "orria %d", } diff --git a/nikola/data/themes/base/messages/messages_fa.py b/nikola/data/themes/base/messages/messages_fa.py index 5899ec5..b69d57a 100644 --- a/nikola/data/themes/base/messages/messages_fa.py +++ b/nikola/data/themes/base/messages/messages_fa.py @@ -2,7 +2,8 @@ from __future__ import unicode_literals MESSAGES = { - "%d min remaining to read": "", + "%d min remaining to read": "%d دقیقه برای خواندن باقی مانده", + "(active)": "", "Also available in:": "همچنین قابل دسترس از:", "Archive": "آرشیو", "Categories": "دستهها", @@ -19,16 +20,20 @@ MESSAGES = { "Posted:": "ارسال شده:", "Posts about %s": "ارسالها دربارهٔ %s", "Posts for year %s": "ارسالها برای سال %s", + "Posts for {month} {day}, {year}": "ارسال برای {month} {day}. {year}", "Posts for {month} {year}": "ارسال برای {month} {year}", "Previous post": "ارسال پیشین", "Publication date": "تاریخ انتشار", "RSS feed": "خوراک", "Read in English": "به فارسی بخوانید", "Read more": "بیشتر بخوانید", - "Skip to main content": "", + "Skip to main content": "متن اصلی را نادیده بگیر", "Source": "منبع", + "Subcategories:": "", "Tags and Categories": "برچسبها و دستهها", "Tags": "برچسبها", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "صفحهٔ ارسالهای قدیمی %d", "page %d": "برگه %d", } diff --git a/nikola/data/themes/base/messages/messages_fi.py b/nikola/data/themes/base/messages/messages_fi.py index 1988e3f..bcc2680 100644 --- a/nikola/data/themes/base/messages/messages_fi.py +++ b/nikola/data/themes/base/messages/messages_fi.py @@ -2,7 +2,8 @@ from __future__ import unicode_literals MESSAGES = { - "%d min remaining to read": "", + "%d min remaining to read": "%d minuuttia lukuaikaa", + "(active)": "", "Also available in:": "Saatavilla myös:", "Archive": "Arkisto", "Categories": "Kategoriat", @@ -19,16 +20,20 @@ MESSAGES = { "Posted:": "Postattu:", "Posts about %s": "Postauksia aiheesta %s", "Posts for year %s": "Postauksia vuodelta %s", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "Postauksia ajalle {month} {year}", "Previous post": "Vanhempia postauksia", "Publication date": "Julkaisupäivämäärä", "RSS feed": "RSS syöte", "Read in English": "Lue suomeksi", "Read more": "Lue lisää", - "Skip to main content": "", + "Skip to main content": "Hyppää sisältöön", "Source": "Lähde", + "Subcategories:": "", "Tags and Categories": "Tagit ja kategoriat", "Tags": "Tagit", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "vanhoja postauksia, sivu %d", "page %d": "sivu %d", } diff --git a/nikola/data/themes/base/messages/messages_fil.py b/nikola/data/themes/base/messages/messages_fil.py new file mode 100644 index 0000000..fd26d77 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_fil.py @@ -0,0 +1,39 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "%d min remaining to read": "", + "(active)": "", + "Also available in:": "", + "Archive": "", + "Categories": "", + "Comments": "", + "LANGUAGE": "", + "Languages:": "", + "More posts about %s": "", + "Newer posts": "", + "Next post": "", + "No posts found.": "", + "Nothing found.": "", + "Older posts": "", + "Original site": "", + "Posted:": "", + "Posts about %s": "", + "Posts for year %s": "", + "Posts for {month} {day}, {year}": "", + "Posts for {month} {year}": "", + "Previous post": "", + "Publication date": "", + "RSS feed": "", + "Read in English": "", + "Read more": "", + "Skip to main content": "", + "Source": "", + "Subcategories:": "", + "Tags and Categories": "", + "Tags": "", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "", + "page %d": "", +} diff --git a/nikola/data/themes/base/messages/messages_fr.py b/nikola/data/themes/base/messages/messages_fr.py index a30aa1a..327b3f7 100644 --- a/nikola/data/themes/base/messages/messages_fr.py +++ b/nikola/data/themes/base/messages/messages_fr.py @@ -3,22 +3,24 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "Il reste encore %d min. de lecture", - "Also available in:": "Egalement disponible en:", + "(active)": "(actif)", + "Also available in:": "Également disponible en:", "Archive": "Archives", "Categories": "Catégories", "Comments": "Commentaires", "LANGUAGE": "Français", "Languages:": "Langues:", "More posts about %s": "Plus d'articles sur %s", - "Newer posts": "Billets récents", + "Newer posts": "Articles récents", "Next post": "Article suivant", - "No posts found.": "Pas de billets.", + "No posts found.": "Pas d'articles.", "Nothing found.": "Pas de résultats.", "Older posts": "Anciens articles", "Original site": "Site d'origine", "Posted:": "Publié:", "Posts about %s": "Articles sur %s", "Posts for year %s": "Articles de l'année %s", + "Posts for {month} {day}, {year}": "Articles du {day} {month} {year}", "Posts for {month} {year}": "Articles de {month} {year}", "Previous post": "Article précédent", "Publication date": "Date de publication", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "Lire la suite", "Skip to main content": "Aller au contenu principal", "Source": "Source", + "Subcategories:": "Sous-catégories", "Tags and Categories": "Étiquettes et catégories", "Tags": "Étiquettes", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "anciens articles, page %d", "page %d": "page %d", } diff --git a/nikola/data/themes/base/messages/messages_gl.py b/nikola/data/themes/base/messages/messages_gl.py index c5c82ee..fd26d77 100644 --- a/nikola/data/themes/base/messages/messages_gl.py +++ b/nikola/data/themes/base/messages/messages_gl.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", + "(active)": "", "Also available in:": "", "Archive": "", "Categories": "", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "", "Posts about %s": "", "Posts for year %s": "", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "", "Previous post": "", "Publication date": "", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "", "Skip to main content": "", "Source": "", + "Subcategories:": "", "Tags and Categories": "", "Tags": "", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "", "page %d": "", } diff --git a/nikola/data/themes/base/messages/messages_hi.py b/nikola/data/themes/base/messages/messages_hi.py index 3d69697..7804b60 100644 --- a/nikola/data/themes/base/messages/messages_hi.py +++ b/nikola/data/themes/base/messages/messages_hi.py @@ -2,33 +2,38 @@ from __future__ import unicode_literals MESSAGES = { - "%d min remaining to read": "", + "%d min remaining to read": "पढ़ने में %d मिनट बाकी", + "(active)": "", "Also available in:": "उपलब्ध भाषाएँ:", "Archive": "आर्काइव", "Categories": "श्रेणियाँ", - "Comments": "", + "Comments": "टिप्पणियाँ", "LANGUAGE": "हिन्दी", - "Languages:": "", + "Languages:": "भाषाएँ:", "More posts about %s": "%s के बारे में अौर पोस्टें", "Newer posts": "नई पोस्टें", "Next post": "अगली पोस्ट", - "No posts found.": "", - "Nothing found.": "", + "No posts found.": "कोई पोस्ट नहीं मिल सकी", + "Nothing found.": "कुछ नहीं मिल सका", "Older posts": "पुरानी पोस्टें", "Original site": "असली साइट", "Posted:": "पोस्टेड:", "Posts about %s": "%s के बारे में पोस्टें", "Posts for year %s": "साल %s की पोस्टें", + "Posts for {month} {day}, {year}": "{day} {month} {year} की पोस्टें", "Posts for {month} {year}": "{month} {year} की पोस्टें", "Previous post": "पिछली पोस्ट", - "Publication date": "", - "RSS feed": "", + "Publication date": "प्रकाशन की तारीख", + "RSS feed": "आर एस एस फ़ीड", "Read in English": "हिन्दी में पढ़िए", "Read more": "और पढ़िए", - "Skip to main content": "", + "Skip to main content": "मुख्य सामग्री पर जाएँ", "Source": "सोर्स", + "Subcategories:": "", "Tags and Categories": "टैग्स और श्रेणियाँ", "Tags": "टैग्स", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "पुरानी पोस्टें, पृष्ठ %d", "page %d": "पृष्ठ %d", } diff --git a/nikola/data/themes/base/messages/messages_hr.py b/nikola/data/themes/base/messages/messages_hr.py index f5f0886..d26fc85 100644 --- a/nikola/data/themes/base/messages/messages_hr.py +++ b/nikola/data/themes/base/messages/messages_hr.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", + "(active)": "", "Also available in:": "Također dostupno i u:", "Archive": "Arhiva", "Categories": "Kategorije", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "Objavljeno:", "Posts about %s": "Postovi o %s", "Posts for year %s": "Postovi za godinu %s", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "Postovi za {month} {year}", "Previous post": "Prethodni post", "Publication date": "Nadnevak objave", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "Čitaj dalje", "Skip to main content": "", "Source": "Izvor", + "Subcategories:": "", "Tags and Categories": "Tagovi i kategorije", "Tags": "Tagovi", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "stari postovi, stranice %d", "page %d": "stranice %d", } diff --git a/nikola/data/themes/base/messages/messages_id.py b/nikola/data/themes/base/messages/messages_id.py new file mode 100644 index 0000000..475299f --- /dev/null +++ b/nikola/data/themes/base/messages/messages_id.py @@ -0,0 +1,39 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "%d min remaining to read": "%d menit tersisa untuk membaca", + "(active)": "(aktif)", + "Also available in:": "Juga tersedia dalam:", + "Archive": "Arsip", + "Categories": "Kategori", + "Comments": "Komentar", + "LANGUAGE": "Inggris", + "Languages:": "Bahasa:", + "More posts about %s": "Lebih banyak tulisan tentang %s", + "Newer posts": "Tulisan lebih baru", + "Next post": "Tulisan berikutnya", + "No posts found.": "Tidak ada tulisan yang ditemukan.", + "Nothing found.": "Tidak ditemukan.", + "Older posts": "Tulisan lebih lama", + "Original site": "Situs orisinal", + "Posted:": "Ditulis oleh:", + "Posts about %s": "Tulisan tentang %s", + "Posts for year %s": "Tulisan untuk tahun %s", + "Posts for {month} {day}, {year}": "Tulisan untuk {month} {day}, {year}", + "Posts for {month} {year}": "Tulisan untuk {month} {year}", + "Previous post": "Tulisan sebelumnya", + "Publication date": "Tanggal publikasi", + "RSS feed": "Sindikasi RSS", + "Read in English": "Baca dalam bahasa Inggris", + "Read more": "Baca selengkapnya", + "Skip to main content": "Lanjutkan ke konten utama", + "Source": "Sumber", + "Subcategories:": "Sub kategori:", + "Tags and Categories": "Tag dan Kategori", + "Tags": "Tag", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "tulisan lama, halaman %d", + "page %d": "halaman %d", +} diff --git a/nikola/data/themes/base/messages/messages_it.py b/nikola/data/themes/base/messages/messages_it.py index 62442d4..91f8374 100644 --- a/nikola/data/themes/base/messages/messages_it.py +++ b/nikola/data/themes/base/messages/messages_it.py @@ -2,15 +2,16 @@ from __future__ import unicode_literals MESSAGES = { - "%d min remaining to read": "ancora %d minuti", - "Also available in:": "Anche disponibile in:", + "%d min remaining to read": "ulteriori %d minuti di lettura", + "(active)": "(attivo)", + "Also available in:": "Disponibile anche in:", "Archive": "Archivio", "Categories": "Categorie", "Comments": "Commenti", - "LANGUAGE": "Italiano", + "LANGUAGE": "Inglese", "Languages:": "Lingue:", "More posts about %s": "Altri articoli collegati %s", - "Newer posts": "Articoli recenti", + "Newer posts": "Articoli più recenti", "Next post": "Articolo successivo", "No posts found.": "Nessun articolo trovato.", "Nothing found.": "Non trovato.", @@ -19,16 +20,20 @@ MESSAGES = { "Posted:": "Pubblicato:", "Posts about %s": "Articoli su %s", "Posts for year %s": "Articoli per l'anno %s", + "Posts for {month} {day}, {year}": "Articoli per il {day} {month} {year}", "Posts for {month} {year}": "Articoli per {month} {year}", "Previous post": "Articolo precedente", "Publication date": "Data di pubblicazione", - "RSS feed": "Flusso RSS", - "Read in English": "Leggi in italiano", + "RSS feed": "Feed RSS", + "Read in English": "Leggi in inglese", "Read more": "Continua la lettura", - "Skip to main content": "", + "Skip to main content": "Vai al testo principale", "Source": "Sorgente", - "Tags and Categories": "Tags e Categorie", - "Tags": "Tags", - "old posts, page %d": "pagina dei vecchi articoli %d", + "Subcategories:": "Sottocategorie:", + "Tags and Categories": "Tag e Categorie", + "Tags": "Tag", + "Write your page here.": "Scrivi qui la tua pagina.", + "Write your post here.": "Scrivi qui il tuo post.", + "old posts, page %d": "vecchi articoli, pagina %d", "page %d": "pagina %d", } diff --git a/nikola/data/themes/base/messages/messages_ja.py b/nikola/data/themes/base/messages/messages_ja.py index cba5ee9..972794d 100644 --- a/nikola/data/themes/base/messages/messages_ja.py +++ b/nikola/data/themes/base/messages/messages_ja.py @@ -2,7 +2,8 @@ from __future__ import unicode_literals MESSAGES = { - "%d min remaining to read": "", + "%d min remaining to read": "読込むまで残り %d 分", + "(active)": "", "Also available in:": "他の言語で読む:", "Archive": "過去の記事", "Categories": "カテゴリー", @@ -19,16 +20,20 @@ MESSAGES = { "Posted:": "投稿日時:", "Posts about %s": "%sについての記事", "Posts for year %s": "%s年の記事", + "Posts for {month} {day}, {year}": "{year}年{month}月{day}日の記事", "Posts for {month} {year}": "{year}年{month}月の記事", "Previous post": "前の記事", "Publication date": "投稿日", "RSS feed": "RSS フィード", "Read in English": "日本語で読む", "Read more": "続きを読む", - "Skip to main content": "", + "Skip to main content": "メインコンテンツをスキップ", "Source": "ソース", + "Subcategories:": "", "Tags and Categories": "タグとカテゴリー", "Tags": "タグ", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "前の記事 %dページ目", "page %d": "ページ %d", } diff --git a/nikola/data/themes/base/messages/messages_ko.py b/nikola/data/themes/base/messages/messages_ko.py new file mode 100644 index 0000000..6904492 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_ko.py @@ -0,0 +1,39 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "%d min remaining to read": "읽기 %d분 남음.", + "(active)": "", + "Also available in:": "", + "Archive": "저장소", + "Categories": "분류", + "Comments": "댓글", + "LANGUAGE": "영어", + "Languages:": "언어:", + "More posts about %s": "%s에 대한 또다른 포스트", + "Newer posts": "최신 포스트", + "Next post": "다음 포스트", + "No posts found.": "검색된 포스트 없음.", + "Nothing found.": "검색 결과 없음.", + "Older posts": "옛날 포스트", + "Original site": "출처", + "Posted:": "", + "Posts about %s": "%s에 대한 포스트", + "Posts for year %s": "%s년도 포스트", + "Posts for {month} {day}, {year}": "", + "Posts for {month} {year}": "{year}년 {month}월에 쓴 포스트", + "Previous post": "이전 포스트", + "Publication date": "발간일", + "RSS feed": "RSS 목록", + "Read in English": "영어로 읽기", + "Read more": "더 읽기", + "Skip to main content": "주 콘텐츠로 바로가기", + "Source": "원문", + "Subcategories:": "", + "Tags and Categories": "태그와 분류", + "Tags": "태그", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "이전 포스트, 페이지 %d", + "page %d": "페이지 %d", +} diff --git a/nikola/data/themes/base/messages/messages_nb.py b/nikola/data/themes/base/messages/messages_nb.py index f4d6062..2533247 100644 --- a/nikola/data/themes/base/messages/messages_nb.py +++ b/nikola/data/themes/base/messages/messages_nb.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", + "(active)": "", "Also available in:": "Også tilgjengelig på:", "Archive": "Arkiv", "Categories": "Kategorier", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "Publisert:", "Posts about %s": "Innlegg om %s", "Posts for year %s": "Innlegg fra %s", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "Innlegg fra {month} {year}", "Previous post": "Forrige innlegg", "Publication date": "", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "Les mer", "Skip to main content": "", "Source": "Kilde", + "Subcategories:": "", "Tags and Categories": "Merker og kategorier", "Tags": "Merker", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "eldre innlegg, side %d", "page %d": "side %d", } diff --git a/nikola/data/themes/base/messages/messages_nl.py b/nikola/data/themes/base/messages/messages_nl.py index 4aa9147..0661ce1 100644 --- a/nikola/data/themes/base/messages/messages_nl.py +++ b/nikola/data/themes/base/messages/messages_nl.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "%d min resterende leestijd ", + "(active)": "(actief)", "Also available in:": "Ook beschikbaar in:", "Archive": "Archief", "Categories": "Categorieën", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "Geplaatst:", "Posts about %s": "Berichten over %s", "Posts for year %s": "Berichten voor het jaar %s", + "Posts for {month} {day}, {year}": "Berichten voor {month} {day}, {year}", "Posts for {month} {year}": "Berichten voor {month} {year}", "Previous post": "Vorig bericht", "Publication date": "Publicatiedatum", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "Lees verder", "Skip to main content": "Ga door naar de hoofdinhoud", "Source": "Bron", + "Subcategories:": "Subcategorieën", "Tags and Categories": "Tags en Categorieën", "Tags": "Tags", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "oude berichten, pagina %d", "page %d": "pagina %d", } diff --git a/nikola/data/themes/base/messages/messages_pl.py b/nikola/data/themes/base/messages/messages_pl.py index b1d4e82..89aae0f 100644 --- a/nikola/data/themes/base/messages/messages_pl.py +++ b/nikola/data/themes/base/messages/messages_pl.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "zostało %d minut czytania", + "(active)": "(aktywne)", "Also available in:": "Również dostępny w językach:", "Archive": "Archiwum", "Categories": "Kategorie", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "Opublikowano:", "Posts about %s": "Posty o %s", "Posts for year %s": "Posty z roku %s", + "Posts for {month} {day}, {year}": "Posty z {day} {month} {year}", "Posts for {month} {year}": "Posty z {month} {year}", "Previous post": "Poprzedni post", "Publication date": "Data publikacji", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "Czytaj więcej", "Skip to main content": "Przejdź do treści", "Source": "Źródło", + "Subcategories:": "Podkategorie:", "Tags and Categories": "Tagi i Kategorie", "Tags": "Tagi", + "Write your page here.": "Tu wpisz treść strony.", + "Write your post here.": "Tu wpisz treść postu.", "old posts, page %d": "stare posty, strona %d", "page %d": "strona %d", } diff --git a/nikola/data/themes/base/messages/messages_pt.py b/nikola/data/themes/base/messages/messages_pt.py index c5c82ee..fd26d77 100644 --- a/nikola/data/themes/base/messages/messages_pt.py +++ b/nikola/data/themes/base/messages/messages_pt.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", + "(active)": "", "Also available in:": "", "Archive": "", "Categories": "", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "", "Posts about %s": "", "Posts for year %s": "", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "", "Previous post": "", "Publication date": "", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "", "Skip to main content": "", "Source": "", + "Subcategories:": "", "Tags and Categories": "", "Tags": "", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "", "page %d": "", } diff --git a/nikola/data/themes/base/messages/messages_pt_br.py b/nikola/data/themes/base/messages/messages_pt_br.py index 0805f8e..58ad63f 100644 --- a/nikola/data/themes/base/messages/messages_pt_br.py +++ b/nikola/data/themes/base/messages/messages_pt_br.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "%d mín restante para leitura", + "(active)": "", "Also available in:": "Também disponível em:", "Archive": "Arquivo", "Categories": "Categorias", @@ -19,16 +20,20 @@ MESSAGES = { "Posted:": "Publicado:", "Posts about %s": "Posts sobre %s", "Posts for year %s": "Posts do ano %s", + "Posts for {month} {day}, {year}": "Posts do {day} {month}, {year}", "Posts for {month} {year}": "Posts de {month} {year}", "Previous post": "Post anterior", "Publication date": "Data de publicação", "RSS feed": "Feed RSS", "Read in English": "Ler em português", "Read more": "Leia mais", - "Skip to main content": "", + "Skip to main content": "Pular para o conteúdo principal", "Source": "Código", + "Subcategories:": "", "Tags and Categories": "Tags e Categorias", "Tags": "Tags", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "Posts antigos, página %d", "page %d": "página %d", } diff --git a/nikola/data/themes/base/messages/messages_ru.py b/nikola/data/themes/base/messages/messages_ru.py index 7205906..cfbe536 100644 --- a/nikola/data/themes/base/messages/messages_ru.py +++ b/nikola/data/themes/base/messages/messages_ru.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "%d минут чтения осталось", + "(active)": "", "Also available in:": "Также доступно на:", "Archive": "Архив", "Categories": "Категории", @@ -19,16 +20,20 @@ MESSAGES = { "Posted:": "Опубликовано:", "Posts about %s": "Записи о %s", "Posts for year %s": "Записи за %s год", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "Записи за {month} {year}", "Previous post": "Предыдущая запись", "Publication date": "Дата опубликования", "RSS feed": "RSS лента", "Read in English": "Прочесть по-русски", "Read more": "Читать далее", - "Skip to main content": "", + "Skip to main content": "Перейти к главному содержимому", "Source": "Источник", + "Subcategories:": "", "Tags and Categories": "Тэги и категории", "Tags": "Тэги", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "%d страница со старыми записями", "page %d": "%d страница", } diff --git a/nikola/data/themes/base/messages/messages_si_lk.py b/nikola/data/themes/base/messages/messages_si_lk.py index c5c82ee..fd26d77 100644 --- a/nikola/data/themes/base/messages/messages_si_lk.py +++ b/nikola/data/themes/base/messages/messages_si_lk.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", + "(active)": "", "Also available in:": "", "Archive": "", "Categories": "", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "", "Posts about %s": "", "Posts for year %s": "", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "", "Previous post": "", "Publication date": "", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "", "Skip to main content": "", "Source": "", + "Subcategories:": "", "Tags and Categories": "", "Tags": "", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "", "page %d": "", } diff --git a/nikola/data/themes/base/messages/messages_sk.py b/nikola/data/themes/base/messages/messages_sk.py index e3618f3..a793ba6 100644 --- a/nikola/data/themes/base/messages/messages_sk.py +++ b/nikola/data/themes/base/messages/messages_sk.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "zostáva %d minút na čítanie", + "(active)": "", "Also available in:": "Tiež dostupné v:", "Archive": "Archív", "Categories": "Kategórie", @@ -19,16 +20,20 @@ MESSAGES = { "Posted:": "Zverejnené:", "Posts about %s": "Príspevky o %s", "Posts for year %s": "Príspevky z roku %s", + "Posts for {month} {day}, {year}": "Príspevky z dňa {day}. {month} {year}", "Posts for {month} {year}": "Príspevky za mesiac {month} z roku {year}", "Previous post": "Predchádzajúci príspevok", "Publication date": "Dátum zverejnenia", "RSS feed": "RSS kanál", "Read in English": "Čítať v slovenčine", "Read more": "Čítať ďalej", - "Skip to main content": "", + "Skip to main content": "Skočiť na hlavný obsah", "Source": "Zdroj", + "Subcategories:": "", "Tags and Categories": "Štítky a kategórie", "Tags": "Štítky", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "staré príspevky, strana %d", "page %d": "stránka %d", } diff --git a/nikola/data/themes/base/messages/messages_sl.py b/nikola/data/themes/base/messages/messages_sl.py index f9f1d13..992787b 100644 --- a/nikola/data/themes/base/messages/messages_sl.py +++ b/nikola/data/themes/base/messages/messages_sl.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "še %d min za branje preostanka", + "(active)": "", "Also available in:": "Na voljo tudi v:", "Archive": "Arhiv", "Categories": "Kategorije", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "Objavljeno:", "Posts about %s": "Objave o %s", "Posts for year %s": "Objave za leto %s", + "Posts for {month} {day}, {year}": "Objave za {day}. {month}, {year}", "Posts for {month} {year}": "Objave za {month} {year}", "Previous post": "Prejšnja objava", "Publication date": "Datum objave", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "Več o tem", "Skip to main content": "Preskoči na glavno vsebino", "Source": "Izvor", + "Subcategories:": "", "Tags and Categories": "Značke in kategorije", "Tags": "Značke", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "stare objave, stran %d", "page %d": "stran %d", } diff --git a/nikola/data/themes/base/messages/messages_sr.py b/nikola/data/themes/base/messages/messages_sr.py new file mode 100644 index 0000000..6087027 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_sr.py @@ -0,0 +1,39 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "%d min remaining to read": "%d минута је преостало за читање", + "(active)": "", + "Also available in:": "Такође доступан у:", + "Archive": "Архива", + "Categories": "Категорије", + "Comments": "Коментари", + "LANGUAGE": "Српски", + "Languages:": "Језици:", + "More posts about %s": "Више постова о %s", + "Newer posts": "Новији постови", + "Next post": "Следећи пост", + "No posts found.": "Нема постова.", + "Nothing found.": "Није ништа пронађено.", + "Older posts": "Старији постови", + "Original site": "Оригинал сајт", + "Posted:": "Објављено:", + "Posts about %s": "Постови о %s", + "Posts for year %s": "Постови за годину %s", + "Posts for {month} {day}, {year}": "", + "Posts for {month} {year}": "Постови за {month} {year}", + "Previous post": "Претходни пост", + "Publication date": "Датум објаве", + "RSS feed": "RSS feed", + "Read in English": "Прочитај на српском", + "Read more": "Прочитај више", + "Skip to main content": "Прескочи на главни садржај", + "Source": "Извор", + "Subcategories:": "", + "Tags and Categories": "Тагови и категорије", + "Tags": "Тагови", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "стари постови, страна %d", + "page %d": "страна %d", +} diff --git a/nikola/data/themes/base/messages/messages_sv.py b/nikola/data/themes/base/messages/messages_sv.py new file mode 100644 index 0000000..deda21a --- /dev/null +++ b/nikola/data/themes/base/messages/messages_sv.py @@ -0,0 +1,39 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "%d min remaining to read": "%d minuter kvar att läsa", + "(active)": "", + "Also available in:": "Även tillgänglig på:", + "Archive": "Arkiv", + "Categories": "Kategorier", + "Comments": "Kommentarer", + "LANGUAGE": "Svenska", + "Languages:": "Språk:", + "More posts about %s": "Mer inlägg om %s", + "Newer posts": "Nya inlägg", + "Next post": "Nästa inlägg", + "No posts found.": "Inga inlägg hittade", + "Nothing found.": "Inget hittat", + "Older posts": "Äldre inlägg", + "Original site": "Orgnialsida", + "Posted:": "Publicerad", + "Posts about %s": "Inlägg om %s", + "Posts for year %s": "Inlägg för år %s", + "Posts for {month} {day}, {year}": "Inlägg för {month} {day}, {year}", + "Posts for {month} {year}": "Inlägg för {month} {year}", + "Previous post": "Föregående inlägg", + "Publication date": "Publiceringsdatum", + "RSS feed": "RSS flöde", + "Read in English": "Läs på Svenska", + "Read more": "Läs mer", + "Skip to main content": "hoppa till huvudinehåll", + "Source": "Källa", + "Subcategories:": "Underkategorier:", + "Tags and Categories": "Taggar och Kategorier", + "Tags": "Taggar", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "gamla inlägg, sida %d", + "page %d": "sida %d", +} diff --git a/nikola/data/themes/base/messages/messages_tl.py b/nikola/data/themes/base/messages/messages_tl.py new file mode 100644 index 0000000..f748edd --- /dev/null +++ b/nikola/data/themes/base/messages/messages_tl.py @@ -0,0 +1,39 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "%d min remaining to read": "", + "(active)": "", + "Also available in:": "", + "Archive": "", + "Categories": "", + "Comments": "", + "LANGUAGE": "Ingles", + "Languages:": "Mga Wika:", + "More posts about %s": "", + "Newer posts": "", + "Next post": "Susunod", + "No posts found.": "", + "Nothing found.": "", + "Older posts": "", + "Original site": "", + "Posted:": "", + "Posts about %s": "", + "Posts for year %s": "", + "Posts for {month} {day}, {year}": "", + "Posts for {month} {year}": "", + "Previous post": "", + "Publication date": "", + "RSS feed": "", + "Read in English": "", + "Read more": "", + "Skip to main content": "", + "Source": "", + "Subcategories:": "", + "Tags and Categories": "", + "Tags": "Mga Tag", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "", + "page %d": "", +} diff --git a/nikola/data/themes/base/messages/messages_tr.py b/nikola/data/themes/base/messages/messages_tr.py index 3ba8217..21eb534 100644 --- a/nikola/data/themes/base/messages/messages_tr.py +++ b/nikola/data/themes/base/messages/messages_tr.py @@ -2,7 +2,8 @@ from __future__ import unicode_literals MESSAGES = { - "%d min remaining to read": "", + "%d min remaining to read": "%d dakikalık okuma", + "(active)": "", "Also available in:": "Şu dilde de mevcut:", "Archive": "Arşiv", "Categories": "Kategoriler", @@ -19,16 +20,20 @@ MESSAGES = { "Posted:": "Yayın tarihi:", "Posts about %s": "%s ile ilgili yazılar", "Posts for year %s": "%s yılındaki yazılar", + "Posts for {month} {day}, {year}": "{month} {day}, {year} 'den beri olan yazılar", "Posts for {month} {year}": "{month} {year} göre yazılar", "Previous post": "Önceki yazı", "Publication date": "Yayınlanma tarihi", "RSS feed": "RSS kaynağı", "Read in English": "Türkçe olarak oku", "Read more": "Devamını oku", - "Skip to main content": "", + "Skip to main content": "Ana içeriğe geç", "Source": "Kaynak", + "Subcategories:": "", "Tags and Categories": "Etiketler ve Kategoriler", "Tags": "Etiketler", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "eski yazılar, sayfa %d", "page %d": "sayfa %d", } diff --git a/nikola/data/themes/base/messages/messages_uk.py b/nikola/data/themes/base/messages/messages_uk.py new file mode 100644 index 0000000..16913da --- /dev/null +++ b/nikola/data/themes/base/messages/messages_uk.py @@ -0,0 +1,39 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "%d min remaining to read": "Залишилось читати %d хвилин", + "(active)": "", + "Also available in:": "Іншою мовою:", + "Archive": "Архів", + "Categories": "Категорії", + "Comments": "Коментарі", + "LANGUAGE": "Українська", + "Languages:": "Мови:", + "More posts about %s": "Більше статей про %s", + "Newer posts": "Нові статті", + "Next post": "Наступна стаття", + "No posts found.": "Не знайдено жодної статті", + "Nothing found.": "Нічого не знайдено", + "Older posts": "Більш старі статті", + "Original site": "Оригінал сайту", + "Posted:": "Опублікована:", + "Posts about %s": "Статті про %s", + "Posts for year %s": "Статті за %s рік", + "Posts for {month} {day}, {year}": "Статті за {month} {day}, {year}", + "Posts for {month} {year}": "Статті за {month} {year}", + "Previous post": "Попередня стаття", + "Publication date": "Дата публікації", + "RSS feed": "RSS-стрічка", + "Read in English": "Читати українською", + "Read more": "Читати далі", + "Skip to main content": "Перейти до основного матеріалу", + "Source": "Джерело", + "Subcategories:": "", + "Tags and Categories": "Теги і категорії", + "Tags": "Теги", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "старі статті, сторінка %d", + "page %d": "сторінка %d", +} diff --git a/nikola/data/themes/base/messages/messages_ur.py b/nikola/data/themes/base/messages/messages_ur.py index fac2a3e..075606c 100644 --- a/nikola/data/themes/base/messages/messages_ur.py +++ b/nikola/data/themes/base/messages/messages_ur.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "%d منٹ کا مطالعہ باقی", + "(active)": "", "Also available in:": "ان زبانوں میں بھی دستیاب:", "Archive": "آرکائیو", "Categories": "زمرے", @@ -19,16 +20,20 @@ MESSAGES = { "Posted:": "اشاعت:", "Posts about %s": "%s کے بارے میں تحاریر", "Posts for year %s": "سال %s کی تحاریر", + "Posts for {month} {day}, {year}": "{day} {month}، {year} کی تحاریر", "Posts for {month} {year}": "{month} {year} کی تحاریر", "Previous post": "پچھلی تحریر", "Publication date": "تاریخِ اشاعت", "RSS feed": "آر ایس ایس فیڈ", - "Read in English": "اردو میں پڑھیے", - "Read more": "مزید پڑھیے", - "Skip to main content": "", + "Read in English": "اردو میں پڑھیں", + "Read more": "مزید پڑھیں", + "Skip to main content": "مرکزی متن پر جائیں", "Source": "سورس", + "Subcategories:": "ذیلی زمرے", "Tags and Categories": "ٹیگز اور زمرے", "Tags": "ٹیگز", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "پرانی تحاریر صفحہ %d", "page %d": "صفحہ %d", } diff --git a/nikola/data/themes/base/messages/messages_zh_cn.py b/nikola/data/themes/base/messages/messages_zh_cn.py index 9d36505..c21b4f0 100644 --- a/nikola/data/themes/base/messages/messages_zh_cn.py +++ b/nikola/data/themes/base/messages/messages_zh_cn.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", + "(active)": "", "Also available in:": "其他语言版本:", "Archive": "文章存档", "Categories": "分类", @@ -19,6 +20,7 @@ MESSAGES = { "Posted:": "发表于:", "Posts about %s": "文章分类:%s", "Posts for year %s": "%s年文章", + "Posts for {month} {day}, {year}": "", "Posts for {month} {year}": "{year}年{month}月文章", "Previous post": "前一篇", "Publication date": "", @@ -27,8 +29,11 @@ MESSAGES = { "Read more": "更多", "Skip to main content": "", "Source": "源代码", + "Subcategories:": "", "Tags and Categories": "标签和分类", "Tags": "标签", + "Write your page here.": "", + "Write your post here.": "", "old posts, page %d": "旧文章页 %d", "page %d": "", } diff --git a/nikola/data/themes/base/messages/messages_zh_tw.py b/nikola/data/themes/base/messages/messages_zh_tw.py new file mode 100644 index 0000000..fd26d77 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_zh_tw.py @@ -0,0 +1,39 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "%d min remaining to read": "", + "(active)": "", + "Also available in:": "", + "Archive": "", + "Categories": "", + "Comments": "", + "LANGUAGE": "", + "Languages:": "", + "More posts about %s": "", + "Newer posts": "", + "Next post": "", + "No posts found.": "", + "Nothing found.": "", + "Older posts": "", + "Original site": "", + "Posted:": "", + "Posts about %s": "", + "Posts for year %s": "", + "Posts for {month} {day}, {year}": "", + "Posts for {month} {year}": "", + "Previous post": "", + "Publication date": "", + "RSS feed": "", + "Read in English": "", + "Read more": "", + "Skip to main content": "", + "Source": "", + "Subcategories:": "", + "Tags and Categories": "", + "Tags": "", + "Write your page here.": "", + "Write your post here.": "", + "old posts, page %d": "", + "page %d": "", +} diff --git a/nikola/data/themes/base/templates/archiveindex.tmpl b/nikola/data/themes/base/templates/archiveindex.tmpl new file mode 100644 index 0000000..129b7c4 --- /dev/null +++ b/nikola/data/themes/base/templates/archiveindex.tmpl @@ -0,0 +1,13 @@ +## -*- coding: utf-8 -*- +<%inherit file="index.tmpl"/> + +<%block name="extra_head"> + ${parent.extra_head()} + %if len(translations) > 1 and generate_atom: + %for language in translations: + <link rel="alternate" type="application/atom+xml" title="Atom for the ${archive_name} section (${language})" href="${_link("archive_atom", archive_name, language)}"> + %endfor + %elif generate_atom: + <link rel="alternate" type="application/atom+xml" title="Atom for the ${archive_name} archive" href="${_link("archive_atom", archive_name)}"> + %endif +</%block> diff --git a/nikola/data/themes/base/templates/base.tmpl b/nikola/data/themes/base/templates/base.tmpl index 21f5ad5..6da6416 100644 --- a/nikola/data/themes/base/templates/base.tmpl +++ b/nikola/data/themes/base/templates/base.tmpl @@ -14,7 +14,7 @@ ${template_hooks['extra_head']()} <a href="#content" class="sr-only sr-only-focusable">${messages("Skip to main content")}</a> <div id="container"> ${header.html_header()} - <main id="content"> + <main id="content" role="main"> <%block name="content"></%block> </main> ${footer.html_footer()} diff --git a/nikola/data/themes/base/templates/base_header.tmpl b/nikola/data/themes/base/templates/base_header.tmpl index 0c6e12d..0c19af6 100644 --- a/nikola/data/themes/base/templates/base_header.tmpl +++ b/nikola/data/themes/base/templates/base_header.tmpl @@ -16,7 +16,7 @@ </%def> <%def name="html_site_title()"> - <h1 id="brand"><a href="${abs_link('/')}" title="${blog_title}" rel="home"> + <h1 id="brand"><a href="${abs_link(_link("root", None, lang))}" title="${blog_title}" rel="home"> %if logo_url: <img src="${logo_url}" alt="${blog_title}" id="logo"> %endif @@ -36,7 +36,7 @@ <ul> %for suburl, text in url: % if rel_link(permalink, suburl) == "#": - <li class="active"><a href="${permalink}">${text}</a></li> + <li class="active"><a href="${permalink}">${text} <span class="sr-only">${messages("(active)", lang)}</span></a></li> %else: <li><a href="${suburl}">${text}</a></li> %endif @@ -44,7 +44,7 @@ </ul> % else: % if rel_link(permalink, url) == "#": - <li class="active"><a href="${permalink}">${text}</a></li> + <li class="active"><a href="${permalink}">${text} <span class="sr-only">${messages("(active)", lang)}</span></a></li> %else: <li><a href="${url}">${text}</a></li> %endif diff --git a/nikola/data/themes/base/templates/base_helper.tmpl b/nikola/data/themes/base/templates/base_helper.tmpl index 491b6da..28b3f8a 100644 --- a/nikola/data/themes/base/templates/base_helper.tmpl +++ b/nikola/data/themes/base/templates/base_helper.tmpl @@ -2,28 +2,24 @@ <%def name="html_headstart()"> <!DOCTYPE html> -<html -\ -% if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) or (comment_system == 'facebook'): +<html \ 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# \ +og: http://ogp.me/ns# article: http://ogp.me/ns/article# \ %endif %if comment_system == 'facebook': -fb: http://ogp.me/ns/fb# \ +fb: http://ogp.me/ns/fb# %endif -'\ +' \ +%if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']): +vocab="http://ogp.me/ns" \ %endif -\ % if is_rtl: dir="rtl" \ % endif \ lang="${lang}"> - <head> +<head> <meta charset="utf-8"> %if description: <meta name="description" content="${description}"> @@ -83,6 +79,10 @@ lang="${lang}"> <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> %endif %endif + % if needs_ipython_css: + <link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css"> + % endif </%def> <%def name="html_feedlinks()"> @@ -97,13 +97,22 @@ lang="${lang}"> <link rel="alternate" type="application/rss+xml" title="RSS" href="${_link('rss', None)}"> %endif %endif + %if generate_atom: + %if len(translations) > 1: + %for language in translations: + <link rel="alternate" type="application/atom+xml" title="Atom (${language})" href="${_link('index_atom', None, language)}"> + %endfor + %else: + <link rel="alternate" type="application/atom+xml" title="Atom" href="${_link('index_atom', None)}"> + %endif + %endif </%def> <%def name="html_translations()"> <ul class="translations"> %for langname in translations.keys(): %if langname != lang: - <li><a href="${_link("index", None, langname)}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li> + <li><a href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li> %endif %endfor </ul> diff --git a/nikola/data/themes/base/templates/comments_helper_disqus.tmpl b/nikola/data/themes/base/templates/comments_helper_disqus.tmpl index 8a94eaf..6dd423c 100644 --- a/nikola/data/themes/base/templates/comments_helper_disqus.tmpl +++ b/nikola/data/themes/base/templates/comments_helper_disqus.tmpl @@ -1,10 +1,6 @@ ## -*- coding: utf-8 -*- -<%! - import json - translations = { - 'es': 'es_ES', - } -%> + +<%! import json %> <%def name="comment_form(url, title, identifier)"> %if comment_system_id: @@ -17,7 +13,11 @@ disqus_title=${json.dumps(title)}, disqus_identifier="${identifier}", disqus_config = function () { - this.language = "${translations.get(lang, lang)}"; + %if lang == 'es': + this.language = "es_ES"; + %else: + this.language = "${lang}"; + %endif }; (function() { var dsq = document.createElement('script'); dsq.async = true; diff --git a/nikola/data/themes/base/templates/crumbs.tmpl b/nikola/data/themes/base/templates/crumbs.tmpl index de8e570..49c5e1e 100644 --- a/nikola/data/themes/base/templates/crumbs.tmpl +++ b/nikola/data/themes/base/templates/crumbs.tmpl @@ -5,7 +5,13 @@ <nav class="breadcrumbs"> <ul class="breadcrumb"> % for link, text in crumbs: - <li><a href="${link}">${text}</a></li> + % if text != index_file: + % if link == '#': + <li>${text.rsplit('.html', 1)[0]}</li> + % else: + <li><a href="${link}">${text}</a></li> + % endif + % endif % endfor </ul> </nav> diff --git a/nikola/data/themes/base/templates/gallery.tmpl b/nikola/data/themes/base/templates/gallery.tmpl index ca9da05..0ee07ac 100644 --- a/nikola/data/themes/base/templates/gallery.tmpl +++ b/nikola/data/themes/base/templates/gallery.tmpl @@ -7,7 +7,7 @@ <%block name="content"> ${ui.bar(crumbs)} %if title: - <h1>${title}</h1> + <h1>${title|h}</h1> %endif %if post: <p> @@ -34,3 +34,8 @@ ${comments.comment_form(None, permalink, title)} %endif </%block> + +<%block name="extra_head"> +${parent.extra_head()} +<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml"> +</%block> diff --git a/nikola/data/themes/base/templates/index.tmpl b/nikola/data/themes/base/templates/index.tmpl index e833eb0..69630e5 100644 --- a/nikola/data/themes/base/templates/index.tmpl +++ b/nikola/data/themes/base/templates/index.tmpl @@ -3,15 +3,23 @@ <%namespace name="comments" file="comments_helper.tmpl"/> <%inherit file="base.tmpl"/> +<%block name="extra_head"> + ${parent.extra_head()} + % if posts and (permalink == '/' or permalink == '/' + index_file): + <link rel="prefetch" href="${posts[0].permalink()}" type="text/html"> + % endif +</%block> + <%block name="content"> +<%block name="content_header"></%block> <div class="postindex"> % for post in posts: <article class="h-entry post-${post.meta('type')}"> <header> - <h1 class="p-name entry-title"><a href="${post.permalink()}" class="u-url">${post.title()}</h1></a> + <h1 class="p-name entry-title"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1> <div class="metadata"> <p class="byline author vcard"><span class="byline-name fn">${post.author()}</span></p> - <p class="dateline"><a href="${post.permalink()}" rel="bookmark"><time class="published dt-published" datetime="${post.date.isoformat()}" itemprop="datePublished" title="${messages("Publication date")}">${post.formatted_date(date_format)}</time></a></p> + <p class="dateline"><a href="${post.permalink()}" rel="bookmark"><time class="published dt-published" datetime="${post.date.isoformat()}" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></a></p> % if not post.meta('nocomments') and site_has_comments: <p class="commentline">${comments.comment_link(post.permalink(), post._base_path)} % endif diff --git a/nikola/data/themes/base/templates/list_post.tmpl b/nikola/data/themes/base/templates/list_post.tmpl index 0ef164f..4fb497c 100644 --- a/nikola/data/themes/base/templates/list_post.tmpl +++ b/nikola/data/themes/base/templates/list_post.tmpl @@ -9,7 +9,7 @@ %if posts: <ul class="postlist"> % for post in posts: - <li><a href="${post.permalink()}" class="listtitle">${post.title()}</a> <time class="listdate" datetime="${post.date.isoformat()}" title="${messages("Publication date")}">${post.formatted_date(date_format)}</time></li> + <li><a href="${post.permalink()}" class="listtitle">${post.title()|h}</a> <time class="listdate" datetime="${post.date.isoformat()}" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></li> % endfor </ul> %else: diff --git a/nikola/data/themes/base/templates/post.tmpl b/nikola/data/themes/base/templates/post.tmpl index fc0afba..cbb81ef 100644 --- a/nikola/data/themes/base/templates/post.tmpl +++ b/nikola/data/themes/base/templates/post.tmpl @@ -10,15 +10,18 @@ <meta name="keywords" content="${post.meta('keywords')|h}"> % endif %if post.description(): - <meta name="description" itemprop="description" content="${post.description()}"> + <meta name="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()}" type="text/html"> + <link rel="prev" href="${post.prev_post.permalink()}" title="${post.prev_post.title()|h}" type="text/html"> %endif %if post.next_post: - <link rel="next" href="${post.next_post.permalink()}" title="${post.next_post.title()}" type="text/html"> + <link rel="next" href="${post.next_post.permalink()}" title="${post.next_post.title()|h}" 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)} @@ -37,7 +40,7 @@ </nav> </aside> % if not post.meta('nocomments') and site_has_comments: - <section class="comments"> + <section class="comments hidden-print"> <h2>${messages("Comments")}</h2> ${comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path)} </section> diff --git a/nikola/data/themes/base/templates/post_header.tmpl b/nikola/data/themes/base/templates/post_header.tmpl index c848186..0efb2f8 100644 --- a/nikola/data/themes/base/templates/post_header.tmpl +++ b/nikola/data/themes/base/templates/post_header.tmpl @@ -4,12 +4,12 @@ <%def name="html_title()"> %if title and not post.meta('hidetitle'): - <h1 class="p-name entry-title" itemprop="headline name"><a href="${post.permalink()}" class="u-url">${title|h}</a></h1> + <h1 class="p-name entry-title" itemprop="headline name"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1> %endif </%def> <%def name="html_translations(post)"> - % if len(translations) > 1: + % if len(post.translated_to) > 1: <div class="metadata posttranslations translations"> <h3 class="posttranslations-intro">${messages("Also available in:")}</h3> % for langname in translations.keys(): @@ -32,13 +32,13 @@ ${html_title()} <div class="metadata"> <p class="byline author vcard"><span class="byline-name fn">${post.author()}</span></p> - <p class="dateline"><a href="${post.permalink()}" rel="bookmark"><time class="published dt-published" datetime="${post.date.isoformat()}" itemprop="datePublished" title="${messages("Publication date")}">${post.formatted_date(date_format)}</time></a></p> + <p class="dateline"><a href="${post.permalink()}" rel="bookmark"><time class="published dt-published" datetime="${post.date.isoformat()}" itemprop="datePublished" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</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><a href='${post.meta('link')}'>${messages("Original site")}</a></p> + <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()}"> diff --git a/nikola/data/themes/base/templates/post_helper.tmpl b/nikola/data/themes/base/templates/post_helper.tmpl index c4e0ed1..e091447 100644 --- a/nikola/data/themes/base/templates/post_helper.tmpl +++ b/nikola/data/themes/base/templates/post_helper.tmpl @@ -14,7 +14,9 @@ %if post.tags: <ul itemprop="keywords" class="tags"> %for tag in post.tags: - <li><a class="tag p-category" href="${_link('tag', tag)}" rel="tag">${tag}</a></li> + % if tag not in hidden_tags: + <li><a class="tag p-category" href="${_link('tag', tag)}" rel="tag">${tag}</a></li> + % endif %endfor </ul> %endif @@ -22,15 +24,15 @@ <%def name="html_pager(post)"> %if post.prev_post or post.next_post: - <ul class="pager"> + <ul class="pager hidden-print"> %if post.prev_post: <li class="previous"> - <a href="${post.prev_post.permalink()}" rel="prev" title="${post.prev_post.title()}">${messages("Previous post")}</a> + <a href="${post.prev_post.permalink()}" rel="prev" title="${post.prev_post.title()|h}">${messages("Previous post")}</a> </li> %endif %if post.next_post: <li class="next"> - <a href="${post.next_post.permalink()}" rel="next" title="${post.next_post.title()}">${messages("Next post")}</a> + <a href="${post.next_post.permalink()}" rel="next" title="${post.next_post.title()|h}">${messages("Next post")}</a> </li> %endif </ul> @@ -39,15 +41,30 @@ <%def name="open_graph_metadata(post)"> %if use_open_graph: - <meta name="og:title" content="${post.title()[:70]|h}"> - <meta name="og:url" content="${abs_link(permalink)}"> + <meta property="og:site_name" content="${blog_title|striphtml}"> + <meta property="og:title" content="${post.title()[:70]|h}"> + <meta property="og:url" content="${abs_link(permalink)}"> %if post.description(): - <meta name="og:description" content="${post.description()[:200]|h}"> + <meta property="og:description" content="${post.description()[:200]|h}"> %else: - <meta name="og:description" content="${post.text(strip_html=True)[:200]|h}"> + <meta property="og:description" content="${post.text(strip_html=True)[:200]|h}"> + %endif + %if post.previewimage: + <meta property="og:image" content="${url_replacer(permalink, post.previewimage, lang, 'absolute')}"> + %endif + <meta property="og:type" content="article"> +### Will only work with Pintrest and breaks everywhere else who expect a [Facebook] URI. +### %if post.author(): +### <meta property="article:author" content="${post.author()}"> +### %endif + %if post.date.isoformat(): + <meta property="article:published_time" content="${post.date.isoformat()}"> + %endif + %if post.tags: + %for tag in post.tags: + <meta property="article:tag" content="${tag}"> + %endfor %endif - <meta name="og:site_name" content="${blog_title|striphtml}"> - <meta name="og:type" content="article"> %endif </%def> diff --git a/nikola/data/themes/base/templates/post_list_directive.tmpl b/nikola/data/themes/base/templates/post_list_directive.tmpl index d9166e9..e080a81 100644 --- a/nikola/data/themes/base/templates/post_list_directive.tmpl +++ b/nikola/data/themes/base/templates/post_list_directive.tmpl @@ -8,7 +8,7 @@ <li class="post-list-item"> ${post.formatted_date(date_format)} - <a href="${post.permalink(lang)}">${post.title(lang)}</a> + <a href="${post.permalink(lang)}">${post.title(lang)|h}</a> </li> % endfor </ul> diff --git a/nikola/data/themes/base/templates/tag.tmpl b/nikola/data/themes/base/templates/tag.tmpl index bff82c2..ec5caca 100644 --- a/nikola/data/themes/base/templates/tag.tmpl +++ b/nikola/data/themes/base/templates/tag.tmpl @@ -16,7 +16,18 @@ <%block name="content"> <article class="tagpage"> <header> - <h1>${title}</h1> + <h1>${title|h}</h1> + %if description: + <p>${description}</p> + %endif + %if subcategories: + ${messages('Subcategories:')} + <ul> + %for name, link in subcategories: + <li><a href="${link}">${name}</a></li> + %endfor + </ul> + %endif <div class="metadata"> %if len(translations) > 1 and generate_rss: %for language in translations: @@ -32,7 +43,7 @@ %if posts: <ul class="postlist"> % for post in posts: - <li><a href="${post.permalink()}" class="listtitle">${post.title()}</a> <time class="listdate" datetime="${post.date.isoformat()}" title="${messages("Publication date")}">${post.formatted_date(date_format)}</time></li> + <li><a href="${post.permalink()}" class="listtitle">${post.title()|h}</a> <time class="listdate" datetime="${post.date.isoformat()}" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></li> % endfor </ul> %endif diff --git a/nikola/data/themes/base/templates/tagindex.tmpl b/nikola/data/themes/base/templates/tagindex.tmpl index 9dda70a..7160fe9 100644 --- a/nikola/data/themes/base/templates/tagindex.tmpl +++ b/nikola/data/themes/base/templates/tagindex.tmpl @@ -1,2 +1,24 @@ ## -*- coding: utf-8 -*- <%inherit file="index.tmpl"/> + +<%block name="content_header"> + %if subcategories: + ${messages('Subcategories:')} + <ul> + %for name, link in subcategories: + <li><a href="${link}">${name}</a></li> + %endfor + </ul> + %endif +</%block> + +<%block name="extra_head"> + ${parent.extra_head()} + %if len(translations) > 1 and generate_atom: + %for language in translations: + <link rel="alternate" type="application/atom+xml" title="Atom for the ${tag} section (${language})" href="${_link(kind + "_atom", tag, language)}"> + %endfor + %elif generate_atom: + <link rel="alternate" type="application/atom+xml" title="Atom for the ${tag} section" href="${_link("tag" + "_atom", tag)}"> + %endif +</%block> diff --git a/nikola/data/themes/base/templates/tags.tmpl b/nikola/data/themes/base/templates/tags.tmpl index 3e0c4b4..a9d2dd7 100644 --- a/nikola/data/themes/base/templates/tags.tmpl +++ b/nikola/data/themes/base/templates/tags.tmpl @@ -7,14 +7,24 @@ <h1>${title}</h1> </header> % if cat_items: - <h2>${messages("Categories")}</h2> - <ul class="postlist"> - % for text, link in cat_items: - % if text: - <li><a class="reference" href="${link}">${text}</a></li> + % if items: + <h2>${messages("Categories")}</h2> + % endif + % for text, full_name, path, link, indent_levels, indent_change_before, indent_change_after in cat_hierarchy: + % for i in range(indent_change_before): + <ul class="postlist"> + % endfor + <li><a class="reference" href="${link}">${text}</a> + % if indent_change_after <= 0: + </li> % endif + % for i in range(-indent_change_after): + </ul> + % if i + 1 < len(indent_levels): + </li> + % endif + % endfor % endfor - </ul> % if items: <h2>${messages("Tags")}</h2> % endif @@ -22,7 +32,9 @@ % if items: <ul class="postlist"> % for text, link in items: - <li><a class="reference listtitle" href="${link}">${text}</a></li> + % if text not in hidden_tags: + <li><a class="reference listtitle" href="${link}">${text}</a></li> + % endif % endfor </ul> % endif diff --git a/nikola/data/themes/bootstrap-jinja/README.md b/nikola/data/themes/bootstrap-jinja/README.md index 5340fe2..637caf5 100644 --- a/nikola/data/themes/bootstrap-jinja/README.md +++ b/nikola/data/themes/bootstrap-jinja/README.md @@ -3,7 +3,7 @@ A "website-done-with-bootstrap" theme, so to speak. Has a fixed navigation bar at top that displays the NAVIGATION_LINKS setting and supports nested menus. -This theme is used in Nikola's website: http://getnikola.com +This theme is used in Nikola's website: https://getnikola.com Important: To fit in the bootstrap navigation bar, the search form needs the navbar-form and pull-left CSS classes applied. Here is an example with Nikola's diff --git a/nikola/data/themes/bootstrap-jinja/assets/css/theme.css b/nikola/data/themes/bootstrap-jinja/assets/css/theme.css index 7566a80..4fc31a8 120000..100644 --- a/nikola/data/themes/bootstrap-jinja/assets/css/theme.css +++ b/nikola/data/themes/bootstrap-jinja/assets/css/theme.css @@ -1 +1,205 @@ -../../../bootstrap/assets/css/theme.css
\ No newline at end of file +#container { + width: 960px; + margin: 50 auto; +} + +#contentcolumn { + max-width: 760px; +} +#q { + width: 150px; +} + +img { + max-width: 90%; +} + +.postbox { + border-bottom: 2px solid darkgrey; + margin-bottom: 12px; +} + +.footerbox {padding: 15px; text-align: center; margin-bottom: 15px;} + +td.label { + /* Issue #290 */ + background-color: inherit; +} + +.footnote-reference { + /* Issue 290 */ + vertical-align: super; + font-size: xx-small; +} + +.caption { + /* Issue 292 */ + text-align: center; + padding-top: 1em; +} + +div.figure > img, +div.figure > a > img { + /* Issue 292 */ + display: block; + margin-left: auto; + margin-right: auto; +} + +div.sidebar, div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning { + /* Issue 277 */ + border: 1px solid #aaa; + border-radius: 5px; +} + +blockquote p, blockquote { + font-size: 17.5px; + font-weight: 300; + line-height: 1.25; +} + +ul.bricks > li { + display: inline; + background-color: lightblue; + padding: 8px; + border-radius: 5px; + line-height: 3; + white-space:nowrap; + margin: 3px; +} + +ul.breadcrumb > li:before { + content: " / "; +} + +pre, pre code { + white-space: pre; + word-wrap: normal; + overflow: auto; +} + +article.post-micro { + font-family: Georgia, 'Times New Roman', Times, serif; + font-size: 1.5em; +} + +.image-block { + display: inline-block; +} + +.flowr_row { + width: 100%; +} + +.tags { + padding-left: 0; + margin-left: -5px; + list-style: none; + text-align: center; + +} + +.tags > li { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + background-color: #999; + border-radius: 10px; +} + +.tags > li a { + color: #fff; +} + +.metadata p:before, +.postlist .listdate:before { + content: " — "; +} + +.metadata p:first-of-type:before { + content: ""; +} + +.metadata p { + display: inline; +} + +.posttranslations h3 { + display: inline; + font-size: 1em; + font-weight: bold; +} + +.posttranslations h3:last-child { + display: none; +} + +.entry-content { + margin-top: 1em; +} + +.navbar .brand { + padding: 0 20px; +} + +.navbar .brand #blog-title { + padding: 10px 0; + display: inline-block; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} + +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; +} + +/* hat tip bootstrap/html5 boilerplate */ +@media print { + *, *:before, *:after { + font-family: Garamond, Junicode, serif; + } + + body { + font-size: 12pt; + } + + article .entry-title a[href]:after, + article .metadata a[href]:after, + article .tags a[href]:after { + content: ""; + } + + article .metadata .sourceline { + display: none; + } + + article .metadata .linkline a[href]:after { + content: " (" attr(href) ")"; + } + + .navbar { + display: none; + } +} diff --git a/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-bn.js b/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-bn.js new file mode 120000 index 0000000..9b995d8 --- /dev/null +++ b/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-bn.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-bn.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js b/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js new file mode 120000 index 0000000..e20bd38 --- /dev/null +++ b/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-pt-BR.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js b/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js deleted file mode 120000 index 76f289e..0000000 --- a/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-pt-br.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap-jinja/assets/js/flowr.plugin.js b/nikola/data/themes/bootstrap-jinja/assets/js/flowr.plugin.js index c195756..c0d986b 120000..100644 --- a/nikola/data/themes/bootstrap-jinja/assets/js/flowr.plugin.js +++ b/nikola/data/themes/bootstrap-jinja/assets/js/flowr.plugin.js @@ -1 +1,265 @@ -../../../bootstrap/assets/js/flowr.plugin.js
\ No newline at end of file +/** + * Flowr.js - Simple jQuery plugin to emulate Flickr's justified view + * For usage information refer to http://github.com/kalyan02/flowr-js + * + * + * @author: Kalyan Chakravarthy (http://KalyanChakravarthy.net) + * @version: v0.1 + */ +(function($){ + //$("#container2").css( 'border', '1px solid #ccc'); + $.fn.flowr = function(options) { + + $this = this; + var ROW_CLASS_NAME = 'flowr-row'; // Class name for the row of flowy + var MAX_LAST_ROW_GAP = 25; // If the width of last row is lesser than max-width, recalculation is needed + var NO_COPY_FIELDS = [ 'complete', 'data', 'responsive' ]; // these attributes will not be carried forward for append related calls + var DEFAULTS = { + 'data' : [], + 'padding' : 5, // whats the padding between flowy items + 'height' : 240, // Minimum height an image row should take + 'render' : null, // callback function to get the tag + 'append' : false, // TODO + 'widthAttr' : 'width', // a custom data structure can specify which attribute refers to height/width + 'heightAttr' : 'height', + 'maxScale' : 1.5, // In case there is only 1 elment in last row + 'maxWidth' : this.width()-1, // 1px is just for offset + 'itemWidth' : null, // callback function for width + 'itemHeight' : null, // callback function for height + 'complete' : null, // complete callback + 'rowClassName' : ROW_CLASS_NAME, + 'rows' : -1, // Maximum number of rows to render. -1 for no limit. + 'responsive' : true // make content responsive + }; + var settings = $.extend( DEFAULTS, options); + + // If data is being appended, we already have settings + // If we already have settings, retrieve them + if( settings.append && $this.data('lastSettings') ) { + lastSettings = $this.data('lastSettings'); + + // Copy over the settings from previous init + for( attr in DEFAULTS ) { + if( NO_COPY_FIELDS.indexOf(attr)<0 && settings[attr] == DEFAULTS[attr] ) { + settings[attr] = lastSettings[attr]; + } + } + + // Check if we have an incomplete last row + lastRow = $this.data('lastRow'); + if( lastRow.data.length > 0 && settings.maxWidth-lastRow.width > MAX_LAST_ROW_GAP ) { + // Prepend the incomplete row to newly loaded data and redraw + lastRowData = lastSettings.data.slice( lastSettings.data.length - lastRow.data.length - 1 ); + settings.data = lastRowData.concat(settings.data); + + // Remove the incomplete row + // TODO: Don't reload this stuff later. Reattach to new row. + $( '.' + settings.rowClassName + ':last', $this ).detach(); + } else { + // console.log( lastRow.data.length ); + // console.log( lastRow.width ); + } + } + + // only on the first initial call + if( !settings.responsive && !settings.append ) + $this.width( $this.width() ); + + // Basic sanity checks + if( !(settings.data instanceof Array) ) + return; + + if( typeof(settings.padding) != 'number' ) + settings.padding = parseInt( settings.padding ); + + if( typeof(settings.itemWidth) != 'function' ) { + settings.itemWidth = function(data) { + return data[ settings.widthAttr ]; + } + } + + if( typeof(settings.itemHeight) != 'function' ) { + settings.itemHeight = function(data) { + return data[ settings.heightAttr ]; + } + } + + // A standalone utility to calculate the item widths for a particular row + // Returns rowWidth: width occupied & data : the items in the new row + var utils = { + getNextRow : function( data, settings ) { + var itemIndex = 0; + var itemsLength = data.length; + var lineItems = []; + var lineWidth = 0; + var maxWidth = settings.maxWidth; + var paddingSize = settings.padding; + + // console.log( 'maxItems=' + data.length ); + + requiredPadding = function() { + var extraPads = arguments.length == 1 ? arguments[0] : 0; + return (lineItems.length - 1 + extraPads) * settings.padding; + } + + while( lineWidth + requiredPadding() < settings.maxWidth && (itemIndex < itemsLength) ) { + var itemData = data[ itemIndex ]; + var itemWidth = settings.itemWidth.call( $this, itemData ); + var itemHeight = settings.itemHeight.call( $this, itemData ); + + var minHeight = settings.height; + var minWidth = Math.floor( itemWidth * settings.height / itemHeight ); + + var newLineWidth = lineWidth + minWidth + requiredPadding(1); + + if (minWidth > settings.maxWidth) { + // very short+wide images like panoramas + // show them even if ugly, as wide as possible + minWidth = settings.maxWidth-1; + minHeight = settings.height * minHeight / minWidth; + } + + // console.log( 'lineWidth = ' + lineWidth ); + // console.log( 'newLineWidth = ' + newLineWidth ); + if( newLineWidth < settings.maxWidth ) { + lineItems.push({ + 'height' : minHeight, + 'width' : minWidth, + 'itemData' : itemData + }); + + lineWidth += minWidth; + itemIndex ++; + } else { + // We'd have exceeded width. So break off to scale. + // console.log( 'breaking off = ' + itemIndex ); + // console.log( 'leave off size = ' + lineItems.length ); + break; + } + } //while + + // Scale the size to max width + testWidth=0; + if( lineWidth < settings.maxWidth ) { + var fullScaleWidth = settings.maxWidth - requiredPadding() - 10; + var currScaleWidth = lineWidth; + var scaleFactor = fullScaleWidth / currScaleWidth; + if( scaleFactor > settings.maxScale ) + scaleFactor = 1; + + var newHeight = Math.round( settings.height * scaleFactor ); + for( i=0; i<lineItems.length; i++ ) { + var lineItem = lineItems[ i ]; + lineItem.width = Math.floor(lineItem.width * scaleFactor); + lineItem.height = newHeight; + + testWidth += lineItem.width; + } + } + + return { + data : lineItems, + width : testWidth + requiredPadding() + }; + }, //getNextRow + reorderContent : function(){ + /* + TODO: optimize for faster resizing by reusing dom objects instead of killing the dom + */ + var _initialWidth = $this.data('width'); + var _newWidth = $this.width(); + var _change = _initialWidth - _newWidth; + + if(_initialWidth!=_newWidth) { + $this.html(''); + var _settings = $this.data( 'lastSettings' ); + _settings.data = $this.data( 'data' ); + _settings.maxWidth = $this.width() - 1; + $this.flowr( _settings ); + } + } + } //utils + + // If the resposive var is set to true then listen for resize method + // and prevent resizing from happening twice if responsive is set again during append phase! + if( settings.responsive && !$this.data('__responsive') ) { + $(window).resize(function(){ + initialWidth = $this.data('width'); + newWidth = $this.width(); + + //initiate resize + if( initialWidth != newWidth ) { + var task_id = $this.data('task_id'); + if( task_id ) { + task_id = clearTimeout( task_id ); + task_id = null; + } + task_id = setTimeout( utils.reorderContent, 80 ); + $this.data('task_id', task_id ); + } + }); + $this.data('__responsive',true); + } + + + return this.each(function(){ + + // Get a copy of original data. 1 level deep copy is sufficient. + var data = settings.data.slice(0); + var rowData = null; + var currentRow = 0; + var currentItem = 0; + + // Store all the data + var allData = $this.data( 'data' ) || []; + for(i=0;i<data.length;i++) { + allData.push( data[i] ); + } + $this.data( 'data', allData ); + + // While we have a new row + while( ( rowData = utils.getNextRow(data,settings) ) != null && rowData.data.length > 0 ) { + if( settings.rows > 0 && currentRow >= settings.rows ) + break; + // remove the number of elements in the new row from the top of data stack + data.splice( 0, rowData.data.length ); + + // Create a new row div, add class, append the htmls and insert the flowy items + var $row = $('<div>').addClass(settings.rowClassName); + for( i=0; i<rowData.data.length; i++ ) { + var displayData = rowData.data[i]; + // Get the HTML object from custom render function passed as argument + var displayObject = settings.render.call( $this, displayData ); + displayObject = $(displayObject); + // Set some basic stuff + displayObject + .css( 'width', displayData.width ) + .css( 'height', displayData.height ) + .css( 'margin-left', i==0 ? '0' : settings.padding + "px" ); //TODO:Refactor + $row.append( displayObject ); + + currentItem++; + } + $this.append( $row ); + // console.log ( "I> rowData.data.length="+rowData.data.length +" rowData.width="+rowData.width ); + + currentRow++; + $this.data('lastRow', rowData ); + } + // store the current state of settings and the items in last row + // we'll need this info when we append more items + $this.data('lastSettings', settings ); + + // onComplete callback + // pass back info about list of rows and items rendered + if( typeof (settings.complete) == 'function' ) { + var completeData = { + renderedRows : currentRow, + renderedItems : currentItem + } + settings.complete.call( $this, completeData ); + } + }); + }; + +})(jQuery); diff --git a/nikola/data/themes/bootstrap-jinja/assets/js/jquery.js b/nikola/data/themes/bootstrap-jinja/assets/js/jquery.js new file mode 120000 index 0000000..966173b --- /dev/null +++ b/nikola/data/themes/bootstrap-jinja/assets/js/jquery.js @@ -0,0 +1 @@ +../../../../../../bower_components/jquery/dist/jquery.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap-jinja/templates/base.tmpl b/nikola/data/themes/bootstrap-jinja/templates/base.tmpl index e9bed3c..3177276 100644 --- a/nikola/data/themes/bootstrap-jinja/templates/base.tmpl +++ b/nikola/data/themes/bootstrap-jinja/templates/base.tmpl @@ -13,7 +13,7 @@ <!-- Menubar --> -<div class="navbar navbar-fixed-top" id="navbar"> +<div class="navbar navbar-static-top" id="navbar"> <div class="navbar-inner"> <div class="container"> @@ -24,7 +24,7 @@ <span class="icon-bar"></span> </a> - <a class="brand" href="{{ abs_link('/') }}"> + <a class="brand" href="{{ abs_link(_link("root", None, lang)) }}"> {% if logo_url %} <img src="{{ logo_url }}" alt="{{ blog_title }}" id="logo"> {% endif %} @@ -58,7 +58,7 @@ </div> </div> <!-- End of Menubar --> -<div class="container-fluid" id="content"> +<div class="container-fluid" id="content" role="main"> <!--Body content--> <div class="row-fluid"> <div class="span2"></div> @@ -74,7 +74,13 @@ {{ template_hooks['page_footer']() }} </div> {{ base.late_load_js() }} - <script>jQuery("a.image-reference").colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script> + <script>$('a.image-reference:not(.islink) img:not(.islink)').parent().colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script> + <!-- fancy dates --> + <script> + moment.locale("{{ momentjs_locales[lang] }}"); + fancydates({{ date_fanciness }}, {{ js_date_format }}); + </script> + <!-- end fancy dates --> {% block extra_js %}{% endblock %} {% if annotations and post and not post.meta('noannotations') %} {{ notes.code() }} diff --git a/nikola/data/themes/bootstrap-jinja/templates/base_helper.tmpl b/nikola/data/themes/bootstrap-jinja/templates/base_helper.tmpl index e44b3a7..4a29e69 100644 --- a/nikola/data/themes/bootstrap-jinja/templates/base_helper.tmpl +++ b/nikola/data/themes/bootstrap-jinja/templates/base_helper.tmpl @@ -1,5 +1,6 @@ {# -*- coding: utf-8 -*- #} +{% import 'annotation_helper.tmpl' as notes with context %} {% macro html_headstart() %} <!DOCTYPE html> <html @@ -68,19 +69,21 @@ lang="{{ lang }}"> {% macro late_load_js() %} {% if use_bundles %} {% if use_cdn %} - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> - <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> + <script src="//maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> <script src="/assets/js/all.js"></script> {% else %} <script src="/assets/js/all-nocdn.js"></script> {% endif %} {% else %} {% if use_cdn %} - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> - <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> + <script src="//maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> {% else %} <script src="/assets/js/jquery.min.js"></script> <script src="/assets/js/bootstrap.min.js"></script> + <script src="/assets/js/moment-with-locales.min.js"></script> + <script src="/assets/js/fancydates.js"></script> {% endif %} <script src="/assets/js/jquery.colorbox-min.js"></script> {% endif %} @@ -94,14 +97,14 @@ lang="{{ lang }}"> {% macro html_stylesheets() %} {% if use_bundles %} {% if use_cdn %} - <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> + <link href="//maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> <link href="/assets/css/all.css" rel="stylesheet" type="text/css"> {% else %} <link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css"> {% endif %} {% else %} {% if use_cdn %} - <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> + <link href="//maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> {% else %} <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="/assets/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"> @@ -114,6 +117,10 @@ lang="{{ lang }}"> <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> {% endif %} {% endif %} + {% if needs_ipython_css %} + <link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css"> + {% endif %} {% if annotations and post and not post.meta('noannotations') %} {{ notes.css() }} {% elif not annotations and post and post.meta('annotations') %} @@ -129,7 +136,7 @@ lang="{{ lang }}"> <ul class="dropdown-menu"> {% for suburl, text in url %} {% if rel_link(permalink, suburl) == "#" %} - <li class="active"><a href="{{ permalink }}">{{ text }}</a> + <li class="active"><a href="{{ permalink }}">{{ text }} <span class="sr-only">{{ messages("(active)", lang) }}</span></a> {% else %} <li><a href="{{ suburl }}">{{ text }}</a> {% endif %} @@ -137,7 +144,7 @@ lang="{{ lang }}"> </ul> {% else %} {% if rel_link(permalink, url) == "#" %} - <li class="active"><a href="{{ permalink }}">{{ text }}</a> + <li class="active"><a href="{{ permalink }}">{{ text }} <span class="sr-only">{{ messages("(active)", lang) }}</span></a> {% else %} <li><a href="{{ url }}">{{ text }}</a> {% endif %} @@ -157,12 +164,21 @@ lang="{{ lang }}"> <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ _link('rss', None) }}"> {% endif %} {% endif %} + {% if generate_atom %} + {% if translations|length > 1 %} + {% for language in translations %} + <link rel="alternate" type="application/atom+xml" title="Atom ({{ language }})" href="{{ _link('index_atom', None, language) }}"> + {% endfor %} + {% else %} + <link rel="alternate" type="application/atom+xml" title="Atom" href="{{ _link('index_atom', None) }}"> + {% endif %} + {% endif %} {% endmacro %} {% macro html_translations() %} {% for langname in translations.keys() %} {% if langname != lang %} - <li><a href="{{ _link("index", None, langname) }}" rel="alternate" hreflang="{{ langname }}">{{ messages("LANGUAGE", langname) }}</a></li> + <li><a href="{{ abs_link(_link("root", None, langname)) }}" rel="alternate" hreflang="{{ langname }}">{{ messages("LANGUAGE", langname) }}</a></li> {% endif %} {% endfor %} {% endmacro %} diff --git a/nikola/data/themes/bootstrap-jinja/templates/bootstrap_helper.tmpl b/nikola/data/themes/bootstrap-jinja/templates/bootstrap_helper.tmpl deleted file mode 100644 index e426774..0000000 --- a/nikola/data/themes/bootstrap-jinja/templates/bootstrap_helper.tmpl +++ /dev/null @@ -1,78 +0,0 @@ -{# -*- coding: utf-8 -*- #} -{# Override only the functions that differ from base_helper.tmpl #} - -{% block html_stylesheets %} - {% if use_bundles %} - {% if use_cdn %} - <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet"> - <link href="/assets/css/all.css" rel="stylesheet" type="text/css"> - {% else %} - <link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css"> - {% endif %} - {% else %} - {% if use_cdn %} - <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet"> - {% else %} - <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"> - <link href="/assets/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"> - {% endif %} - <link href="/assets/css/rst.css" rel="stylesheet" type="text/css"> - <link href="/assets/css/code.css" rel="stylesheet" type="text/css"> - <link href="/assets/css/colorbox.css" rel="stylesheet" type="text/css"/> - <link href="/assets/css/theme.css" rel="stylesheet" type="text/css"/> - {% if has_custom_css %} - <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> - {% endif %} - {% endif %} - {% if annotations and post and not post.meta('noannotations') %} - {{ notes.css() }} - {% elif not annotations and post and post.meta('annotations') %} - {{ notes.css() }} - {% endif %} -{% endblock %} - - -{% block late_load_js %} - {% if use_bundles %} - {% if use_cdn %} - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> - <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/js/bootstrap.min.js"></script> - <script src="/assets/js/all.js"></script> - {% else %} - <script src="/assets/js/all-nocdn.js"></script> - {% endif %} - {% else %} - {% if use_cdn %} - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> - <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/js/bootstrap.min.js"></script> - {% else %} - <script src="/assets/js/jquery-1.11.0.min.js"></script> - <script src="/assets/js/bootstrap.min.js"></script> - {% endif %} - <script src="/assets/js/jquery.colorbox-min.js"></script> - {% endif %} -{% endblock %} - - -{% block html_navigation_links %} - {% for url, text in navigation_links[lang] %} - {% if url is mapping %} - <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ text }}<b class="caret"></b></a> - <ul class="dropdown-menu"> - {% for suburl, text in url %} - {% if rel_link(permalink, suburl) == "#" %} - <li class="active"><a href="{{ permalink }}">{{ text }}</a> - {% else %} - <li><a href="{{ suburl }}">{{ text }}</a> - {% endif %} - {% endfor %} - </ul> - {% else %} - {% if rel_link(permalink, url) == "#" %} - <li class="active"><a href="{{ permalink }}">{{ text }}</a> - {% else %} - <li><a href="{{ url }}">{{ text }}</a> - {% endif %} - {% endif %} - {% endfor %} -{% endblock %} diff --git a/nikola/data/themes/bootstrap-jinja/templates/gallery.tmpl b/nikola/data/themes/bootstrap-jinja/templates/gallery.tmpl index e3f9f05..07112da 100644 --- a/nikola/data/themes/bootstrap-jinja/templates/gallery.tmpl +++ b/nikola/data/themes/bootstrap-jinja/templates/gallery.tmpl @@ -7,7 +7,7 @@ {% block content %} {{ ui.bar(crumbs) }} {% if title %} - <h1>{{ title }}</h1> + <h1>{{ title|e }}</h1> {% endif %} {% if post %} <p> @@ -40,6 +40,7 @@ {% block extra_head %} {{ super() }} +<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml"> <style type="text/css"> .image-block { display: inline-block; diff --git a/nikola/data/themes/bootstrap-jinja/templates/post.tmpl b/nikola/data/themes/bootstrap-jinja/templates/post.tmpl index 54646d0..df4109c 100644 --- a/nikola/data/themes/bootstrap-jinja/templates/post.tmpl +++ b/nikola/data/themes/bootstrap-jinja/templates/post.tmpl @@ -14,10 +14,13 @@ {% endif %} <meta name="author" content="{{ post.author() }}"> {% if post.prev_post %} - <link rel="prev" href="{{ post.prev_post.permalink() }}" title="{{ post.prev_post.title() }}" type="text/html"> + <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() }}" type="text/html"> + <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) }} @@ -37,7 +40,7 @@ </nav> </aside> {% if not post.meta('nocomments') and site_has_comments %} - <section class="comments"> + <section class="comments hidden-print"> <h2>{{ messages("Comments") }}</h2> {{ comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path) }} </section> diff --git a/nikola/data/themes/bootstrap-jinja/templates/post_header.tmpl b/nikola/data/themes/bootstrap-jinja/templates/post_header.tmpl deleted file mode 100644 index b565244..0000000 --- a/nikola/data/themes/bootstrap-jinja/templates/post_header.tmpl +++ /dev/null @@ -1,40 +0,0 @@ -{# -*- coding: utf-8 -*- #} -{% import 'post_helper.tmpl' as helper with context %} -{% import 'comments_helper.tmpl' as comments with context %} - -{% macro html_title() %} - <h1 class="p-name entry-title" itemprop="headline name"><a href="{{ post.permalink() }}" class="u-url">{{ title|e }}</a></h1> -{% endmacro %} - -{% macro html_translations(post) %} - {% if translations|length > 1 %} - <div class="metadata posttranslations translations"> - <h3 class="posttranslations-intro">{{ messages("Also available in:") }}</h3> - {% for langname in translations.keys() %} - {% 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_post_header() %} - <header> - {{ html_title() }} - <div class="metadata"> - <p class="byline author vcard"><span class="byline-name fn">{{ post.author() }}</span></p> - <p class="dateline"><a href="{{ post.permalink() }}" rel="bookmark"><time class="published dt-published" datetime="{{ post.date.isoformat() }}" itemprop="datePublished" title="{{ messages("Publication date") }}">{{ post.formatted_date(date_format) }}</time></a></p> - {% if not post.meta('nocomments') and site_has_comments %} - <p class="commentline">{{ comments.comment_link(post.permalink(), post._base_path) }} - {% endif %} - {% if post.meta('link') %} - <p><a href='{{ post.meta('link') }}'>{{ messages("Original site") }}</a></p> - {% endif %} - {% if post.description() %} - <meta content="{{ post.description() }}" itemprop="description"> - {% endif %} - </div> - {{ html_translations(post) }} - </header> -{% endmacro %} diff --git a/nikola/data/themes/bootstrap-jinja/templates/tags.tmpl b/nikola/data/themes/bootstrap-jinja/templates/tags.tmpl index 080e621..c308f19 100644 --- a/nikola/data/themes/bootstrap-jinja/templates/tags.tmpl +++ b/nikola/data/themes/bootstrap-jinja/templates/tags.tmpl @@ -4,14 +4,24 @@ {% block content %} <h1>{{ title }}</h1> {% if cat_items %} - <h2>{{ messages("Categories") }}</h2> - <ul class="unstyled"> - {% for text, link in cat_items %} - {% if text %} - <li><a class="reference badge" href="{{ link }}">{{ text }}</a></li> + {% if items %} + <h2>{{ messages("Categories") }}</h2> + {% endif %} + {% for text, full_name, path, link, indent_levels, indent_change_before, indent_change_after in cat_hierarchy %} + {% for i in range(indent_change_before) %} + <ul class="unstyled"> + {% endfor %} + <li><a class="reference badge" href="{{ link }}">{{ text }}</a> + {% if indent_change_after <= 0 %} + </li> {% endif %} + {% for i in range(-indent_change_after) %} + </ul> + {% if i + 1 < indent_levels|length %} + </li> + {% endif %} + {% endfor %} {% endfor %} - </ul> {% if items %} <h2>{{ messages("Tags") }}</h2> {% endif %} @@ -19,7 +29,9 @@ {% if items %} <ul class="list-inline"> {% for text, link in items %} - <li><a class="reference badge" href="{{ link }}">{{ text }}</a></li> + {% if text not in hidden_tags %} + <li><a class="reference badge" href="{{ link }}">{{ text }}</a></li> + {% endif %} {% endfor %} </ul> {% endif %} diff --git a/nikola/data/themes/bootstrap/README.md b/nikola/data/themes/bootstrap/README.md index 5340fe2..637caf5 100644 --- a/nikola/data/themes/bootstrap/README.md +++ b/nikola/data/themes/bootstrap/README.md @@ -3,7 +3,7 @@ A "website-done-with-bootstrap" theme, so to speak. Has a fixed navigation bar at top that displays the NAVIGATION_LINKS setting and supports nested menus. -This theme is used in Nikola's website: http://getnikola.com +This theme is used in Nikola's website: https://getnikola.com Important: To fit in the bootstrap navigation bar, the search form needs the navbar-form and pull-left CSS classes applied. Here is an example with Nikola's diff --git a/nikola/data/themes/bootstrap/assets/css/theme.css b/nikola/data/themes/bootstrap/assets/css/theme.css index 761dbb6..4fc31a8 100644 --- a/nikola/data/themes/bootstrap/assets/css/theme.css +++ b/nikola/data/themes/bootstrap/assets/css/theme.css @@ -1,11 +1,3 @@ -body { - padding-top: 60px; -} -@media (max-width: 979px) { - body { - padding-top: 0px; - } -} #container { width: 960px; margin: 50 auto; @@ -91,17 +83,6 @@ article.post-micro { font-size: 1.5em; } -/* fix anchors for headers */ -h1, h2, h3 { - margin-top: -40px; - padding-top: 60px; -} - -h4, h5, h6 { - margin-top: -50px; - padding-top: 60px; -} - .image-block { display: inline-block; } @@ -193,3 +174,32 @@ h4, h5, h6 { overflow: visible; clip: auto; } + +/* hat tip bootstrap/html5 boilerplate */ +@media print { + *, *:before, *:after { + font-family: Garamond, Junicode, serif; + } + + body { + font-size: 12pt; + } + + article .entry-title a[href]:after, + article .metadata a[href]:after, + article .tags a[href]:after { + content: ""; + } + + article .metadata .sourceline { + display: none; + } + + article .metadata .linkline a[href]:after { + content: " (" attr(href) ")"; + } + + .navbar { + display: none; + } +} diff --git a/nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-bn.js b/nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-bn.js new file mode 120000 index 0000000..9b995d8 --- /dev/null +++ b/nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-bn.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-bn.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js b/nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js new file mode 120000 index 0000000..e20bd38 --- /dev/null +++ b/nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-pt-BR.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js b/nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js deleted file mode 120000 index 76f289e..0000000 --- a/nikola/data/themes/bootstrap/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-pt-br.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap/assets/js/jquery.js b/nikola/data/themes/bootstrap/assets/js/jquery.js new file mode 120000 index 0000000..966173b --- /dev/null +++ b/nikola/data/themes/bootstrap/assets/js/jquery.js @@ -0,0 +1 @@ +../../../../../../bower_components/jquery/dist/jquery.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap/bundles b/nikola/data/themes/bootstrap/bundles index 089b036..38257d2 100644 --- a/nikola/data/themes/bootstrap/bundles +++ b/nikola/data/themes/bootstrap/bundles @@ -1,4 +1,4 @@ assets/css/all-nocdn.css=bootstrap.css,bootstrap-responsive.css,rst.css,code.css,colorbox.css,theme.css,custom.css assets/css/all.css=rst.css,code.css,colorbox.css,theme.css,custom.css -assets/js/all-nocdn.js=jquery.min.js,bootstrap.min.js,jquery.colorbox-min.js -assets/js/all.js=jquery.colorbox-min.js +assets/js/all-nocdn.js=jquery.min.js,bootstrap.min.js,jquery.colorbox-min.js,moment-with-locales.min.js,fancydates.js +assets/js/all.js=jquery.colorbox-min.js,moment-with-locales.min.js,fancydates.js diff --git a/nikola/data/themes/bootstrap/templates/base.tmpl b/nikola/data/themes/bootstrap/templates/base.tmpl index 9f2bb61..e848673 100644 --- a/nikola/data/themes/bootstrap/templates/base.tmpl +++ b/nikola/data/themes/bootstrap/templates/base.tmpl @@ -13,7 +13,7 @@ ${template_hooks['extra_head']()} <!-- Menubar --> -<div class="navbar navbar-fixed-top" id="navbar"> +<div class="navbar navbar-static-top" id="navbar"> <div class="navbar-inner"> <div class="container"> @@ -24,7 +24,7 @@ ${template_hooks['extra_head']()} <span class="icon-bar"></span> </a> - <a class="brand" href="${abs_link('/')}"> + <a class="brand" href="${abs_link(_link("root", None, lang))}"> %if logo_url: <img src="${logo_url}" alt="${blog_title}" id="logo"> %endif @@ -58,7 +58,7 @@ ${template_hooks['extra_head']()} </div> </div> <!-- End of Menubar --> -<div class="container-fluid" id="content"> +<div class="container-fluid" id="content" role="main"> <!--Body content--> <div class="row-fluid"> <div class="span2"></div> @@ -74,7 +74,13 @@ ${template_hooks['extra_head']()} ${template_hooks['page_footer']()} </div> ${base.late_load_js()} - <script>jQuery("a.image-reference").colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script> + <script>$('a.image-reference:not(.islink) img:not(.islink)').parent().colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script> + <!-- fancy dates --> + <script> + moment.locale("${momentjs_locales[lang]}"); + fancydates(${date_fanciness}, ${js_date_format}); + </script> + <!-- end fancy dates --> <%block name="extra_js"></%block> % if annotations and post and not post.meta('noannotations'): ${notes.code()} diff --git a/nikola/data/themes/bootstrap/templates/base_helper.tmpl b/nikola/data/themes/bootstrap/templates/base_helper.tmpl index 40cce39..4c62f8d 100644 --- a/nikola/data/themes/bootstrap/templates/base_helper.tmpl +++ b/nikola/data/themes/bootstrap/templates/base_helper.tmpl @@ -1,5 +1,6 @@ ## -*- coding: utf-8 -*- +<%namespace name="notes" file="annotation_helper.tmpl" import="*" /> <%def name="html_headstart()"> <!DOCTYPE html> <html @@ -68,19 +69,21 @@ lang="${lang}"> <%def name="late_load_js()"> %if use_bundles: %if use_cdn: - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> - <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> + <script src="//maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> <script src="/assets/js/all.js"></script> %else: <script src="/assets/js/all-nocdn.js"></script> %endif %else: %if use_cdn: - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> - <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> + <script src="//maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> %else: <script src="/assets/js/jquery.min.js"></script> <script src="/assets/js/bootstrap.min.js"></script> + <script src="/assets/js/moment-with-locales.min.js"></script> + <script src="/assets/js/fancydates.js"></script> %endif <script src="/assets/js/jquery.colorbox-min.js"></script> %endif @@ -94,14 +97,14 @@ lang="${lang}"> <%def name="html_stylesheets()"> %if use_bundles: %if use_cdn: - <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> + <link href="//maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> <link href="/assets/css/all.css" rel="stylesheet" type="text/css"> %else: <link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css"> %endif %else: %if use_cdn: - <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> + <link href="//maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> %else: <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="/assets/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"> @@ -114,6 +117,10 @@ lang="${lang}"> <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> %endif %endif + % if needs_ipython_css: + <link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css"> + % endif % if annotations and post and not post.meta('noannotations'): ${notes.css()} % elif not annotations and post and post.meta('annotations'): @@ -129,7 +136,7 @@ lang="${lang}"> <ul class="dropdown-menu"> %for suburl, text in url: % if rel_link(permalink, suburl) == "#": - <li class="active"><a href="${permalink}">${text}</a> + <li class="active"><a href="${permalink}">${text} <span class="sr-only">${messages("(active)", lang)}</span></a> %else: <li><a href="${suburl}">${text}</a> %endif @@ -137,7 +144,7 @@ lang="${lang}"> </ul> % else: % if rel_link(permalink, url) == "#": - <li class="active"><a href="${permalink}">${text}</a> + <li class="active"><a href="${permalink}">${text} <span class="sr-only">${messages("(active)", lang)}</span></a> %else: <li><a href="${url}">${text}</a> %endif @@ -157,12 +164,21 @@ lang="${lang}"> <link rel="alternate" type="application/rss+xml" title="RSS" href="${_link('rss', None)}"> %endif %endif + %if generate_atom: + %if len(translations) > 1: + %for language in translations: + <link rel="alternate" type="application/atom+xml" title="Atom (${language})" href="${_link('index_atom', None, language)}"> + %endfor + %else: + <link rel="alternate" type="application/atom+xml" title="Atom" href="${_link('index_atom', None)}"> + %endif + %endif </%def> <%def name="html_translations()"> %for langname in translations.keys(): %if langname != lang: - <li><a href="${_link("index", None, langname)}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li> + <li><a href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li> %endif %endfor </%def> diff --git a/nikola/data/themes/bootstrap/templates/gallery.tmpl b/nikola/data/themes/bootstrap/templates/gallery.tmpl index 8ad4eb4..ab15587 100644 --- a/nikola/data/themes/bootstrap/templates/gallery.tmpl +++ b/nikola/data/themes/bootstrap/templates/gallery.tmpl @@ -7,7 +7,7 @@ <%block name="content"> ${ui.bar(crumbs)} %if title: - <h1>${title}</h1> + <h1>${title|h}</h1> %endif %if post: <p> @@ -40,6 +40,7 @@ ${comments.comment_form(None, permalink, title)} <%block name="extra_head"> ${parent.extra_head()} +<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml"> <style type="text/css"> .image-block { display: inline-block; diff --git a/nikola/data/themes/bootstrap/templates/post.tmpl b/nikola/data/themes/bootstrap/templates/post.tmpl index e55fcd5..8d9f88a 100644 --- a/nikola/data/themes/bootstrap/templates/post.tmpl +++ b/nikola/data/themes/bootstrap/templates/post.tmpl @@ -14,11 +14,14 @@ %endif <meta name="author" content="${post.author()}"> %if post.prev_post: - <link rel="prev" href="${post.prev_post.permalink()}" title="${post.prev_post.title()}" type="text/html"> + <link rel="prev" href="${post.prev_post.permalink()}" title="${post.prev_post.title()|h}" type="text/html"> %endif %if post.next_post: - <link rel="next" href="${post.next_post.permalink()}" title="${post.next_post.title()}" type="text/html"> + <link rel="next" href="${post.next_post.permalink()}" title="${post.next_post.title()|h}" 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)} @@ -37,7 +40,7 @@ </nav> </aside> % if not post.meta('nocomments') and site_has_comments: - <section class="comments"> + <section class="comments hidden-print"> <h2>${messages("Comments")}</h2> ${comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path)} </section> diff --git a/nikola/data/themes/bootstrap/templates/tags.tmpl b/nikola/data/themes/bootstrap/templates/tags.tmpl index 9afeca7..ead3b0a 100644 --- a/nikola/data/themes/bootstrap/templates/tags.tmpl +++ b/nikola/data/themes/bootstrap/templates/tags.tmpl @@ -4,14 +4,24 @@ <%block name="content"> <h1>${title}</h1> % if cat_items: - <h2>${messages("Categories")}</h2> - <ul class="unstyled"> - % for text, link in cat_items: - % if text: - <li><a class="reference badge" href="${link}">${text}</a></li> + % if items: + <h2>${messages("Categories")}</h2> + % endif + % for text, full_name, path, link, indent_levels, indent_change_before, indent_change_after in cat_hierarchy: + % for i in range(indent_change_before): + <ul class="unstyled"> + % endfor + <li><a class="reference badge" href="${link}">${text}</a> + % if indent_change_after <= 0: + </li> % endif + % for i in range(-indent_change_after): + </ul> + % if i + 1 < len(indent_levels): + </li> + % endif + % endfor % endfor - </ul> % if items: <h2>${messages("Tags")}</h2> % endif @@ -19,7 +29,9 @@ % if items: <ul class="list-inline"> % for text, link in items: - <li><a class="reference badge" href="${link}">${text}</a></li> + % if text not in hidden_tags: + <li><a class="reference badge" href="${link}">${text}</a></li> + % endif % endfor </ul> % endif diff --git a/nikola/data/themes/bootstrap3-jinja/assets/css/docs.css b/nikola/data/themes/bootstrap3-jinja/assets/css/docs.css index b9cce36..189ea89 120000..100644 --- a/nikola/data/themes/bootstrap3-jinja/assets/css/docs.css +++ b/nikola/data/themes/bootstrap3-jinja/assets/css/docs.css @@ -1 +1,160 @@ -../../../bootstrap3/assets/css/docs.css
\ No newline at end of file +body { + font-weight: 300; +} + +a:hover, +a:focus { + text-decoration: none; +} + +.container { + max-width: 700px; +} + +h2 { + text-align: center; + font-weight: 300; +} + + +/* Header +-------------------------------------------------- */ + +.jumbotron { + position: relative; + font-size: 16px; + color: #fff; + color: rgba(255,255,255,.75); + text-align: center; + background-color: #b94a48; + border-radius: 0; +} +.jumbotron h1, +.jumbotron .glyphicon-ok { + margin-bottom: 15px; + font-weight: 300; + letter-spacing: -1px; + color: #fff; +} +.jumbotron .glyphicon-ok { + font-size: 40px; + line-height: 1; +} +.btn-outline { + margin-top: 15px; + margin-bottom: 15px; + padding: 18px 24px; + font-size: inherit; + font-weight: 500; + color: #fff; /* redeclare to override the `.jumbotron a` */ + background-color: transparent; + border-color: #fff; + border-color: rgba(255,255,255,.5); + transition: all .1s ease-in-out; +} +.btn-outline:hover, +.btn-outline:active { + color: #b94a48; + background-color: #fff; + border-color: #fff; +} + +.jumbotron:after { + position: absolute; + right: 0; + bottom: 0; + left: 0; + z-index: 10; + display: block; + content: ""; + height: 30px; + background-image: -moz-linear-gradient(rgba(0, 0, 0, 0), rgba(0,0,0,.1)); + background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0), rgba(0,0,0,.1)); +} + +.jumbotron p a, +.jumbotron-links a { + font-weight: 500; + color: #fff; + transition: all .1s ease-in-out; +} +.jumbotron p a:hover, +.jumbotron-links a:hover { + text-shadow: 0 0 10px rgba(255,255,255,.55); +} + +/* Textual links */ +.jumbotron-links { + margin-top: 15px; + margin-bottom: 0; + padding-left: 0; + list-style: none; + font-size: 14px; +} +.jumbotron-links li { + display: inline; +} +.jumbotron-links li + li { + margin-left: 20px; +} + +@media (min-width: 768px) { + .jumbotron { + padding-top: 100px; + padding-bottom: 100px; + font-size: 21px; + } + .jumbotron h1, + .jumbotron .glyphicon-ok { + font-size: 50px; + } +} + +/* Steps for setup +-------------------------------------------------- */ + +.how-to { + padding: 50px 20px; + border-top: 1px solid #eee; +} +.how-to li { + font-size: 21px; + line-height: 1.5; + margin-top: 20px; +} +.how-to li p { + font-size: 16px; + color: #555; +} +.how-to code { + font-size: 85%; + color: #b94a48; + background-color: #fcf3f2; + word-wrap: break-word; + white-space: normal; +} + +/* Icons +-------------------------------------------------- */ + +.the-icons { + padding: 40px 10px; + font-size: 20px; + line-height: 2; + color: #333; + text-align: center; +} +.the-icons .glyphicon { + padding-left: 15px; + padding-right: 15px; +} + +/* Footer +-------------------------------------------------- */ + +.footer { + padding: 50px 30px; + color: #777; + text-align: center; + border-top: 1px solid #eee; +} diff --git a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomCenter.png b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomCenter.png Binary files differindex 2a6267e..0d4475e 120000..100644 --- a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomCenter.png +++ b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomCenter.png diff --git a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomLeft.png b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomLeft.png Binary files differindex 6cd025a..2775eba 120000..100644 --- a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomLeft.png +++ b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomLeft.png diff --git a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomRight.png b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomRight.png Binary files differindex 9596518..f7f5137 120000..100644 --- a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomRight.png +++ b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderBottomRight.png diff --git a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderMiddleLeft.png b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderMiddleLeft.png Binary files differindex b5403bf..a2d63d1 120000..100644 --- a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderMiddleLeft.png +++ b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderMiddleLeft.png diff --git a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderMiddleRight.png b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderMiddleRight.png Binary files differindex 27c023f..fd7c3e8 120000..100644 --- a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderMiddleRight.png +++ b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderMiddleRight.png diff --git a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopCenter.png b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopCenter.png Binary files differindex e272a45..2937a9c 120000..100644 --- a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopCenter.png +++ b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopCenter.png diff --git a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopLeft.png b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopLeft.png Binary files differindex e8ceae5..f9d458b 120000..100644 --- a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopLeft.png +++ b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopLeft.png diff --git a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopRight.png b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopRight.png Binary files differindex 9a84403..74b8583 120000..100644 --- a/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopRight.png +++ b/nikola/data/themes/bootstrap3-jinja/assets/css/images/ie6/borderTopRight.png diff --git a/nikola/data/themes/bootstrap3-jinja/assets/css/rst.css b/nikola/data/themes/bootstrap3-jinja/assets/css/rst.css deleted file mode 120000 index d78763e..0000000 --- a/nikola/data/themes/bootstrap3-jinja/assets/css/rst.css +++ /dev/null @@ -1 +0,0 @@ -../../../bootstrap3/assets/css/rst.css
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3-jinja/assets/css/theme.css b/nikola/data/themes/bootstrap3-jinja/assets/css/theme.css index a2774ff..9ce6472 120000..100644 --- a/nikola/data/themes/bootstrap3-jinja/assets/css/theme.css +++ b/nikola/data/themes/bootstrap3-jinja/assets/css/theme.css @@ -1 +1,213 @@ -../../../bootstrap3/assets/css/theme.css
\ No newline at end of file +#container { + width: 960px; + margin: 0 auto; +} + +#contentcolumn { + max-width: 760px; +} +#q { + width: 150px; +} + +img { + max-width: 90%; +} + +.postbox { + border-bottom: 2px solid darkgrey; + margin-bottom: 12px; +} + +.titlebox { + text-align: right; +} + +#addthisbox {margin-bottom: 12px;} + +td.label { + /* Issue #290 */ + background-color: inherit; +} + +.footnote-reference { + /* Issue 290 */ + vertical-align: super; + font-size: xx-small; +} + + +.caption { + /* Issue 292 */ + text-align: center; + padding-top: 1em; +} + +div.figure > img, +div.figure > a > img { + /* Issue 292 */ + display: block; + margin-left: auto; + margin-right: auto; +} + +div.sidebar, div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning { + /* Issue 277 */ + border: 1px solid #aaa; + border-radius: 5px; +} + +blockquote p, blockquote { + font-size: 17.5px; + font-weight: 300; + line-height: 1.25; +} + +ul.bricks > li { + display: inline; + background-color: lightblue; + padding: 8px; + border-radius: 5px; + line-height: 3; + white-space:nowrap; + margin: 3px; +} + +.at300b, .stMainServices, .stButton, .stButton_gradient { + box-sizing: content-box; +} + +pre, pre code { + white-space: pre; + word-wrap: normal; + overflow: auto; +} + +article.post-micro { + font-family: Georgia, 'Times New Roman', Times, serif; + font-size: 1.5em; +} + +.image-block { + display: inline-block; +} + +.flowr_row { + width: 100%; +} + +.tags { + padding-left: 0; + margin-left: -5px; + list-style: none; + text-align: center; + +} + +.tags > li { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + background-color: #999; + border-radius: 10px; +} + +.tags > li a { + color: #fff; +} + +.metadata p:before, +.postlist .listdate:before { + content: " — "; +} + +.metadata p:first-of-type:before { + content: ""; +} + +.metadata p { + display: inline; +} + +.posttranslations h3 { + display: inline; + font-size: 1em; + font-weight: bold; +} + +.posttranslations h3:last-child { + display: none; +} + +.entry-content { + margin-top: 1em; +} + +.navbar-brand { + padding: 0 15px; +} + +.navbar-brand #blog-title { + padding: 15px 0; + display: inline-block; +} + +.navbar-brand #logo { + max-width: 100%; +} + +.navbar-brand>img { + display: inline; +} + +.row { + margin: 0; +} + +/* for alignment with Bootstrap's .entry-content styling */ +.entry-summary { + margin-top: 1em; +} + +/* Custom page footer */ +#footer { + padding-top: 19px; + color: #777; + border-top: 1px solid #e5e5e5; +} + +/* hat tip bootstrap/html5 boilerplate */ +@media print { + *, *:before, *:after { + font-family: Garamond, Junicode, serif; + } + + body { + font-size: 12pt; + } + + article .entry-title a[href]:after, + article .metadata a[href]:after, + article .tags a[href]:after { + content: ""; + } + + article .metadata .sourceline { + display: none; + } + + article .metadata .linkline a[href]:after { + content: " (" attr(href) ")"; + } + + .navbar { + display: none; + } +} diff --git a/nikola/data/themes/bootstrap3-jinja/assets/fonts/glyphicons-halflings-regular.woff2 b/nikola/data/themes/bootstrap3-jinja/assets/fonts/glyphicons-halflings-regular.woff2 new file mode 120000 index 0000000..8c1e4d3 --- /dev/null +++ b/nikola/data/themes/bootstrap3-jinja/assets/fonts/glyphicons-halflings-regular.woff2 @@ -0,0 +1 @@ +../../../../../../bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3-jinja/templates/base.tmpl b/nikola/data/themes/bootstrap3-jinja/templates/base.tmpl index c1ac838..058640a 100644 --- a/nikola/data/themes/bootstrap3-jinja/templates/base.tmpl +++ b/nikola/data/themes/bootstrap3-jinja/templates/base.tmpl @@ -13,7 +13,7 @@ <!-- Menubar --> -<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> +<nav class="navbar navbar-inverse navbar-static-top" 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('/') }}"> + <a class="navbar-brand" href="{{ abs_link(_link("root", None, lang)) }}"> {% if logo_url %} <img src="{{ logo_url }}" alt="{{ blog_title }}" id="logo"> {% endif %} @@ -58,7 +58,7 @@ <!-- End of Menubar --> -<div class="container" id="content"> +<div class="container" id="content" role="main"> <div class="body-content"> <!--Body content--> <div class="row"> @@ -67,7 +67,7 @@ </div> <!--End of body content--> - <footer> + <footer id="footer"> {{ content_footer }} {{ template_hooks['page_footer']() }} </footer> @@ -75,7 +75,13 @@ </div> {{ base.late_load_js() }} - <script>jQuery("a.image-reference").colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script> + <script>$('a.image-reference:not(.islink) img:not(.islink)').parent().colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script> + <!-- fancy dates --> + <script> + moment.locale("{{ momentjs_locales[lang] }}"); + fancydates({{ date_fanciness }}, {{ js_date_format }}); + </script> + <!-- end fancy dates --> {% block extra_js %}{% endblock %} {% if annotations and post and not post.meta('noannotations') %} {{ notes.code() }} diff --git a/nikola/data/themes/bootstrap3-jinja/templates/base_helper.tmpl b/nikola/data/themes/bootstrap3-jinja/templates/base_helper.tmpl index 38a73c4..a481632 100644 --- a/nikola/data/themes/bootstrap3-jinja/templates/base_helper.tmpl +++ b/nikola/data/themes/bootstrap3-jinja/templates/base_helper.tmpl @@ -1,5 +1,6 @@ {# -*- coding: utf-8 -*- #} +{% import 'annotation_helper.tmpl' as notes with context %} {% macro html_headstart() %} <!DOCTYPE html> <html @@ -67,19 +68,21 @@ lang="{{ lang }}"> {% macro late_load_js() %} {% if use_bundles %} {% if use_cdn %} - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> - <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> + <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script src="/assets/js/all.js"></script> {% else %} <script src="/assets/js/all-nocdn.js"></script> {% endif %} {% else %} {% if use_cdn %} - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> - <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> + <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> {% else %} <script src="/assets/js/jquery.min.js"></script> <script src="/assets/js/bootstrap.min.js"></script> + <script src="/assets/js/moment-with-locales.min.js"></script> + <script src="/assets/js/fancydates.js"></script> {% endif %} <script src="/assets/js/jquery.colorbox-min.js"></script> {% endif %} @@ -93,14 +96,14 @@ lang="{{ lang }}"> {% macro html_stylesheets() %} {% if use_bundles %} {% if use_cdn %} - <link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> + <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"> <link href="/assets/css/all.css" rel="stylesheet" type="text/css"> {% else %} <link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css"> {% endif %} {% else %} {% if use_cdn %} - <link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> + <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"> {% else %} <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"> {% endif %} @@ -112,6 +115,10 @@ lang="{{ lang }}"> <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> {% endif %} {% endif %} + {% if needs_ipython_css %} + <link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css"> + {% endif %} {% if annotations and post and not post.meta('noannotations') %} {{ notes.css() }} {% elif not annotations and post and post.meta('annotations') %} @@ -122,11 +129,11 @@ lang="{{ lang }}"> {% macro html_navigation_links() %} {% for url, text in navigation_links[lang] %} {% if isinstance(url, tuple) %} - <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ text }}<b class="caret"></b></a> + <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ text }} <b class="caret"></b></a> <ul class="dropdown-menu"> {% for suburl, text in url %} {% if rel_link(permalink, suburl) == "#" %} - <li class="active"><a href="{{ permalink }}">{{ text }}</a> + <li class="active"><a href="{{ permalink }}">{{ text }} <span class="sr-only">{{ messages("(active)", lang) }}</span></a> {% else %} <li><a href="{{ suburl }}">{{ text }}</a> {% endif %} @@ -134,7 +141,7 @@ lang="{{ lang }}"> </ul> {% else %} {% if rel_link(permalink, url) == "#" %} - <li class="active"><a href="{{ permalink }}">{{ text }}</a> + <li class="active"><a href="{{ permalink }}">{{ text }} <span class="sr-only">{{ messages("(active)", lang) }}</span></a> {% else %} <li><a href="{{ url }}">{{ text }}</a> {% endif %} @@ -154,12 +161,21 @@ lang="{{ lang }}"> <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ _link('rss', None) }}"> {% endif %} {% endif %} + {% if generate_atom %} + {% if translations|length > 1 %} + {% for language in translations %} + <link rel="alternate" type="application/atom+xml" title="Atom ({{ language }})" href="{{ _link('index_atom', None, language) }}"> + {% endfor %} + {% else %} + <link rel="alternate" type="application/atom+xml" title="Atom" href="{{ _link('index_atom', None) }}"> + {% endif %} + {% endif %} {% endmacro %} {% macro html_translations() %} {% for langname in translations.keys() %} {% if langname != lang %} - <li><a href="{{ _link("index", None, langname) }}" rel="alternate" hreflang="{{ langname }}">{{ messages("LANGUAGE", langname) }}</a></li> + <li><a href="{{ abs_link(_link("root", None, langname)) }}" rel="alternate" hreflang="{{ langname }}">{{ messages("LANGUAGE", langname) }}</a></li> {% endif %} {% endfor %} {% endmacro %} diff --git a/nikola/data/themes/bootstrap3-jinja/templates/gallery.tmpl b/nikola/data/themes/bootstrap3-jinja/templates/gallery.tmpl index 11382c3..00fda11 100644 --- a/nikola/data/themes/bootstrap3-jinja/templates/gallery.tmpl +++ b/nikola/data/themes/bootstrap3-jinja/templates/gallery.tmpl @@ -7,7 +7,7 @@ {% block content %} {{ ui.bar(crumbs) }} {% if title %} - <h1>{{ title }}</h1> + <h1>{{ title|e }}</h1> {% endif %} {% if post %} <p> @@ -17,8 +17,7 @@ {% if folders %} <ul> {% for folder, ftitle in folders %} - <li><a href="{{ folder }}"><i class="glyphicon - glyphicon-folder-open"></i> {{ ftitle }}</a></li> + <li><a href="{{ folder }}"><i class="glyphicon glyphicon-folder-open"></i> {{ ftitle }}</a></li> {% endfor %} </ul> {% endif %} @@ -41,6 +40,7 @@ {% block extra_head %} {{ super() }} +<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml"> <style type="text/css"> .image-block { display: inline-block; diff --git a/nikola/data/themes/bootstrap3/assets/css/rst.css b/nikola/data/themes/bootstrap3/assets/css/rst.css deleted file mode 100644 index 489ceaa..0000000 --- a/nikola/data/themes/bootstrap3/assets/css/rst.css +++ /dev/null @@ -1,318 +0,0 @@ -/* -:Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 7514 2012-09-14 14:27:12Z milde $ -:Copyright: This stylesheet has been placed in the public domain. - -Default cascading style sheet for the HTML output of Docutils. - -See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to -customize this style sheet. -*/ - -/* used to remove borders from tables and images */ -.borderless, table.borderless td, table.borderless th { - border: 0 } - -table.borderless td, table.borderless th { - /* Override padding for "table.docutils td" with "! important". - The right padding separates the table cells. */ - padding: 0 0.5em 0 0 ! important } - -.first { - /* Override more specific margin styles with "! important". */ - margin-top: 0 ! important } - -.last, .with-subtitle { - margin-bottom: 0 ! important } - -.hidden { - display: none } - -a.toc-backref { - text-decoration: none ; - color: black } - -blockquote.epigraph { - margin: 2em 5em ; } - -dl.docutils dd { - margin-bottom: 0.5em } - -object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { - overflow: hidden; -} - -/* Uncomment (and remove this text!) to get bold-faced definition list terms -dl.docutils dt { - font-weight: bold } -*/ - -div.abstract { - margin: 2em 5em } - -div.abstract p.topic-title { - font-weight: bold ; - text-align: center } - -div.admonition, div.attention, div.caution, div.danger, div.error, -div.hint, div.important, div.note, div.tip, div.warning { - margin: 2em ; - border: medium outset ; - padding: 1em } - -div.admonition p.admonition-title, div.hint p.admonition-title, -div.important p.admonition-title, div.note p.admonition-title, -div.tip p.admonition-title { - font-weight: bold ; - font-family: sans-serif } - -div.attention p.admonition-title, div.caution p.admonition-title, -div.danger p.admonition-title, div.error p.admonition-title, -div.warning p.admonition-title, .code .error { - color: red ; - font-weight: bold ; - font-family: sans-serif } - -/* Uncomment (and remove this text!) to get reduced vertical space in - compound paragraphs. -div.compound .compound-first, div.compound .compound-middle { - margin-bottom: 0.5em } - -div.compound .compound-last, div.compound .compound-middle { - margin-top: 0.5em } -*/ - -div.dedication { - margin: 2em 5em ; - text-align: center ; - font-style: italic } - -div.dedication p.topic-title { - font-weight: bold ; - font-style: normal } - -div.figure { - margin-left: 2em ; - margin-right: 2em } - -div.footer, div.header { - clear: both; - font-size: smaller } - -div.line-block { - display: block ; - margin-top: 1em ; - margin-bottom: 1em } - -div.line-block div.line-block { - margin-top: 0 ; - margin-bottom: 0 ; - margin-left: 1.5em } - -html[dir="rtl"] div.line-block div.line-block { - margin-top: 0 ; - margin-bottom: 0 ; - margin-right: 1.5em ; - margin-left: 0 } - -div.sidebar { - margin: 0 0 0.5em 1em ; - border: medium outset ; - padding: 1em ; - background-color: #ffffee ; - width: 40% ; - float: right ; - clear: right } - -div.sidebar p.rubric { - font-family: sans-serif ; - font-size: medium } - -div.system-messages { - margin: 5em } - -div.system-messages h1 { - color: red } - -div.system-message { - border: medium outset ; - padding: 1em } - -div.system-message p.system-message-title { - color: red ; - font-weight: bold } - -div.topic { - margin: 2em } - -h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, -h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { - margin-top: 0.4em } - -h1.title { - text-align: center } - -h2.subtitle { - text-align: center } - -hr.docutils { - width: 75% } - -img.align-left, .figure.align-left, object.align-left { - clear: left ; - float: left ; - margin-right: 1em } - -img.align-right, .figure.align-right, object.align-right { - clear: right ; - float: right ; - margin-left: 1em } - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left } - -.align-center { - clear: both ; - text-align: center } - -.align-right { - text-align: right } - -/* reset inner alignment in figures */ -div.align-right { - text-align: inherit } - -/* div.align-center * { */ -/* text-align: left } */ - -ol.simple, ul.simple { - margin-bottom: 1em } - -ol.arabic { - list-style: decimal } - -ol.loweralpha { - list-style: lower-alpha } - -ol.upperalpha { - list-style: upper-alpha } - -ol.lowerroman { - list-style: lower-roman } - -ol.upperroman { - list-style: upper-roman } - -p.attribution { - text-align: right ; - margin-left: 50% } - -p.caption { - font-style: italic } - -p.credits { - font-style: italic ; - font-size: smaller } - -p.label { - white-space: nowrap } - -p.rubric { - font-weight: bold ; - font-size: larger ; - color: maroon ; - text-align: center } - -p.sidebar-title { - font-family: sans-serif ; - font-weight: bold ; - font-size: larger } - -p.sidebar-subtitle { - font-family: sans-serif ; - font-weight: bold } - -p.topic-title { - font-weight: bold } - -pre.address { - margin-bottom: 0 ; - margin-top: 0 ; - font: inherit } - -pre.literal-block, pre.doctest-block, pre.math, pre.code { - margin-left: 2em ; - margin-right: 2em } - -pre.code .ln { color: grey; } /* line numbers */ -pre.code, code { background-color: #eeeeee } -pre.code .comment, code .comment { color: #5C6576 } -pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } -pre.code .literal.string, code .literal.string { color: #0C5404 } -pre.code .name.builtin, code .name.builtin { color: #352B84 } -pre.code .deleted, code .deleted { background-color: #DEB0A1} -pre.code .inserted, code .inserted { background-color: #A3D289} - -span.classifier { - font-family: sans-serif ; - font-style: oblique } - -span.classifier-delimiter { - font-family: sans-serif ; - font-weight: bold } - -span.interpreted { - font-family: sans-serif } - -span.option { - white-space: nowrap } - -span.pre { - white-space: pre } - -span.problematic { - color: red } - -span.section-subtitle { - /* font-size relative to parent (h1..h6 element) */ - font-size: 80% } - -table.citation { - border-left: solid 1px gray; - margin-left: 1px } - -table.docinfo { - margin: 2em 4em } - -table.docutils { - margin-top: 0.5em ; - margin-bottom: 0.5em } - -table.footnote { - border-left: solid 1px black; - margin-left: 1px } - -table.docutils td, table.docutils th, -table.docinfo td, table.docinfo th { - padding-left: 0.5em ; - padding-right: 0.5em ; - vertical-align: top } - -table.docutils th.field-name, table.docinfo th.docinfo-name { - font-weight: bold ; - text-align: left ; - white-space: nowrap ; - padding-left: 0 } - -h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, -h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { - font-size: 100% } - -ul.auto-toc { - list-style-type: none } diff --git a/nikola/data/themes/bootstrap3/assets/css/theme.css b/nikola/data/themes/bootstrap3/assets/css/theme.css index 5e3775a..9ce6472 100644 --- a/nikola/data/themes/bootstrap3/assets/css/theme.css +++ b/nikola/data/themes/bootstrap3/assets/css/theme.css @@ -1,7 +1,3 @@ -body { - margin-top: 60px; -} - #container { width: 960px; margin: 0 auto; @@ -92,17 +88,6 @@ article.post-micro { font-size: 1.5em; } -/* fix anchors for headers */ -h1, h2, h3 { - margin-top: -40px; - padding-top: 60px; -} - -h4, h5, h6 { - margin-top: -50px; - padding-top: 60px; -} - .image-block { display: inline-block; } @@ -178,6 +163,51 @@ h4, h5, h6 { max-width: 100%; } +.navbar-brand>img { + display: inline; +} + .row { margin: 0; } + +/* for alignment with Bootstrap's .entry-content styling */ +.entry-summary { + margin-top: 1em; +} + +/* Custom page footer */ +#footer { + padding-top: 19px; + color: #777; + border-top: 1px solid #e5e5e5; +} + +/* hat tip bootstrap/html5 boilerplate */ +@media print { + *, *:before, *:after { + font-family: Garamond, Junicode, serif; + } + + body { + font-size: 12pt; + } + + article .entry-title a[href]:after, + article .metadata a[href]:after, + article .tags a[href]:after { + content: ""; + } + + article .metadata .sourceline { + display: none; + } + + article .metadata .linkline a[href]:after { + content: " (" attr(href) ")"; + } + + .navbar { + display: none; + } +} diff --git a/nikola/data/themes/bootstrap3/assets/fonts/glyphicons-halflings-regular.woff2 b/nikola/data/themes/bootstrap3/assets/fonts/glyphicons-halflings-regular.woff2 new file mode 120000 index 0000000..8c1e4d3 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/fonts/glyphicons-halflings-regular.woff2 @@ -0,0 +1 @@ +../../../../../../bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/bundles b/nikola/data/themes/bootstrap3/bundles index 0a96b4f..8bdc591 100644 --- a/nikola/data/themes/bootstrap3/bundles +++ b/nikola/data/themes/bootstrap3/bundles @@ -1,4 +1,4 @@ assets/css/all-nocdn.css=bootstrap.css,rst.css,code.css,colorbox.css,theme.css,custom.css assets/css/all.css=rst.css,code.css,colorbox.css,theme.css,custom.css -assets/js/all-nocdn.js=jquery.min.js,bootstrap.min.js,jquery.colorbox-min.js -assets/js/all.js=jquery.colorbox-min.js +assets/js/all-nocdn.js=jquery.min.js,bootstrap.min.js,jquery.colorbox-min.js,moment-with-locales.min.js,fancydates.js +assets/js/all.js=jquery.colorbox-min.js,moment-with-locales.min.js,fancydates.js diff --git a/nikola/data/themes/bootstrap3/templates/base.tmpl b/nikola/data/themes/bootstrap3/templates/base.tmpl index c463873..16aebce 100644 --- a/nikola/data/themes/bootstrap3/templates/base.tmpl +++ b/nikola/data/themes/bootstrap3/templates/base.tmpl @@ -13,7 +13,7 @@ ${template_hooks['extra_head']()} <!-- Menubar --> -<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> +<nav class="navbar navbar-inverse navbar-static-top" 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 @@ ${template_hooks['extra_head']()} <span class="icon-bar"></span> <span class="icon-bar"></span> </button> - <a class="navbar-brand" href="${abs_link('/')}"> + <a class="navbar-brand" href="${abs_link(_link("root", None, lang))}"> %if logo_url: <img src="${logo_url}" alt="${blog_title}" id="logo"> %endif @@ -58,7 +58,7 @@ ${template_hooks['extra_head']()} <!-- End of Menubar --> -<div class="container" id="content"> +<div class="container" id="content" role="main"> <div class="body-content"> <!--Body content--> <div class="row"> @@ -67,7 +67,7 @@ ${template_hooks['extra_head']()} </div> <!--End of body content--> - <footer> + <footer id="footer"> ${content_footer} ${template_hooks['page_footer']()} </footer> @@ -75,7 +75,13 @@ ${template_hooks['extra_head']()} </div> ${base.late_load_js()} - <script>jQuery("a.image-reference").colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script> + <script>$('a.image-reference:not(.islink) img:not(.islink)').parent().colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script> + <!-- fancy dates --> + <script> + moment.locale("${momentjs_locales[lang]}"); + fancydates(${date_fanciness}, ${js_date_format}); + </script> + <!-- end fancy dates --> <%block name="extra_js"></%block> % if annotations and post and not post.meta('noannotations'): ${notes.code()} diff --git a/nikola/data/themes/bootstrap3/templates/base_helper.tmpl b/nikola/data/themes/bootstrap3/templates/base_helper.tmpl index 096c3c2..8ea843a 100644 --- a/nikola/data/themes/bootstrap3/templates/base_helper.tmpl +++ b/nikola/data/themes/bootstrap3/templates/base_helper.tmpl @@ -1,5 +1,6 @@ ## -*- coding: utf-8 -*- +<%namespace name="notes" file="annotation_helper.tmpl" import="*" /> <%def name="html_headstart()"> <!DOCTYPE html> <html @@ -67,19 +68,21 @@ lang="${lang}"> <%def name="late_load_js()"> %if use_bundles: %if use_cdn: - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> - <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> + <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script src="/assets/js/all.js"></script> %else: <script src="/assets/js/all-nocdn.js"></script> %endif %else: %if use_cdn: - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> - <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> + <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> %else: <script src="/assets/js/jquery.min.js"></script> <script src="/assets/js/bootstrap.min.js"></script> + <script src="/assets/js/moment-with-locales.min.js"></script> + <script src="/assets/js/fancydates.js"></script> %endif <script src="/assets/js/jquery.colorbox-min.js"></script> %endif @@ -93,14 +96,14 @@ lang="${lang}"> <%def name="html_stylesheets()"> %if use_bundles: %if use_cdn: - <link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> + <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"> <link href="/assets/css/all.css" rel="stylesheet" type="text/css"> %else: <link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css"> %endif %else: %if use_cdn: - <link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> + <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"> %else: <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"> %endif @@ -112,6 +115,10 @@ lang="${lang}"> <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> %endif %endif + % if needs_ipython_css: + <link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css"> + % endif % if annotations and post and not post.meta('noannotations'): ${notes.css()} % elif not annotations and post and post.meta('annotations'): @@ -122,11 +129,11 @@ lang="${lang}"> <%def name="html_navigation_links()"> %for url, text in navigation_links[lang]: % if isinstance(url, tuple): - <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">${text}<b class="caret"></b></a> + <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">${text} <b class="caret"></b></a> <ul class="dropdown-menu"> %for suburl, text in url: % if rel_link(permalink, suburl) == "#": - <li class="active"><a href="${permalink}">${text}</a> + <li class="active"><a href="${permalink}">${text} <span class="sr-only">${messages("(active)", lang)}</span></a> %else: <li><a href="${suburl}">${text}</a> %endif @@ -134,7 +141,7 @@ lang="${lang}"> </ul> % else: % if rel_link(permalink, url) == "#": - <li class="active"><a href="${permalink}">${text}</a> + <li class="active"><a href="${permalink}">${text} <span class="sr-only">${messages("(active)", lang)}</span></a> %else: <li><a href="${url}">${text}</a> %endif @@ -154,12 +161,21 @@ lang="${lang}"> <link rel="alternate" type="application/rss+xml" title="RSS" href="${_link('rss', None)}"> %endif %endif + %if generate_atom: + %if len(translations) > 1: + %for language in translations: + <link rel="alternate" type="application/atom+xml" title="Atom (${language})" href="${_link('index_atom', None, language)}"> + %endfor + %else: + <link rel="alternate" type="application/atom+xml" title="Atom" href="${_link('index_atom', None)}"> + %endif + %endif </%def> <%def name="html_translations()"> %for langname in translations.keys(): %if langname != lang: - <li><a href="${_link("index", None, langname)}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li> + <li><a href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li> %endif %endfor </%def> diff --git a/nikola/data/themes/bootstrap3/templates/gallery.tmpl b/nikola/data/themes/bootstrap3/templates/gallery.tmpl index 26fe80d..3d6c01a 100644 --- a/nikola/data/themes/bootstrap3/templates/gallery.tmpl +++ b/nikola/data/themes/bootstrap3/templates/gallery.tmpl @@ -7,7 +7,7 @@ <%block name="content"> ${ui.bar(crumbs)} %if title: - <h1>${title}</h1> + <h1>${title|h}</h1> %endif %if post: <p> @@ -17,8 +17,7 @@ %if folders: <ul> % for folder, ftitle in folders: - <li><a href="${folder}"><i class="glyphicon - glyphicon-folder-open"></i> ${ftitle}</a></li> + <li><a href="${folder}"><i class="glyphicon glyphicon-folder-open"></i> ${ftitle}</a></li> % endfor </ul> %endif @@ -41,6 +40,7 @@ ${comments.comment_form(None, permalink, title)} <%block name="extra_head"> ${parent.extra_head()} +<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml"> <style type="text/css"> .image-block { display: inline-block; |
