diff options
| author | 2013-03-13 20:58:39 -0300 | |
|---|---|---|
| committer | 2013-03-13 20:58:39 -0300 | |
| commit | 8b14a1e5b2ca574fdd4fd2377567ec98a110d4b6 (patch) | |
| tree | 0895935489e4920d18824f7fb3a0d799649a27c3 /nikola/data | |
| parent | 878ba1152ebc64a4a2609d23c9e400a6111db642 (diff) | |
Imported Upstream version 5.4.2upstream/5.4.2
Diffstat (limited to 'nikola/data')
25 files changed, 160 insertions, 103 deletions
diff --git a/nikola/data/samplesite/files/images/biohazard.png b/nikola/data/samplesite/files/images/biohazard.png Binary files differnew file mode 100644 index 0000000..ae4629d --- /dev/null +++ b/nikola/data/samplesite/files/images/biohazard.png diff --git a/nikola/data/samplesite/listings/hello.py b/nikola/data/samplesite/listings/hello.py index 695c212..885acde 100644 --- a/nikola/data/samplesite/listings/hello.py +++ b/nikola/data/samplesite/listings/hello.py @@ -4,7 +4,8 @@ import sys def hello(name='world'): - print "hello", name + greeting = "hello " + name + print(greeting) if __name__ == "__main__": hello(*sys.argv[1:]) diff --git a/nikola/data/samplesite/stories/creating-a-theme.meta b/nikola/data/samplesite/stories/creating-a-theme.meta new file mode 100644 index 0000000..fe9b69a --- /dev/null +++ b/nikola/data/samplesite/stories/creating-a-theme.meta @@ -0,0 +1,3 @@ +Creating a Theme +creating-a-theme +2012/03/13 12:00 diff --git a/nikola/data/samplesite/stories/creating-a-theme.txt b/nikola/data/samplesite/stories/creating-a-theme.txt new file mode 120000 index 0000000..108a192 --- /dev/null +++ b/nikola/data/samplesite/stories/creating-a-theme.txt @@ -0,0 +1 @@ +../../../../docs/creating-a-theme.txt
\ No newline at end of file diff --git a/nikola/data/samplesite/stories/quickref.txt b/nikola/data/samplesite/stories/quickref.txt index 13ebc9b..9a06d74 100644 --- a/nikola/data/samplesite/stories/quickref.txt +++ b/nikola/data/samplesite/stories/quickref.txt @@ -55,7 +55,7 @@ <p>Links that look like "(<a href="#details">details</a>)" point into the HTML version of the full <a - href="../../ref/rst/restructuredtext.html">reStructuredText + href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html">reStructuredText specification</a> document. These are relative links; if they don't work, please use the <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html" @@ -65,7 +65,7 @@ <h2><a href="#contents" name="inline-markup" class="backref" >Inline Markup</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#inline-markup">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup">details</a>) <p>Inline markup allows words and phrases within text to have character styles (like italics and boldface) and functionality @@ -198,7 +198,7 @@ >Escaping with Backslashes</a></h2> <p>(<a - href="../../ref/rst/restructuredtext.html#escaping-mechanism">details</a>) + href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#escaping-mechanism">details</a>) <p>reStructuredText uses backslashes ("\") to override the special meaning given to markup characters and get the literal characters @@ -246,7 +246,7 @@ <h2><a href="#contents" name="section-structure" class="backref" >Section Structure</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#sections">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#sections">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -292,7 +292,7 @@ <h2><a href="#contents" name="paragraphs" class="backref" >Paragraphs</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#paragraphs">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#paragraphs">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -320,7 +320,7 @@ <h2><a href="#contents" name="bullet-lists" class="backref" >Bullet Lists</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#bullet-lists">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#bullet-lists">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -358,7 +358,7 @@ <h2><a href="#contents" name="enumerated-lists" class="backref" >Enumerated Lists</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#enumerated-lists">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#enumerated-lists">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -396,7 +396,7 @@ <h2><a href="#contents" name="definition-lists" class="backref" >Definition Lists</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#definition-lists">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#definition-lists">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -437,7 +437,7 @@ <h2><a href="#contents" name="field-lists" class="backref" >Field Lists</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#field-lists">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#field-lists">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -476,7 +476,7 @@ <h2><a href="#contents" name="option-lists" class="backref" >Option Lists</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#option-lists">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#option-lists">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -524,7 +524,7 @@ <h2><a href="#contents" name="literal-blocks" class="backref" >Literal Blocks</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#literal-blocks">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#literal-blocks">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -613,7 +613,7 @@ <h2><a href="#contents" name="line-blocks" class="backref" >Line Blocks</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#line-blocks">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#line-blocks">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -655,7 +655,7 @@ <h2><a href="#contents" name="block-quotes" class="backref" >Block Quotes</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#block-quotes">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#block-quotes">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -687,7 +687,7 @@ <h2><a href="#contents" name="doctest-blocks" class="backref" >Doctest Blocks</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#doctest-blocks">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#doctest-blocks">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -723,7 +723,7 @@ <h2><a href="#contents" name="tables" class="backref" >Tables</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#tables">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#tables">details</a>) <p>There are two syntaxes for tables in reStructuredText. Grid tables are complete but cumbersome to create. Simple tables are @@ -840,7 +840,7 @@ <h2><a href="#contents" name="transitions" class="backref" >Transitions</a></h2> - <p>(<a href="../../ref/rst/restructuredtext.html#transitions">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#transitions">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -890,7 +890,7 @@ <h3><a href="#contents" name="footnotes" class="backref" >Footnotes</a></h3> - <p>(<a href="../../ref/rst/restructuredtext.html#footnotes">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#footnotes">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -983,7 +983,7 @@ <h3><a href="#contents" name="citations" class="backref" >Citations</a></h3> - <p>(<a href="../../ref/rst/restructuredtext.html#citations">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#citations">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -1036,7 +1036,7 @@ <h3><a href="#contents" name="hyperlink-targets" class="backref" >Hyperlink Targets</a></h3> - <p>(<a href="../../ref/rst/restructuredtext.html#hyperlink-targets">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#hyperlink-targets">details</a>) <h4><a href="#contents" name="external-hyperlink-targets" class="backref" >External Hyperlink Targets</a></h4> @@ -1081,11 +1081,11 @@ printed documents, where the link needs to be presented explicitly, for example as a footnote. You can force usage of the call-out form by using the - "<a href="../../ref/rst/directives.html#target-notes">target-notes</a>" + "<a href="http://docutils.sourceforge.net/docs/ref/rst/directives.html#target-notes">target-notes</a>" directive. <p>reStructuredText also provides for <b>embedded URIs</b> (<a - href="../../ref/rst/restructuredtext.html#embedded-uris">details</a>), + href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#embedded-uris">details</a>), a convenience at the expense of readability. A hyperlink reference may directly embed a target URI inline, within angle brackets. The following is exactly equivalent to the example above: @@ -1149,7 +1149,7 @@ <h4><a href="#contents" name="indirect-hyperlink-targets" class="backref" >Indirect Hyperlink Targets</a></h4> - <p>(<a href="../../ref/rst/restructuredtext.html#indirect-hyperlink-targets">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#indirect-hyperlink-targets">details</a>) <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> <thead> @@ -1189,7 +1189,7 @@ <h4><a href="#contents" name="implicit-hyperlink-targets" class="backref" >Implicit Hyperlink Targets</a></h4> - <p>(<a href="../../ref/rst/restructuredtext.html#implicit-hyperlink-targets">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#implicit-hyperlink-targets">details</a>) <p>Section titles, footnotes, and citations automatically generate hyperlink targets (the title text or footnote/citation label is @@ -1217,12 +1217,12 @@ <h3><a href="#contents" name="directives" class="backref" >Directives</a></h3> - <p>(<a href="../../ref/rst/restructuredtext.html#directives">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#directives">details</a>) <p>Directives are a general-purpose extension mechanism, a way of adding support for new constructs without adding new syntax. For a description of all standard directives, see <a - href="../../ref/rst/directives.html" >reStructuredText + href="http://docutils.sourceforge.net/docs/ref/rst/directives.html" >reStructuredText Directives</a>. <p><table border="1" width="100%" bgcolor="#ffffcc" cellpadding="3"> @@ -1235,17 +1235,17 @@ <tr valign="top"> <td><samp>For instance:</samp> - <p><samp>.. image:: images/ball1.gif</samp> + <p><samp>.. image:: images/biohazard.png</samp> <td> For instance: - <p><img src="images/ball1.gif" alt="ball1"> + <p><img src="/images/biohazard.png" alt="ball1"> </table> <h3><a href="#contents" name="substitution-references-and-definitions" class="backref" >Substitution References and Definitions</a></h3> - <p>(<a href="../../ref/rst/restructuredtext.html#substitution-definitions">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#substitution-definitions">details</a>) <p>Substitutions are like inline directives, allowing graphics and arbitrary constructs within text. @@ -1268,7 +1268,7 @@ <td> - <p>The <img src="images/biohazard.png" align="bottom" alt="biohazard"> symbol + <p>The <img src="/images/biohazard.png" align="bottom" alt="biohazard"> symbol must be used on containers used to dispose of medical waste. </table> @@ -1276,7 +1276,7 @@ <h3><a href="#contents" name="comments" class="backref" >Comments</a></h3> - <p>(<a href="../../ref/rst/restructuredtext.html#comments">details</a>) + <p>(<a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#comments">details</a>) <p>Any text which begins with an explicit markup start but doesn't use the syntax of any of the constructs above, is a comment. diff --git a/nikola/data/samplesite/stories/quickstart.txt b/nikola/data/samplesite/stories/quickstart.txt index a74d8fa..1a0f330 100644 --- a/nikola/data/samplesite/stories/quickstart.txt +++ b/nikola/data/samplesite/stories/quickstart.txt @@ -96,7 +96,7 @@ __ quickref.html#escaping middle of a word won't be recognized. See the `markup spec`__ for full details. -__ ../../ref/rst/restructuredtext.html#inline-markup +__ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup Lists @@ -362,18 +362,18 @@ __ quickref.html#directives To include an image in your document, you use the the ``image`` directive__. For example:: - .. image:: images/biohazard.png + .. image:: /images/biohazard.png results in: -.. image:: images/biohazard.png +.. image:: /images/biohazard.png -The ``images/biohazard.png`` part indicates the filename of the image +The ``/images/biohazard.png`` part indicates the filename of the image you wish to appear in the document. There's no restriction placed on the image (format, size etc). If the image is to appear in HTML and you wish to supply additional information, you may:: - .. image:: images/biohazard.png + .. image:: /images/biohazard.png :height: 100 :width: 200 :scale: 50 @@ -381,8 +381,8 @@ you wish to supply additional information, you may:: See the full `image directive documentation`__ for more info. -__ ../../ref/rst/directives.html -__ ../../ref/rst/directives.html#images +__ http://docutils.sourceforge.net/docs/ref/rst/directives.html +__ http://docutils.sourceforge.net/docs/ref/rst/directives.html#images What Next? @@ -401,6 +401,6 @@ list. http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html. .. _reStructuredText Markup Specification: - ../../ref/rst/restructuredtext.html -.. _Docutils-users: ../mailing-lists.html#docutils-users + http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html +.. _Docutils-users: http://docutils.sourceforge.net/docs/user/mailing-lists.html#docutils-users .. _Docutils project web site: http://docutils.sourceforge.net/ diff --git a/nikola/data/themes/default/assets/css/theme.css b/nikola/data/themes/default/assets/css/theme.css index 6f3d4cb..0523ce9 100644 --- a/nikola/data/themes/default/assets/css/theme.css +++ b/nikola/data/themes/default/assets/css/theme.css @@ -49,9 +49,14 @@ div.figure > a > img { margin-right: auto; } -div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning { +div.sidebar, div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning { /* Issue 277 */ border: 1px solid #aaa; border-radius: 5px; } +blockquote p, blockquote { + font-size: 17.5px; + font-weight: 300; + line-height: 1.25; +} diff --git a/nikola/data/themes/default/assets/js/mathjax.js b/nikola/data/themes/default/assets/js/mathjax.js new file mode 100644 index 0000000..2f4e773 --- /dev/null +++ b/nikola/data/themes/default/assets/js/mathjax.js @@ -0,0 +1,12 @@ +// We wait for the onload function to load MathJax after the page is completely loaded. +// MathJax is loaded 1 unit of time after the page is ready. +// This hack prevent problems when you use social button from addthis. +// +window.onload = function () { + setTimeout(function () { + var script = document.createElement("script"); + script.type = "text/javascript"; + script.src = "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"; + document.getElementsByTagName("body")[0].appendChild(script); + },1) +}
\ No newline at end of file diff --git a/nikola/data/themes/default/bundles b/nikola/data/themes/default/bundles index 10f44e7..35af9c0 100644 --- a/nikola/data/themes/default/bundles +++ b/nikola/data/themes/default/bundles @@ -1,4 +1,4 @@ assets/css/all-nocdn.css=bootstrap.css,bootstrap-responsive.css,rst.css,code.css,colorbox.css,slides.css,theme.css,custom.css assets/css/all.css=rst.css,code.css,colorbox.css,slides.css,theme.css,custom.css -assets/js/all-nocdn.js=bootstrap.min.js,jquery-1.7.2.min.js,jquery.colorbox-min.js,slides.min.jquery.js +assets/js/all-nocdn.js=jquery-1.7.2.min.js,bootstrap.min.js,jquery.colorbox-min.js,slides.min.jquery.js assets/js/all.js=jquery.colorbox-min.js,slides.min.jquery.js diff --git a/nikola/data/themes/default/templates/base.tmpl b/nikola/data/themes/default/templates/base.tmpl index 7af8497..c0935a2 100644 --- a/nikola/data/themes/default/templates/base.tmpl +++ b/nikola/data/themes/default/templates/base.tmpl @@ -48,6 +48,10 @@ </ul> <!--End of sidebar content--> </div> + </div> + </div> + </div> +</div> ${analytics} ${late_load_js()} <script type="text/javascript">jQuery("a.image-reference").colorbox({rel:"gal",maxWidth:"80%",maxHeight:"80%",scalePhotos:true});</script> diff --git a/nikola/data/themes/default/templates/base_helper.tmpl b/nikola/data/themes/default/templates/base_helper.tmpl index 51969c9..eb22905 100644 --- a/nikola/data/themes/default/templates/base_helper.tmpl +++ b/nikola/data/themes/default/templates/base_helper.tmpl @@ -4,7 +4,7 @@ <meta name="description" content="${description}" > <meta name="author" content="${blog_author}"> <title>${title} | ${blog_title}</title> - <!-- Le styles --> + ${mathjax_config} %if use_bundles: %if use_cdn: <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet"> @@ -28,7 +28,6 @@ <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> %endif %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]--> @@ -36,7 +35,7 @@ ${rss_link} %else: %for language in translations: - <link rel="alternate" type="application/rss+xml" title="RSS (${language})" href="${_link('rss', None, lang)}"> + <link rel="alternate" type="application/rss+xml" title="RSS (${language})" href="${_link('rss', None, language)}"> %endfor %endif %if favicons: @@ -73,10 +72,10 @@ <!-- Social buttons --> <div id="addthisbox" class="addthis_toolbox addthis_peekaboo_style addthis_default_style addthis_label_style addthis_32x32_style"> <a class="addthis_button_more">Share</a> - <ul><li><a class="addthis_button_facebook"></a></li> - <li><a class="addthis_button_google_plusone_share"></a></li> - <li><a class="addthis_button_linkedin"></a></li> - <li><a class="addthis_button_twitter"></a></li> + <ul><li><a class="addthis_button_facebook"></a> + <li><a class="addthis_button_google_plusone_share"></a> + <li><a class="addthis_button_linkedin"></a> + <li><a class="addthis_button_twitter"></a> </ul> </div> <script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4f7088a56bb93798"></script> diff --git a/nikola/data/themes/default/templates/gallery.tmpl b/nikola/data/themes/default/templates/gallery.tmpl index 3186cc8..09c25cc 100644 --- a/nikola/data/themes/default/templates/gallery.tmpl +++ b/nikola/data/themes/default/templates/gallery.tmpl @@ -6,7 +6,7 @@ <%block name="content"> <ul class="breadcrumb"> % for link, crumb in crumbs: - <li><a href="${link}">/ ${crumb}</a></li> + <li><a href="${link}">/ ${crumb}</a> % endfor </ul> %if text: @@ -16,13 +16,13 @@ %endif <ul> % for folder in folders: - <li><a href="${folder}"><i class="icon-folder-open"></i> ${folder}</a></li> + <li><a href="${folder}"><i class="icon-folder-open"></i> ${folder}</a> % endfor </ul> <ul class="thumbnails"> %for image in images: <li><a href="${image[0]}" class="thumbnail image-reference" ${image[2]}> - <img src="${image[1]}" /></a></li> + <img src="${image[1]}" /></a> %endfor </ul> %if enable_comments: diff --git a/nikola/data/themes/default/templates/index.tmpl b/nikola/data/themes/default/templates/index.tmpl index 1a436e2..4f66867 100644 --- a/nikola/data/themes/default/templates/index.tmpl +++ b/nikola/data/themes/default/templates/index.tmpl @@ -7,7 +7,7 @@ <div class="postbox"> <h1><a href="${post.permalink(lang)}">${post.title(lang)}</a> <small> - ${messages[lang]["Posted"]}: ${post.date.strftime(date_format)} + ${messages[lang]["Posted"]}: <time class="published" datetime="${post.date.isoformat()}">${post.date.strftime(date_format)}</time> </small></h1> <hr> ${post.text(lang, index_teasers)} @@ -16,4 +16,5 @@ % endfor ${helper.html_pager()} ${disqus.html_disqus_script()} + ${helper.mathjax_script(post)} </%block> diff --git a/nikola/data/themes/default/templates/index_helper.tmpl b/nikola/data/themes/default/templates/index_helper.tmpl index 114a730..151b4d2 100644 --- a/nikola/data/themes/default/templates/index_helper.tmpl +++ b/nikola/data/themes/default/templates/index_helper.tmpl @@ -5,13 +5,17 @@ %if prevlink: <li class="previous"> <a href="${prevlink}">← ${messages[lang]["Newer posts"]}</a> - </li> %endif %if nextlink: <li class="next"> <a href="${nextlink}">${messages[lang]["Older posts"]} →</a> - </li> %endif </ul> </div> </%def> + +<%def name="mathjax_script(post)"> + %if any(post.is_mathjax for post in posts): + <script src="/assets/js/mathjax.js" type="text/javascript"></script> + %endif +</%def> diff --git a/nikola/data/themes/default/templates/listing.tmpl b/nikola/data/themes/default/templates/listing.tmpl index 596a704..f279af0 100644 --- a/nikola/data/themes/default/templates/listing.tmpl +++ b/nikola/data/themes/default/templates/listing.tmpl @@ -3,8 +3,18 @@ <%block name="content"> <ul class="breadcrumb"> % for link, crumb in crumbs: - <li><a href="${link}">/ ${crumb}</a></li> + <li><a href="${link}">/${crumb}</a> % endfor </ul> -${code} +<ul class="unstyled"> +% for name in folders: + <li><a href="${name}"><i class="icon-folder-open"></i> ${name}</a> +% endfor +% for name in files: + <li><a href="${name}.html"><i class="icon-file"></i> ${name}</a> +% endfor +</ul> +% if code: + ${code} +% endif </%block> diff --git a/nikola/data/themes/default/templates/post.tmpl b/nikola/data/themes/default/templates/post.tmpl index 672d4f6..22d8a58 100644 --- a/nikola/data/themes/default/templates/post.tmpl +++ b/nikola/data/themes/default/templates/post.tmpl @@ -2,20 +2,28 @@ <%namespace name="helper" file="post_helper.tmpl"/> <%namespace name="disqus" file="disqus_helper.tmpl"/> <%inherit file="base.tmpl"/> +<%block name="extra_head"> +${helper.twitter_card_information(post)} +</%block> <%block name="content"> <div class="postbox"> ${helper.html_title()} <hr> <small> - ${messages[lang]["Posted"]}: ${post.date.strftime(date_format)} + ${messages[lang]["Posted"]}: <time class="published" datetime="${post.date.isoformat()}">${post.date.strftime(date_format)}</time> ${helper.html_translations(post)} - | - <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)} ${disqus.html_disqus(post.permalink(absolute=True), post.title(lang), post.base_path)} + ${helper.mathjax_script(post)} </div> </%block> + +<%block name="sourcelink"> + <li> + <a href="${post.pagenames[lang]+post.source_ext()}" id="sourcelink">${messages[lang]["Source"]}</a> + </li> +</%block> diff --git a/nikola/data/themes/default/templates/post_helper.tmpl b/nikola/data/themes/default/templates/post_helper.tmpl index ab08359..911a831 100644 --- a/nikola/data/themes/default/templates/post_helper.tmpl +++ b/nikola/data/themes/default/templates/post_helper.tmpl @@ -33,12 +33,39 @@ %if post.prev_post: <li class="previous"> <a href="${post.prev_post.permalink(lang)}">← ${messages[lang]["Previous post"]}</a> - </li> %endif %if post.next_post: <li class="next"> <a href="${post.next_post.permalink(lang)}">${messages[lang]["Next post"]} →</a> - </li> %endif </ul> </%def> + +<%def name="twitter_card_information(post)"> + %if twitter_card and twitter_card['use_twitter_cards']: + <meta name="twitter:card" content="${twitter_card.get('card', 'summary')}"> + <meta name="og:url" content="${post.permalink(lang, absolute=True)}"> + %if 'site:id' in twitter_card: + <meta name="twitter:site:id" content="${twitter_card['site:id']}"> + %elif 'site' in twitter_card: + <meta name="twitter:site" content="${twitter_card['site']}"> + %endif + %if 'creator:id' in twitter_card: + <meta name="twitter:creator:id" content="${twitter_card['creator:id']}"> + %elif 'creator' in twitter_card: + <meta name="twitter:creator" content="${twitter_card['creator']}"> + %endif + <meta name="og:title" content="${post.title(lang)[:70]}"> + %if post.description(lang): + <meta name="og:description" content="${post.description(lang)[:200]}"> + %else: + <meta name="og:description" content="${post.text(lang, strip_html=True)[:200]}"> + %endif + %endif +</%def> + +<%def name="mathjax_script(post)"> + %if post.is_mathjax: + <script src="/assets/js/mathjax.js" type="text/javascript"></script> + %endif +</%def> diff --git a/nikola/data/themes/jinja-default/templates/base.tmpl b/nikola/data/themes/jinja-default/templates/base.tmpl index 32e5d48..97cddff 100644 --- a/nikola/data/themes/jinja-default/templates/base.tmpl +++ b/nikola/data/themes/jinja-default/templates/base.tmpl @@ -93,15 +93,19 @@ <!-- social buttons --> <div id="addthisbox" class="addthis_toolbox addthis_peekaboo_style addthis_default_style addthis_label_style addthis_32x32_style"> <a class="addthis_button_more">Share</a> - <ul><li><a class="addthis_button_facebook"></a></li> - <li><a class="addthis_button_google_plusone_share"></a></li> - <li><a class="addthis_button_linkedin"></a></li> - <li><a class="addthis_button_twitter"></a></li> + <ul><li><a class="addthis_button_facebook"></a> + <li><a class="addthis_button_google_plusone_share"></a> + <li><a class="addthis_button_linkedin"></a> + <li><a class="addthis_button_twitter"></a> </ul> </div> <script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4f7088a56bb93798"></script> <!-- End of social buttons --> {% endif %} + </div> + </div> + </div> +</div> {{analytics}} <!-- late load javascript --> {% if use_bundles %} diff --git a/nikola/data/themes/jinja-default/templates/gallery.tmpl b/nikola/data/themes/jinja-default/templates/gallery.tmpl index 34ff439..9b16df6 100644 --- a/nikola/data/themes/jinja-default/templates/gallery.tmpl +++ b/nikola/data/themes/jinja-default/templates/gallery.tmpl @@ -4,7 +4,7 @@ {% block content %} <ul class="breadcrumb"> {% for link, crumb in crumbs %} - <li><a href="{{link}}">/ {{crumb}}</a></li> + <li><a href="{{link}}">/ {{crumb}}</a> {% endfor %} </ul> {% if text %} @@ -14,13 +14,13 @@ {% endif %} <ul> {% for folder in folders %} - <li><a href="{{folder}}"><i class="icon-folder-open"></i> {{folder}}</a></li> + <li><a href="{{folder}}"><i class="icon-folder-open"></i> {{folder}}</a> {% endfor %} </ul> <ul class="thumbnails"> {% for image in images %} - <li><a href="{{image[0]}}" class="thumbnail image-reference"><img src="{{image[2]}}" /></a></li> - <img src="{{image[1]}}" /></a></li> + <li><a href="{{image[0]}}" class="thumbnail image-reference" {{image[2]}}> + <img src="{{image[1]}}" /></a> {% endfor %} </ul> {%if enable_comments %} diff --git a/nikola/data/themes/jinja-default/templates/index.tmpl b/nikola/data/themes/jinja-default/templates/index.tmpl index ad54c19..ab0392c 100644 --- a/nikola/data/themes/jinja-default/templates/index.tmpl +++ b/nikola/data/themes/jinja-default/templates/index.tmpl @@ -19,12 +19,10 @@ {%if prevlink %} <li class="previous"> <a href="{{prevlink}}">← {{messages[lang]["Newer posts"]}}</a> - </li> {% endif %} {% if nextlink %} <li class="next"> - <a href="{{nextlink}}">${messages[lang]["Older posts"]} →</a> - </li> + <a href="{{nextlink}}">{{messages[lang]["Older posts"]}} →</a> {% endif %} </ul> diff --git a/nikola/data/themes/jinja-default/templates/listing.tmpl b/nikola/data/themes/jinja-default/templates/listing.tmpl index 8310635..493624a 100644 --- a/nikola/data/themes/jinja-default/templates/listing.tmpl +++ b/nikola/data/themes/jinja-default/templates/listing.tmpl @@ -2,7 +2,7 @@ {% block content %} <ul class="breadcrumb"> {% for link, crumb in crumbs %} - <li><a href="{{link}}">/ {{crumb}}</a></li> + <li><a href="{{link}}">/ {{crumb}}</a> {% endfor %} </ul> {{code}} diff --git a/nikola/data/themes/jinja-default/templates/post.tmpl b/nikola/data/themes/jinja-default/templates/post.tmpl index 2a356c5..d14e973 100644 --- a/nikola/data/themes/jinja-default/templates/post.tmpl +++ b/nikola/data/themes/jinja-default/templates/post.tmpl @@ -32,12 +32,10 @@ {%if post.prev_post %} <li class="previous"> <a href="{{rel_link(permalink, post.prev_post.permalink(lang))}}">← {{messages[lang]["Previous post"]}}</a> - </li> {% endif %} {%if post.next_post %} <li class="next"> <a href="{{rel_link(permalink, post.next_post.permalink(lang))}}">{{messages[lang]["Next post"]}} →</a> - </li> {% endif %} </ul> {% if disqus_forum %} diff --git a/nikola/data/themes/site/README b/nikola/data/themes/site/README index 6cbc7dd..c89543c 100644 --- a/nikola/data/themes/site/README +++ b/nikola/data/themes/site/README @@ -29,4 +29,4 @@ default duckduckgo search form: <input type="submit" value="DuckDuckGo Search" style="visibility: hidden;" /> </form> <!-- End of custom search --> - """ % BLOG_URL + """ % SITE_URL diff --git a/nikola/data/themes/site/assets/css/theme.css b/nikola/data/themes/site/assets/css/theme.css index 0183c69..aa0ee4a 100644 --- a/nikola/data/themes/site/assets/css/theme.css +++ b/nikola/data/themes/site/assets/css/theme.css @@ -52,8 +52,15 @@ div.figure > a > img { margin-right: auto; } -div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning { +div.sidebar, div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning { /* Issue 277 */ border: 1px solid #aaa; border-radius: 5px; } + +blockquote p, blockquote { + font-size: 17.5px; + font-weight: 300; + line-height: 1.25; +} + diff --git a/nikola/data/themes/site/templates/post.tmpl b/nikola/data/themes/site/templates/post.tmpl deleted file mode 100644 index 785385f..0000000 --- a/nikola/data/themes/site/templates/post.tmpl +++ /dev/null @@ -1,25 +0,0 @@ -## -*- 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"> - ${helper.html_title()} - <hr> - <small> - ${messages[lang]["Posted"]}: ${post.date.strftime(date_format)} - ${helper.html_translations(post)} - ${helper.html_tags(post)} - </small> - <hr> - ${post.text(lang)} - ${helper.html_pager(post)} - ${disqus.html_disqus(post.permalink(absolute=True), post.title(lang), post.base_path)} - </div> -</%block> - -<%block name="sourcelink"> - <li> - <a href="${post.pagenames[lang]+post.source_ext()}" id="sourcelink">${messages[lang]["Source"]}</a> - </li> -</%block> |
