From 5f1db9c0c9fcb35fa9153bb3a87dd52aabaa6734 Mon Sep 17 00:00:00 2001 From: Luca Chiricozzi Date: Mon, 29 Dec 2014 23:08:56 +0100 Subject: [PATCH] first commit --- .gitignore | 1 + LICENSE.md | 21 +++ README.md | 73 +++++++++++ static/css/main.css | 149 ++++++++++++++++++++++ static/css/solarized.css | 84 ++++++++++++ static/js/jquery.sticky-kit.min.js | 10 ++ static/js/main.js | 6 + static/js/plugins.js | 22 ++++ templates/analytics.html | 10 ++ templates/archives.html | 22 ++++ templates/article.html | 60 +++++++++ templates/author.html | 3 + templates/authors.html | 0 templates/base.html | 197 +++++++++++++++++++++++++++++ templates/categories.html | 22 ++++ templates/category.html | 3 + templates/disqus_count.html | 13 ++ templates/index.html | 31 +++++ templates/page.html | 15 +++ templates/sitemap.html | 32 +++++ templates/tag.html | 3 + templates/tags.html | 14 ++ 22 files changed, 791 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 static/css/main.css create mode 100644 static/css/solarized.css create mode 100644 static/js/jquery.sticky-kit.min.js create mode 100644 static/js/main.js create mode 100644 static/js/plugins.js create mode 100644 templates/analytics.html create mode 100644 templates/archives.html create mode 100644 templates/article.html create mode 100644 templates/author.html create mode 100644 templates/authors.html create mode 100644 templates/base.html create mode 100644 templates/categories.html create mode 100644 templates/category.html create mode 100644 templates/disqus_count.html create mode 100644 templates/index.html create mode 100644 templates/page.html create mode 100644 templates/sitemap.html create mode 100644 templates/tag.html create mode 100644 templates/tags.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..4615f14 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Luca Chiricozzi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..1fde30a --- /dev/null +++ b/README.md @@ -0,0 +1,73 @@ +mg +============== + +A minimal theme with a green header bar for [Pelican](http://blog.getpelican.com/). + +Warning +-------------- +mg is still under development and may do anything it likes up, don't use it on +a production site! +You have been warned! + +Features +-------------- + +* [Open Graph](http://ogp.me/) supports for pages and articles. +* Show a custom image instead of your site name. +* Comment with DISQUS. +* Google Analytics. +* Responsive design. +* Share buttons built with share urls. +* Meta tags for description, author and copyright. +* Custom footer notice. + +Anti-Features +-------------- + +* Support only a single author blog +* Support only ATOM feeds +* Currently blogroll is disabled +* Tag and tags pages style needs to be improved. + +Settings +-------------- + +**DESCRIPTION** +A brief description of your site, for Open Graph and search engines. + +**FOOTER** +A custom footer notice. + +**LOGO** +The path of a custom image for replacing the site name in your header bar. +The path is relative to the "/static/" folder of your site, so if your image +is placed at "www.example.com/static/img/logo.png", the path to insert is +"img/logo.png". + +**OG_IMAGE** +The path of a custom image for the `og:image` meta property. As for **LOGO**, +the path is relative to the "/static/" folder of your site. + +**OG_IMAGE_TYPE** +The MIME type for **OG_IMAGE**. + +**OG_IMAGE_WIDTH** +The width of **OG_IMAGE**. + +**OG_IMAGE_HEIGHT** +The heigth of **OG_IMAGE**. + +**SHARE** +Enable share buttons, boolean. + +**SOCIAL** +A list of tutples (icon, URL). The icons are from [Font Awesome] +(http://fortawesome.github.io/Font-Awesome/). The suffix "-square" is stripped +away in the bottom icons of the small screen layout. +e.g. +```python + SOCIAL = (('twitter', 'https://twitter.com/luca_chr'), + ('google-plus-square', 'https://plus.google.com/117284397605208270870'), + ('github', 'https://github.com/lucachr'), + ('envelope', 'mailto:luca92web@gmail.com'),) +``` diff --git a/static/css/main.css b/static/css/main.css new file mode 100644 index 0000000..3fd460e --- /dev/null +++ b/static/css/main.css @@ -0,0 +1,149 @@ +/*! Copyright (c) 2014 Luca Chiricozzi. All Rights Reserved. */ +html { + font: 400 14px / 20px "Oswald", "Helvetica Neue",Helvetica,Arial,sans-serif; } + +a { + color: #33b5e5; } + a:hover { + color: #0099cc; } + +.uk-navbar-brand { + text-transform: uppercase; } + +.uk-article-meta > a { + color: #444; } + .uk-article-meta > a:hover { + color: #444; } +.uk-article-meta > .uk-icon-comment { + color: #444; } + +.uk-icon-twitter { + color: #00B0ED; } + +.uk-icon-facebook, .uk-icon-facebook-square { + color: #3B5999; } + +.uk-icon-google-plus, .uk-icon-google-plus-square { + color: #D34836; } + +.uk-icon-github { + color: #333; } + +.uk-icon-envelope { + color: #444; } + +.uk-nav-side > li.uk-active > a { + background: #28D1B2; } + +.uk-pagination > .uk-active > span { + background: #28D1B2; } + +.uk-icon-medium { + margin-right: 0.3em; } + +.uk-navbar-toggle { + color: white; } + .uk-navbar-toggle:hover, .uk-navbar-toggle:focus { + color: white; } + +.uk-nav-offcanvas > li > a { + border-top: 1px solid rgba(0, 0, 0, 0.3); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); + text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); } + .uk-nav-offcanvas > li > a:last-child { + border-bottom: 1px solid rgba(0, 0, 0, 0.3); } +.uk-nav-offcanvas .uk-nav-divider { + border-top: 1px solid rgba(255, 255, 255, 0.01); + margin: 0; + height: 4px; + background: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3); } + +.uk-nav-offcanvas .uk-nav-header { + margin-top: 0; + background: #404040; + border-top: 1px solid rgba(0, 0, 0, 0.3); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); + text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); } + +.mg-header { + padding: 1em 0; + background-color: #39B39D; } + +.mg-brand, .mg-brand-small { + font-size: 2em; + font-weight: 600; + letter-spacing: 0.02em; + color: white; } + .mg-brand:hover, .mg-brand-small:hover { + color: white; } + +.mg-brand > img, .mg-brand-small > img { + height: 1em; } + +.mg-tagline { + padding: 1em 0 0; + color: white; } + +.mg-main { + margin-top: 4em; + margin-bottom: 3em; + min-height: 100%; } + +.mg-feed { + color: #FF6600; } + .mg-feed:hover { + text-decoration: none; + color: #FF6600; } + +.mg-footer { + margin-bottom: 1em; } + +.mg-author { + margin-top: 1em; } + +.mg-brand-small { + max-width: 100%; } + +.mg-icons-small { + margin-bottom: 1em; } + +.mg-icons-small > li > a { + color: white; } + .mg-icons-small > li > a:hover { + color: white; } +.mg-icons-small .uk-icon-rss { + background-color: #FF6600; } +.mg-icons-small .uk-icon-twitter { + background-color: #00B0ED; } +.mg-icons-small .uk-icon-facebook { + background-color: #3B5999; } +.mg-icons-small .uk-icon-google-plus { + background-color: #D34836; } +.mg-icons-small .uk-icon-github { + background-color: #333; } +.mg-icons-small .uk-icon-envelope { + background-color: #059; } + +.mg-badges li { + float: left; + position: relative; } + +.browserupgrade { + margin: 0.2em 0; + background: #ccc; + color: #000; + padding: 0.2em 0; } + +@media (min-width: 1220px) { + .mg-tagline { + padding-left: 0 !important; } } +@media (max-width: 767px) { + .mg-brand, .mg-brand-small { + padding: 0; + max-width: 100%; } + + .mg-brand > img, .mg-brand-small > img { + height: 0.8em; } } + +/*# sourceMappingURL=main.css.map */ diff --git a/static/css/solarized.css b/static/css/solarized.css new file mode 100644 index 0000000..6809d4e --- /dev/null +++ b/static/css/solarized.css @@ -0,0 +1,84 @@ +/* Solarized Light + * For use with Jekyll and Pygments + * http://ethanschoonover.com/solarized + * SOLARIZED HEX ROLE + * --------- -------- ------------------------------------------ + * base01 #586e75 body text / default code / primary content + * base1 #93a1a1 comments / secondary content + * base3 #fdf6e3 background + * orange #cb4b16 constants + * red #dc322f regex, special keywords + * blue #268bd2 reserved keywords + * cyan #2aa198 strings, numbers + * green #859900 operators, other keywords + * */ + +.highlight { background-color: #fdf6e3; color: #586e75 } +.highlight .c { color: #93a1a1 } /* Comment */ +.highlight .err { color: #586e75 } /* Error */ +.highlight .g { color: #586e75 } /* Generic */ +.highlight .k { color: #859900 } /* Keyword */ +.highlight .l { color: #586e75 } /* Literal */ +.highlight .n { color: #586e75 } /* Name */ +.highlight .o { color: #859900 } /* Operator */ +.highlight .x { color: #cb4b16 } /* Other */ +.highlight .p { color: #586e75 } /* Punctuation */ +.highlight .cm { color: #93a1a1 } /* Comment.Multiline */ +.highlight .cp { color: #859900 } /* Comment.Preproc */ +.highlight .c1 { color: #93a1a1 } /* Comment.Single */ +.highlight .cs { color: #859900 } /* Comment.Special */ +.highlight .gd { color: #2aa198 } /* Generic.Deleted */ +.highlight .ge { color: #586e75; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #dc322f } /* Generic.Error */ +.highlight .gh { color: #cb4b16 } /* Generic.Heading */ +.highlight .gi { color: #859900 } /* Generic.Inserted */ +.highlight .go { color: #586e75 } /* Generic.Output */ +.highlight .gp { color: #586e75 } /* Generic.Prompt */ +.highlight .gs { color: #586e75; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #cb4b16 } /* Generic.Subheading */ +.highlight .gt { color: #586e75 } /* Generic.Traceback */ +.highlight .kc { color: #cb4b16 } /* Keyword.Constant */ +.highlight .kd { color: #268bd2 } /* Keyword.Declaration */ +.highlight .kn { color: #859900 } /* Keyword.Namespace */ +.highlight .kp { color: #859900 } /* Keyword.Pseudo */ +.highlight .kr { color: #268bd2 } /* Keyword.Reserved */ +.highlight .kt { color: #dc322f } /* Keyword.Type */ +.highlight .ld { color: #586e75 } /* Literal.Date */ +.highlight .m { color: #2aa198 } /* Literal.Number */ +.highlight .s { color: #2aa198 } /* Literal.String */ +.highlight .na { color: #586e75 } /* Name.Attribute */ +.highlight .nb { color: #B58900 } /* Name.Builtin */ +.highlight .nc { color: #268bd2 } /* Name.Class */ +.highlight .no { color: #cb4b16 } /* Name.Constant */ +.highlight .nd { color: #268bd2 } /* Name.Decorator */ +.highlight .ni { color: #cb4b16 } /* Name.Entity */ +.highlight .ne { color: #cb4b16 } /* Name.Exception */ +.highlight .nf { color: #268bd2 } /* Name.Function */ +.highlight .nl { color: #586e75 } /* Name.Label */ +.highlight .nn { color: #586e75 } /* Name.Namespace */ +.highlight .nx { color: #586e75 } /* Name.Other */ +.highlight .py { color: #586e75 } /* Name.Property */ +.highlight .nt { color: #268bd2 } /* Name.Tag */ +.highlight .nv { color: #268bd2 } /* Name.Variable */ +.highlight .ow { color: #859900 } /* Operator.Word */ +.highlight .w { color: #586e75 } /* Text.Whitespace */ +.highlight .mf { color: #2aa198 } /* Literal.Number.Float */ +.highlight .mh { color: #2aa198 } /* Literal.Number.Hex */ +.highlight .mi { color: #2aa198 } /* Literal.Number.Integer */ +.highlight .mo { color: #2aa198 } /* Literal.Number.Oct */ +.highlight .sb { color: #93a1a1 } /* Literal.String.Backtick */ +.highlight .sc { color: #2aa198 } /* Literal.String.Char */ +.highlight .sd { color: #586e75 } /* Literal.String.Doc */ +.highlight .s2 { color: #2aa198 } /* Literal.String.Double */ +.highlight .se { color: #cb4b16 } /* Literal.String.Escape */ +.highlight .sh { color: #586e75 } /* Literal.String.Heredoc */ +.highlight .si { color: #2aa198 } /* Literal.String.Interpol */ +.highlight .sx { color: #2aa198 } /* Literal.String.Other */ +.highlight .sr { color: #dc322f } /* Literal.String.Regex */ +.highlight .s1 { color: #2aa198 } /* Literal.String.Single */ +.highlight .ss { color: #2aa198 } /* Literal.String.Symbol */ +.highlight .bp { color: #268bd2 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #268bd2 } /* Name.Variable.Class */ +.highlight .vg { color: #268bd2 } /* Name.Variable.Global */ +.highlight .vi { color: #268bd2 } /* Name.Variable.Instance */ +.highlight .il { color: #2aa198 } /* Literal.Number.Integer.Long */ diff --git a/static/js/jquery.sticky-kit.min.js b/static/js/jquery.sticky-kit.min.js new file mode 100644 index 0000000..2943e73 --- /dev/null +++ b/static/js/jquery.sticky-kit.min.js @@ -0,0 +1,10 @@ +/* + * Sticky-kit v1.1.1 | WTFPL | Leaf Corcoran 2014 | http://leafo.net + * */ +(function(){var k,e;k=this.jQuery||window.jQuery;e=k(window);k.fn.stick_in_parent=function(d){var v,y,n,p,h,C,s,G,q,H;null==d&&(d={});s=d.sticky_class;y=d.inner_scrolling;C=d.recalc_every;h=d.parent;p=d.offset_top;n=d.spacer;v=d.bottoming;null==p&&(p=0);null==h&&(h=void 0);null==y&&(y=!0);null==s&&(s="is_stuck");null==v&&(v=!0);G=function(a,d,q,z,D,t,r,E){var u,F,m,A,c,f,B,w,x,g,b;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);f=a.parent();null!=h&&(f=f.closest(h));if(!f.length)throw"failed to find stick parent"; + u=m=!1;(g=null!=n?n&&a.closest(n):k("
"))&&g.css("position",a.css("position"));B=function(){var c,e,l;if(!E&&(c=parseInt(f.css("border-top-width"),10),e=parseInt(f.css("padding-top"),10),d=parseInt(f.css("padding-bottom"),10),q=f.offset().top+c+e,z=f.height(),m&&(u=m=!1,null==n&&(a.insertAfter(g),g.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(s),l=!0),D=a.offset().top-parseInt(a.css("margin-top"),10)-p,t=a.outerHeight(!0),r=a.css("float"),g&&g.css({width:a.outerWidth(!0), + height:t,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),l))return b()};B();if(t!==z)return A=void 0,c=p,x=C,b=function(){var b,k,l,h;if(!E&&(null!=x&&(--x,0>=x&&(x=C,B())),l=e.scrollTop(),null!=A&&(k=l-A),A=l,m?(v&&(h=l+t+c>z+q,u&&!h&&(u=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),lb&&!u&&(c-=k,c=Math.max(b-t,c),c=Math.min(p,c),m&&a.css({top:c+"px"})))):l>D&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(s),null==n&&(a.after(g),"left"!==r&&"right"!==r||g.append(a)),a.trigger("sticky_kit:stick")),m&&v&&(null==h&&(h=l+t+c>z+q),!u&&h)))return u=!0,"static"===f.css("position")&&f.css({position:"relative"}),a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")}, + w=function(){B();return b()},F=function(){E=!0;e.off("touchmove",b);e.off("scroll",b);e.off("resize",w);k(document.body).off("sticky_kit:recalc",w);a.off("sticky_kit:detach",F);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});f.position("position","");if(m)return null==n&&("left"!==r&&"right"!==r||a.insertAfter(g),g.remove()),a.removeClass(s)},e.on("touchmove",b),e.on("scroll",b),e.on("resize",w),k(document.body).on("sticky_kit:recalc",w),a.on("sticky_kit:detach",F),setTimeout(b, + 0)}};q=0;for(H=this.length;q +(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= + function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; + e=o.createElement(i);r=o.getElementsByTagName(i)[0]; + e.src='//www.google-analytics.com/analytics.js'; + r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); +ga('create','{{ GOOGLE_ANALYTICS }}');ga('send','pageview'); + +{% endif %} diff --git a/templates/archives.html b/templates/archives.html new file mode 100644 index 0000000..71f9772 --- /dev/null +++ b/templates/archives.html @@ -0,0 +1,22 @@ +{% extends "base.html" %} +{% block title %}Archives{% endblock %} +{% block description %}{% endblock %} + +{% block content %} +
+

Archives

+ + {% for article in dates %} + + {% endfor %} + +
+{% endblock %} + + + diff --git a/templates/article.html b/templates/article.html new file mode 100644 index 0000000..0a71f60 --- /dev/null +++ b/templates/article.html @@ -0,0 +1,60 @@ +{% extends "base.html" %} +{% block title %}{{ article.title|striptags }}{% endblock %} +{% block description %}{{ article.summary }}{% endblock %} +{% block content %} +
+ + {% if SHARE %} +
+ +
+ {% endif %} + +
+ +
+ +
+

{{ article.title }}

+ +

{{ article.summary }}

+ + {% if SHARE %} + Share + Tweet + Share + {% endif %} + + {{ article.content }} +
+
+ + {% if DISQUS_SITENAME %} +
+ + + comments powered by Disqus + {% endif %} + +
+{% endblock %} diff --git a/templates/author.html b/templates/author.html new file mode 100644 index 0000000..abc9663 --- /dev/null +++ b/templates/author.html @@ -0,0 +1,3 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} | {{ author }}{% endblock %} +{% block description %}{% endblock %} diff --git a/templates/authors.html b/templates/authors.html new file mode 100644 index 0000000..e69de29 diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..6eb6467 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,197 @@ + + + + + + + + +{% block title %}{{ SITENAME }}{%endblock%} + + + + +{% if article %} + + + +{% if article.summary %} + +{% endif %} +{% if article.date %} + +{% endif %} +{% if article.modified %} + +{% endif %} +{% if article.author %} + +{% endif %} +{% for tag in article.tags %} + +{% endfor %} +{% elif page %} + + + +{% else %} + + + +{% endif %} + + + + + + + + + + + + + +
+ + +
+ +
+ +
+ +
+ + {% block content %} + {% endblock %} + +
+
+ +
    +
  • Categories
  • + {% for cat, _ in categories %} +
  • {{ cat }}
  • + {% endfor %} + {% if DISPLAY_PAGES_ON_MENU != False %} +
  • Pages
  • + + {% for p in PAGES %} +
  • + {{ p.title }} +
  • + {% endfor %} + + {% endif %} + +
  • +
  • Archives
  • +
