diff options
Diffstat (limited to 'nikola/data/themes/base')
52 files changed, 1609 insertions, 0 deletions
diff --git a/nikola/data/themes/base/README.md b/nikola/data/themes/base/README.md new file mode 100644 index 0000000..f92f490 --- /dev/null +++ b/nikola/data/themes/base/README.md @@ -0,0 +1,4 @@ +This theme has almost no styling, it's meant as a basis from which other +teams can be developed. + +Therefore, most "advanced" features, such as slides or galleries, are broken. diff --git a/nikola/data/themes/base/assets/css/rst.css b/nikola/data/themes/base/assets/css/rst.css new file mode 100644 index 0000000..855b9fb --- /dev/null +++ b/nikola/data/themes/base/assets/css/rst.css @@ -0,0 +1,316 @@ +/* +: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 } + +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 } + +a.footnote-reference { + line-height: 0px; +} diff --git a/nikola/data/themes/base/assets/css/theme.css b/nikola/data/themes/base/assets/css/theme.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/nikola/data/themes/base/assets/css/theme.css diff --git a/nikola/data/themes/base/assets/js/mathjax.js b/nikola/data/themes/base/assets/js/mathjax.js new file mode 100644 index 0000000..2f4e773 --- /dev/null +++ b/nikola/data/themes/base/assets/js/mathjax.js @@ -0,0 +1,12 @@ +// We wait for the onload function to load MathJax after the page is completely loaded. +// MathJax is loaded 1 unit of time after the page is ready. +// This hack prevent problems when you use social button from addthis. +// +window.onload = function () { + setTimeout(function () { + var script = document.createElement("script"); + script.type = "text/javascript"; + script.src = "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"; + document.getElementsByTagName("body")[0].appendChild(script); + },1) +}
\ No newline at end of file diff --git a/nikola/data/themes/base/bundles b/nikola/data/themes/base/bundles new file mode 100644 index 0000000..4760181 --- /dev/null +++ b/nikola/data/themes/base/bundles @@ -0,0 +1,2 @@ +assets/css/all.css=rst.css,code.css,theme.css +assets/css/all-nocdn.css=rst.css,code.css,theme.css diff --git a/nikola/data/themes/base/engine b/nikola/data/themes/base/engine new file mode 100644 index 0000000..2951cdd --- /dev/null +++ b/nikola/data/themes/base/engine @@ -0,0 +1 @@ +mako diff --git a/nikola/data/themes/base/messages/messages_bg.py b/nikola/data/themes/base/messages/messages_bg.py new file mode 100644 index 0000000..2d36959 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_bg.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Също достъпно в", + "Archive": "Архив", + "Categories": "Категории", + "LANGUAGE": "Български", + "More posts about": "Още публикации относно ", + "Newer posts": "Нови публикации", + "Next post": "Следваща публикация", + "Older posts": "Стари публикации", + "Original site": "Оригиналния сайт", + "Posted": "Публиковано", + "Posts about %s": "Публикации относно %s", + "Posts for year %s": "Публикации за %s година", + "Posts for {month} {year}": "Публикации за {month} {year}", + "Previous post": "Предишна публикация", + "Read in English": "Прочетете на български", + "Read more": "Прочети още", + "Source": "Source", + "Tags and Categories": "Тагове и Категории", + "Tags": "Тагове", + "old posts page %d": "стари публикации страница %d", +} diff --git a/nikola/data/themes/base/messages/messages_ca.py b/nikola/data/themes/base/messages/messages_ca.py new file mode 100644 index 0000000..80c4ee4 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_ca.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "També disponibles en", + "Archive": "Arxiu", + "Categories": "", + "LANGUAGE": "Català", + "More posts about": "Més entrades sobre", + "Newer posts": "Entrades posteriors", + "Next post": "Entrada següent", + "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}": "", + "Previous post": "Entrada anterior", + "Read in English": "Llegeix-ho en català", + "Read more": "Llegeix-ne més", + "Source": "Codi", + "Tags and Categories": "", + "Tags": "Etiquetes", + "old posts page %d": "entrades antigues pàgina %d", +} diff --git a/nikola/data/themes/base/messages/messages_de.py b/nikola/data/themes/base/messages/messages_de.py new file mode 100644 index 0000000..c885304 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_de.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Auch verfügbar in", + "Archive": "Archiv", + "Categories": "Kategorien", + "LANGUAGE": "Deutsch", + "More posts about": "Weitere Einträge über", + "Newer posts": "Neuere Einträge", + "Next post": "Nächster Eintrag", + "Older posts": "Ältere Einträge", + "Original site": "Original-Seite", + "Posted": "Veröffentlicht", + "Posts about %s": "Einträge über %s", + "Posts for year %s": "Einträge aus dem Jahr %s", + "Posts for {month} {year}": "Einträge aus {month} {year}", + "Previous post": "Vorheriger Eintrag", + "Read in English": "Auf Deutsch lesen", + "Read more": "Weiterlesen", + "Source": "Source", + "Tags and Categories": "Tags und Kategorien", + "Tags": "Tags", + "old posts page %d": "Vorherige Einträge %d", +} diff --git a/nikola/data/themes/base/messages/messages_el.py b/nikola/data/themes/base/messages/messages_el.py new file mode 100644 index 0000000..a1745fa --- /dev/null +++ b/nikola/data/themes/base/messages/messages_el.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Διαθέσιμο και στα", + "Archive": "Αρχείο", + "Categories": "Κατηγορίες", + "LANGUAGE": "Ελληνικά", + "More posts about": "Περισσότερες αναρτήσεις για", + "Newer posts": "Νεότερες αναρτήσεις", + "Next post": "Επόμενη ανάρτηση", + "Older posts": "Παλαιότερες αναρτήσεις", + "Original site": "Ιστοσελίδα αρχικής ανάρτησης", + "Posted": "Αναρτήθηκε", + "Posts about %s": "Αναρτήσεις για %s", + "Posts for year %s": "Αναρτήσεις για το έτος %s", + "Posts for {month} {year}": "Αναρτήσεις για τον {month} του {year}", + "Previous post": "Προηγούμενη ανάρτηση", + "Read in English": "Διαβάστε στα Ελληνικά", + "Read more": "Διαβάστε περισσότερα", + "Source": "Πηγαίος κώδικας", + "Tags and Categories": "", + "Tags": "Ετικέτες", + "old posts page %d": "σελίδα παλαιότερων αναρτήσεων %d", +} diff --git a/nikola/data/themes/base/messages/messages_en.py b/nikola/data/themes/base/messages/messages_en.py new file mode 100644 index 0000000..1e695ac --- /dev/null +++ b/nikola/data/themes/base/messages/messages_en.py @@ -0,0 +1,27 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Also available in", + "Archive": "Archive", + "Categories": "Categories", + "LANGUAGE": "English", + "More posts about": "More posts about", + "Newer posts": "Newer posts", + "Next post": "Next post", + "No content": "", + "No title": "", + "Older posts": "Older posts", + "Original site": "Original site", + "Posted": "Posted", + "Posts about %s": "Posts about %s", + "Posts for year %s": "Posts for year %s", + "Posts for {month} {year}": "Posts for {month} {year}", + "Previous post": "Previous post", + "Read in English": "Read in English", + "Read more": "Read more", + "Source": "Source", + "Tags and Categories": "Tags and Categories", + "Tags": "Tags", + "old posts page %d": "old posts page %d", +} diff --git a/nikola/data/themes/base/messages/messages_eo.py b/nikola/data/themes/base/messages/messages_eo.py new file mode 100644 index 0000000..50bd25a --- /dev/null +++ b/nikola/data/themes/base/messages/messages_eo.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Ankaŭ disponebla en", + "Archive": "Arĥivo", + "Categories": "Kategorioj", + "LANGUAGE": "Anglalingve", + "More posts about": "Pli artikoloj pri...", + "Newer posts": "Pli novaj artikoloj", + "Next post": "Venonta artikolo", + "Older posts": "Pli malnovaj artikoloj", + "Original site": "Originala interretejo", + "Posted": "Skribita", + "Posts about %s": "Artikoloj pri %s", + "Posts for year %s": "Artikoloj de la jaro %s", + "Posts for {month} {year}": "Artikoloj skribitaj en {month} {year}", + "Previous post": "Antaŭa artikolo", + "Read in English": "Legu ĝin en Esperanto", + "Read more": "Legu plu", + "Source": "Fonto", + "Tags and Categories": "Etikedoj kaj Kategorioj", + "Tags": "Etikedoj", + "old posts page %d": "paĝo de malnovaj artikoloj %d", +} diff --git a/nikola/data/themes/base/messages/messages_es.py b/nikola/data/themes/base/messages/messages_es.py new file mode 100644 index 0000000..79ffac6 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_es.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "También disponible en", + "Archive": "Archivo", + "Categories": "Categorías", + "LANGUAGE": "Español", + "More posts about": "Más posts sobre", + "Newer posts": "Posts posteriores", + "Next post": "Siguiente post", + "Older posts": "Posts anteriores", + "Original site": "Sitio original", + "Posted": "Publicado", + "Posts about %s": "Posts sobre %s", + "Posts for year %s": "Posts del año %s", + "Posts for {month} {year}": "Posts de {month} {year}", + "Previous post": "Post anterior", + "Read in English": "Leer en español", + "Read more": "Leer más", + "Source": "Código", + "Tags and Categories": "Tags y Categorías", + "Tags": "Tags", + "old posts page %d": "posts antiguos página %d", +} diff --git a/nikola/data/themes/base/messages/messages_fa.py b/nikola/data/themes/base/messages/messages_fa.py new file mode 100644 index 0000000..786893c --- /dev/null +++ b/nikola/data/themes/base/messages/messages_fa.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "همچنین قابل دسترس از", + "Archive": "آرشیو", + "Categories": "دستهها", + "LANGUAGE": "فارسی", + "More posts about": "ارسالهای بیشتر دربارهٔ", + "Newer posts": "ارسالهای جدیدتر", + "Next post": "ارسال بعدی", + "Older posts": "پستهای قدیمیتر", + "Original site": "سایت اصلی", + "Posted": "ارسال شده", + "Posts about %s": "ارسالها دربارهٔ %s", + "Posts for year %s": "ارسالها برای سال %s", + "Posts for {month} {year}": "ارسال برای {month} {year}", + "Previous post": "ارسال پیشین", + "Read in English": "به فارسی بخوانید", + "Read more": "بیشتر بخوانید", + "Source": "منبع", + "Tags and Categories": "برچسبها و دستهها", + "Tags": "برچسبها", + "old posts page %d": "صفحهٔ ارسالهای قدیمی %d", +} diff --git a/nikola/data/themes/base/messages/messages_fi.py b/nikola/data/themes/base/messages/messages_fi.py new file mode 100644 index 0000000..ca64919 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_fi.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Saatavilla myös", + "Archive": "Arkisto", + "Categories": "Kategoriat", + "LANGUAGE": "Suomi", + "More posts about": "Lisää postauksia aiheesta", + "Newer posts": "Uudempia postauksia", + "Next post": "Seuraava postaus", + "Older posts": "Vanhempia postauksia", + "Original site": "Alkuperäinen sivusto", + "Posted": "Postattu", + "Posts about %s": "Postauksia aiheesta %s", + "Posts for year %s": "Postauksia vuodelta %s", + "Posts for {month} {year}": "Postauksia ajalle {month} {year}", + "Previous post": "Vanhempia postauksia", + "Read in English": "Lue suomeksi", + "Read more": "Lue lisää", + "Source": "Lähde", + "Tags and Categories": "Tagit ja kategoriat", + "Tags": "Tagit", + "old posts page %d": "vanhojen postauksien sivu %d", +} diff --git a/nikola/data/themes/base/messages/messages_fr.py b/nikola/data/themes/base/messages/messages_fr.py new file mode 100644 index 0000000..45c7474 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_fr.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Disponible aussi en", + "Archive": "Archives", + "Categories": "Catégories", + "LANGUAGE": "Français", + "More posts about": "Plus de billets sur", + "Newer posts": "Billets récents", + "Next post": "Billet suivant", + "Older posts": "Anciens billets", + "Original site": "Site d'origine", + "Posted": "Publié", + "Posts about %s": "Billets sur %s", + "Posts for year %s": "Billets de l'année %s", + "Posts for {month} {year}": "Billets de {month} {year}", + "Previous post": "Billet précédent", + "Read in English": "Lire en français", + "Read more": "Lire la suite", + "Source": "Source", + "Tags and Categories": "Étiquettes et catégories", + "Tags": "Étiquettes", + "old posts page %d": "anciens billets page %d", +} diff --git a/nikola/data/themes/base/messages/messages_hr.py b/nikola/data/themes/base/messages/messages_hr.py new file mode 100644 index 0000000..420159d --- /dev/null +++ b/nikola/data/themes/base/messages/messages_hr.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Također dostupno i u", + "Archive": "Arhiva", + "Categories": "", + "LANGUAGE": "hrvatski", + "More posts about": "Više postova o", + "Newer posts": "Noviji postovi", + "Next post": "Sljedeći post", + "Older posts": "Stariji postovi", + "Original site": "Izvorna stranica", + "Posted": "Objavljeno", + "Posts about %s": "Postovi o %s", + "Posts for year %s": "Postovi za godinu %s", + "Posts for {month} {year}": "Postovi za {month} {year}", + "Previous post": "Prethodni post", + "Read in English": "Čitaj na hrvatskom", + "Read more": "Čitaj dalje", + "Source": "Izvor", + "Tags and Categories": "", + "Tags": "Tagovi", + "old posts page %d": "stari postovi stranice %d", +} diff --git a/nikola/data/themes/base/messages/messages_it.py b/nikola/data/themes/base/messages/messages_it.py new file mode 100644 index 0000000..b460f22 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_it.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Anche disponibile in", + "Archive": "Archivio", + "Categories": "Categorie", + "LANGUAGE": "Italiano", + "More posts about": "Altri articoli collegati", + "Newer posts": "Articoli recenti", + "Next post": "Articolo successivo", + "Older posts": "Articoli precedenti", + "Original site": "Sito originale", + "Posted": "Pubblicato", + "Posts about %s": "Articoli su %s", + "Posts for year %s": "Articoli per l'anno %s", + "Posts for {month} {year}": "Articoli per {month} {year}", + "Previous post": "Articolo precedente", + "Read in English": "Leggi in italiano", + "Read more": "Espandi", + "Source": "Sorgente", + "Tags and Categories": "Tags e Categorie", + "Tags": "Tags", + "old posts page %d": "pagina dei vecchi articoli %d", +} diff --git a/nikola/data/themes/base/messages/messages_ja.py b/nikola/data/themes/base/messages/messages_ja.py new file mode 100644 index 0000000..4a238cc --- /dev/null +++ b/nikola/data/themes/base/messages/messages_ja.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "他の言語で読む", + "Archive": "過去の記事", + "Categories": "", + "LANGUAGE": "日本語", + "More posts about": "タグ", + "Newer posts": "新しい記事", + "Next post": "次の記事", + "Older posts": "過去の記事", + "Original site": "元のサイト", + "Posted": "投稿日時", + "Posts about %s": "%sについての記事", + "Posts for year %s": "%s年の記事", + "Posts for {month} {year}": "{year}年{month}月の記事", + "Previous post": "前の記事", + "Read in English": "日本語で読む", + "Read more": "続きを読む", + "Source": "ソース", + "Tags and Categories": "", + "Tags": "タグ", + "old posts page %d": "前の記事 %dページ目", +} diff --git a/nikola/data/themes/base/messages/messages_nl.py b/nikola/data/themes/base/messages/messages_nl.py new file mode 100644 index 0000000..a2da822 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_nl.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Ook beschikbaar in", + "Archive": "Archief", + "Categories": "Categorieën", + "LANGUAGE": "Nederlands", + "More posts about": "Meer berichten over", + "Newer posts": "Nieuwere berichten", + "Next post": "Volgend bericht", + "Older posts": "Oudere berichten", + "Original site": "Originele site", + "Posted": "Geplaatst", + "Posts about %s": "Berichten over %s", + "Posts for year %s": "Berichten voor het jaar %s", + "Posts for {month} {year}": "Berichten voor {month} {year}", + "Previous post": "Vorig bericht", + "Read in English": "Lees in het Nederlands", + "Read more": "Lees verder", + "Source": "Bron", + "Tags and Categories": "Tags en Categorieën", + "Tags": "Tags", + "old posts page %d": "oude berichten pagina %d", +} diff --git a/nikola/data/themes/base/messages/messages_pl.py b/nikola/data/themes/base/messages/messages_pl.py new file mode 100644 index 0000000..cf5c51c --- /dev/null +++ b/nikola/data/themes/base/messages/messages_pl.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Również dostępny w", + "Archive": "Archiwum", + "Categories": "Kategorie", + "LANGUAGE": "polski", + "More posts about": "Więcej postów o", + "Newer posts": "Nowsze posty", + "Next post": "Następny post", + "Older posts": "Starsze posty", + "Original site": "Oryginalna strona", + "Posted": "Opublikowany", + "Posts about %s": "Posty o %s", + "Posts for year %s": "Posty z roku %s", + "Posts for {month} {year}": "Posty z {month} {year}", + "Previous post": "Poprzedni post", + "Read in English": "Czytaj po polsku", + "Read more": "Czytaj więcej", + "Source": "Źródło", + "Tags and Categories": "Tagi i Kategorie", + "Tags": "Tags", + "old posts page %d": "stare posty, strona %d", +} diff --git a/nikola/data/themes/base/messages/messages_pt_br.py b/nikola/data/themes/base/messages/messages_pt_br.py new file mode 100644 index 0000000..ebf642a --- /dev/null +++ b/nikola/data/themes/base/messages/messages_pt_br.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Também disponível em", + "Archive": "Arquivo", + "Categories": "Categorias", + "LANGUAGE": "Português", + "More posts about": "Mais posts sobre", + "Newer posts": "Posts mais recentes", + "Next post": "Próximo post", + "Older posts": "Posts mais antigos", + "Original site": "Site original", + "Posted": "Publicado", + "Posts about %s": "Posts sobre %s", + "Posts for year %s": "Posts do ano %s", + "Posts for {month} {year}": "Posts de {month} {year}", + "Previous post": "Post anterior", + "Read in English": "Ler em português", + "Read more": "Leia mais", + "Source": "Código", + "Tags and Categories": "Tags e Categorias", + "Tags": "Tags", + "old posts page %d": "Posts antigos página %d", +} diff --git a/nikola/data/themes/base/messages/messages_ru.py b/nikola/data/themes/base/messages/messages_ru.py new file mode 100644 index 0000000..44ce1f2 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_ru.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Также доступно на", + "Archive": "Архив", + "Categories": "Категории", + "LANGUAGE": "Русский", + "More posts about": "Больше записей о", + "Newer posts": "Новые записи", + "Next post": "Следующая запись", + "Older posts": "Старые записи", + "Original site": "Оригинальный сайт", + "Posted": "Опубликовано", + "Posts about %s": "Записи о %s", + "Posts for year %s": "Записи за %s год", + "Posts for {month} {year}": "Записи за {month} {year}", + "Previous post": "Предыдущая запись", + "Read in English": "Прочесть по-русски", + "Read more": "Читать далее", + "Source": "Источник", + "Tags and Categories": "Тэги и категории", + "Tags": "Тэги", + "old posts page %d": "%d страница со старыми записями", +} diff --git a/nikola/data/themes/base/messages/messages_sl.py b/nikola/data/themes/base/messages/messages_sl.py new file mode 100644 index 0000000..bad3327 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_sl.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Na voljo tudi v", + "Archive": "Arhiv", + "Categories": "Kategorije", + "LANGUAGE": "Slovenščina", + "More posts about": "Več objav o", + "Newer posts": "Novejše objave", + "Next post": "Naslednja objava", + "Older posts": "Starejše objave", + "Original site": "Izvorna spletna stran", + "Posted": "Objavljeno", + "Posts about %s": "Objave o %s", + "Posts for year %s": "Objave za leto %s", + "Posts for {month} {year}": "Objave za {month} {year}", + "Previous post": "Prejšnja objava", + "Read in English": "Beri v slovenščini", + "Read more": "Več o tem", + "Source": "Izvor", + "Tags and Categories": "Značke in kategorije", + "Tags": "Značke", + "old posts page %d": "stare objave, stran %d", +} diff --git a/nikola/data/themes/base/messages/messages_sl_si.py b/nikola/data/themes/base/messages/messages_sl_si.py new file mode 120000 index 0000000..152e151 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_sl_si.py @@ -0,0 +1 @@ +messages_sl.py
\ No newline at end of file diff --git a/nikola/data/themes/base/messages/messages_tr_tr.py b/nikola/data/themes/base/messages/messages_tr_tr.py new file mode 100644 index 0000000..7cf0e9f --- /dev/null +++ b/nikola/data/themes/base/messages/messages_tr_tr.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "Şu dilde de mevcut:", + "Archive": "Arşiv", + "Categories": "Kategoriler", + "LANGUAGE": "Türkçe", + "More posts about": "ilgili diğer yazılar", + "Newer posts": "Daha yeni yazılar", + "Next post": "Sonraki yazı", + "Older posts": "Daha eski yazılar", + "Original site": "Orjinal web sayfası", + "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} {year}": "{month} {year} göre yazılar", + "Previous post": "Önceki yazı", + "Read in English": "Türkçe olarak oku", + "Read more": "Devamını oku", + "Source": "Kaynak", + "Tags and Categories": "Etiketler ve Kategoriler", + "Tags": "Etiketler", + "old posts page %d": "eski yazılar sayfa %d", +} diff --git a/nikola/data/themes/base/messages/messages_zh_cn.py b/nikola/data/themes/base/messages/messages_zh_cn.py new file mode 100644 index 0000000..fc79313 --- /dev/null +++ b/nikola/data/themes/base/messages/messages_zh_cn.py @@ -0,0 +1,25 @@ +# -*- encoding:utf-8 -*- +from __future__ import unicode_literals + +MESSAGES = { + "Also available in": "其他语言版本", + "Archive": "文章存档", + "Categories": "", + "LANGUAGE": "简体中文", + "More posts about": "更多相关文章:", + "Newer posts": "新一篇", + "Next post": "后一篇", + "Older posts": "旧一篇", + "Original site": "原文地址", + "Posted": "发表于", + "Posts about %s": "文章分类:%s", + "Posts for year %s": "%s年文章", + "Posts for {month} {year}": "{year}年{month}月文章", + "Previous post": "前一篇", + "Read in English": "中文版", + "Read more": "更多", + "Source": "源代码", + "Tags and Categories": "", + "Tags": "标签", + "old posts page %d": "旧文章页 %d", +} diff --git a/nikola/data/themes/base/templates/annotation_helper.tmpl b/nikola/data/themes/base/templates/annotation_helper.tmpl new file mode 100644 index 0000000..70077ab --- /dev/null +++ b/nikola/data/themes/base/templates/annotation_helper.tmpl @@ -0,0 +1,16 @@ +<%def name="css()"> + <link rel="stylesheet" href="http://assets.annotateit.org/annotator/v1.2.5/annotator.min.css"> +</%def> + +<%def name="code()"> + <script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script> + <script src="http://assets.annotateit.org/annotator/v1.2.7/annotator-full.js"></script> + <script> + jQuery(function ($) { + $('body').annotator().annotator('setupPlugins', {}, { + // Disable filter bar + Filter: false + }); + }); + </script> +</%def> diff --git a/nikola/data/themes/base/templates/base.tmpl b/nikola/data/themes/base/templates/base.tmpl new file mode 100644 index 0000000..31c1747 --- /dev/null +++ b/nikola/data/themes/base/templates/base.tmpl @@ -0,0 +1,40 @@ +## -*- coding: utf-8 -*- +<%namespace name="base" file="base_helper.tmpl" import="*"/> +<%namespace name="annotations" file="annotation_helper.tmpl"/> +${set_locale(lang)} +<!DOCTYPE html> +<html +%if comment_system == 'facebook': +xmlns:fb="http://ogp.me/ns/fb#" +%endif +lang="${lang}"> +<head> + ${base.html_head()} + <%block name="extra_head"> + </%block> + ${extra_head_data} +</head> +<body> + <h1 id="blog-title"> + <a href="${abs_link('/')}" title="${blog_title}" rel="home">${blog_title}</a> + </h1> + <%block name="belowtitle"> + %if len(translations) > 1: + <small> + ${(messages("Also available in"))}: + ${base.html_translations()} + </small> + %endif + </%block> + <%block name="content"></%block> + <small>${content_footer}</small> + <!--Sidebar content--> + <ul class="unstyled"> + <li>${license} + ${base.html_social()} + ${base.html_navigation_links()} + <li>${search_form} + </ul> + ${base.late_load_js()} + ${social_buttons_code} +</body> diff --git a/nikola/data/themes/base/templates/base_helper.tmpl b/nikola/data/themes/base/templates/base_helper.tmpl new file mode 100644 index 0000000..ac1dea3 --- /dev/null +++ b/nikola/data/themes/base/templates/base_helper.tmpl @@ -0,0 +1,90 @@ +## -*- coding: utf-8 -*- +<%def name="html_head()"> + <meta charset="utf-8"> + %if description: + <meta name="description" content="${description}"> + %endif + <meta name="author" content="${blog_author}"> + <title>${title|striphtml} | ${blog_title|striphtml}</title> + ${mathjax_config} + %if use_bundles: + %if use_cdn: + <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: + <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/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 lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script> + <![endif]--> + %if rss_link: + ${rss_link} + %else: + %if len(translations) > 1: + %for language in translations: + <link rel="alternate" type="application/rss+xml" title="RSS (${language})" href="${_link('rss', None, language)}"> + %endfor + %else: + <link rel="alternate" type="application/rss+xml" title="RSS" href="${_link('rss', None)}"> + %endif + %endif + %if favicons: + %for name, file, size in favicons: + <link rel="${name}" href="${file}" sizes="${size}"/> + %endfor + %endif + % if comment_system == 'facebook': + <meta property="fb:app_id" content="${comment_system_id}"> + % endif +</%def> + +<%def name="late_load_js()"> +</%def> + +<%def name="html_social()"> + ${social_buttons_code} +</%def> + +<!--FIXME: remove in v7 --> +<%def name="html_sidebar_links()"> + ${html_navigation_links()} +</%def> + +<%def name="html_navigation_links()"> + %for url, text in navigation_links[lang]: + % if isinstance(url, tuple): + <li> ${text} + <ul> + %for suburl, text in url: + % if rel_link(permalink, suburl) == "#": + <li class="active"><a href="${suburl}">${text}</a> + %else: + <li><a href="${suburl}">${text}</a> + %endif + %endfor + </ul> + % else: + % if rel_link(permalink, url) == "#": + <li class="active"><a href="${url}">${text}</a> + %else: + <li><a href="${url}">${text}</a> + %endif + % endif + %endfor +</%def> + + +<%def name="html_translations()"> + %for langname in translations.keys(): + %if langname != lang: + <a href="${_link("index", None, langname)}">${messages("LANGUAGE", langname)}</a> + %endif + %endfor +</%def> diff --git a/nikola/data/themes/base/templates/comments_helper.tmpl b/nikola/data/themes/base/templates/comments_helper.tmpl new file mode 100644 index 0000000..e74a146 --- /dev/null +++ b/nikola/data/themes/base/templates/comments_helper.tmpl @@ -0,0 +1,49 @@ +## -*- coding: utf-8 -*- + +<%namespace name="disqus" file="disqus_helper.tmpl"/> +<%namespace name="livefyre" file="livefyre_helper.tmpl"/> +<%namespace name="intensedebate" file="intensedebate_helper.tmpl"/> +<%namespace name="moot" file="moot_helper.tmpl"/> +<%namespace name="googleplus" file="googleplus_helper.tmpl"/> + +<%def name="comment_form(url, title, identifier)"> + %if comment_system == 'disqus': + ${disqus.comment_form(url, title, identifier)} + % elif comment_system == 'livefyre': + ${livefyre.comment_form(url, title, identifier)} + % elif comment_system == 'intensedebate': + ${intensedebate.comment_form(url, title, identifier)} + % elif comment_system == 'moot': + ${moot.comment_form(url, title, identifier)} + % elif comment_system == 'googleplus': + ${googleplus.comment_form(url, title, identifier)} + %endif +</%def> + +<%def name="comment_link(link, identifier)"> + %if comment_system == 'disqus': + ${disqus.comment_link(link, identifier)} + % elif comment_system == 'livefyre': + ${livefyre.comment_link(link, identifier)} + % elif comment_system == 'intensedebate': + ${intensedebate.comment_link(link, identifier)} + % elif comment_system == 'moot': + ${moot.comment_link(link, identifier)} + % elif comment_system == 'googleplus': + ${googleplus.comment_link(link, identifier)} + %endif +</%def> + +<%def name="comment_link_script()"> + %if comment_system == 'disqus': + ${disqus.comment_link_script()} + % elif comment_system == 'livefyre': + ${livefyre.comment_link_script()} + % elif comment_system == 'intensedebate': + ${intensedebate.comment_link_script()} + % elif comment_system == 'moot': + ${moot.comment_link_script()} + % elif comment_system == 'googleplus': + ${googleplus.comment_link_script()} + %endif +</%def> diff --git a/nikola/data/themes/base/templates/crumbs.tmpl b/nikola/data/themes/base/templates/crumbs.tmpl new file mode 100644 index 0000000..c458cbe --- /dev/null +++ b/nikola/data/themes/base/templates/crumbs.tmpl @@ -0,0 +1,9 @@ +## -*- coding: utf-8 -*- + +<%def name="bar(crumbs)"> +<ul class="breadcrumb"> + % for link, text in crumbs: + <li><a href="${link}">${text}</a></li> + % endfor +</ul> +</%def> diff --git a/nikola/data/themes/base/templates/disqus_helper.tmpl b/nikola/data/themes/base/templates/disqus_helper.tmpl new file mode 100644 index 0000000..211f27a --- /dev/null +++ b/nikola/data/themes/base/templates/disqus_helper.tmpl @@ -0,0 +1,58 @@ +## -*- coding: utf-8 -*- +<%! + import json + translations = { + 'es': 'es_ES', + } +%> + +<%def name="comment_form(url, title, identifier)"> + %if comment_system_id: + <div id="disqus_thread"></div> + <script type="text/javascript"> + var disqus_shortname ="${comment_system_id}"; + %if url: + var disqus_url="${url}"; + %endif + var disqus_title=${json.dumps(title)}; + var disqus_identifier="${identifier}"; + var disqus_config = function () { + this.language = "${translations.get(lang, lang)}"; + }; + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); + </script> + <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> + <a href="http://disqus.com" class="dsq-brlink">Comments powered by <span class="logo-disqus">Disqus</span></a> + %endif +</%def> + +<%def name="comment_link(link, identifier)"> + <p> + %if comment_system_id: + <a href="${link}#disqus_thread" data-disqus-identifier="${identifier}">Comments</a> + %endif +</%def> + + +<%def name="comment_link_script()"> + %if comment_system_id: + <script type="text/javascript">var disqus_shortname="${comment_system_id}";(function(){var a=document.createElement("script");a.async=true;a.type="text/javascript";a.src="http://"+disqus_shortname+".disqus.com/count.js";(document.getElementsByTagName("HEAD")[0]||document.getElementsByTagName("BODY")[0]).appendChild(a)}());</script> + %endif +</%def> + +## FIXME: remove aliases in v7 +<%def name="html_disqus(url, title, identifier)"> + ${comment_form(url, title, identifier)} +</%def> + +<%def name="html_disqus_link(link, identifier)"> + ${comment_link(link, identifier)} +</%def> + +<%def name="html_disqus_script()"> + ${comment_link_script()} +</%def> diff --git a/nikola/data/themes/base/templates/facebook_helper.tmpl b/nikola/data/themes/base/templates/facebook_helper.tmpl new file mode 100644 index 0000000..d6059a1 --- /dev/null +++ b/nikola/data/themes/base/templates/facebook_helper.tmpl @@ -0,0 +1,62 @@ +## -*- coding: utf-8 -*- +<%def name="comment_form(url, title, identifier)"> +<div id="fb-root"></div> +<script> + window.fbAsyncInit = function() { + // init the FB JS SDK + FB.init({ + appId : '${comment_system_id}', + status : true, + xfbml : true + }); + + }; + + // Load the SDK asynchronously + (function(d, s, id){ + var js, fjs = d.getElementsByTagName(s)[0]; + if (d.getElementById(id)) {return;} + js = d.createElement(s); js.id = id; + js.src = "//connect.facebook.net/en_US/all.js"; + fjs.parentNode.insertBefore(js, fjs); + }(document, 'script', 'facebook-jssdk')); +</script> + +<div class="fb-comments" data-href="${url}" data-width="470"></div> +</%def> + +<%def name="comment_link(link, identifier)"> +<span class="fb-comments-count" data-url="${link}"> +</%def> + +<%def name="comment_link_script()"> +<div id="fb-root"></div> +<script> + // thank lxml for this + $('.fb-comments-count').each(function(i, obj) { + var url = obj.attributes['data-url'].value; + // change here if you dislike the default way of displaying + // this + obj.innerHTML = '<fb:comments-count href="' + url + '"></fb:comments-count> comments'; + }); + + window.fbAsyncInit = function() { + // init the FB JS SDK + FB.init({ + appId : '${comment_system_id}', + status : true, + xfbml : true + }); + + }; + + // Load the SDK asynchronously + (function(d, s, id){ + var js, fjs = d.getElementsByTagName(s)[0]; + if (d.getElementById(id)) {return;} + js = d.createElement(s); js.id = id; + js.src = "//connect.facebook.net/en_US/all.js"; + fjs.parentNode.insertBefore(js, fjs); + }(document, 'script', 'facebook-jssdk')); +</script> +</%def> diff --git a/nikola/data/themes/base/templates/gallery.tmpl b/nikola/data/themes/base/templates/gallery.tmpl new file mode 100644 index 0000000..be9cc6f --- /dev/null +++ b/nikola/data/themes/base/templates/gallery.tmpl @@ -0,0 +1,28 @@ +## -*- coding: utf-8 -*- +<%inherit file="base.tmpl"/> +<%namespace name="comments" file="comments_helper.tmpl"/> +<%namespace name="ui" file="crumbs.tmpl" import="bar"/> +<%block name="sourcelink"></%block> + +<%block name="content"> + ${ui.bar(crumbs)} + %if text: + <p> + ${text} + </p> + %endif + <ul> + % for folder in folders: + <li><a href="${folder}"><i class="icon-folder-open"></i> ${folder}</a></li> + % endfor + </ul> + <ul class="thumbnails"> + %for image in photo_array: + <li><a href="${image['url']}" class="thumbnail image-reference" title="${image['title']}"> + <img src="${image['url_thumb']}" alt="${image['title']}" /></a> + %endfor + </ul> +%if enable_comments: + ${comments.comment_form(None, permalink, title)} +%endif +</%block> diff --git a/nikola/data/themes/base/templates/googleplus_helper.tmpl b/nikola/data/themes/base/templates/googleplus_helper.tmpl new file mode 100644 index 0000000..5a5c4d7 --- /dev/null +++ b/nikola/data/themes/base/templates/googleplus_helper.tmpl @@ -0,0 +1,17 @@ +## -*- coding: utf-8 -*- +<%def name="comment_form(url, title, identifier)"> +<script src="https://apis.google.com/js/plusone.js"></script> +<div class="g-comments" + data-href="${url}" + data-first_party_property="BLOGGER" + data-view_type="FILTERED_POSTMOD"> +</div> +</%def> + +<%def name="comment_link(link, identifier)"> +<div class="g-commentcount" data-href="${link}"></div> +<script src="https://apis.google.com/js/plusone.js"></script> +</%def> + +<%def name="comment_link_script()"> +</%def> diff --git a/nikola/data/themes/base/templates/index.tmpl b/nikola/data/themes/base/templates/index.tmpl new file mode 100644 index 0000000..6de79e2 --- /dev/null +++ b/nikola/data/themes/base/templates/index.tmpl @@ -0,0 +1,29 @@ +## -*- coding: utf-8 -*- +<%namespace name="helper" file="index_helper.tmpl"/> +<%namespace name="comments" file="comments_helper.tmpl"/> +<%inherit file="base.tmpl"/> +<%block name="content"> + % for post in posts: + <div class="postbox h-entry"> + <h1 class="p-name"><a href="${post.permalink()}" class="u-url">${post.title()}</a> + <small> + ${messages("Posted")}: <time class="published dt-published" datetime="${post.date.isoformat()}">${post.formatted_date(date_format)}</time> + </small></h1> + <hr> + %if index_teasers: + <div class="p-summary"> + ${post.text(teaser_only=True)} + %else: + <div class="e-content"> + ${post.text(teaser_only=False)} + %endif + </div> + % if not post.meta('nocomments'): + ${comments.comment_link(post.permalink(), post._base_path)} + % endif + </div> + % endfor + ${helper.html_pager()} + ${comments.comment_link_script()} + ${helper.mathjax_script(posts)} +</%block> diff --git a/nikola/data/themes/base/templates/index_helper.tmpl b/nikola/data/themes/base/templates/index_helper.tmpl new file mode 100644 index 0000000..a914846 --- /dev/null +++ b/nikola/data/themes/base/templates/index_helper.tmpl @@ -0,0 +1,23 @@ +## -*- coding: utf-8 -*- +<%def name="html_pager()"> +<div> +<ul class="pager"> + %if prevlink: + <li class="previous"> + <a href="${prevlink}" rel="prev">← ${messages("Newer posts")}</a> + </li> + %endif + %if nextlink: + <li class="next"> + <a href="${nextlink}" rel="next">${messages("Older posts")} →</a> + </li> + %endif +</ul> +</div> +</%def> + +<%def name="mathjax_script(posts)"> + %if any(post.is_mathjax for post in posts): + <script src="/assets/js/mathjax.js" type="text/javascript"></script> + %endif +</%def> diff --git a/nikola/data/themes/base/templates/intensedebate_helper.tmpl b/nikola/data/themes/base/templates/intensedebate_helper.tmpl new file mode 100644 index 0000000..6462f74 --- /dev/null +++ b/nikola/data/themes/base/templates/intensedebate_helper.tmpl @@ -0,0 +1,25 @@ +## -*- coding: utf-8 -*- +<%def name="comment_form(url, title, identifier)"> +<script> +var idcomments_acct = '${comment_system_id}'; +var idcomments_post_id = "${identifier}"; +var idcomments_post_url = "${url}"; +</script> +<span id="IDCommentsPostTitle" style="display:none"></span> +<script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'></script> +</script> +</%def> + +<%def name="comment_link(link, identifier)"> +<a href="{link}" onclick="this.href='${link}'; this.target='_self';"><span class='IDCommentsReplace' style='display:none'>${identifier}</span> +<script> +var idcomments_acct = '${comment_system_id}'; +var idcomments_post_id = "${identifier}"; +var idcomments_post_url = "${link}"; +</script> +<script type="text/javascript" src="http://www.intensedebate.com/js/genericLinkWrapperV2.js"></script> +</a> +</%def> + +<%def name="comment_link_script()"> +</%def> diff --git a/nikola/data/themes/base/templates/list.tmpl b/nikola/data/themes/base/templates/list.tmpl new file mode 100644 index 0000000..a60b508 --- /dev/null +++ b/nikola/data/themes/base/templates/list.tmpl @@ -0,0 +1,14 @@ +## -*- coding: utf-8 -*- +<%inherit file="base.tmpl"/> +<%block name="content"> + <!--Body content--> + <div class="postbox"> + <h1>${title}</h1> + <ul class="unstyled"> + % for text, link in items: + <li><a href="${link}">${text}</a> + % endfor + </ul> + </div> + <!--End of body content--> +</%block> diff --git a/nikola/data/themes/base/templates/list_post.tmpl b/nikola/data/themes/base/templates/list_post.tmpl new file mode 100644 index 0000000..f0e159d --- /dev/null +++ b/nikola/data/themes/base/templates/list_post.tmpl @@ -0,0 +1,14 @@ +## -*- coding: utf-8 -*- +<%inherit file="base.tmpl"/> +<%block name="content"> + <!--Body content--> + <div class="postbox"> + <h1>${title}</h1> + <ul class="unstyled"> + % for post in posts: + <li><a href="${post.permalink()}">[${post.formatted_date(date_format)}] ${post.title()}</a> + % endfor + </ul> + </div> + <!--End of body content--> +</%block> diff --git a/nikola/data/themes/base/templates/listing.tmpl b/nikola/data/themes/base/templates/listing.tmpl new file mode 100644 index 0000000..b6ca83f --- /dev/null +++ b/nikola/data/themes/base/templates/listing.tmpl @@ -0,0 +1,17 @@ +## -*- coding: utf-8 -*- +<%inherit file="base.tmpl"/> +<%namespace name="ui" file="crumbs.tmpl" import="bar"/> +<%block name="content"> +${ui.bar(crumbs)} +<ul class="unstyled"> +% for name in folders: + <li><a href="${name}"><i class="icon-folder-open"></i> ${name}</a> +% endfor +% for name in files: + <li><a href="${name}.html"><i class="icon-file"></i> ${name}</a> +% endfor +</ul> +% if code: + ${code} +% endif +</%block> diff --git a/nikola/data/themes/base/templates/livefyre_helper.tmpl b/nikola/data/themes/base/templates/livefyre_helper.tmpl new file mode 100644 index 0000000..6916459 --- /dev/null +++ b/nikola/data/themes/base/templates/livefyre_helper.tmpl @@ -0,0 +1,37 @@ +## -*- coding: utf-8 -*- +<%def name="comment_form(url, title, identifier)"> +<div id="livefyre-comments"></div> +<script type="text/javascript" src="http://zor.livefyre.com/wjs/v3.0/javascripts/livefyre.js"></script> +<script type="text/javascript"> +(function () { + var articleId = "${identifier}"; + fyre.conv.load({}, [{ + el: 'livefyre-comments', + network: "livefyre.com", + siteId: "${comment_system_id}", + articleId: articleId, + signed: false, + collectionMeta: { + articleId: articleId, + url: fyre.conv.load.makeCollectionUrl(), + } + }], function() {}); +}()); +</script> +</%def> + +<%def name="comment_link(link, identifier)"> + <p> + <a href="${link}"> + <span class="livefyre-commentcount" data-lf-site-id="${comment_system_id}" data-lf-article-id="${identifier}"> + 0 Comments + </span></a> +</%def> + + +<%def name="comment_link_script()"> +<script + type="text/javascript" + src="http://zor.livefyre.com/wjs/v1.0/javascripts/CommentCount.js"> +</script> +</%def> diff --git a/nikola/data/themes/base/templates/moot_helper.tmpl b/nikola/data/themes/base/templates/moot_helper.tmpl new file mode 100644 index 0000000..951553e --- /dev/null +++ b/nikola/data/themes/base/templates/moot_helper.tmpl @@ -0,0 +1,13 @@ +## -*- coding: utf-8 -*- + +<%def name="comment_form(url, title, identifier)"> + <a class="moot" href="https://moot.it/i/${comment_system_id}/${identifier}">${comment_system_id} forums</a> +</%def> + +<%def name="comment_link(link, identifier)"> +</%def> + + +<%def name="comment_link_script()"> +<script src="https://cdn.moot.it/1/moot.min.js"></script> +</%def> diff --git a/nikola/data/themes/base/templates/mustache-comment-form.tmpl b/nikola/data/themes/base/templates/mustache-comment-form.tmpl new file mode 100644 index 0000000..593d0aa --- /dev/null +++ b/nikola/data/themes/base/templates/mustache-comment-form.tmpl @@ -0,0 +1,5 @@ +## -*- coding: utf-8 -*- +<%namespace name="comments" file="comments_helper.tmpl"/> +% if not post.meta('nocomments'): + ${comments.comment_form(post.permalink(absolute=True), post.title(), post.base_path)} +% endif diff --git a/nikola/data/themes/base/templates/post.tmpl b/nikola/data/themes/base/templates/post.tmpl new file mode 100644 index 0000000..fd6316d --- /dev/null +++ b/nikola/data/themes/base/templates/post.tmpl @@ -0,0 +1,41 @@ +## -*- coding: utf-8 -*- +<%namespace name="helper" file="post_helper.tmpl"/> +<%namespace name="comments" file="comments_helper.tmpl"/> +<%inherit file="base.tmpl"/> +<%block name="extra_head"> +${helper.twitter_card_information(post)} +% if post.meta('keywords'): + <meta name="keywords" content="${post.meta('keywords')|h}"> +% endif +</%block> +<%block name="content"> + <div class="postbox"> + <div class="h-entry" itemscope="itemscope" itemtype="http://schema.org/Article"> + ${helper.html_title()} + <hr> + <small> + ${messages("Posted")}: <time class="published dt-published" datetime="${post.date.isoformat()}" itemprop="datePublished">${post.formatted_date(date_format)}</time> + ${helper.html_translations(post)} + ${helper.html_tags(post)} + | + <%block name="sourcelink"> + % if not post.meta('password'): + <a href="${post.source_link()}" id="sourcelink">${messages("Source")}</a> + % endif + </%block> + </small> + <hr> + <div class="e-content" itemprop="articleBody text"> + ${post.text()} + </div> + %if post.description(): + <meta content="${post.description()}" itemprop="description"> + %endif + </div> + ${helper.html_pager(post)} + % if not post.meta('nocomments'): + ${comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path)} + % endif + ${helper.mathjax_script(post)} + </div> +</%block> diff --git a/nikola/data/themes/base/templates/post_helper.tmpl b/nikola/data/themes/base/templates/post_helper.tmpl new file mode 100644 index 0000000..f6b0535 --- /dev/null +++ b/nikola/data/themes/base/templates/post_helper.tmpl @@ -0,0 +1,75 @@ +## -*- coding: utf-8 -*- +<%def name="html_title()"> + <h1 class="p-name" itemprop="headline name">${title|h}</h1> + % if link: + <p><a href='${link}'>${messages("Original site")}</a></p> + % endif +</%def> + + +<%def name="html_translations(post)"> + %if len(translations) > 1: + %for langname in translations.keys(): + %if langname != lang and post.is_translation_available(langname): + | + <a href="${post.permalink(langname)}">${messages("Read in English", langname)}</a> + %endif + %endfor + %endif +</%def> + + +<%def name="html_tags(post)"> + %if post.tags: + | ${messages("More posts about")} + <span itemprop="keywords"> + %for tag in post.tags: + <a class="tag p-category" href="${_link('tag', tag)}"><span class="badge badge-info">${tag}</span></a> + %endfor + </span> + %endif +</%def> + +<%def name="html_pager(post)"> + <ul class="pager"> + %if post.prev_post: + <li class="previous"> + <a href="${post.prev_post.permalink()}" rel="prev">← ${messages("Previous post")}</a> + </li> + %endif + %if post.next_post: + <li class="next"> + <a href="${post.next_post.permalink()}" rel="next">${messages("Next post")} →</a> + </li> + %endif + </ul> +</%def> + +<%def name="twitter_card_information(post)"> + %if twitter_card and twitter_card['use_twitter_cards']: + <meta name="twitter:card" content="${twitter_card.get('card', 'summary')|h}"> + <meta name="og:url" content="${post.permalink(absolute=True)}"> + %if 'site:id' in twitter_card: + <meta name="twitter:site:id" content="${twitter_card['site:id']}"> + %elif 'site' in twitter_card: + <meta name="twitter:site" content="${twitter_card['site']}"> + %endif + %if 'creator:id' in twitter_card: + <meta name="twitter:creator:id" content="${twitter_card['creator:id']}"> + %elif 'creator' in twitter_card: + <meta name="twitter:creator" content="${twitter_card['creator']}"> + %endif + <meta name="og:title" content="${post.title()[:70]|h}"> + %if post.description(): + <meta name="og:description" content="${post.description()[:200]|h}"> + %else: + <meta name="og:description" content="${post.text(strip_html=True)[:200]|h}"> + %endif + %endif +</%def> + +<%def name="mathjax_script(post)"> + %if post.is_mathjax: + <script src="/assets/js/mathjax.js"></script> + %endif +</%def> diff --git a/nikola/data/themes/base/templates/post_list_directive.tmpl b/nikola/data/themes/base/templates/post_list_directive.tmpl new file mode 100644 index 0000000..3345ae4 --- /dev/null +++ b/nikola/data/themes/base/templates/post_list_directive.tmpl @@ -0,0 +1,14 @@ +## -*- coding: utf-8 -*- +<!-- Begin post-list ${post_list_id} --> +<div id="${post_list_id}" class="post-list"> + <ul class="post-list"> + % for post in posts: + <li class="post-list-item"> + ${post.formatted_date(date_format)} + + <a href="${post.permalink(lang)}">${post.title(lang)}</a> + </li> + % endfor + </ul> +</div> +<!-- End post-list ${post_list_id} --> diff --git a/nikola/data/themes/base/templates/slides.tmpl b/nikola/data/themes/base/templates/slides.tmpl new file mode 100644 index 0000000..14983ad --- /dev/null +++ b/nikola/data/themes/base/templates/slides.tmpl @@ -0,0 +1,22 @@ +<div id="${carousel_id}" class="carousel slide"> + <ol class="carousel-indicators"> + % for i in range(len(content)): + % if i == 0: + <li data-target="#${carousel_id}" data-slide-to="${i}" class="active"></li> + % else: + <li data-target="#${carousel_id}" data-slide-to="${i}"></li> + % endif + % endfor + </ol> + <div class="carousel-inner"> + % for i, image in enumerate(content): + % if i == 0: + <div class="item active"><img src="${image}" alt="" style="margin: 0 auto 0 auto;"></div> + % else: + <div class="item"><img src="${image}" alt="" style="margin: 0 auto 0 auto;"></div> + % endif + % endfor + </div> + <a class="left carousel-control" href="#${carousel_id}" data-slide="prev">‹</a> + <a class="right carousel-control" href="#${carousel_id}" data-slide="next">›</a> +</div> diff --git a/nikola/data/themes/base/templates/story.tmpl b/nikola/data/themes/base/templates/story.tmpl new file mode 100644 index 0000000..7406f05 --- /dev/null +++ b/nikola/data/themes/base/templates/story.tmpl @@ -0,0 +1,16 @@ +## -*- coding: utf-8 -*- +<%inherit file="post.tmpl"/> +<%namespace name="helper" file="post_helper.tmpl"/> +<%namespace name="comments" file="comments_helper.tmpl"/> +<%block name="extra_head"> +${helper.twitter_card_information(post)} +</%block> +<%block name="content"> +%if title and not post.meta('hidetitle'): + <h1>${title}</h1> +%endif + ${post.text()} +%if enable_comments and not post.meta('nocomments'): + ${comments.comment_form(post.permalink(absolute=True), post.title(), post.base_path)} +%endif +</%block> diff --git a/nikola/data/themes/base/templates/tag.tmpl b/nikola/data/themes/base/templates/tag.tmpl new file mode 100644 index 0000000..2ca9db4 --- /dev/null +++ b/nikola/data/themes/base/templates/tag.tmpl @@ -0,0 +1,32 @@ +## -*- coding: utf-8 -*- +<%inherit file="list_post.tmpl"/> +<%block name="extra_head"> + %if len(translations) > 1: + %for language in translations: + <link rel="alternate" type="application/rss+xml" type="application/rss+xml" title="RSS for ${kind} ${tag} (${language})" href="${_link(kind + "_rss", tag, language)}"> + %endfor + %else: + <link rel="alternate" type="application/rss+xml" type="application/rss+xml" title="RSS for ${kind} ${tag}" href="${_link(kind + "_rss", tag)}"> + %endif +</%block> + +<%block name="content"> + <!--Body content--> + <div class="postbox"> + <h1>${title}</h1> + %if len(translations) > 1: + %for language in translations: + <a href="${_link(kind + "_rss", tag, language)}">RSS (${language})</a> + %endfor + %else: + <a href="${_link(kind + "_rss", tag)}">RSS</a> + %endif + <br> + <ul class="unstyled"> + % for post in posts: + <li><a href="${post.permalink()}">[${post.formatted_date(date_format)}] ${post.title()}</a> + % endfor + </ul> + </div> + <!--End of body content--> +</%block> diff --git a/nikola/data/themes/base/templates/tags.tmpl b/nikola/data/themes/base/templates/tags.tmpl new file mode 100644 index 0000000..6c8c5e9 --- /dev/null +++ b/nikola/data/themes/base/templates/tags.tmpl @@ -0,0 +1,25 @@ +## -*- coding: utf-8 -*- +<%inherit file="base.tmpl"/> +<%block name="content"> + <h1>${title}</h1> + % if cat_items: + <h2>${messages("Categories")}</h2> + <ul class="unstyled bricks"> + % for text, link in cat_items: + % if text: + <li><a class="reference" href="${link}">${text}</a></li> + % endif + % endfor + </ul> + % if items: + <h2>${messages("Tags")}</h2> + % endif + %endif + % if items: + <ul class="unstyled bricks"> + % for text, link in items: + <li><a class="reference" href="${link}">${text}</a></li> + % endfor + </ul> + % endif +</%block> |
