diff options
| author | 2013-02-13 18:35:39 -0300 | |
|---|---|---|
| committer | 2013-02-13 18:35:39 -0300 | |
| commit | a40930043121a4b60de8526d58417761a54ab718 (patch) | |
| tree | 383c5cf8e320761ee942619282fe51be625179a7 /nikola/data/themes/orphan | |
| parent | 9c5708cc92af894e414bc76ee35ec2230de5d288 (diff) | |
Imported Upstream version 5.2upstream/5.2
Diffstat (limited to 'nikola/data/themes/orphan')
| l--------- | nikola/data/themes/orphan/messages | 1 | ||||
| -rw-r--r-- | nikola/data/themes/orphan/templates/base_helper.tmpl | 23 | ||||
| -rw-r--r-- | nikola/data/themes/orphan/templates/disqus_helper.tmpl | 40 | ||||
| -rw-r--r-- | nikola/data/themes/orphan/templates/gallery.tmpl | 4 | ||||
| -rw-r--r-- | nikola/data/themes/orphan/templates/index.tmpl | 5 | ||||
| -rw-r--r-- | nikola/data/themes/orphan/templates/index_helper.tmpl | 16 | ||||
| -rw-r--r-- | nikola/data/themes/orphan/templates/post.tmpl | 5 | ||||
| -rw-r--r-- | nikola/data/themes/orphan/templates/post_helper.tmpl | 13 | ||||
| -rw-r--r-- | nikola/data/themes/orphan/templates/story.tmpl | 3 |
9 files changed, 76 insertions, 34 deletions
diff --git a/nikola/data/themes/orphan/messages b/nikola/data/themes/orphan/messages deleted file mode 120000 index 3047ea2..0000000 --- a/nikola/data/themes/orphan/messages +++ /dev/null @@ -1 +0,0 @@ -../default/messages/
\ No newline at end of file diff --git a/nikola/data/themes/orphan/templates/base_helper.tmpl b/nikola/data/themes/orphan/templates/base_helper.tmpl index f5fe80c..170dee1 100644 --- a/nikola/data/themes/orphan/templates/base_helper.tmpl +++ b/nikola/data/themes/orphan/templates/base_helper.tmpl @@ -1,22 +1,34 @@ +## -*- coding: utf-8 -*- <%def name="html_head()"> <meta charset="utf-8"> <meta name="title" content="${title} | ${blog_title}" > <meta name="description" content="${description}" > <meta name="author" content="${blog_author}"> <title>${title} | ${blog_title}</title> + <!-- Le styles --> %if use_bundles: -<!-- CSS and JS Bundles here --> <link href="/assets/css/all.css" rel="stylesheet" type="text/css"> + <script src="/assets/js/all.js" type="text/javascript"></script> %else: -<!-- CSS and JS here --> + <link href="/assets/css/bootstrap.css" rel="stylesheet" type="text/css"> <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/slides.css" rel="stylesheet" type="text/css"/> <link href="/assets/css/theme.css" rel="stylesheet" type="text/css"/> %if has_custom_css: -<!-- Custom CSS here --> <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> %endif + <link href="/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css"> + <script src="/assets/js/jquery-1.7.2.min.js" type="text/javascript"></script> + <script src="/assets/js/jquery.colorbox-min.js" type="text/javascript"></script> + <script src="/assets/js/slides.min.jquery.js" type="text/javascript"></script> + <script src="/assets/js/bootstrap.min.js" type="text/javascript"></script> %endif + <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> + <!--[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: @@ -24,6 +36,11 @@ <link rel="alternate" type="application/rss+xml" title="RSS (${language})" href="${_link('rss', None, lang)}"> %endfor %endif + %if favicons: + %for name, file, size in favicons: + <link rel="${name}" href="${file}" sizes="${size}"/> + %endfor + %endif </%def> diff --git a/nikola/data/themes/orphan/templates/disqus_helper.tmpl b/nikola/data/themes/orphan/templates/disqus_helper.tmpl new file mode 100644 index 0000000..674e20e --- /dev/null +++ b/nikola/data/themes/orphan/templates/disqus_helper.tmpl @@ -0,0 +1,40 @@ +## -*- coding: utf-8 -*- +<%! + import json +%> +<%def name="html_disqus(url, title, identifier)"> + %if disqus_forum: + <div id="disqus_thread"></div> + <script type="text/javascript"> + var disqus_shortname ="${disqus_forum}"; + %if url: + var disqus_url="${url}"; + %endif + var disqus_title=${json.dumps(title)}; + var disqus_identifier="${identifier}"; + var disqus_config = function () { + this.language = "${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> + %endif +</%def> + +<%def name="html_disqus_link(link, identifier)"> + <p> + %if disqus_forum: + <a href="${link}" data-disqus-identifier="${identifier}">Comments</a> + %endif +</%def> + + +<%def name="html_disqus_script()"> + %if disqus_forum: + <script type="text/javascript">var disqus_shortname="${disqus_forum}";(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> diff --git a/nikola/data/themes/orphan/templates/gallery.tmpl b/nikola/data/themes/orphan/templates/gallery.tmpl index 37d749f..3186cc8 100644 --- a/nikola/data/themes/orphan/templates/gallery.tmpl +++ b/nikola/data/themes/orphan/templates/gallery.tmpl @@ -1,5 +1,6 @@ ## -*- coding: utf-8 -*- <%inherit file="base.tmpl"/> +<%namespace name="disqus" file="disqus_helper.tmpl"/> <%block name="sourcelink"></%block> <%block name="content"> @@ -24,4 +25,7 @@ <img src="${image[1]}" /></a></li> %endfor </ul> +%if enable_comments: + ${disqus.html_disqus(None, permalink, title)} +%endif </%block> diff --git a/nikola/data/themes/orphan/templates/index.tmpl b/nikola/data/themes/orphan/templates/index.tmpl index 03dd1f8..1a436e2 100644 --- a/nikola/data/themes/orphan/templates/index.tmpl +++ b/nikola/data/themes/orphan/templates/index.tmpl @@ -1,5 +1,6 @@ ## -*- coding: utf-8 -*- <%namespace name="helper" file="index_helper.tmpl"/> +<%namespace name="disqus" file="disqus_helper.tmpl"/> <%inherit file="base.tmpl"/> <%block name="content"> % for post in posts: @@ -10,9 +11,9 @@ </small></h1> <hr> ${post.text(lang, index_teasers)} - ${helper.html_disqus_link(post)} + ${disqus.html_disqus_link(post.permalink()+"#disqus_thread", post.base_path)} </div> % endfor ${helper.html_pager()} - ${helper.html_disqus_script()} + ${disqus.html_disqus_script()} </%block> diff --git a/nikola/data/themes/orphan/templates/index_helper.tmpl b/nikola/data/themes/orphan/templates/index_helper.tmpl index cfecdf3..114a730 100644 --- a/nikola/data/themes/orphan/templates/index_helper.tmpl +++ b/nikola/data/themes/orphan/templates/index_helper.tmpl @@ -1,3 +1,4 @@ +## -*- coding: utf-8 -*- <%def name="html_pager()"> <div> <ul class="pager"> @@ -14,18 +15,3 @@ </ul> </div> </%def> - - -<%def name="html_disqus_link(post)"> - <p> - %if disqus_forum: - <a href="${post.permalink()}#disqus_thread">Comments</a> - %endif -</%def> - - -<%def name="html_disqus_script()"> - %if disqus_forum: - <script type="text/javascript">var disqus_shortname="${disqus_forum}";(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> diff --git a/nikola/data/themes/orphan/templates/post.tmpl b/nikola/data/themes/orphan/templates/post.tmpl index 306192d..672d4f6 100644 --- a/nikola/data/themes/orphan/templates/post.tmpl +++ b/nikola/data/themes/orphan/templates/post.tmpl @@ -1,5 +1,6 @@ ## -*- coding: utf-8 -*- <%namespace name="helper" file="post_helper.tmpl"/> +<%namespace name="disqus" file="disqus_helper.tmpl"/> <%inherit file="base.tmpl"/> <%block name="content"> <div class="postbox"> @@ -9,12 +10,12 @@ ${messages[lang]["Posted"]}: ${post.date.strftime(date_format)} ${helper.html_translations(post)} | - <a href="${post.pagenames[lang]+'.txt'}">${messages[lang]["Source"]}</a> + <a href="${post.pagenames[lang]+'.txt'}" id="sourcelink">${messages[lang]["Source"]}</a> ${helper.html_tags(post)} </small> <hr> ${post.text(lang)} ${helper.html_pager(post)} - ${helper.html_disqus(post)} + ${disqus.html_disqus(post.permalink(absolute=True), post.title(lang), post.base_path)} </div> </%block> diff --git a/nikola/data/themes/orphan/templates/post_helper.tmpl b/nikola/data/themes/orphan/templates/post_helper.tmpl index 3e874e9..a3dc75f 100644 --- a/nikola/data/themes/orphan/templates/post_helper.tmpl +++ b/nikola/data/themes/orphan/templates/post_helper.tmpl @@ -1,3 +1,4 @@ +## -*- coding: utf-8 -*- <%def name="html_title()"> <h1>${title}</h1> % if link: @@ -9,7 +10,7 @@ <%def name="html_translations(post)"> %if len(translations) > 1: %for langname in translations.keys(): - %if langname != lang: + %if langname != lang and post.is_translation_available(langname): | <a href="${post.permalink(langname)}">${messages[langname]["Read in English"]}</a> %endif @@ -28,16 +29,6 @@ </%def> -<%def name="html_disqus(post)"> - %if disqus_forum: - <div id="disqus_thread"></div> - <script type="text/javascript">var disqus_shortname="${disqus_forum}";var disqus_url="${post.permalink(absolute=True)}";(function(){var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src="http://"+disqus_shortname+".disqus.com/embed.js";(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(a)})(); </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="html_pager(post)"> <ul class="pager"> %if post.prev_post: diff --git a/nikola/data/themes/orphan/templates/story.tmpl b/nikola/data/themes/orphan/templates/story.tmpl index deb0a46..30d263b 100644 --- a/nikola/data/themes/orphan/templates/story.tmpl +++ b/nikola/data/themes/orphan/templates/story.tmpl @@ -5,4 +5,7 @@ <h1>${title}</h1> %endif ${post.text(lang)} +%if enable_comments: + ${disqus.html_disqus(post.permalink(absolute=True), post.title(lang), post.base_path)} +%endif </%block> |
