diff options
Diffstat (limited to 'nikola/data/themes/monospace')
11 files changed, 136 insertions, 97 deletions
diff --git a/nikola/data/themes/monospace/assets/css/rst.css b/nikola/data/themes/monospace/assets/css/rst.css index 1f0edcb..cf73111 100644 --- a/nikola/data/themes/monospace/assets/css/rst.css +++ b/nikola/data/themes/monospace/assets/css/rst.css @@ -1,8 +1,6 @@ /* -:Author: David Goodger -:Contact: goodger@users.sourceforge.net -:Date: $Date: 2005-12-18 01:56:14 +0100 (Sun, 18 Dec 2005) $ -:Revision: $Revision: 4224 $ +:Author: David Goodger (goodger@python.org) +:Id: $Id: html4css1.css 7514 2012-09-14 14:27:12Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. @@ -35,11 +33,15 @@ a.toc-backref { color: black } blockquote.epigraph { - margin: 2em 1em ; } + margin: 2em 5em ; } dl.docutils dd { margin-bottom: 0.5em } +object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { + overflow: hidden; +} + /* Uncomment (and remove this text!) to get bold-faced definition list terms dl.docutils dt { font-weight: bold } @@ -54,16 +56,9 @@ div.abstract p.topic-title { div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning { - padding: 8px 35px 8px 14px; - margin-bottom: 18px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - background-color: #d9edf7; - color: #3a87ad; - border: 1px solid #bce8f1; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} + margin: 2em ; + border: medium outset ; + padding: 1em } div.admonition p.admonition-title, div.hint p.admonition-title, div.important p.admonition-title, div.note p.admonition-title, @@ -73,7 +68,7 @@ div.tip p.admonition-title { div.attention p.admonition-title, div.caution p.admonition-title, div.danger p.admonition-title, div.error p.admonition-title, -div.warning p.admonition-title { +div.warning p.admonition-title, .code .error { color: red ; font-weight: bold ; font-family: sans-serif } @@ -97,7 +92,6 @@ div.dedication p.topic-title { font-style: normal } div.figure { - text-align: center; margin-left: 2em ; margin-right: 2em } @@ -116,7 +110,7 @@ div.line-block div.line-block { margin-left: 1.5em } div.sidebar { - margin-left: 1em ; + margin: 0 0 0.5em 1em ; border: medium outset ; padding: 1em ; background-color: #ffffee ; @@ -135,21 +129,11 @@ div.system-messages h1 { color: red } div.system-message { - padding: 8px 35px 8px 14px; - margin-bottom: 18px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - border: 1px solid #eed3d7; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - padding: 1em; - background-color: #f2dede; - color: #b94a48; - -} + border: medium outset ; + padding: 1em } div.system-message p.system-message-title { - color: inherit ; + color: red ; font-weight: bold } div.topic { @@ -168,11 +152,38 @@ h2.subtitle { hr.docutils { width: 75% } -img.align-left { - clear: left } +img.align-left, .figure.align-left, object.align-left { + clear: left ; + float: left ; + margin-right: 1em } -img.align-right { - clear: right } +img.align-right, .figure.align-right, object.align-right { + clear: right ; + float: right ; + margin-left: 1em } + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left } + +.align-center { + clear: both ; + text-align: center } + +.align-right { + text-align: right } + +/* reset inner alignment in figures */ +div.align-right { + text-align: inherit } + +/* div.align-center * { */ +/* text-align: left } */ ol.simple, ul.simple { margin-bottom: 1em } @@ -227,16 +238,20 @@ p.topic-title { pre.address { margin-bottom: 0 ; margin-top: 0 ; - font-family: serif ; - font-size: 100% } + font: inherit } -pre.literal-block, pre.doctest-block { - margin: 0 0 0 0 ; - background-color: #eeeeee; - padding: 1em; - overflow: auto; -/* font-family: "Courier New", Courier, monospace;*/ -} +pre.literal-block, pre.doctest-block, pre.math, pre.code { + margin-left: 2em ; + margin-right: 2em } + +pre.code .ln { color: grey; } /* line numbers */ +pre.code, code { background-color: #eeeeee } +pre.code .comment, code .comment { color: #5C6576 } +pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } +pre.code .literal.string, code .literal.string { color: #0C5404 } +pre.code .name.builtin, code .name.builtin { color: #352B84 } +pre.code .deleted, code .deleted { background-color: #DEB0A1} +pre.code .inserted, code .inserted { background-color: #A3D289} span.classifier { font-family: sans-serif ; @@ -293,23 +308,5 @@ h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { font-size: 100% } -tt.docutils { - background-color: #eeeeee } - ul.auto-toc { list-style-type: none } - -#blog-title { - font-size: 34pt; - /*margin:0 0.3em -14px;*/ - background-color: #FFF; - font-family: "courier"; - text-align: right; - margin-top: 20px; - margin-bottom: 10px; -} - -img { - margin-top: 12px; - margin-bottom: 12px; -} diff --git a/nikola/data/themes/monospace/assets/css/theme.css b/nikola/data/themes/monospace/assets/css/theme.css index b66d7bd..b9c0cf2 100644 --- a/nikola/data/themes/monospace/assets/css/theme.css +++ b/nikola/data/themes/monospace/assets/css/theme.css @@ -11,4 +11,4 @@ body { margin:0px; padding:20px 0px; text-align:center; font-family:Monospace; c #sidebar .description { display:block; width:100%; height:auto; margin:0px 0px 10px 0px; } h1, h2, h3, h4, h5, h6, h7 { margin:0px; text-transform:uppercase; } h4, h5, h6 { font-size:14px; } -h1 { padding:0px 0px 15px; margin:0px 0px 15px 0px; } +#blog-title { margin-top: 0; line-height:48px;} diff --git a/nikola/data/themes/monospace/messages b/nikola/data/themes/monospace/messages deleted file mode 120000 index 3047ea2..0000000 --- a/nikola/data/themes/monospace/messages +++ /dev/null @@ -1 +0,0 @@ -../default/messages/
\ No newline at end of file diff --git a/nikola/data/themes/monospace/templates/base_helper.tmpl b/nikola/data/themes/monospace/templates/base_helper.tmpl index f5fe80c..170dee1 100644 --- a/nikola/data/themes/monospace/templates/base_helper.tmpl +++ b/nikola/data/themes/monospace/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/monospace/templates/disqus_helper.tmpl b/nikola/data/themes/monospace/templates/disqus_helper.tmpl new file mode 100644 index 0000000..674e20e --- /dev/null +++ b/nikola/data/themes/monospace/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/monospace/templates/gallery.tmpl b/nikola/data/themes/monospace/templates/gallery.tmpl index 37d749f..3186cc8 100644 --- a/nikola/data/themes/monospace/templates/gallery.tmpl +++ b/nikola/data/themes/monospace/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/monospace/templates/index.tmpl b/nikola/data/themes/monospace/templates/index.tmpl index bbf5529..ee57d26 100644 --- a/nikola/data/themes/monospace/templates/index.tmpl +++ b/nikola/data/themes/monospace/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: @@ -19,9 +20,9 @@ </span> </div> ${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/monospace/templates/index_helper.tmpl b/nikola/data/themes/monospace/templates/index_helper.tmpl index cfecdf3..114a730 100644 --- a/nikola/data/themes/monospace/templates/index_helper.tmpl +++ b/nikola/data/themes/monospace/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/monospace/templates/post.tmpl b/nikola/data/themes/monospace/templates/post.tmpl index 94a74f8..2ba27f1 100644 --- a/nikola/data/themes/monospace/templates/post.tmpl +++ b/nikola/data/themes/monospace/templates/post.tmpl @@ -1,12 +1,13 @@ ## -*- 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="post"> ${helper.html_title()} <div class="meta" style="background-color: rgb(234, 234, 234); "> <span class="authordate"> - ${messages[lang]["Posted"]}: ${post.date.strftime(date_format)} [<a href="${post.pagenames[lang]+'.txt'}">${messages[lang]["Source"]}</a>] + ${messages[lang]["Posted"]}: ${post.date.strftime(date_format)} [<a href="${post.pagenames[lang]+'.txt'}" id="sourcelink">${messages[lang]["Source"]}</a>] </span> <br> %if post.tags: @@ -23,6 +24,6 @@ </div> ${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/monospace/templates/post_helper.tmpl b/nikola/data/themes/monospace/templates/post_helper.tmpl index 3e874e9..8651c65 100644 --- a/nikola/data/themes/monospace/templates/post_helper.tmpl +++ b/nikola/data/themes/monospace/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/monospace/templates/story.tmpl b/nikola/data/themes/monospace/templates/story.tmpl index deb0a46..30d263b 100644 --- a/nikola/data/themes/monospace/templates/story.tmpl +++ b/nikola/data/themes/monospace/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> |
