diff options
Diffstat (limited to 'aboutwilson/templates')
-rw-r--r-- | aboutwilson/templates/analytics.html | 14 | ||||
-rw-r--r-- | aboutwilson/templates/archives.html | 20 | ||||
-rw-r--r-- | aboutwilson/templates/article.html | 37 | ||||
-rw-r--r-- | aboutwilson/templates/author.html | 2 | ||||
-rw-r--r-- | aboutwilson/templates/authors.html | 0 | ||||
-rw-r--r-- | aboutwilson/templates/base.html | 111 | ||||
-rw-r--r-- | aboutwilson/templates/categories.html | 11 | ||||
-rw-r--r-- | aboutwilson/templates/category.html | 16 | ||||
-rw-r--r-- | aboutwilson/templates/disqus.html | 14 | ||||
-rw-r--r-- | aboutwilson/templates/github.html | 3 | ||||
-rw-r--r-- | aboutwilson/templates/index.html | 36 | ||||
-rw-r--r-- | aboutwilson/templates/page.html | 8 | ||||
-rw-r--r-- | aboutwilson/templates/pagination.html | 21 | ||||
-rw-r--r-- | aboutwilson/templates/tag.html | 16 | ||||
-rw-r--r-- | aboutwilson/templates/tags.html | 45 | ||||
-rw-r--r-- | aboutwilson/templates/twitter.html | 3 |
16 files changed, 357 insertions, 0 deletions
diff --git a/aboutwilson/templates/analytics.html b/aboutwilson/templates/analytics.html new file mode 100644 index 0000000..ec365b8 --- /dev/null +++ b/aboutwilson/templates/analytics.html @@ -0,0 +1,14 @@ +{% if GOOGLE_ANALYTICS %} +<script> +(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','//www.google-analytics.com/analytics.js','ga'); + +ga('create', 'UA-4510606-3', 'aboutwilson.net'); +ga('require', 'displayfeatures'); +ga('require', 'linkid', 'linkid.js'); +ga('send', 'pageview'); + +</script> +{% endif %}
\ No newline at end of file diff --git a/aboutwilson/templates/archives.html b/aboutwilson/templates/archives.html new file mode 100644 index 0000000..2078a6c --- /dev/null +++ b/aboutwilson/templates/archives.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% block description %}The archives page, find old stuff organized by date.{% endblock %} +{% block title %}Archive — {{ SITENAME }}{% endblock %} +{% block content %} + +<h1>Archives</h1> + +<table class="table"> + <tbody> + {% for article in dates %} + <tr> + <td>{{ article.date.strftime("%d %b %Y") }}</td> + <td><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title }}</a></td> + </tr> + {% endfor %} + </tbody> +</table> + + +{% endblock %} diff --git a/aboutwilson/templates/article.html b/aboutwilson/templates/article.html new file mode 100644 index 0000000..73dd6f4 --- /dev/null +++ b/aboutwilson/templates/article.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} +{% block description %}Title: {{ article.title }}; Date: {{ article.date|strftime('%Y-%m-%d') }}; Author: {{ article.author }}{% endblock %} +{% block title %}{{ article.title }} — {{ SITENAME }}{% endblock %} +{% block content %} +<div class="article" itemscope itemtype="http://schema.org/BlogPosting"> + <div class="text-center article-header"> + <h1 itemprop="name headline" class="article-title">{{ article.title }}</h1> + <span itemprop="author" itemscope itemtype="http://schema.org/Person"> + <h4 itemprop="name">{{article.author or "Wilson Freitas"}}</h4> + </span> + <time datetime="{{ article.date.isoformat() }}" itemprop="datePublished">{{ article.locale_date }}</time> + </div> + {% if article.category %} + <div> + Category: + <span itemprop="articleSection"> + <a href="{{ SITEURL }}/{{ article.category.url }}" rel="category">{{ article.category }}</a> + </span> + </div> + {% endif %} + {% if article.tags %} + <div> + Tags: + {% for tag in article.tags %} + <span itemprop="keywords"> + <a href="{{ SITEURL }}/{{ tag.url }}" rel="tag">{{ tag }}</a> + </span> + {% endfor %} + </div> + {% endif %} + <div itemprop="articleBody" class="article-body">{{ article.content }}</div> + <hr> + <h2>Comments</h2> + {% include "twitter.html" %} + {% include 'disqus.html' %} +</div> +{% endblock %} diff --git a/aboutwilson/templates/author.html b/aboutwilson/templates/author.html new file mode 100644 index 0000000..5b41b41 --- /dev/null +++ b/aboutwilson/templates/author.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} <small>{{ author }}</small>{% endblock %}
\ No newline at end of file diff --git a/aboutwilson/templates/authors.html b/aboutwilson/templates/authors.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/aboutwilson/templates/authors.html diff --git a/aboutwilson/templates/base.html b/aboutwilson/templates/base.html new file mode 100644 index 0000000..f89c4a9 --- /dev/null +++ b/aboutwilson/templates/base.html @@ -0,0 +1,111 @@ +<!DOCTYPE html> +<html lang="{{ DEFAULT_LANG }}"> +<head> + <meta charset="utf-8"> + <title>{% block title %}{{ SITENAME }}{% endblock %}</title> + <meta name="description" content="{% block description %}Coding, scientific development, finance, data analysis, visualization, statistics, and machine learning{% endblock %}"> + <meta name="author" content="{{ AUTHOR }}"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> + <!--[if lt IE 9]> + <script src="{{ SITEURL }}/theme/html5.js"></script> + <![endif]--> + <link href="{{ SITEURL }}/theme/css/ipython.css" rel="stylesheet"> + <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> + <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"> + <link href="//maxcdn.bootstrapcdn.com/bootswatch/3.2.0/simplex/bootstrap.min.css" rel="stylesheet"> + <link href="{{ SITEURL }}/theme/css/local.css" rel="stylesheet"> + <link href="{{ SITEURL }}/theme/css/pygments.css" rel="stylesheet"> + {% block head %}{% endblock %} +</head> +<body> +<div class="container"> + <div class="page-header"> + <h1><a href="{{SITEURL}}">{{ SITENAME }}</a> + <br><small>what we observe is not the nature itself but the nature exposed to our method of questioning</small></h1> + </div> + <div class="row"> + <div class="col-md-8 col-md-offset-2"> + {% block content %}{% endblock %} + </div> + </div> {# End row #} + <!-- <hr> --> +</div> <!-- /container --> +<footer class="aw-footer bg-danger"> + <div class="container"> <!-- footer --> + <div class="row"> + <div class="col-md-10 col-md-offset-1"> + <div class="row"> + <div class="col-md-3"> + <h4>Navigation</h4> + <ul class="list-unstyled my-list-style"> + <li><a href="{{SITEURL}}">{{ SITENAME }}</a></li> + {% for title, link in MENUITEMS %} + <li><a href="{{ SITEURL }}/{{ link }}"><i class="fa fa-{{ title }} "></i> {{title}}</a></li> + {% endfor %} + {% if DISPLAY_PAGES_ON_MENU %} + {% for page in PAGES %} + <li><a href="{{ SITEURL }}/{{ page.url }}"><i class="fa fa-{{ page.title }} "></i> {{page.title}}</a></li> + {% endfor %} + {% endif %} + <li><a href="{{ SITEURL }}/feeds/rss.xml"><i class="fa fa-rss "></i> rss</a></li> + </ul> + </div> + <div class="col-md-3"> + <h4>Author</h4> + <ul class="list-unstyled my-list-style"> + <li><a href="http://aboutwilson.net">Homepage</a></li> + <li><a href="http://github.com/wilsonfreitas">Github</a></li> + <li><a href="https://twitter.com/aboutwilson">Twitter</a></li> + <li><a href="https://plus.google.com/114469936125336696794?rel=author">Google+</a></li> + <li><a href="https://www.facebook.com/wnfreitas">Facebook</a></li> + <li><a href="http://www.linkedin.com/pub/wilson-freitas/a/572/609">Linked-in</a></li> + </ul> + </div> + <div class="col-md-3"> + <h4>Categories</h4> + <ul class="list-unstyled my-list-style"> + {% for cat, art in categories %} + <li><a href="{{SITEURL}}/category/{{cat | replace(" ", "-") }}.html">{{cat}} ({{art | count}})</a></li> + {% endfor %} + </ul> + </div> + <div class="col-md-3"> + <h4>Links</h4> + <ul class="list-unstyled my-list-style"> + <li><a href="http://www.r-bloggers.com/">R-bloggers</a></li> + </ul> + </div> + </div> + </div> + </div> + </div> +</footer> +<div class="container"> + <div class="row"> + <div class="col-md-12 text-center center-block aw-bottom"> + <p>© {{ AUTHOR }} 2014</p> + <p>Powered by Pelican</p> + </div> + </div> +</div> +<!-- JavaScript --> +<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> +<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> +<script type="text/javascript"> +jQuery(document).ready(function($) { + $("div.collapseheader").click(function () { + $header = $(this).children("span").first(); + $codearea = $(this).children(".input_area"); + $codearea.slideToggle(500, function () { + $header.text(function () { + return $codearea.is(":visible") ? "Collapse Code" : "Expand Code"; + }); + }); + }); +}); +</script> +{% include "analytics.html" %} +{% include "github.html" %} +</body> +</html> diff --git a/aboutwilson/templates/categories.html b/aboutwilson/templates/categories.html new file mode 100644 index 0000000..33fb24b --- /dev/null +++ b/aboutwilson/templates/categories.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% block description %}The Categories page lists all categories used to classify the posts. Each post is categorized by a category helping readers find out easily what they are looking for.{% endblock %} +{% block title %}Categories — {{ SITENAME }}{% endblock %} +{% block content %} +<h1>Categories</h1> +<ul> +{% for category, articles in categories %} + <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</li> +{% endfor %} +</ul> +{% endblock %} diff --git a/aboutwilson/templates/category.html b/aboutwilson/templates/category.html new file mode 100644 index 0000000..48ffca9 --- /dev/null +++ b/aboutwilson/templates/category.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% block description %}All posts which refer to category {{ category }}{% endblock %} +{% block title %}{{ category }} — {{ SITENAME }}{% endblock %} +{% block content %} +<h1>Category <small>{{category}}</small></h1> +<table class="table"> + <tbody> + {% for article in articles %} + <tr> + <td>{{ article.date.strftime("%d %b %Y") }}</td> + <td><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title }}</a></td> + </tr> + {% endfor %} + </tbody> +</table> +{% endblock %}
\ No newline at end of file diff --git a/aboutwilson/templates/disqus.html b/aboutwilson/templates/disqus.html new file mode 100644 index 0000000..ddaaedd --- /dev/null +++ b/aboutwilson/templates/disqus.html @@ -0,0 +1,14 @@ +{% if DISQUS_SITENAME %} +<div id="disqus_thread"></div> +<script type="text/javascript"> + var disqus_shortname = '{{ DISQUS_SITENAME }}'; + var disqus_title = '{{ article.title }}'; + + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); +</script> +<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> +{% endif %} diff --git a/aboutwilson/templates/github.html b/aboutwilson/templates/github.html new file mode 100644 index 0000000..4c3d935 --- /dev/null +++ b/aboutwilson/templates/github.html @@ -0,0 +1,3 @@ +{% if GITHUB_URL %} +<a href="{{ GITHUB_URL }}"><img style="position: absolute; top: 40px; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" alt="Fork me on GitHub" /></a> +{% endif %} diff --git a/aboutwilson/templates/index.html b/aboutwilson/templates/index.html new file mode 100644 index 0000000..6087d5f --- /dev/null +++ b/aboutwilson/templates/index.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} +{% block content_title %}{% endblock %} +{% block content %} +{% if articles %} +{% for article in articles_page.object_list %} +<div class="article" itemscope itemtype="http://schema.org/BlogPosting"> + <a href="{{ SITEURL }}/{{ article.url }}"> + <h2 itemprop="name headline">{{ article.title }}</h2> + </a> + <time datetime="{{ article.date.isoformat() }}" itemprop="datePublished">{{ article.locale_date }}</time> + — + <span itemprop="author" itemscope="" itemtype="http://schema.org/Person"> + <span itemprop="name">{{article.author or "Wilson Freitas"}}</span> + </span> + <div class="summary">{{ article.summary }}</div> + {% if article.category %} + Category: + <span itemprop="articleSection"> + <a href="{{ SITEURL }}/{{ article.category.url }}" rel="category">{{ article.category }}</a> + </span> + {% endif %} + Tags: + {% if article.tags %} + {% for tag in article.tags %} + <span itemprop="keywords"> + <a href="{{ SITEURL }}/{{ tag.url }}" rel="tag">{{ tag }}</a> + </span> + {% endfor %} + {% endif %} +</div> +<hr> +{% endfor %} {# For article #} +{% include 'pagination.html' %} +{% endif %} {# If articles #} +{% endblock content %} + diff --git a/aboutwilson/templates/page.html b/aboutwilson/templates/page.html new file mode 100644 index 0000000..fb7c0ef --- /dev/null +++ b/aboutwilson/templates/page.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% block description %}{{ page.description }}{% endblock %} +{% block title %}{{ page.title }} — {{ SITENAME }} {% endblock %} +{% block content %} +<section id="content" class="body"> + {{ page.content }} +</section> +{% endblock %} diff --git a/aboutwilson/templates/pagination.html b/aboutwilson/templates/pagination.html new file mode 100644 index 0000000..6783ae5 --- /dev/null +++ b/aboutwilson/templates/pagination.html @@ -0,0 +1,21 @@ +<div class="pagination"> +<ul> +{% if articles_page.has_previous() %} +{% set num = articles_page.previous_page_number() %} + <li class="prev"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">← Previous</a></li> +{% else %} + <li class="prev disabled"><a href="#">← Previous</a></li> +{% endif %} + +{% for num in range( 1, 1 + articles_paginator.num_pages ) %} + <li class="{{ 'active' if num == articles_page.number else '' }}"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">{{ num }}</a></li> +{% endfor %} + +{% if articles_page.has_next() %} + <li class="next"><a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">Next →</a></li> +{% else %} + <li class="next disabled"><a href="#">→ Next</a></li> +{% endif %} + +</ul> +</div> diff --git a/aboutwilson/templates/tag.html b/aboutwilson/templates/tag.html new file mode 100644 index 0000000..76f6e3a --- /dev/null +++ b/aboutwilson/templates/tag.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% block description %}All posts which refer to tag {{ tag }}{% endblock %} +{% block title %}{{ tag }} — {{ SITENAME }}{% endblock %} +{% block content %} +<h1>Tag <small>{{tag}}</small></h1> +<table class="table"> + <tbody> + {% for article in articles %} + <tr> + <td>{{ article.date.strftime("%d %b %Y") }}</td> + <td><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title }}</a></td> + </tr> + {% endfor %} + </tbody> +</table> +{% endblock %} diff --git a/aboutwilson/templates/tags.html b/aboutwilson/templates/tags.html new file mode 100644 index 0000000..dc6da95 --- /dev/null +++ b/aboutwilson/templates/tags.html @@ -0,0 +1,45 @@ +{% extends "base.html" %} +{% block description %}The Tags page lists all tags used to classify the posts. Each post has at least one tag helping readers find out easily what they are looking for.{% endblock %} +{% block title %}Tags — {{ SITENAME }}{% endblock %} +{% block head %} +<style type="text/css" media="screen"> +ul.tagcloud { + list-style: none; + padding: 0; + padding-top: 7em; + padding-bottom: 7em; + width: 50%; + margin-left: 25%; +} + +ul.tagcloud li { + display: inline-block; +} + +li.tag-1 { + font-size: 150%; +} + +li.tag-2 { + font-size: 120%; +} + +li.tag-3 { + font-size: 100%; +} + +li.tag-4 { + font-size: 80%; +} +</style> +{% endblock %} +{% block content %} +<h1>Tags</h1> +<div class="text-center"> +<ul class="tagcloud"> + {% for tag in tag_cloud %} + <li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li> + {% endfor %} +</ul> +</div> +{% endblock %} diff --git a/aboutwilson/templates/twitter.html b/aboutwilson/templates/twitter.html new file mode 100644 index 0000000..c6b159f --- /dev/null +++ b/aboutwilson/templates/twitter.html @@ -0,0 +1,3 @@ +{% if TWITTER_USERNAME %} +<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="{{TWITTER_USERNAME}}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> +{% endif %}
\ No newline at end of file |