diff options
Diffstat (limited to 'Peli-Kiera')
24 files changed, 1147 insertions, 0 deletions
diff --git a/Peli-Kiera/LICENSE.md b/Peli-Kiera/LICENSE.md new file mode 100644 index 0000000..557f996 --- /dev/null +++ b/Peli-Kiera/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2017 b. avianto + +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/Peli-Kiera/README.md b/Peli-Kiera/README.md new file mode 100644 index 0000000..0628475 --- /dev/null +++ b/Peli-Kiera/README.md @@ -0,0 +1,111 @@ + +# Peli-Kiera +Peli-Kiera is a theme for the Pelican static site generator. +Thanks to the [Hugo-Kiera](https://github.com/avianto/hugo-kiera) project for the inspiration. +### Demo +Live-Demo at [https://aleylara.github.io/Peli-Kiera](https://aleylara.github.io/Peli-Kiera) +### Installation +The theme can be installed by cloning the repo into your +themes path and pointing to it in your `pelicanconf.py`. +```bash +# Create a themes directory if it doesn't exists +cd project-dir/themes +git clone https://github.com/aleylara/Peli-Kiera + +# Path to your theme directory in pelicanconf.py +THEME = 'themes/Peli-Kiera' +``` +In order to get read times and links between articles, the theme requires [pelican-readtime](https://github.com/getpelican/pelican-plugins/tree/master/readtime) and [neighbors](https://github.com/getpelican/pelican-plugins/tree/master/neighbors) plugins. + +```bash +# Path to your plugins directory in pelicanconf.py +PLUGIN_PATHS = ['pelican-plugins'] +PLUGINS = ['readtime', 'neighbors'] +``` +### Settings + +```python +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +from __future__ import unicode_literals + +AUTHOR = 'Author' +SITENAME = 'Site-Name' +SITEURL = '' +SITESUBTITLE = Site Subtitle' +PATH = 'content' +TIMEZONE = '###########/#######' +DEFAULT_LANG = 'en' + +THEME = 'themes/Peli-Kiera' +PLUGIN_PATHS = ['plugins'] +PLUGINS = ['readtime', 'neighbors'] +STATIC_PATHS = ['images'] +SUMMARY_MAX_LENGTH = 60 +DEFAULT_PAGINATION = 10 +GITHUB_URL = 'https://github.com/' + +# Feed generation is usually not desired when developing +FEED_ALL_ATOM = 'feeds/all.atom.xml' +CATEGORY_FEED_ATOM = None +TRANSLATION_FEED_ATOM = None +AUTHOR_FEED_ATOM = None +AUTHOR_FEED_RSS = None +RSS_FEED_SUMMARY_ONLY = True + +# Social widget +SOCIAL = ( + ('twitter', 'https://twitter.com/'), + ('linkedin', 'https://www.linkedin.com'), + ('github', 'https://github.com/'), + ('gitlab', 'https://gitlab.com/'), + ('facebook', 'https://facebook.com'), + ('instagram', 'https://instagram.com'), +) + +# DISQUS_SITENAME = '' +# GOOGLE_ANALYTICS = '' + +# Uncomment following line if you want document-relative URLs when developing +# RELATIVE_URLS = True +``` + +### Features +* Atom/RSS feeds +* Mobile friendly +* Google analytics +* Comments via Disqus +* Font awesome icons +* Modified pagination +* Image placements + +### Pagination and image placement +The pagination is presented with the current page and 3 neighboring pages on either side. + + << < 7 8 9 **10** 11 12 13 > >> + +Images can be moved on page by adding the tag `#float-right`, `#float-left`, `#mid` and `#full` in your markdown. + +```markdown +![Title]({static}/images/my_image-600x400.png#float-right "") +``` + +Similarly, the placement can also be applied to html directly by wrapping images in a `<figure class="placement">` tag. + +```html +<figure class="float-left"> + <img src="path-to/images/my_image-600x400.png" alt=""> +</figure> +``` +Minimum image width of 600px is recommended. Images scale accordingly on smaller screens. + +### Preview +![Screenshot1](screenshot-1.png "Screenshot Desktop") +![Screenshot2](screenshot-2.png "Screenshot Mobile") +![Screenshot3](screenshot-3.png "Screenshot Mobile") + +You can leave feedback or say thanks [here 👍](https://saythanks.io/to/aleylara) + +### License +[MIT License](https://github.com/avianto/hugo-kiera/blob/master/LICENSE.md) + diff --git a/Peli-Kiera/screenshot-1.png b/Peli-Kiera/screenshot-1.png Binary files differnew file mode 100755 index 0000000..4fdcb37 --- /dev/null +++ b/Peli-Kiera/screenshot-1.png diff --git a/Peli-Kiera/screenshot-2.png b/Peli-Kiera/screenshot-2.png Binary files differnew file mode 100644 index 0000000..30cb2cf --- /dev/null +++ b/Peli-Kiera/screenshot-2.png diff --git a/Peli-Kiera/screenshot-3.png b/Peli-Kiera/screenshot-3.png Binary files differnew file mode 100644 index 0000000..e6c4dc0 --- /dev/null +++ b/Peli-Kiera/screenshot-3.png diff --git a/Peli-Kiera/static/css/main.css b/Peli-Kiera/static/css/main.css new file mode 100644 index 0000000..61bb2ec --- /dev/null +++ b/Peli-Kiera/static/css/main.css @@ -0,0 +1,404 @@ +@import url("pygment.css"); + +body { + margin: 0; + padding: 0; + overflow-x: hidden; + font-family: "Roboto Slab", serif; + color: #333333; +} + +h1, +h2, +h3, +h4, +h5, +h6, +time { + font-family: "Ruda", sans-serif; +} + +#container { + margin: 0; + padding: 0; + max-width: 100vw; + min-height: 100vh; + display: flex; + flex-direction: column; +} + +#container > * { + width: 700px; + margin: 0 auto; +} + +@media only screen and (max-width: 800px) { + #container > * { + width: auto; + margin: 0 1.2em; + } +} + +#container header { + margin-bottom: 1em; +} + +#container header h1 { + font-size: 2.8rem; +} + +#container header h1 a { + color: #000000; + font-size: 2.8rem; +} + +#container header ul { + display: flex; + margin: 0; + padding: 0; + list-style: none; + float: right; +} + +#container header ul li { + margin-left: 1em; +} + +@media only screen and (max-width: 800px) { + #container header ul { + float: none; + } + + #container header ul li { + margin: 0 1em 0 0; + } +} + +#container nav { + border-bottom: solid 3px #cecece; + padding-bottom: 0.5em; + font-family: "Ruda", sans-serif; +} + +#container nav ul { + margin: 0; + padding: 0; + list-style: none; + display: flex; + justify-content: flex-end; +} + +#container nav ul li { + margin-left: 1em; +} + +#container nav ul li a.active { + border-bottom: 0.5em solid #666666; +} + +#container main { + flex: 1 0 0; + line-height: 1.5; + font-size: 1.2rem; +} + +#container main section#home ul { + margin: 0; + padding: 0; + list-style: none; +} + +#container main section#home ul li { + margin: 0.5em 0; + padding-bottom: 0.5em; +} + +#container main section#home ul li h2 { + margin: 0.2em 0; +} + +#container main section#home span { + color: #666666; +} + +#container p a { + font-style: italic; +} + +#container main section#list ul { + margin: 0; + padding: 0; + list-style: none; +} + +#container main section#list ul li { + display: flex; + justify-content: space-between; + padding: 0.5em 0; + border-bottom: 1px solid #cecece; +} + +#container main section#list ul li time, #container main section#list ul li span.count { + float: right; + white-space: nowrap; +} + +#container main section#list ul li:last-child { + border-bottom: none; +} + +@media only screen and (max-width: 800px) { + #container main section#list ul li { + font-size: small; + } +} + +#container main section.post-nav ul { + margin: 0.5em 0; + padding: 0.5em 0; + list-style: none; + display: flex; + justify-content: space-between; + border-top: 1px solid #f7f7f7; + font-size: 0.9em; +} + +#container main article pre, #container main section pre { + + background-color: #F5F5F5; + overflow-x: auto; + padding: 0.8em; + font-size: 0.8em; + box-shadow: 0 -1px 0 #bbbbbb inset; +} + +#container main article pre code, #container main section pre code { + font-size: 0.8em; +} + +#container main article p code, #container main section p code { + padding: 0.2em; + background-color: #F5F5F5; + font-size: 0.8em; +} + +#container main article p kbd, #container main section p kbd { + display: inline-block; + padding: 0.2em 0.3em; + font-size: 0.8em; + line-height: 1em; + color: #555555; + vertical-align: middle; + background-color: #F5F5F5; + border-width: 1px; + border-style: solid; + border-color: #cccccc #cccccc #bbbbbb; + border-image: none; + border-radius: 3px; + box-shadow: 0 -1px 0 #bbbbbb inset; +} + +#container main h1 { + margin-bottom: 1rem; +} + +#container footer { + border-top: solid 1px #cecece; +} + +#container footer h6 { + font-size: 0.8em; +} + +.meta-aside, #container main section#home ul li aside, #container main article aside { + margin: 0.5em 0; + font-family: "Ruda", sans-serif; + color: #909090; + font-size: 0.8em; +} + +.meta-aside ul, #container main section#home ul li aside ul, #container main article aside ul { + margin: 0; + padding: 0; + list-style: none; +} + +.meta-aside ul li, #container main section#home ul li aside ul li, #container main article aside ul li { + margin: 0; + padding: 0; +} + +a { + color: #666666; + text-decoration: none; +} + +.image, figure img, img { + width: 100%; + box-shadow: 0 3px 3px #bbbbbb; +} + +.full-image, figure.full img, img[src*="full"] { + width: 100%; + box-shadow: 0 3px 3px #bbbbbb; +} + +@supports (width: 100vw) { + .full-image, figure.full img, img[src*="full"] { + width: 100vw; + position: relative; + left: 50%; + right: 50%; + margin-left: -50vw; + margin-right: -50vw; + } +} + +.mid-image, figure.mid img, img[src*="mid"] { + width: 100%; + box-shadow: 0 3px 3px #bbbbbb; +} + +@supports (width: 100vw) { + .mid-image, figure.mid img, img[src*="mid"] { + width: 800px; + position: relative; + left: 50%; + right: 50%; + margin-left: -400px; + margin-right: -400px; + } + + @media only screen and (max-width: 800px) { + .mid-image, figure.mid img, img[src*="mid"] { + width: 100%; + left: 0; + right: 0; + margin: 0; + } + } +} + +.float-image-left, figure.float-left img, img[src*="float-left"] { + width: 300px; + float: left; + margin: 0 1em 1em -3em; + box-shadow: 0 3px 3px #bbbbbb; +} + +@media only screen and (max-width: 800px) { + .float-image-left, figure.float-left img, img[src*="float-left"] { + float: none; + margin: 0; + width: 100%; + } +} + +.float-image-right, figure.float-right img, img[src*="float-right"] { + width: 300px; + float: right; + margin: 0 -3em 1em 1em; + box-shadow: 0 3px 3px #bbbbbb; +} + +@media only screen and (max-width: 800px) { + .float-image-right, figure.float-right img, img[src*="float-right"] { + float: none; + margin: 0; + width: 100%; + } +} + +figure { + margin: 0; +} + +figure figcaption p { + margin-top: 0.3em; + font-size: 0.8em; + font-style: italic; +} + +figure.full { + margin: 0; +} + +figure.mid { + margin: 0; +} + +figure.float-left { + margin: 0; + float: left; +} + +figure.float-right { + margin: 0; + float: right; +} + +figure.float-right figcaption { + margin-left: 1em; +} + +table { + width: 100%; + border-bottom: solid 1px #cecece; +} + +table thead { + background-color: #cecece; +} + +blockquote { + margin: 1em; + border-left: solid 0.1em #cecece; + padding: 0.5em 2em; + position: relative; + background-color: #efefef; + box-shadow: 0 -1px 0 #bbbbbb inset; +} + +blockquote::before { + content: "\f10d"; + font-size: 3em; + font-family: "FontAwesome"; + color: rgba(192, 192, 192, 0.3); + position: absolute; + left: 6px; + top: 0; +} + +@media only screen and (max-width: 800px) { + blockquote { + margin: 1em 0; + padding: 0.5em; + } +} + +dl dd { + font-style: italic; +} + +ul.pagination { + display: flex; + justify-content: center; + margin: 1em 0 0; + padding: 0.5em 0; + list-style: none; +} + +ul.pagination li { + padding: 0 0.5em; +} + +@media only screen and (max-width: 800px) { + ul.pagination li { + padding: 0 0.3em; + } +} + +ul.pagination li.active { + font-weight: bold; +} + diff --git a/Peli-Kiera/static/css/pygment.css b/Peli-Kiera/static/css/pygment.css new file mode 100644 index 0000000..0fa0bea --- /dev/null +++ b/Peli-Kiera/static/css/pygment.css @@ -0,0 +1,77 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #8f5902; font-style: italic } /* Comment */ +.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ +.highlight .g { color: #000000 } /* Generic */ +.highlight .k { color: #204a87; font-weight: bold } /* Keyword */ +.highlight .l { color: #000000 } /* Literal */ +.highlight .n { color: #000000 } /* Name */ +.highlight .o { color: #ce5c00; font-weight: bold } /* Operator */ +.highlight .x { color: #000000 } /* Other */ +.highlight .p { color: #000000; font-weight: bold } /* Punctuation */ +.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #a40000 } /* Generic.Deleted */ +.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #ef2929 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #000000; font-style: italic } /* Generic.Output */ +.highlight .gp { color: #8f5902 } /* Generic.Prompt */ +.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ +.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ +.highlight .ld { color: #000000 } /* Literal.Date */ +.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */ +.highlight .s { color: #4e9a06 } /* Literal.String */ +.highlight .na { color: #c4a000 } /* Name.Attribute */ +.highlight .nb { color: #204a87 } /* Name.Builtin */ +.highlight .nc { color: #000000 } /* Name.Class */ +.highlight .no { color: #000000 } /* Name.Constant */ +.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #ce5c00 } /* Name.Entity */ +.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #000000 } /* Name.Function */ +.highlight .nl { color: #f57900 } /* Name.Label */ +.highlight .nn { color: #000000 } /* Name.Namespace */ +.highlight .nx { color: #000000 } /* Name.Other */ +.highlight .py { color: #000000 } /* Name.Property */ +.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #000000 } /* Name.Variable */ +.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ +.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ +.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ +.highlight .sc { color: #4e9a06 } /* Literal.String.Char */ +.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ +.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ +.highlight .se { color: #4e9a06 } /* Literal.String.Escape */ +.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ +.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ +.highlight .sx { color: #4e9a06 } /* Literal.String.Other */ +.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ +.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ +.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ +.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #000000 } /* Name.Function.Magic */ +.highlight .vc { color: #000000 } /* Name.Variable.Class */ +.highlight .vg { color: #000000 } /* Name.Variable.Global */ +.highlight .vi { color: #000000 } /* Name.Variable.Instance */ +.highlight .vm { color: #000000 } /* Name.Variable.Magic */ +.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ diff --git a/Peli-Kiera/templates/analytics.html b/Peli-Kiera/templates/analytics.html new file mode 100644 index 0000000..a966c4c --- /dev/null +++ b/Peli-Kiera/templates/analytics.html @@ -0,0 +1,45 @@ +{% if GOOGLE_ANALYTICS %} + <script type="text/javascript"> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); + + ga('create', '{{GOOGLE_ANALYTICS}}', '{{GA_COOKIE_DOMAIN if GA_COOKIE_DOMAIN else 'auto'}}'); + ga('send', 'pageview'); + </script> +{% endif %} +{% if GAUGES %} + <script type="text/javascript"> + var _gauges = _gauges || []; + (function() { + var t = document.createElement('script'); + t.type = 'text/javascript'; + t.async = true; + t.id = 'gauges-tracker'; + t.setAttribute('data-site-id', '{{GAUGES}}'); + t.src = '//secure.gaug.es/track.js'; + var s = document.getElementsByTagName('script')[0]; + s.parentNode.insertBefore(t, s); + })(); + </script> +{% endif %} +{% if PIWIK_URL and PIWIK_SITE_ID %} + <script type="text/javascript"> + {% if PIWIK_SSL_URL %} + var pkBaseURL = "{{ PIWIK_SSL_URL }}"; + {% else %} + var pkBaseURL = "{{ PIWIK_URL }}"; + {% endif %} + var _paq = _paq || []; + _paq.push(["trackPageView"]); + _paq.push(["enableLinkTracking"]); + (function() { + var u=(("https:" == document.location.protocol) ? "https" : "http")+"://"+pkBaseURL+"/"; + _paq.push(["setTrackerUrl", u+"piwik.php"]); + _paq.push(["setSiteId", "{{ PIWIK_SITE_ID }}"]); + var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript"; + g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s); + })(); + </script> +{% endif %} diff --git a/Peli-Kiera/templates/archives.html b/Peli-Kiera/templates/archives.html new file mode 100644 index 0000000..a7374d7 --- /dev/null +++ b/Peli-Kiera/templates/archives.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Archives{% endblock %} + +{% block content %} + <main> + <section id="list"> + <h2>Archives for {{ SITENAME }}</h2> + <ul> + {% for article in dates %} + <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> + <time>{{ article.date|strftime('%b %Y') }}</time> + </li> + {% endfor %} + </ul> + </section> + </main> +{% endblock %}
\ No newline at end of file diff --git a/Peli-Kiera/templates/article.html b/Peli-Kiera/templates/article.html new file mode 100644 index 0000000..118945d --- /dev/null +++ b/Peli-Kiera/templates/article.html @@ -0,0 +1,84 @@ +{% extends "base.html" %} +{% block html_lang %}{{ article.lang }}{% endblock %} + +{% block title %}{{ SITENAME }} - {{ article.title }}{% endblock %} + +{% block head %} + {{ super() }} + {% if article.description %} + <meta name="description" content="{{ article.description }}"/> + {% endif %} + {% for tag in article.tags %} + <meta name="tags" content="{{ tag }}"/> + {% endfor %} +{% endblock %} + +{% block content %} + <main> + <article> + <h2>{{ article.title }}</h2> + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} + <aside> + <ul> + <li> + <time datetime="{{ article.date }}">{{ article.date|strftime('%b %d, %Y') }}</time> + </li> + {% if article.modified %} + <li> + <time datetime="{{ article.modified }}">Modified + on {{ article.modified|strftime('%b %d, %Y') }}</time> + {% endif %} + </li> + {% if article.readtime %} + <li>{{ article.readtime.minutes }} min read</li> + {% endif %} + {% if article.category %} + <li> + Categories: + <a href="{{ SITEURL }}/{{ article.category.url }}"><em>{{ article.category }}</em></a> + {% endif %} + </li> + {% if article.tags %} + <li> + Tags: + {% for tag in article.tags %} + <a href="{{ SITEURL }}/{{ tag.url }}"><em>#{{ tag }}</em></a> + {% endfor %} + {% endif %} + </li> + </ul> + </aside> + {{ article.content }} + </article> + <section class="post-nav"> + <ul> + {% if article.next_article %} + <li> + <a href="{{ SITEURL }}/{{ article.next_article.url }}"><i + class="fa fa-chevron-circle-left"></i> {{ article.next_article.title }}</a> + </li> + {% else %} + <li> + <a href="{{ SITEURL }}/{{ article.next_article.url }}">{{ " " }}</a> + </li> + {% endif %} + {% if article.prev_article %} + <li> + <a href="{{ SITEURL }}/{{ article.prev_article.url }}">{{ article.prev_article.title }} <i + class="fa fa-chevron-circle-right"></i></a> + </li> + {% else %} + <li> + <a href="{{ SITEURL }}/{{ article.prev_article.url }}">{{ " " }}</a> + </li> + {% endif %} + </ul> + </section> + <div> + {% include 'disqus_script.html' %} + </div> + </main> +{% endblock %} + + diff --git a/Peli-Kiera/templates/author.html b/Peli-Kiera/templates/author.html new file mode 100644 index 0000000..2722740 --- /dev/null +++ b/Peli-Kiera/templates/author.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - {{ author }}{% endblock %} + +{% block content %} + <main> + <section id="list"> + <h2>Articles by - {{ author }}</h2> + <ul> + {% set new = namespace(p=0) %} + {% for article in articles_page.object_list %} + {% set period = article.date | strftime('%Y') %} + {% if period != new.p %} + <h3>{{ period }}</h3> + <li> + <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> + <time>{{ article.date|strftime('%b %Y') }}</time> + </li> + {% set new.p = article.date | strftime('%Y') %} + {% elif period == new.p %} + <li> + <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> + <time>{{ article.date|strftime('%b %Y') }}</time> + </li> + {% endif %} + {% endfor %} + </ul> + </section> + {% if articles_page.has_other_pages() %} + {% include 'pagination.html' %} + {% endif %} + </main> +{% endblock %} diff --git a/Peli-Kiera/templates/authors.html b/Peli-Kiera/templates/authors.html new file mode 100644 index 0000000..bacb48e --- /dev/null +++ b/Peli-Kiera/templates/authors.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Authors{% endblock %} + +{% block content %} + <main> + <section id="list"> + <h2>Authors</h2> + <ul> + {% for author, articles in authors|sort %} + {% if author == "" %} + <li><a href="#">Anonymous</a>({{ articles|count }})</li> + {% else %} + <li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>({{ articles|count }})</li> + {% endif %} + {% endfor %} + </ul> + </section> + </main> +{% endblock %} diff --git a/Peli-Kiera/templates/base.html b/Peli-Kiera/templates/base.html new file mode 100644 index 0000000..737bd5c --- /dev/null +++ b/Peli-Kiera/templates/base.html @@ -0,0 +1,84 @@ +<!DOCTYPE html> +<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}"> +<head> + {% block head %} + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta http-equiv="X-UA-Compatible" content="ie=edge"> + <title>{% block title %}{{ SITENAME }}{% endblock title %}</title> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css"/> + <link rel="stylesheet" + href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/> + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Slab|Ruda"/> + <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/{{ CSS_FILE }}"/> + {% if FEED_ALL_ATOM %} + <link href="{{ FEED_DOMAIN }}/ + {% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" + type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed"/> + {% endif %} + {% if FEED_ALL_RSS %} + <link href="{{ FEED_DOMAIN }}/ + {% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" + type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed"/> + {% endif %} + {% endblock head %} +</head> +<body> +{% include 'github.html' %} +<div id="container"> + <header> + <h1><a href="{{ SITEURL }}/">{{ SITENAME }}</a></h1> + {% if SOCIAL or FEED_ALL_ATOM or FEED_ALL_RSS %} + <ul class="social-media"> + {% for name, link in SOCIAL %} + <li><a href="{{ link }}"><i class="fa fa-{{ name }} fa-lg" aria-hidden="true"></i></a></li> + {% endfor %} + {% if FEED_ALL_ATOM %} + <li><a href="{{ FEED_DOMAIN }}/ + {% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" + type="application/atom+xml" rel="alternate"><i class="fa fa-rss fa-lg" + aria-hidden="true"></i></a></li> + {% endif %} + {% if FEED_ALL_RSS %} + <li><a href="{{ FEED_DOMAIN }}/ + {% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" + type="application/rss+xml" rel="alternate"><i class="fa fa-rss fa-lg" aria-hidden="true"></i></a> + </li> + {% endif %} + </ul> + {% endif %} + <p><em>{{ SITESUBTITLE }}</em></p> + </header> + <nav> + <ul> + {% for title, link in MENUITEMS %} + <li><a href="{{ link }}">{{ title }}</a></li> + {% endfor %} + {% if DISPLAY_CATEGORIES_ON_MENU %} + {% for cat, null in categories %} + <li><a {% if cat==category %} + class="active" {% endif %}href="{{ SITEURL }}/{{ cat.url }}"> {{ cat }} </a></li> + {% endfor %} + {% endif %} + {% if DISPLAY_PAGES_ON_MENU %} + {% for p in pages %} + <li><a {% if p==page %} class="active" {% endif %}href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a> + </li> + {% endfor %} + {% endif %} + </ul> + </nav> + {% block content %} + {% endblock %} + <footer> + <h6> + Copyright © 2018 + {% if AUTHOR %}- {{ AUTHOR }}{% endif %} | Rendered by <a href="http://getpelican.com/">Pelican</a> | + Powered by <a href="http://python.org">Python</a> + </h6> + </footer> +</div> +{% include 'analytics.html' %} +</body> +</html> + diff --git a/Peli-Kiera/templates/categories.html b/Peli-Kiera/templates/categories.html new file mode 100644 index 0000000..faaac26 --- /dev/null +++ b/Peli-Kiera/templates/categories.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Categories{% endblock %} + +{% block content %} + <main> + <section id="list"> + <h2>Number of Articles for Category </h2> + <ul> + {% for category, articles in categories|sort %} + <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li> + {% endfor %} + </ul> + </section> + </main> +{% endblock %} + diff --git a/Peli-Kiera/templates/category.html b/Peli-Kiera/templates/category.html new file mode 100644 index 0000000..12c566c --- /dev/null +++ b/Peli-Kiera/templates/category.html @@ -0,0 +1,34 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Archives{% endblock %} + +{% block content %} + <main> + <section id="list"> + <h2>{{ category }}</h2> + <ul> + {% set new = namespace(p=0) %} + {% for article in articles_page.object_list %} + {% set period = article.date | strftime('%Y') %} + {% if period != new.p %} + <h3>{{ period }}</h3> + <li> + <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> + <time>{{ article.date|strftime('%b %Y') }}</time> + </li> + {% set new.p = article.date | strftime('%Y') %} + {% elif period == new.p %} + <li> + <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> + <time>{{ article.date|strftime('%b %Y') }}</time> + </li> + {% endif %} + {% endfor %} + </ul> + </section> + {% if articles_page.has_other_pages() %} + {% include 'pagination.html' %} + {% endif %} + </main> +{% endblock %} + diff --git a/Peli-Kiera/templates/disqus_script.html b/Peli-Kiera/templates/disqus_script.html new file mode 100644 index 0000000..5aafa17 --- /dev/null +++ b/Peli-Kiera/templates/disqus_script.html @@ -0,0 +1,23 @@ +{% if DISQUS_SITENAME %} + <div class="comments"> + <h2>Comments !</h2> + <div id="disqus_thread"></div> + <script> + var disqus_config = function () { + this.page.url = "{{ SITEURL }}/{{ article.url }}"; + this.page.identifier = "{{ article.slug }}"; + this.page.title = "{{ article.title }}"; + }; + (function () { + var d = document, + s = d.createElement('script'); + s.src = 'https://{{ DISQUS_SITENAME }}.disqus.com/embed.js'; + s.setAttribute('data-timestamp', +new Date()); + (d.head || d.body).appendChild(s); + })(); + </script> + <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments + powered by + Disqus.</a></noscript> + </div> +{% endif %} diff --git a/Peli-Kiera/templates/github.html b/Peli-Kiera/templates/github.html new file mode 100644 index 0000000..dce0159 --- /dev/null +++ b/Peli-Kiera/templates/github.html @@ -0,0 +1,35 @@ +{% if GITHUB_URL %} +<a href="{{ GITHUB_URL }}" class="github-corner" aria-label="View source on GitHub"> + <svg width="80" height="80" viewBox="0 0 250 250" + style="fill:#8B8B7A; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"> + <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> + <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" + fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path> + <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" + fill="currentColor" class="octo-body"></path> + </svg> +</a> +{% endif %} +<style>.github-corner:hover .octo-arm { + animation: octocat-wave 560ms ease-in-out +} +@keyframes octocat-wave { + 0%, 100% { + transform: rotate(0) + } + 20%, 60% { + transform: rotate(-25deg) + } + 40%, 80% { + transform: rotate(10deg) + } +} +@media (max-width: 500px) { + .github-corner:hover .octo-arm { + animation: none + } + + .github-corner .octo-arm { + animation: octocat-wave 560ms ease-in-out + } +}</style> diff --git a/Peli-Kiera/templates/index.html b/Peli-Kiera/templates/index.html new file mode 100644 index 0000000..8a6e379 --- /dev/null +++ b/Peli-Kiera/templates/index.html @@ -0,0 +1,34 @@ +{% extends "base.html" %} +{% block content %} + <main> + <section id="home"> + <ul> + {% for article in articles_page.object_list %} + <li> + <h2><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" + title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> + <aside> + <ul> + <li> + <time datetime="{{ article.date }}">{{ article.date|strftime('%b %d, %Y') }}</time> + </li> + {% if article.readtime %} + <li> + {{ article.readtime.minutes }} min read + </li> + {% endif %} + </ul> + </aside> + <p> + {{ article.summary }} + <a href="{{ SITEURL }}/{{ article.url }}"><em>Read more...</em></a> + </p> + </li> + {% endfor %} + </ul> + {% if articles_page.has_other_pages() %} + {% include 'pagination.html' %} + {% endif %} + </section> + </main> +{% endblock content %}
\ No newline at end of file diff --git a/Peli-Kiera/templates/page.html b/Peli-Kiera/templates/page.html new file mode 100644 index 0000000..65ee958 --- /dev/null +++ b/Peli-Kiera/templates/page.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% block html_lang %}{{ page.lang }}{% endblock %} + +{% block title %}{{ SITENAME }} - {{ page.title }}{%endblock%} + +{% block content %} + <main> + <section> + <h2>{{ page.title }}</h2> + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + {{ page.content }} + {% if page.modified %} + <p> + Last updated: {{ page.locale_modified }} + </p> + {% endif %} + </section> + </main> +{% endblock %} diff --git a/Peli-Kiera/templates/pagination.html b/Peli-Kiera/templates/pagination.html new file mode 100644 index 0000000..35f1a0f --- /dev/null +++ b/Peli-Kiera/templates/pagination.html @@ -0,0 +1,26 @@ +{% if DEFAULT_PAGINATION %} + + <ul class="pagination"> + {% if articles_page.has_previous() %} + <li><a href="{{ SITEURL }}/{{ page_name }}{{ '' }}.html"><span aria-hidden="true">««</span></a> + </li> + <li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">«</a></li> + {% endif %} + {% for page in range(1, articles_paginator.num_pages + 1) %} + {% if page == 1 and page >= (articles_page.number - 3) and page <= (articles_page.number) + 3 %} + <li class="{{ 'active' if page == articles_page.number else '' }}"><a + href="{{ SITEURL }}/{{ page_name }}{{ "" }}.html">{{ page }}</a></li> + {% elif page >= (articles_page.number - 3) and page <= (articles_page.number) + 3 %} + <li class="{{ 'active' if page == articles_page.number else '' }}"><a + href="{{ SITEURL }}/{{ page_name }}{{ page }}.html">{{ page }}</a></li> + {% endif %} + + {% endfor %} + {% if articles_page.has_next() %} + <li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">»</a></li> + <li><a href="{{ SITEURL }}/{{ page_name }}{{ articles_paginator.num_pages }}.html"><span aria-hidden="true">»»</span></a> + </li> + {% endif %} + </ul> +{% endif %} + diff --git a/Peli-Kiera/templates/period_archives.html b/Peli-Kiera/templates/period_archives.html new file mode 100644 index 0000000..8a6b425 --- /dev/null +++ b/Peli-Kiera/templates/period_archives.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - {{ period | reverse | join(' ') }} Archives{% endblock %} + +{% block content %} + <main> + <section id="list"> + <h2>Archives for {{ period | reverse | join(' ') }}</h2> + <ul> + {% for article in dates %} + <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> + <time>{{ article.date|strftime('%b %Y') }}</time> + </li> + {% endfor %} + </ul> + </section> + </main> +{% endblock %}
\ No newline at end of file diff --git a/Peli-Kiera/templates/tag.html b/Peli-Kiera/templates/tag.html new file mode 100644 index 0000000..9c1a0ad --- /dev/null +++ b/Peli-Kiera/templates/tag.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - {{ tag }}{% endblock %} + +{% block content %} + <main> + <section id="list"> + <h2>#{{ tag }}</h2> + <ul> + {% for article in dates %} + <li> + <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> + <time>{{ article.date|strftime('%b %Y') }}</time> + </li> + {% endfor %} + </ul> + </section> + </main> +{% endblock %} diff --git a/Peli-Kiera/templates/tags.html b/Peli-Kiera/templates/tags.html new file mode 100644 index 0000000..1fa4065 --- /dev/null +++ b/Peli-Kiera/templates/tags.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Tags{% endblock %} + +{% block content %} + <main> + <section id="list"> + <h2>Tags for {{ SITENAME }}</h2> + <ul> + {% for tag, articles in tags|sort %} + <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li> + {% endfor %} + </ul> + </section> + </main> +{% endblock %} diff --git a/Peli-Kiera/templates/translations.html b/Peli-Kiera/templates/translations.html new file mode 100644 index 0000000..db8c372 --- /dev/null +++ b/Peli-Kiera/templates/translations.html @@ -0,0 +1,9 @@ +{% macro translations_for(article) %} +{% if article.translations %} +Translations: +{% for translation in article.translations %} +<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a> +{% endfor %} +{% endif %} +{% endmacro %} + |