diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/article.html | 45 | ||||
-rw-r--r-- | templates/base.html | 107 | ||||
-rw-r--r-- | templates/index.html | 17 | ||||
-rw-r--r-- | templates/page.html | 17 |
4 files changed, 95 insertions, 91 deletions
diff --git a/templates/article.html b/templates/article.html index d558183..630323b 100644 --- a/templates/article.html +++ b/templates/article.html @@ -1,4 +1,14 @@ {% extends "base.html" %} +{% block menu %} + | <a href="{{ SITEURL }}">Home</a> | + {% for p in PAGES %} + | <a href="{{ SITEURL}}/{{p.url}}">{{p.title}}</a> | + {% endfor %} +{% endblock %} +{% block article %} +<h1><a href="{{ SITEURL }}/{{ article.url}}">{{ + article.title |striptags }}</a></h1> +{% endblock %} {% block head %} {{ super() }} {% for keyword in article.keywords %} @@ -12,37 +22,34 @@ {% for tag in article.tags %} <meta name="tags" content="{{tag}}" /> {% endfor %} - {% endblock %} {% block content %} <section id="content" class="body"> - <header> - <h2 class="entry-title"> - <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" - title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> - {% import 'translations.html' as translations with context %} - {{ translations.translations_for(article) }} - </header> <footer class="post-info"> - <abbr class="published" title="{{ article.date.isoformat() }}"> - {{ article.locale_date }} + <p> Posted on {{ article.date|strftime('%b %d, %Y')}} + {% if article.authors %} By {{ article.author }} + {% endif %} + {% if article.category %} under {{ article.category }} + {% endif %} + </p> </abbr> - {% if article.modified %} + {% if article.modified %} <abbr class="modified" title="{{ article.modified.isoformat() }}"> - {{ article.locale_modified }} + Modified on {{ article.locale_modified }} </abbr> - {% endif %} - {% if article.authors %} - <address class="vcard author"> - By {% for author in article.authors %} - <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> - {% endfor %} - </address> {% endif %} </footer><!-- /.post-info --> <div class="entry-content"> {{ article.content }} </div><!-- /.entry-content --> + <div id="footer"> + <p> + <italic>Tagged as: + {% for t in article.tags|sort %} + {{t}}, + {% endfor %} + </italic> + </p> </section> {% endblock %} diff --git a/templates/base.html b/templates/base.html index a1839b2..0b1808b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,64 +1,57 @@ <!DOCTYPE html> <html lang="{{ DEFAULT_LANG }}"> <head> - {% block head %} - <title>{% block title %}{{ SITENAME }}{% endblock title %}</title> - <meta charset="utf-8" /> - {% if FEED_ALL_ATOM %} - <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" /> - {% endif %} - {% if FEED_ALL_RSS %} - <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" /> - {% endif %} - {% if FEED_ATOM %} - <link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" /> - {% endif %} - {% if FEED_RSS %} - <link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" /> - {% endif %} - {% if CATEGORY_FEED_ATOM and category %} - <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" /> - {% endif %} - {% if CATEGORY_FEED_RSS and category %} - <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(category.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" /> - {% endif %} - {% if TAG_FEED_ATOM and tag %} - <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" /> - {% endif %} - {% if TAG_FEED_RSS and tag %} - <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" /> - {% endif %} - {% endblock head %} - <link rel="stylesheet" type="text/css" href="/theme/default.css" /> + {% block head %} + <title>{% block title %}Vasudev Kamath - {{ SITENAME }}{% endblock title %}</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + {% if FEED_ALL_ATOM %} + <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" /> + {% endif %} + {% if FEED_ALL_RSS %} + <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" /> + {% endif %} + {% if FEED_ATOM %} + <link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" /> + {% endif %} + {% if FEED_RSS %} + <link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" /> + {% endif %} + {% if CATEGORY_FEED_ATOM and category %} + <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" /> + {% endif %} + {% if CATEGORY_FEED_RSS and category %} + <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(category.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" /> + {% endif %} + {% if TAG_FEED_ATOM and tag %} + <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" /> + {% endif %} + {% if TAG_FEED_RSS and tag %} + <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" /> + {% endif %} + <link rel="stylesheet" type="text/css" href="/theme/css/pygments.css"/> + <link rel="stylesheet" type="text/css" href="/theme/css/default.css"/> + {% endblock head %} </head> -<body id="index" class="home"> - <header id="banner" class="body"> - <h1><a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a></h1> - </header><!-- /#banner --> - <nav id="menu"><ul> - {% for title, link in MENUITEMS %} - <li><a href="{{ link }}">{{ title }}</a></li> - {% endfor %} - {% if DISPLAY_PAGES_ON_MENU %} - {% for p in PAGES %} - <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li> - {% endfor %} - {% else %} - {% if DISPLAY_CATEGORIES_ON_MENU %} - {% for cat, null in categories %} - <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li> - {% endfor %} - {% endif %} - {% endif %} - </ul></nav><!-- /#menu --> - {% block content %} - {% endblock %} - <footer id="contentinfo" class="body"> - <address id="about" class="vcard body"> - Proudly powered by <a href="http://getpelican.com/">Pelican</a>, - which takes great advantage of <a href="http://python.org">Python</a>. - </address><!-- /#about --> - </footer><!-- /#contentinfo --> +<body> + <div id="header" class="body"> + <div id="navigation"> + {% block menu %} + {% endblock %} + </div> + {% block article %} + {% endblock %} + {% block page %} + {% endblock %} + </div> + <div id="content"> + {% block content %} + {% endblock %} + </div> + <hr/> + <div id="footer"> + Site Proudly powered by <a href="http://getpelican.com/">Pelican</a> + </div> </body> </html> diff --git a/templates/index.html b/templates/index.html index 4bd8198..429020e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,4 +1,10 @@ {% extends "base.html" %} +{% block menu %} + {% for p in PAGES %} + | <a href="{{ SITEURL}}/{{p.url}}">{{p.title}}</a> | + {% endfor %} +<h1><a href="{{ SITEURL }}">Home</a></h1> +{% endblock %} {% block content %} <section id="content"> {% block content_title %} @@ -8,16 +14,7 @@ <ol id="post-list"> {% for article in articles_page.object_list %} <li><article class="hentry"> - <header> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header> - <footer class="post-info"> - <abbr class="published" title="{{ article.date.isoformat() }}"> {{ article.locale_date }} </abbr> - <address class="vcard author">By - {% for author in article.authors %} - <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> - {% endfor %} - </address> - </footer><!-- /.post-info --> - <div class="entry-content"> {{ article.summary }} </div><!-- /.entry-content --> + <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a> </article></li> {% endfor %} </ol><!-- /#posts-list --> diff --git a/templates/page.html b/templates/page.html index 5ceb779..b834171 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,12 +1,19 @@ {% extends "base.html" %} +{% block menu %} +| <a href="{{ SITEURL }}"> Home </a> | +{% for p in pages %} +{% if p.title != page.title %} +| <a href="{{ SITEURL }}/{{p.url}}"> {{p.title}} </a>| +{% endif %} +{% endfor %} +{% endblock %} +{% block page %} + <h1><a href={{ SITEURL }}/{{ page.url }}>{{ + page.title|striptags}} </a> </h1> +{% endblock %} {% block title %}{{ page.title }}{%endblock%} {% block content %} - <h1>{{ page.title }}</h1> - {% import 'translations.html' as translations with context %} - {{ translations.translations_for(page) }} - {{ page.content }} - {% if page.modified %} <p> Last updated: {{ page.locale_modified }} |