Skip to content

Commit b27527e

Browse files
committedMay 28, 2015
lanyon port
1 parent 6fab665 commit b27527e

File tree

10 files changed

+1394
-0
lines changed

10 files changed

+1394
-0
lines changed
 

‎v7/lanyon/README.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
This theme is a port of the [Lanyon theme by mvo](http://lanyon.getpoole.com/) Everything that's good in it
Has a conversation. Original line has a conversation.
2+
is mvo's fault, everything bad is mine.
3+
4+
It supports one variable set in the config:
5+
6+
```
7+
GLOBAL_CONTEXT = {
8+
"lanyon_subtheme": "theme-base-08"
9+
}
10+
```
11+
12+
That changes the color scheme, replace 08 with one of 09, 0a, 0b, 0c, 0d, 0e, 0f.
13+
14+
You can read a tutorial about how this theme was created [at Nikola's site]()_

‎v7/lanyon/assets/css/code.css

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.highlight .hll { background-color: #ffc; }
2+
.highlight .c { color: #999; } /* Comment */
3+
.highlight .err { color: #a00; background-color: #faa } /* Error */
4+
.highlight .k { color: #069; } /* Keyword */
5+
.highlight .o { color: #555 } /* Operator */
6+
.highlight .cm { color: #09f; font-style: italic } /* Comment.Multiline */
7+
.highlight .cp { color: #099 } /* Comment.Preproc */
8+
.highlight .c1 { color: #999; } /* Comment.Single */
9+
.highlight .cs { color: #999; } /* Comment.Special */
10+
.highlight .gd { background-color: #fcc; border: 1px solid #c00 } /* Generic.Deleted */
11+
.highlight .ge { font-style: italic } /* Generic.Emph */
12+
.highlight .gr { color: #f00 } /* Generic.Error */
13+
.highlight .gh { color: #030; } /* Generic.Heading */
14+
.highlight .gi { background-color: #cfc; border: 1px solid #0c0 } /* Generic.Inserted */
15+
.highlight .go { color: #aaa } /* Generic.Output */
16+
.highlight .gp { color: #009; } /* Generic.Prompt */
17+
.highlight .gs { } /* Generic.Strong */
18+
.highlight .gu { color: #030; } /* Generic.Subheading */
19+
.highlight .gt { color: #9c6 } /* Generic.Traceback */
20+
.highlight .kc { color: #069; } /* Keyword.Constant */
21+
.highlight .kd { color: #069; } /* Keyword.Declaration */
22+
.highlight .kn { color: #069; } /* Keyword.Namespace */
23+
.highlight .kp { color: #069 } /* Keyword.Pseudo */
24+
.highlight .kr { color: #069; } /* Keyword.Reserved */
25+
.highlight .kt { color: #078; } /* Keyword.Type */
26+
.highlight .m { color: #f60 } /* Literal.Number */
27+
.highlight .s { color: #d44950 } /* Literal.String */
28+
.highlight .na { color: #4f9fcf } /* Name.Attribute */
29+
.highlight .nb { color: #366 } /* Name.Builtin */
30+
.highlight .nc { color: #0a8; } /* Name.Class */
31+
.highlight .no { color: #360 } /* Name.Constant */
32+
.highlight .nd { color: #99f } /* Name.Decorator */
33+
.highlight .ni { color: #999; } /* Name.Entity */
34+
.highlight .ne { color: #c00; } /* Name.Exception */
35+
.highlight .nf { color: #c0f } /* Name.Function */
36+
.highlight .nl { color: #99f } /* Name.Label */
37+
.highlight .nn { color: #0cf; } /* Name.Namespace */
38+
.highlight .nt { color: #2f6f9f; } /* Name.Tag */
39+
.highlight .nv { color: #033 } /* Name.Variable */
40+
.highlight .ow { color: #000; } /* Operator.Word */
41+
.highlight .w { color: #bbb } /* Text.Whitespace */
42+
.highlight .mf { color: #f60 } /* Literal.Number.Float */
43+
.highlight .mh { color: #f60 } /* Literal.Number.Hex */
44+
.highlight .mi { color: #f60 } /* Literal.Number.Integer */
45+
.highlight .mo { color: #f60 } /* Literal.Number.Oct */
46+
.highlight .sb { color: #c30 } /* Literal.String.Backtick */
47+
.highlight .sc { color: #c30 } /* Literal.String.Char */
48+
.highlight .sd { color: #c30; font-style: italic } /* Literal.String.Doc */
49+
.highlight .s2 { color: #c30 } /* Literal.String.Double */
50+
.highlight .se { color: #c30; } /* Literal.String.Escape */
51+
.highlight .sh { color: #c30 } /* Literal.String.Heredoc */
52+
.highlight .si { color: #a00 } /* Literal.String.Interpol */
53+
.highlight .sx { color: #c30 } /* Literal.String.Other */
54+
.highlight .sr { color: #3aa } /* Literal.String.Regex */
55+
.highlight .s1 { color: #c30 } /* Literal.String.Single */
56+
.highlight .ss { color: #fc3 } /* Literal.String.Symbol */
57+
.highlight .bp { color: #366 } /* Name.Builtin.Pseudo */
58+
.highlight .vc { color: #033 } /* Name.Variable.Class */
59+
.highlight .vg { color: #033 } /* Name.Variable.Global */
60+
.highlight .vi { color: #033 } /* Name.Variable.Instance */
61+
.highlight .il { color: #f60 } /* Literal.Number.Integer.Long */
62+
63+
.css .o,
64+
.css .o + .nt,
65+
.css .nt + .nt { color: #999; }

‎v7/lanyon/assets/css/lanyon.css

+587
Large diffs are not rendered by default.

‎v7/lanyon/assets/css/poole.css

+430
Large diffs are not rendered by default.

‎v7/lanyon/parent

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
base

‎v7/lanyon/templates/base.tmpl

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
## -*- coding: utf-8 -*-
2+
<%namespace name="base" file="base_helper.tmpl" import="*"/>
3+
<%namespace name="header" file="base_header.tmpl" import="*"/>
4+
<%namespace name="footer" file="base_footer.tmpl" import="*"/>
5+
<%namespace name="annotations" file="annotation_helper.tmpl"/>
6+
${set_locale(lang)}
7+
${base.html_headstart()}
8+
<%block name="extra_head">
9+
### Leave this block alone.
10+
</%block>
11+
${template_hooks['extra_head']()}
12+
</head>
13+
% if lanyon_subtheme:
14+
<body class="${lanyon_subtheme}">
15+
%else:
16+
<body>
17+
%endif
18+
<a href="#content" class="sr-only sr-only-focusable">${messages("Skip to main content")}</a>
19+
<!-- Target for toggling the sidebar `.sidebar-checkbox` is for regular
20+
styles, `#sidebar-checkbox` for behavior. -->
21+
<input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">
22+
23+
<!-- Toggleable sidebar -->
24+
<div class="sidebar" id="sidebar">
25+
<div class="sidebar-item">
26+
<p>A reserved <a href="http://jekyllrb.com" target="_blank">Nikola</a> theme that places the utmost gravity on content with a hidden drawer. Made by <a href="https://twitter.com/mdo" target="_blank">@mdo</a> for Jekyll,
27+
ported to Nikola by <a href="https://twitter.com/mdo" target="_blank">@ralsina</a>.</p>
28+
</div>
29+
${header.html_navigation_links()}
30+
</div>
31+
32+
<!-- Wrap is the content to shift when toggling the sidebar. We wrap the
33+
content to avoid any CSS collisions with our real content. -->
34+
<div class="wrap">
35+
<div class="masthead">
36+
<div class="container">
37+
${header.html_site_title()}
38+
</div>
39+
</div>
40+
41+
<div class="container content" id="content">
42+
<%block name="content"></%block>
43+
${footer.html_footer()}
44+
</div>
45+
</div>
46+
<label for="sidebar-checkbox" class="sidebar-toggle"></label>
47+
${body_end}
48+
${template_hooks['body_end']()}
49+
${base.late_load_js()}
50+
</body>
51+
</html>

‎v7/lanyon/templates/base_header.tmpl

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## -*- coding: utf-8 -*-
2+
<%namespace name="base" file="base_helper.tmpl" import="*"/>
3+
4+
<%def name="html_header()">
5+
<header id="header" role="banner">
6+
${html_site_title()}
7+
${html_translation_header()}
8+
${html_navigation_links()}
9+
%if search_form:
10+
<div class="searchform" role="search">
11+
${search_form}
12+
</div>
13+
%endif
14+
</header>
15+
${template_hooks['page_header']()}
16+
</%def>
17+
18+
<%def name="html_site_title()">
19+
<h3 id="brand" class="masthead-title">
20+
<a href="${abs_link(_link("root", None, lang))}" title="${blog_title}" rel="home">${blog_title}</a>
21+
</h3>
22+
</%def>
23+
24+
<%def name="html_navigation_links()">
25+
<nav id="menu" role="navigation" class="sidebar-nav">
26+
%for url, text in navigation_links[lang]:
27+
<a class="sidebar-nav-item" href="${url}">${text}</a>
28+
%endfor
29+
${template_hooks['menu']()}
30+
${template_hooks['menu_alt']()}
31+
</nav>
32+
</%def>
33+
34+
35+
<%def name="html_translation_header()">
36+
%if len(translations) > 1:
37+
<div id="toptranslations">
38+
<h2>${messages("Languages:")}</h2>
39+
${base.html_translations()}
40+
</div>
41+
%endif
42+
</%def>

‎v7/lanyon/templates/base_helper.tmpl

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
## -*- coding: utf-8 -*-
2+
3+
<%def name="html_headstart()">
4+
<!DOCTYPE html>
5+
<html \
6+
prefix='\
7+
%if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']):
8+
og: http://ogp.me/ns# article: http://ogp.me/ns/article# \
9+
%endif
10+
%if comment_system == 'facebook':
11+
fb: http://ogp.me/ns/fb#
12+
%endif
13+
' \
14+
%if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']):
15+
vocab="http://ogp.me/ns" \
16+
%endif
17+
% if is_rtl:
18+
dir="rtl" \
19+
% endif
20+
\
21+
lang="${lang}">
22+
<head>
23+
<meta charset="utf-8">
24+
%if description:
25+
<meta name="description" content="${description}">
26+
%endif
27+
<meta name="viewport" content="width=device-width">
28+
<title>${title|striphtml} | ${blog_title|striphtml}</title>
29+
30+
${html_stylesheets()}
31+
${html_feedlinks()}
32+
%if permalink:
33+
<link rel="canonical" href="${abs_link(permalink)}">
34+
%endif
35+
36+
%if favicons:
37+
%for name, file, size in favicons:
38+
<link rel="${name}" href="${file}" sizes="${size}"/>
39+
%endfor
40+
%endif
41+
42+
% if comment_system == 'facebook':
43+
<meta property="fb:app_id" content="${comment_system_id}">
44+
% endif
45+
46+
%if prevlink:
47+
<link rel="prev" href="${prevlink}" type="text/html">
48+
%endif
49+
%if nextlink:
50+
<link rel="next" href="${nextlink}" type="text/html">
51+
%endif
52+
53+
${mathjax_config}
54+
%if use_cdn:
55+
<!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
56+
%else:
57+
<!--[if lt IE 9]><script src="${url_replacer(permalink, '/assets/js/html5.js', lang)}"></script><![endif]-->
58+
%endif
59+
60+
${extra_head_data}
61+
</%def>
62+
63+
<%def name="late_load_js()">
64+
${social_buttons_code}
65+
</%def>
66+
67+
<%def name="html_stylesheets()">
68+
%if use_bundles:
69+
%if use_cdn:
70+
<link href="/assets/css/all.css" rel="stylesheet" type="text/css">
71+
%else:
72+
<link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
73+
%endif
74+
%else:
75+
<link href="/assets/css/rst.css" rel="stylesheet" type="text/css">
76+
<link href="/assets/css/poole.css" rel="stylesheet" type="text/css">
77+
<link href="/assets/css/lanyon.css" rel="stylesheet" type="text/css">
78+
<link href="/assets/css/code.css" rel="stylesheet" type="text/css">
79+
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700|PT+Sans:400">
80+
%if has_custom_css:
81+
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
82+
%endif
83+
%endif
84+
</%def>
85+
86+
<%def name="html_feedlinks()">
87+
%if rss_link:
88+
${rss_link}
89+
%elif generate_rss:
90+
%if len(translations) > 1:
91+
%for language in translations:
92+
<link rel="alternate" type="application/rss+xml" title="RSS (${language})" href="${_link('rss', None, language)}">
93+
%endfor
94+
%else:
95+
<link rel="alternate" type="application/rss+xml" title="RSS" href="${_link('rss', None)}">
96+
%endif
97+
%endif
98+
%if generate_atom:
99+
%if len(translations) > 1:
100+
%for language in translations:
101+
<link rel="alternate" type="application/atom+xml" title="Atom (${language})" href="${_link('index_atom', None, language)}">
102+
%endfor
103+
%else:
104+
<link rel="alternate" type="application/atom+xml" title="Atom" href="${_link('index_atom', None)}">
105+
%endif
106+
%endif
107+
</%def>
108+
109+
<%def name="html_translations()">
110+
<ul class="translations">
111+
%for langname in translations.keys():
112+
%if langname != lang:
113+
<li><a href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li>
114+
%endif
115+
%endfor
116+
</ul>
117+
</%def>

‎v7/lanyon/templates/index.tmpl

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## -*- coding: utf-8 -*-
2+
<%namespace name="helper" file="index_helper.tmpl"/>
3+
<%namespace name="comments" file="comments_helper.tmpl"/>
4+
<%inherit file="base.tmpl"/>
5+
6+
<%block name="extra_head">
7+
${parent.extra_head()}
8+
% if posts and (permalink == '/' or permalink == '/' + index_file):
9+
<link rel="prefetch" href="${posts[0].permalink()}" type="text/html">
10+
% endif
11+
</%block>
12+
13+
<%block name="content">
14+
<%block name="content_header"></%block>
15+
<div class="posts">
16+
% for post in posts:
17+
<article class="post h-entry post-${post.meta('type')}">
18+
<header>
19+
<h1 class="post-title p-name"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1>
20+
<div class="metadata">
21+
<p class="byline author vcard"><span class="byline-name fn">${post.author()}</span></p>
22+
<p class="dateline"><a href="${post.permalink()}" rel="bookmark"><time class="post-date published dt-published" datetime="${post.date.isoformat()}" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></a></p>
23+
% if not post.meta('nocomments') and site_has_comments:
24+
<p class="commentline">${comments.comment_link(post.permalink(), post._base_path)}
25+
% endif
26+
</div>
27+
</header>
28+
%if index_teasers:
29+
<div class="p-summary entry-summary">
30+
${post.text(teaser_only=True)}
31+
%else:
32+
<div class="e-content entry-content">
33+
${post.text(teaser_only=False)}
34+
%endif
35+
</div>
36+
</article>
37+
% endfor
38+
</div>
39+
${helper.html_pager()}
40+
${comments.comment_link_script()}
41+
${helper.mathjax_script(posts)}
42+
</%block>

‎v7/lanyon/templates/post_header.tmpl

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## -*- coding: utf-8 -*-
2+
<%namespace name="helper" file="post_helper.tmpl"/>
3+
<%namespace name="comments" file="comments_helper.tmpl"/>
4+
5+
<%def name="html_title()">
6+
%if title and not post.meta('hidetitle'):
7+
<h1 class="post-title p-name entry-title" itemprop="headline name"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1>
8+
%endif
9+
</%def>
10+
11+
<%def name="html_translations(post)">
12+
% if len(post.translated_to) > 1:
13+
<div class="metadata posttranslations translations">
14+
<h3 class="posttranslations-intro">${messages("Also available in:")}</h3>
15+
% for langname in translations.keys():
16+
% if langname != lang and post.is_translation_available(langname):
17+
<p><a href="${post.permalink(langname)}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></p>
18+
% endif
19+
% endfor
20+
</div>
21+
% endif
22+
</%def>
23+
24+
<%def name="html_sourcelink()">
25+
% if show_sourcelink:
26+
<p class="sourceline"><a href="${post.source_link()}" id="sourcelink">${messages("Source")}</a></p>
27+
% endif
28+
</%def>
29+
30+
<%def name="html_post_header()">
31+
<header>
32+
${html_title()}
33+
<div class="metadata">
34+
<p class="byline author vcard"><span class="byline-name fn">${post.author()}</span></p>
35+
<p class="dateline"><a href="${post.permalink()}" rel="bookmark"><time class="post-date published dt-published" datetime="${post.date.isoformat()}" itemprop="datePublished" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></a></p>
36+
% if not post.meta('nocomments') and site_has_comments:
37+
<p class="commentline">${comments.comment_link(post.permalink(), post._base_path)}
38+
% endif
39+
%if post.description():
40+
<meta name="description" itemprop="description" content="${post.description()}">
41+
%endif
42+
</div>
43+
${html_translations(post)}
44+
</header>
45+
</%def>

0 commit comments

Comments
 (0)
Please sign in to comment.