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
baby steps
- Loading branch information
Showing
2 changed files
with
59 additions
and
71 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 |
---|---|---|
@@ -1,11 +1,7 @@ | ||
## -*- coding: utf-8 -*- | ||
<%namespace name="base" file="base_helper.tmpl" import="*"/> | ||
//- 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> | ||
mixin html_footer() | ||
if content_footer | ||
footer (id="footer", role="contentinfo") | ||
p #{content_footer} | ||
!= template_hooks['page_footer']() |
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,66 +1,58 @@ | ||
## -*- 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> | ||
- import "base_helper.jade" as helper with context | ||
|
||
<%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 | ||
mixin 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 | ||
!= template_hooks['page_header']() | ||
|
||
% if show_blog_title: | ||
<span id="blog-title">${blog_title}</span> | ||
% endif | ||
</a></h1> | ||
</%def> | ||
mixin 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") | ||
if show_blog_title: | ||
span(id="blog-title") | ||
= blog_title | ||
|
||
<%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> | ||
mixin 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 | ||
else | ||
li | ||
a(href="#{suburl}") | ||
=text | ||
else | ||
if rel_link(permalink, url) == "#" | ||
li(class="active") | ||
a(href="#{permalink}") | ||
= text | ||
else | ||
li | ||
a(href="#{url}") | ||
= text | ||
|
||
<%def name="html_translation_header()"> | ||
%if len(translations) > 1: | ||
<div id="toptranslations"> | ||
<h2>${messages("Languages:")}</h2> | ||
${base.html_translations()} | ||
</div> | ||
%endif | ||
</%def> | ||
!= template_hooks['menu']() | ||
!= template_hooks['menu_alt']() | ||
|
||
mixin html_translation_header() | ||
if len(translations) > 1 | ||
div(id="toptranslations") | ||
h2 | ||
= messages("Languages:") | ||
= base.html_translations() |