+
+ +
+

Receive Updates

+ ATOM +
+ + {% if SOCIAL %} +
+

Contacts

+ {% for icon, link in SOCIAL %} + + + + {% endfor %} +
+ {% endif %} + +
+ +
+ +
+ +
+ +
+
+ +
+
  • + {% if SOCIAL %} + {% for icon, link in SOCIAL %} +
  • + +
  • + {% endfor %} + {% endif %} +
    + +
    +

    {{ FOOTER }}

    + +

    Powered by Pelican. Theme mg by Luca Chiricozzi.

    +
    +
    +
    + +
    +
    +
      +
    • Categories
    • + {% for cat, _ in categories %} +
    • {{ cat }}
    • + {% endfor %} + {% if DISPLAY_PAGES_ON_MENU != False %} +
    • Pages
    • + {% for p in PAGES %} +
    • + {{ p.title }} +
    • + {% endfor %} + + {% endif %} + +
    • +
    • Archives
    • +
    +
    +
    + + + + + + + + + +{% include 'disqus_count.html' %} +{% include 'analytics.html' %} + + + diff --git a/templates/categories.html b/templates/categories.html new file mode 100644 index 0000000..675868f --- /dev/null +++ b/templates/categories.html @@ -0,0 +1,22 @@ +{% extends "base.html" %} +{% block title %}Categories{% endblock %} +{% block description %}{% endblock %} + +{% block content %} +
    +

    Categories

    + {% for category, articles in categories %} +

    {{ category|capitalize }}

    + {% for article in articles %} + + + + {% endfor %} + {% endfor %} +
    +{% endblock %} diff --git a/templates/category.html b/templates/category.html new file mode 100644 index 0000000..81c9cdb --- /dev/null +++ b/templates/category.html @@ -0,0 +1,3 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} | {{ category|capitalize }}{% endblock %} +{% block description %}{% endblock %} diff --git a/templates/disqus_count.html b/templates/disqus_count.html new file mode 100644 index 0000000..405742f --- /dev/null +++ b/templates/disqus_count.html @@ -0,0 +1,13 @@ + + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..8ee2a3f --- /dev/null +++ b/templates/index.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} +{% block content_title %}{% endblock %} +{% block content %} +
    + +{% if articles %} +{% for article in articles %} + + + + {% if DEFAULT_PAGINATION and articles_paginator.num_pages > 1 %} + + {% endif %} +{% endfor %} +{% endif %} +
    +{% endblock %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..0071d99 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block title %}{{ page.title|capitalize }}{% endblock %} +{% block description %}{% endblock %} +{% block content %} +
    +

    {{ page.title }}

    + + {% block page_content %} + {% endblock %} + + {{ page.content }} +
    + + +{% endblock %} diff --git a/templates/sitemap.html b/templates/sitemap.html new file mode 100644 index 0000000..e844e0b --- /dev/null +++ b/templates/sitemap.html @@ -0,0 +1,32 @@ + + + +{% for article in articles %} + + {{ SITEURL }}/{{ article.url }} + 0.8 + + + {% for translation in article.translations %} + + {{ SITEURL }}/{{ translation.url }} + 0.8 + + {% endfor %} +{% endfor %} + +{% for page in pages %} + + {{ SITEURL }}/{{ page.url }} + 1.0 + + + {% for translation in page.translations %} + + {{ SITEURL }}/{{ translation.url }} + 1.0 + + {% endfor %} +{% endfor %} + + diff --git a/templates/tag.html b/templates/tag.html new file mode 100644 index 0000000..f73fbbf --- /dev/null +++ b/templates/tag.html @@ -0,0 +1,3 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} | {{ tag|capitalize }}{% endblock %} +{% block description %}{% endblock %} diff --git a/templates/tags.html b/templates/tags.html new file mode 100644 index 0000000..61876a4 --- /dev/null +++ b/templates/tags.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} +{% block title %}Tags{% endblock %} +{% block description %}{% endblock %} + +{% block content %} +
    +

    Tags

    +
      + {% for tag, articles in tags|sort %} +
    • {{ tag }} ({{ articles|count }})
    • + {% endfor %} +
    +
    +{% endblock %}