1
0
mirror of https://github.com/arsenetar/pelican-red.git synced 2026-01-23 15:11:38 +00:00

Update stylesheet and templates

Stylesheets update includes:
- Changing pygments class to default .codehilite
- Introduction of styles for new template components
- changing to a 16 column layout ( might revert back to 12 )
- reducing column gutter
Template work includes:
- removing extra ul from site_social
- adding creative commons handling to page_footer
- creating tags to display all tags with article counts
- adding the blogroll to base in aside
- starting work on tag
This commit is contained in:
2013-07-28 05:43:18 -04:00
parent 8edc544e36
commit 725cb8893f
9 changed files with 355 additions and 354 deletions

View File

@@ -1,11 +1,30 @@
{# Items to include at the bottom of a single page #}
{# PDF links #}
{% if PDF_PROCESSOR %}
<a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">PDF</a>
{% if PDF %}
<a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf" title="Download PDF"><i class="large icon-newspaper"></i></a>
{% endif %}
{# Copyright notice and link #}
{% if COPYRIGHTS and (COPYRIGHT_PAGE or page.copyright) %}
<a href="{{ COPYRIGHTS[page.copyright|default(DEFAULT_COPYRIGHT)][1] }}">{{ COPYRIGHTS[page.copyright|default(DEFAULT_COPYRIGHT)][0] }}</a>
{% set copyright = page.copyright|default(DEFAULT_COPYRIGHT) %}
<span>Page content licensed under:
<a href="{{ COPYRIGHTS[copyright][1] }}" title="{{ COPYRIGHTS[copyright][0] }}">
{# Output creative commons icons instead of text #}
{% if 'cc' in copyright %}
<i class="large icon-cc"></i>
<i class="large icon-cc-by"></i>
{% if 'nc' in copyright %}
<i class="large icon-cc-nc"></i>
{% endif %}
{% if 'sa' in copyright %}
<i class="large icon-cc-sa"></i>
{% elif 'nd' in copyright %}
<i class="large icon-cc-nd"></i>
{% endif %}
{% else %}
{{ COPYRIGHTS[copyright][0] }}
{% endif %}
</a>
</span>
{% endif %}
{# Comments #}
{% if ( page.comments == True or ( page.comments is not defined and COMMENTS_PAGE == True ) ) and DISQUS_SN %}

View File

@@ -1,5 +1,3 @@
<ul class="social-area">
{% for network, url in SOCIAL %}
<li><a href="{{ url }}"><i class="huge icon-{{ network }}"></i></a></li>
{% endfor %}
</ul>
{% for network, url in SOCIAL %}
<li><a href="{{ url }}" title="{{ network|title }}"><i class="huge icon-{{ network }}"></i></a></li>
{% endfor %}

View File

@@ -30,7 +30,7 @@
<script data="{{ SITEURL }}/theme/js/vendor/" src="{{ SITEURL }}/theme/js/vendor/custom.modernizr.js"></script>
</head>
<body>
<header class="fixed">
<header id="nav" class="contain-to-grid">
<nav class="top-bar">
<ul class="title-area">
<!-- Title Area -->
@@ -47,7 +47,7 @@
{% endfor %}
{% if DISPLAY_PAGES_ON_MENU != False %}
{% if DISPLAY_PAGES_ON_MENU == 'Compact' %}
<li class="has-dropdown"><a href="">Pages</a>
<li class="has-dropdown"><a href="#">Pages</a>
<ul class="dropdown">
{% for p in PAGES %}
<li {% if p == page %} class='active'{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
@@ -63,7 +63,7 @@
{% endif %}
{% if DISPLAY_CATEGORIES_ON_MENU != False %}
{% if DISPLAY_CATEGORIES_ON_MENU == 'Compact' %}
<li class="has-dropdown"><a href="{{ SITEURL }}/categories.html">Categories</a>
<li class="has-dropdown"><a href="#">Categories</a>
<ul class="dropdown">
{% for cat, null in categories %}
<li {% if cat == category %} class='active'{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat.name|title }}</a></li>
@@ -90,29 +90,42 @@
</header>
<!-- Content Area -->
<div class="row">
<section class="large-9 columns">
<header>
<h1>{% block content_title %}{% endblock %}</h1>
</header>
{% block content %}
<ul class="no-bullet">
{% for article in articles_page.object_list %}
<li><article>
<header><h1>{{ article.title|title }}</h1></header>
{{ article.summary }}
<footer>{{ article.author }}</footer>
</article></li>
{% endfor %}
<div id="main" class="large-13 columns push-3">
<section>
<header>
<h1>{% block content_title %}{% endblock %}</h1>
{% block content_image %}{% endblock %}
</header>
{% block content %}
<ul class="no-bullet">
{% for article in articles_page.object_list %}
<li><article>
<header><h1>{{ article.title|title }}</h1></header>
{{ article.summary }}
<footer>{{ article.author }}</footer>
</article></li>
{% endfor %}
</ul>
{% endblock %}
</section>
</div>
<div id="mainAside" class="large-3 columns pull-13">
<aside>
{% block aside %}
<h3>Blog Links</h3>
<ul id='blogRoll' class="no-bullet">
{% for link in LINKS %}
<li><a href="{{ link[1] }}">{{ link[0] }}</a></li>
{% endfor %}
</ul>
{% endblock %}
</section>
<aside class="large-3 columns">
{% block aside %}{% endblock %}
{% endblock %}
</aside>
</div>
</div>
</div>
<footer class="row">
<div class="large-12 columns" id="footer">
<span><a href="">&copy; {{ AUTHOR }} 2013</a></span>
<div class="large-16 columns" id="mainFooter">
<span>&copy; {{ AUTHOR }} 2013</span>
</div>
</footer>
<script src="{{ SITEURL }}/theme/js/app.js"></script>

View File

@@ -1,4 +1,3 @@
{% extends 'base.html' %}
{% block content %}
{% endblock %}
{% block title %}{{ (super) }} - {{ tag.name }} {% endblock %}
{% block content_title %}{{ tag.name }}{% endblock %}

View File

@@ -2,9 +2,14 @@
{% block title %}{{ super() }} - Tags{% endblock %}
{% block content_title %}Tags{% endblock %}
{% block content %}
<ul class="inline-list">
{% for tag in tags %}
<li>{{ tag.name }}</li>
{% endfor %}
<p>A list of all tags with article counts is below:</p>
<ul class="tag-list">
{% set all_tags = [] %}
{% for tag, articles in tags %}
{% if all_tags.append({'name': tag.name, 'url': tag.url, 'articles': articles|length() }) %}{% endif %}
{% endfor %}
{% for tag in all_tags | sort(reverse=True, attribute = 'articles') %}
<li><a href="{{ tag.url }}">{{ tag.name }}<span>{{ tag.articles }}</span></a></li>
{% endfor %}
</ul>
{% endblock %}