Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
redoing the theme with latest base
- Loading branch information
Showing
30 changed files
with
1,061 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extends index.jade | ||
|
||
block extra_head | ||
!= 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)}") | ||
elif generate_atom: | ||
link(rel="alternate", type="application/atom+xml", title="Atom for the #{archive_name} archive", href="#{_link("archive_atom", archive_name)}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,26 @@ | ||
!!! 5 | ||
|
||
- import "base_helper.jade" as helper with context | ||
|
||
html(lang=lang) | ||
head | ||
!= helper.html_head() | ||
= extra_head_data | ||
|
||
body | ||
h1(id="blog-title") | ||
a(href=abs_link('/'), title=blog_title, rel="home") | ||
= blog_title | ||
|
||
block belowtitle | ||
if translations|length > 1 | ||
small | ||
= messages("Also available in:") + " " | ||
for langname in translations | ||
if langname != lang | ||
a(href=_link("index", None, langname), rel="alternate", hreflang=langname) | ||
= messages("LANGUAGE", langname) | ||
|
||
block content | ||
// Nothing in this template, override | ||
small | ||
!= content_footer | ||
|
||
// Sidebar | ||
ul.unstyled | ||
if license | ||
li | ||
= license | ||
!= helper.html_navigation_links() | ||
if search_form | ||
!= search_form | ||
!= late_load_js | ||
!= social_buttons_code | ||
## -*- coding: utf-8 -*- | ||
<%namespace name="base" file="base_helper.tmpl" import="*"/> | ||
<%namespace name="header" file="base_header.tmpl" import="*"/> | ||
<%namespace name="footer" file="base_footer.tmpl" import="*"/> | ||
<%namespace name="annotations" file="annotation_helper.tmpl"/> | ||
${set_locale(lang)} | ||
${base.html_headstart()} | ||
<%block name="extra_head"> | ||
### Leave this block alone. | ||
</%block> | ||
${template_hooks['extra_head']()} | ||
</head> | ||
<body> | ||
<a href="#content" class="sr-only sr-only-focusable">${messages("Skip to main content")}</a> | ||
<div id="container"> | ||
${header.html_header()} | ||
<main id="content" role="main"> | ||
<%block name="content"></%block> | ||
</main> | ||
${footer.html_footer()} | ||
</div> | ||
${body_end} | ||
${template_hooks['body_end']()} | ||
${base.late_load_js()} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## -*- coding: utf-8 -*- | ||
<%namespace name="base" file="base_helper.tmpl" import="*"/> | ||
|
||
<%def name="html_footer()"> | ||
%if content_footer: | ||
<footer id="footer" role="contentinfo"> | ||
<p>${content_footer}</p> | ||
${template_hooks['page_footer']()} | ||
</footer> | ||
%endif | ||
</%def> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
## -*- coding: utf-8 -*- | ||
<%namespace name="base" file="base_helper.tmpl" import="*"/> | ||
|
||
<%def name="html_header()"> | ||
<header id="header" role="banner"> | ||
${html_site_title()} | ||
${html_translation_header()} | ||
${html_navigation_links()} | ||
%if search_form: | ||
<div class="searchform" role="search"> | ||
${search_form} | ||
</div> | ||
%endif | ||
</header> | ||
${template_hooks['page_header']()} | ||
</%def> | ||
|
||
<%def name="html_site_title()"> | ||
<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 | ||
|
||
% if show_blog_title: | ||
<span id="blog-title">${blog_title}</span> | ||
% endif | ||
</a></h1> | ||
</%def> | ||
|
||
<%def name="html_navigation_links()"> | ||
<nav id="menu" role="navigation"> | ||
<ul> | ||
%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="${permalink}">${text}</a></li> | ||
%else: | ||
<li><a href="${suburl}">${text}</a></li> | ||
%endif | ||
%endfor | ||
</ul> | ||
% else: | ||
% if rel_link(permalink, url) == "#": | ||
<li class="active"><a href="${permalink}">${text}</a></li> | ||
%else: | ||
<li><a href="${url}">${text}</a></li> | ||
%endif | ||
% endif | ||
%endfor | ||
${template_hooks['menu']()} | ||
${template_hooks['menu_alt']()} | ||
</ul> | ||
</nav> | ||
</%def> | ||
|
||
<%def name="html_translation_header()"> | ||
%if len(translations) > 1: | ||
<div id="toptranslations"> | ||
<h2>${messages("Languages:")}</h2> | ||
${base.html_translations()} | ||
</div> | ||
%endif | ||
</%def> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,115 @@ | ||
mixin html_head() | ||
meta(charset='utf-8') | ||
if description: | ||
meta(name="description" content=description) | ||
meta(name="author" content=blog_author) | ||
// needs striphtml | ||
title(text=(title + ' | ' + blog_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") | ||
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") | ||
|
||
if permalink | ||
link(rel="canonical", href=abs_link(permalink)) | ||
|
||
if rss_link | ||
= rss_link | ||
else | ||
if translations|length > 1 | ||
for language in translations | ||
link(rel="alternate", type="application/rss+xml", title="RSS ("+language+")", href=_link('rss', None, language)) | ||
else: | ||
link(rel="alternate", type="application/rss+xml", title="RSS", href=_link('rss', None)) | ||
|
||
if favicons | ||
for name, file, size in favicons | ||
link(rel=name, href=file, sizes=size) | ||
|
||
mixin html_navigation_links() | ||
// Links seem broken somehow | ||
for url, text in navigation_links[lang] | ||
if url|istuple | ||
li | ||
= text | ||
ul | ||
for suburl, text in url | ||
if rel_link(permalink, url) == '#' | ||
li(class='active') | ||
a(href=permalink) | ||
= text | ||
else | ||
li | ||
a(href=permalink) | ||
= text | ||
else | ||
if rel_link(permalink, url) == '#' | ||
li(class='active') | ||
a(href=permalink) | ||
= text | ||
else | ||
li | ||
a(href=permalink) | ||
= text | ||
## -*- coding: utf-8 -*- | ||
|
||
<%def name="html_headstart()"> | ||
<!DOCTYPE html> | ||
<html \ | ||
prefix='\ | ||
%if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']): | ||
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> | ||
<meta charset="utf-8"> | ||
%if description: | ||
<meta name="description" content="${description}"> | ||
%endif | ||
<meta name="viewport" content="width=device-width"> | ||
<title>${title|striphtml} | ${blog_title|striphtml}</title> | ||
|
||
${html_stylesheets()} | ||
${html_feedlinks()} | ||
%if permalink: | ||
<link rel="canonical" href="${abs_link(permalink)}"> | ||
%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 | ||
|
||
%if prevlink: | ||
<link rel="prev" href="${prevlink}" type="text/html"> | ||
%endif | ||
%if nextlink: | ||
<link rel="next" href="${nextlink}" type="text/html"> | ||
%endif | ||
|
||
${mathjax_config} | ||
%if use_cdn: | ||
<!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> | ||
%else: | ||
<!--[if lt IE 9]><script src="${url_replacer(permalink, '/assets/js/html5.js', lang)}"></script><![endif]--> | ||
%endif | ||
|
||
${extra_head_data} | ||
</%def> | ||
|
||
<%def name="late_load_js()"> | ||
${social_buttons_code} | ||
</%def> | ||
|
||
<%def name="html_stylesheets()"> | ||
%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 | ||
</%def> | ||
|
||
<%def name="html_feedlinks()"> | ||
%if rss_link: | ||
${rss_link} | ||
%elif generate_rss: | ||
%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 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="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li> | ||
%endif | ||
%endfor | ||
</ul> | ||
</%def> |
Oops, something went wrong.