mirror of
https://github.com/c0de-archive/pelican-mg.git
synced 2024-12-22 08:22:40 +00:00
first commit
This commit is contained in:
commit
5f1db9c0c9
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.swp
|
21
LICENSE.md
Normal file
21
LICENSE.md
Normal file
@ -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.
|
73
README.md
Normal file
73
README.md
Normal file
@ -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'),)
|
||||
```
|
149
static/css/main.css
Normal file
149
static/css/main.css
Normal file
@ -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 */
|
84
static/css/solarized.css
Normal file
84
static/css/solarized.css
Normal file
@ -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 */
|
10
static/js/jquery.sticky-kit.min.js
vendored
Normal file
10
static/js/jquery.sticky-kit.min.js
vendored
Normal file
@ -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("<div />"))&&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"))),l<D&&(m=!1,c=p,null==n&&("left"!==r&&"right"!==r||a.insertAfter(g),g.detach()),b={position:"",width:"",top:""},a.css(b).removeClass(s).trigger("sticky_kit:unstick")),
|
||||
y&&(b=e.height(),t+p>b&&!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<H;q++)d=this[q],G(k(d));return this}}).call(this);
|
||||
|
6
static/js/main.js
Normal file
6
static/js/main.js
Normal file
@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.mg-container-social').height($('article').height());
|
||||
$('#mg-panel-social').stick_in_parent({offset_top: 35});
|
||||
});
|
22
static/js/plugins.js
Normal file
22
static/js/plugins.js
Normal file
@ -0,0 +1,22 @@
|
||||
// Avoid `console` errors in browsers that lack a console.
|
||||
(function() {
|
||||
var method;
|
||||
var noop = function () {};
|
||||
var methods = [
|
||||
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
|
||||
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
|
||||
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
|
||||
'timeStamp', 'trace', 'warn'
|
||||
];
|
||||
var length = methods.length;
|
||||
var console = (window.console = window.console || {});
|
||||
|
||||
while (length--) {
|
||||
method = methods[length];
|
||||
|
||||
// Only stub undefined methods.
|
||||
if (!console[method]) {
|
||||
console[method] = noop;
|
||||
}
|
||||
}
|
||||
}());
|
10
templates/analytics.html
Normal file
10
templates/analytics.html
Normal file
@ -0,0 +1,10 @@
|
||||
{% if GOOGLE_ANALYTICS %}
|
||||
<script>
|
||||
(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');
|
||||
</script>
|
||||
{% endif %}
|
22
templates/archives.html
Normal file
22
templates/archives.html
Normal file
@ -0,0 +1,22 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Archives{% endblock %}
|
||||
{% block description %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="uk-width-medium-4-5">
|
||||
<h1>Archives</h1>
|
||||
|
||||
{% for article in dates %}
|
||||
<article class="uk-article">
|
||||
<a href="{{ article.url }}" class="uk-article-title uk-link-muted">{{ article.title }}</a>
|
||||
<p class="uk-article-meta">{{ article.locale_date }}</p>
|
||||
<p class="uk-article-lead">{{ article.summary }}</p>
|
||||
<hr class="uk-article-divider">
|
||||
</article>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
60
templates/article.html
Normal file
60
templates/article.html
Normal file
@ -0,0 +1,60 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ article.title|striptags }}{% endblock %}
|
||||
{% block description %}{{ article.summary }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="mg-container-social uk-width-medium-1-10 uk-hidden-small">
|
||||
|
||||
{% if SHARE %}
|
||||
<div class="uk-panel" id="mg-panel-social">
|
||||
<ul class="uk-nav uk-nav-side">
|
||||
<li>
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u={{ SITEURL }}/{{ article.url }}" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;" taget="_blank" class="uk-button"><i class="uk-icon-facebook-square"></i> Share</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://twitter.com/intent/tweet?text={{ article.title|striptags|urlencode }}&url={{ SITEURL }}/{{ article.url }}&via={{ TWITTER_USERNAME }}" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" class="uk-button" target="_blank"><i class="uk-icon-twitter"></i> Tweet</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://plus.google.com/share?url={{ SITEURL }}/{{ article.url }}" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="_blank" class="uk-button"><i class="uk-icon-google-plus-square"></i> Share</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="uk-width-medium-7-10">
|
||||
|
||||
<article class="uk-article">
|
||||
<h1 class="uk-article-title">{{ article.title }}</h1>
|
||||
<p class="uk-article-meta"> {{ article.locale_date }} in <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% if DISQUS_SITENAME %}, <i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread"></a>{% endif %}</p>
|
||||
<p class="uk-article-lead">{{ article.summary }}</p>
|
||||
|
||||
{% if SHARE %}
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u={{ SITEURL }}/{{ article.url }}" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;" taget="_blank" class="uk-button uk-visible-small"><i class="uk-icon-facebook-square"></i> Share</a>
|
||||
<a href="https://twitter.com/intent/tweet?text={{ article.title|striptags|urlencode }}&url={{ SITEURL }}/{{ article.url }}&via={{ TWITTER_USERNAME }}" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" class="uk-button uk-visible-small" target="_blank"><i class="uk-icon-twitter"></i> Tweet</a>
|
||||
<a href="https://plus.google.com/share?url={{ SITEURL }}/{{ article.url }}" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="_blank" class="uk-button uk-visible-small"><i class="uk-icon-google-plus-square"></i> Share</a>
|
||||
{% endif %}
|
||||
|
||||
{{ article.content }}
|
||||
<hr class="uk-article-divider">
|
||||
</article>
|
||||
|
||||
{% if DISQUS_SITENAME %}
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
||||
var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname
|
||||
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = '//' + 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>
|
||||
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
3
templates/author.html
Normal file
3
templates/author.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}{{ SITENAME }} | {{ author }}{% endblock %}
|
||||
{% block description %}{% endblock %}
|
0
templates/authors.html
Normal file
0
templates/authors.html
Normal file
197
templates/base.html
Normal file
197
templates/base.html
Normal file
@ -0,0 +1,197 @@
|
||||
<!DOCTYPE html>
|
||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" prefix="og: http://ogp.me/ns#"> <![endif]-->
|
||||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" prefix="og: http://ogp.me/ns#"> <![endif]-->
|
||||
<!--[if IE 8]> <html class="no-js lt-ie9" prefix="og: http://ogp.me/ns#"> <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" prefix="og: http://ogp.me/ns#"> <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{% block title %}{{ SITENAME }}{%endblock%}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="{% block description %}{{ SITE_DESCRIPTION }}{% endblock %}">
|
||||
<meta name="author" content="{{ AUTHOR }}">
|
||||
<meta name="copyright" content="{{ AUTHOR }}">
|
||||
{% if article %}
|
||||
<meta property="og:title" content="{{ article.title|capitalize }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}" />
|
||||
{% if article.summary %}
|
||||
<meta property="og:description" content="{{ article.summary }}" />
|
||||
{% endif %}
|
||||
{% if article.date %}
|
||||
<meta property="og:article:published_time" content="{{ article.date }}">
|
||||
{% endif %}
|
||||
{% if article.modified %}
|
||||
<meta property="og:article:modified_time" content="{{ article.modified }}">
|
||||
{% endif %}
|
||||
{% if article.author %}
|
||||
<meta property="og:article:author" content="{{ article.author }}">
|
||||
{% endif %}
|
||||
{% for tag in article.tags %}
|
||||
<meta property="og:article:tag" content="{{ tag }}">
|
||||
{% endfor %}
|
||||
{% elif page %}
|
||||
<meta property="og:title" content="{{ page.title|capitalize }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="{{ SITEURL }}/{{ page.url }}" />
|
||||
{% else %}
|
||||
<meta property="og:title" content="{{ SITENAME }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="{{ SITEURL }}" />
|
||||
{% endif %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/static/{{ OG_IMAGE }}" />
|
||||
<meta property="og:image:type" content="{{ OG_IMAGE_TYPE }}" />
|
||||
|
||||
<link href="{{ SITEURL }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} ATOM Feed"/>
|
||||
<link href='//fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/uikit/2.15.0/css/uikit.min.css">
|
||||
<link rel="stylesheet" href="/theme/css/solarized.css">
|
||||
<link rel="stylesheet" href="/theme/css/main.css">
|
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!--[if lt IE 7]>
|
||||
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||
<![endif]-->
|
||||
<header class=" mg-header uk-navbar uk-navbar-attached">
|
||||
|
||||
<div class="uk-container uk-container-center">
|
||||
<div class="uk-grid" data-uk-grid-margin>
|
||||
|
||||
<a class="mg-brand uk-navbar-brand uk-hidden-small" href="{{ SITEURL }}">
|
||||
{% if LOGO %}
|
||||
<img src="/static/{{ LOGO }}" alt="{{ SITENAME }}" title="{{ SITENAME }}" class="uk-margin uk-margin-remove">
|
||||
{% else %}
|
||||
{{ SITENAME }}
|
||||
{% endif %}
|
||||
</a>
|
||||
<div class="mg-tagline uk-navbar-content uk-hidden-small">{% if SITESUBTITLE %}{{ SITESUBTITLE }}{% endif %}</div>
|
||||
<a class="uk-navbar-toggle uk-visible-small" href="#mg-offcanvas" data-uk-offcanvas></a>
|
||||
<a class="mg-brand uk-navbar-brand uk-navbar-center uk-visible-small" href="{{ SITEURL }}">
|
||||
{% if LOGO %}
|
||||
<img src="/static/{{ LOGO }}" alt="{{ SITENAME }}" title="{{ SITENAME }}" class="uk-margin uk-margin-remove">
|
||||
{% else %}
|
||||
{{ SITENAME }}
|
||||
{% endif %}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="mg-main">
|
||||
|
||||
<div class="uk-container uk-container-center">
|
||||
|
||||
<div class="uk-grid" data-uk-grid-margin>
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
<div class="uk-width-medium-1-5 uk-hidden-small">
|
||||
<div class="uk-panel uk-panel-box">
|
||||
<!--<h3 class="uk-panel-title">Categories</h3> -->
|
||||
<ul class="uk-nav uk-nav-side">
|
||||
<li class="uk-nav-header">Categories</li>
|
||||
{% for cat, _ in categories %}
|
||||
<li {% if cat == category %}class="uk-active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
|
||||
{% endfor %}
|
||||
{% if DISPLAY_PAGES_ON_MENU != False %}
|
||||
<li class="uk-nav-header">Pages</li>
|
||||
|
||||
{% for p in PAGES %}
|
||||
<li {% if p == page %}class="uk-active"{% endif %}>
|
||||
<a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
<li class="uk-nav-divider"></li>
|
||||
<li><a href="{{ SITEURL }}/{{ ARCHIVES_URL }}">Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="uk-panel uk-panel-box">
|
||||
<h3 class="uk-panel-title">Receive Updates</h3>
|
||||
<a rel="alternate" type="application/atom+xml" href="{{ SITEURL }}/{{ FEED_ATOM}}" class="mg-feed"><i class="uk-icon-rss uk-icon-medium"></i> ATOM</a>
|
||||
</div>
|
||||
|
||||
{% if SOCIAL %}
|
||||
<div class="uk-panel uk-panel-box">
|
||||
<h3 class="uk-panel-title">Contacts</h3>
|
||||
{% for icon, link in SOCIAL %}
|
||||
<a href="{{ link }}">
|
||||
<i class="uk-icon-{{ icon }} uk-icon-medium"></i>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<footer class="mg-footer">
|
||||
<div class="uk-container uk-container-center uk-text-center">
|
||||
|
||||
<div class="mg-icons-small uk-subnav uk-visible-small">
|
||||
<li><a rel="alternate" type="application/atom+xml" href="{{ SITEURL }}/{{ FEED_ATOM }}" class="uk-icon-button uk-icon-rss"></a></li>
|
||||
{% if SOCIAL %}
|
||||
{% for icon, link in SOCIAL %}
|
||||
<li>
|
||||
<a href="{{ link }}" class="uk-icon-button uk-icon-{{ icon.replace("-square", "") }}"></a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="mg-author uk-panel">
|
||||
<p>{{ FOOTER }}</p>
|
||||
|
||||
<p>Powered by <a href="http://blog.getpelican.com">Pelican</a>. Theme <a href="">mg</a> by <a href="https://github.com/lucachr">Luca Chiricozzi</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<div id="mg-offcanvas" class="uk-offcanvas">
|
||||
<div class="uk-offcanvas-bar">
|
||||
<ul class="uk-nav uk-nav-offcanvas" data-uk-nav>
|
||||
<li class="uk-nav-header">Categories</li>
|
||||
{% for cat, _ in categories %}
|
||||
<li {% if cat == category %}class="uk-active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
|
||||
{% endfor %}
|
||||
{% if DISPLAY_PAGES_ON_MENU != False %}
|
||||
<li class="uk-nav-header">Pages</li>
|
||||
{% for p in PAGES %}
|
||||
<li {% if p == page %}class="uk-active"{% endif %}>
|
||||
<a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
<li class="uk-nav-divider"></li>
|
||||
<li><a href="{{ SITEURL }}/{{ ARCHIVES_URL }}">Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/uikit/2.15.0/js/uikit.min.js"></script>
|
||||
<script src="/theme/js/jquery.sticky-kit.min.js"></script>
|
||||
|
||||
<script src="/theme/js/plugins.js"></script>
|
||||
<script src="/theme/js/main.js"></script>
|
||||
|
||||
{% include 'disqus_count.html' %}
|
||||
{% include 'analytics.html' %}
|
||||
</body>
|
||||
</html>
|
||||
|
22
templates/categories.html
Normal file
22
templates/categories.html
Normal file
@ -0,0 +1,22 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Categories{% endblock %}
|
||||
{% block description %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="uk-width-medium-4-5">
|
||||
<h1>Categories</h1>
|
||||
{% for category, articles in categories %}
|
||||
<h2><a href="{{ SITEURL}}/{{ category.url}}" class="uk-link-muted">{{ category|capitalize }}</a></h2>
|
||||
{% for article in articles %}
|
||||
|
||||
<article class="uk-article">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" class="uk-article-title uk-link-muted">{{ article.title }}</a>
|
||||
<p class="uk-article-meta">{{ article.locale_date}} • <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></p>
|
||||
<p class="uk-article-lead">{{ article.summary }}</p>
|
||||
<hr class="uk-article-divider">
|
||||
</article>
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
3
templates/category.html
Normal file
3
templates/category.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}{{ SITENAME }} | {{ category|capitalize }}{% endblock %}
|
||||
{% block description %}{% endblock %}
|
13
templates/disqus_count.html
Normal file
13
templates/disqus_count.html
Normal file
@ -0,0 +1,13 @@
|
||||
<script type="text/javascript">
|
||||
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
||||
var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname
|
||||
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function () {
|
||||
var s = document.createElement('script'); s.async = true;
|
||||
s.type = 'text/javascript';
|
||||
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
|
||||
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
||||
}());
|
||||
</script>
|
||||
|
31
templates/index.html
Normal file
31
templates/index.html
Normal file
@ -0,0 +1,31 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content_title %}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="uk-width-medium-4-5">
|
||||
|
||||
{% if articles %}
|
||||
{% for article in articles %}
|
||||
|
||||
<article class="uk-article">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" class="uk-article-title uk-link-muted">{{ article.title }}</a>
|
||||
<p class="uk-article-meta">{{ article.locale_date}} • <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% if DISQUS_SITENAME %} • <i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread"></a>{% endif %}</p>
|
||||
</p>
|
||||
<p class="uk-article-lead">{{ article.summary }}</p>
|
||||
<p>{{ ' '.join(article.content.split(' ')[0:100])|striptags }}...</p>
|
||||
<a href="{{ SITEURL }}/{{ article.url }}">Read More</a>
|
||||
<hr class="uk-article-divider">
|
||||
</article>
|
||||
|
||||
{% if DEFAULT_PAGINATION and articles_paginator.num_pages > 1 %}
|
||||
<ul class="uk-pagination">
|
||||
{% if articles_previous_page %}<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}"><i class="uk-icon-angle-double-left"></i></a></li>{% endif %}
|
||||
{% if articles_previous_page %}<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">{{ articles_previous_page.number }}</a></li>{% endif %}
|
||||
<li class="uk-active"><span>{{ articles_page.number }}</span></li>
|
||||
{% if articles_next_page %}<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}"><i class="uk-icon-angle-double-right"></i></a></li>{% endif %}
|
||||
{% if articles_next_page %}<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">{{ articles_next_page.number }}</a></li>{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
15
templates/page.html
Normal file
15
templates/page.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ page.title|capitalize }}{% endblock %}
|
||||
{% block description %}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="uk-width-medium-4-5">
|
||||
<h1 class="uk-heading-large">{{ page.title }}</h1>
|
||||
|
||||
{% block page_content %}
|
||||
{% endblock %}
|
||||
|
||||
{{ page.content }}
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
32
templates/sitemap.html
Normal file
32
templates/sitemap.html
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
|
||||
{% for article in articles %}
|
||||
<url>
|
||||
<loc>{{ SITEURL }}/{{ article.url }}</loc>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
|
||||
{% for translation in article.translations %}
|
||||
<url>
|
||||
<loc>{{ SITEURL }}/{{ translation.url }}</loc>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% for page in pages %}
|
||||
<url>
|
||||
<loc>{{ SITEURL }}/{{ page.url }}</loc>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
|
||||
{% for translation in page.translations %}
|
||||
<url>
|
||||
<loc>{{ SITEURL }}/{{ translation.url }}</loc>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
</urlset>
|
3
templates/tag.html
Normal file
3
templates/tag.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}{{ SITENAME }} | {{ tag|capitalize }}{% endblock %}
|
||||
{% block description %}{% endblock %}
|
14
templates/tags.html
Normal file
14
templates/tags.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Tags{% endblock %}
|
||||
{% block description %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="uk-width-medium-4-5">
|
||||
<h1>Tags</h1>
|
||||
<ul>
|
||||
{% for tag, articles in tags|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user