initial commit to seperate repo
This commit is contained in:
commit
8630e4db13
23669 changed files with 1067407 additions and 0 deletions
94
themes/cyborg/templates/base.tmpl
Normal file
94
themes/cyborg/templates/base.tmpl
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%namespace name="base" file="base_helper.tmpl" import="*" />
|
||||
<%namespace name="notes" file="annotation_helper.tmpl" import="*" />
|
||||
${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>
|
||||
|
||||
<!-- Menubar -->
|
||||
|
||||
<nav class="navbar navbar-inverse navbar-fixed-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">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="${abs_link('/')}">
|
||||
%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>
|
||||
</div><!-- /.navbar-header -->
|
||||
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
${base.html_navigation_links()}
|
||||
${template_hooks['menu']()}
|
||||
</ul>
|
||||
%if search_form:
|
||||
${search_form}
|
||||
%endif
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<%block name="belowtitle">
|
||||
%if len(translations) > 1:
|
||||
<li>${base.html_translations()}</li>
|
||||
%endif
|
||||
</%block>
|
||||
% if show_sourcelink:
|
||||
<%block name="sourcelink"></%block>
|
||||
%endif
|
||||
${template_hooks['menu_alt']()}
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div><!-- /.container -->
|
||||
</nav>
|
||||
|
||||
<!-- End of Menubar -->
|
||||
|
||||
<div class="container" id="content">
|
||||
<div class="body-content">
|
||||
<!--Body content-->
|
||||
<div class="row">
|
||||
${template_hooks['page_header']()}
|
||||
<%block name="content"></%block>
|
||||
</div>
|
||||
<!--End of body content-->
|
||||
|
||||
<footer>
|
||||
${content_footer}
|
||||
${template_hooks['page_footer']()}
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
${base.late_load_js()}
|
||||
<script>jQuery("a.image-reference").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()}
|
||||
% elif not annotations and post and post.meta('annotations'):
|
||||
${notes.code()}
|
||||
% endif
|
||||
${body_end}
|
||||
${template_hooks['body_end']()}
|
||||
</body>
|
||||
</html>
|
||||
167
themes/cyborg/templates/base_helper.tmpl
Normal file
167
themes/cyborg/templates/base_helper.tmpl
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
|
||||
<%def name="html_headstart()">
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
\
|
||||
% if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) or (comment_system == 'facebook'):
|
||||
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# \
|
||||
%endif
|
||||
%if comment_system == 'facebook':
|
||||
fb: http://ogp.me/ns/fb# \
|
||||
%endif
|
||||
'\
|
||||
%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, initial-scale=1">
|
||||
<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()">
|
||||
%if use_bundles:
|
||||
%if use_cdn:
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.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.1/jquery.min.js"></script>
|
||||
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/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
|
||||
%if colorbox_locales[lang]:
|
||||
<script src="/assets/js/colorbox-i18n/jquery.colorbox-${colorbox_locales[lang]}.js"></script>
|
||||
%endif
|
||||
${social_buttons_code}
|
||||
</%def>
|
||||
|
||||
|
||||
<%def name="html_stylesheets()">
|
||||
%if use_bundles:
|
||||
%if use_cdn:
|
||||
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/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="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">
|
||||
%else:
|
||||
<link href="/assets/css/bootstrap.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
|
||||
</%def>
|
||||
|
||||
<%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>
|
||||
<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
|
||||
</%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
|
||||
</%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>
|
||||
%endif
|
||||
%endfor
|
||||
</%def>
|
||||
94
themes/cyborg/templates/gallery.tmpl
Normal file
94
themes/cyborg/templates/gallery.tmpl
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
## -*- 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 title:
|
||||
<h1>${title}</h1>
|
||||
%endif
|
||||
%if post:
|
||||
<p>
|
||||
${post.text()}
|
||||
</p>
|
||||
%endif
|
||||
%if folders:
|
||||
<ul>
|
||||
% for folder, ftitle in folders:
|
||||
<li><a href="${folder}"><i class="glyphicon
|
||||
glyphicon-folder-open"></i> ${ftitle}</a></li>
|
||||
% endfor
|
||||
</ul>
|
||||
%endif
|
||||
|
||||
<div id="gallery_container"></div>
|
||||
%if photo_array:
|
||||
<noscript>
|
||||
<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>
|
||||
</noscript>
|
||||
%endif
|
||||
%if site_has_comments and enable_comments:
|
||||
${comments.comment_form(None, permalink, title)}
|
||||
%endif
|
||||
</%block>
|
||||
|
||||
<%block name="extra_head">
|
||||
${parent.extra_head()}
|
||||
<style type="text/css">
|
||||
.image-block {
|
||||
display: inline-block;
|
||||
}
|
||||
.flowr_row {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</%block>
|
||||
|
||||
|
||||
<%block name="extra_js">
|
||||
<script src="/assets/js/flowr.plugin.js"></script>
|
||||
<script>
|
||||
jsonContent = ${photo_array_json};
|
||||
$("#gallery_container").flowr({
|
||||
data : jsonContent,
|
||||
height : ${thumbnail_size}*.6,
|
||||
padding: 5,
|
||||
rows: -1,
|
||||
render : function(params) {
|
||||
// Just return a div, string or a dom object, anything works fine
|
||||
img = $("<img />").attr({
|
||||
'src': params.itemData.url_thumb,
|
||||
'width' : params.width,
|
||||
'height' : params.height
|
||||
}).css('max-width', '100%');
|
||||
link = $( "<a></a>").attr({
|
||||
'href': params.itemData.url,
|
||||
'class': 'image-reference'
|
||||
});
|
||||
div = $("<div />").addClass('image-block').attr({
|
||||
'title': params.itemData.title,
|
||||
'data-toggle': "tooltip",
|
||||
});
|
||||
link.append(img);
|
||||
div.append(link);
|
||||
div.hover(div.tooltip());
|
||||
return div;
|
||||
},
|
||||
itemWidth : function(data) { return data.size.w; },
|
||||
itemHeight : function(data) { return data.size.h; },
|
||||
complete : function(params) {
|
||||
if( jsonContent.length > params.renderedItems ) {
|
||||
nextRenderList = jsonContent.slice( params.renderedItems );
|
||||
}
|
||||
}
|
||||
});
|
||||
$("a.image-reference").colorbox({rel:"gal", maxWidth:"100%",maxHeight:"100%",scalePhotos:true});
|
||||
</script>
|
||||
</%block>
|
||||
28
themes/cyborg/templates/listing.tmpl
Normal file
28
themes/cyborg/templates/listing.tmpl
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="base.tmpl"/>
|
||||
<%namespace name="ui" file="crumbs.tmpl" import="bar"/>
|
||||
|
||||
<%block name="content">
|
||||
${ui.bar(crumbs)}
|
||||
%if folders or files:
|
||||
<ul class="list-unstyled">
|
||||
% for name in folders:
|
||||
<li><a href="${name}"><i class="glyphicon glyphicon-folder-open"></i> ${name}</a>
|
||||
% endfor
|
||||
% for name in files:
|
||||
<li><a href="${name}.html"><i class="glyphicon glyphicon-file"></i> ${name}</a>
|
||||
% endfor
|
||||
</ul>
|
||||
%endif
|
||||
% if code:
|
||||
${code}
|
||||
% endif
|
||||
</%block>
|
||||
|
||||
<%block name="sourcelink">
|
||||
% if source_link:
|
||||
<li>
|
||||
<a href="${source_link}" id="sourcelink">${messages("Source")}</a>
|
||||
</li>
|
||||
% endif
|
||||
</%block>
|
||||
24
themes/cyborg/templates/slides.tmpl
Normal file
24
themes/cyborg/templates/slides.tmpl
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<%block name="content">
|
||||
<div id="${carousel_id}" class="carousel slide">
|
||||
<ol class="carousel-indicators">
|
||||
% for i in range(len(slides_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(slides_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"><span class="icon-prev"></span></a>
|
||||
<a class="right carousel-control" href="#${carousel_id}" data-slide="next"><span class="icon-next"></span></a>
|
||||
</div>
|
||||
</%block>
|
||||
Loading…
Add table
Add a link
Reference in a new issue