diff options
author | Justin Mayer <entroP@gmail.com> | 2013-12-27 15:07:31 -0800 |
---|---|---|
committer | Justin Mayer <entroP@gmail.com> | 2013-12-27 15:07:31 -0800 |
commit | eada362fff3da25eae0ca9283ac5fcb2f65e2e6a (patch) | |
tree | 87abcf89230988110cf9ddf5f49538107d0e9c4e /pelican-bootstrap3/templates | |
parent | 23701c6d825833372bff819bedfd9773dcc02160 (diff) | |
parent | f02333f6e1ad4da0a36d880037168e3eb0621c84 (diff) | |
download | pelican-themes-eada362fff3da25eae0ca9283ac5fcb2f65e2e6a.tar.gz |
Merge pull request #181 from DandyDev/pelican-bootstrap3-update
Updated pelican-bootstrap3 to v1.1
Diffstat (limited to 'pelican-bootstrap3/templates')
-rw-r--r-- | pelican-bootstrap3/templates/archives.html | 2 | ||||
-rw-r--r-- | pelican-bootstrap3/templates/article.html | 4 | ||||
-rw-r--r-- | pelican-bootstrap3/templates/base.html | 48 | ||||
-rw-r--r-- | pelican-bootstrap3/templates/categories.html | 2 | ||||
-rw-r--r-- | pelican-bootstrap3/templates/includes/footer.html | 16 | ||||
-rw-r--r-- | pelican-bootstrap3/templates/includes/github.html | 16 | ||||
-rw-r--r-- | pelican-bootstrap3/templates/includes/pagination.html | 21 | ||||
-rw-r--r-- | pelican-bootstrap3/templates/includes/sidebar.html | 55 | ||||
-rw-r--r-- | pelican-bootstrap3/templates/includes/taglist.html | 16 | ||||
-rw-r--r-- | pelican-bootstrap3/templates/index.html | 22 |
10 files changed, 126 insertions, 76 deletions
diff --git a/pelican-bootstrap3/templates/archives.html b/pelican-bootstrap3/templates/archives.html index 0f61031..927dde0 100644 --- a/pelican-bootstrap3/templates/archives.html +++ b/pelican-bootstrap3/templates/archives.html @@ -6,7 +6,7 @@ <dl> {% for article in dates %} <dt>{{ article.locale_date }}</dt> - <dd><a href='{{ article.url }}'>{{ article.title }}</a></dd> + <dd><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title }}</a></dd> {% endfor %} </dl> </section> diff --git a/pelican-bootstrap3/templates/article.html b/pelican-bootstrap3/templates/article.html index 8588bda..5b35765 100644 --- a/pelican-bootstrap3/templates/article.html +++ b/pelican-bootstrap3/templates/article.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}{{ article.title }}{% endblock %} +{% block title %}{{ article.title|striptags }}{% endblock %} {% block content %} <section id="content"> <article> @@ -7,7 +7,7 @@ <h1> <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" - title="Permalink to {{ article.title }}"> + title="Permalink to {{ article.title|striptags }}"> {{ article.title }} </a> </h1> diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html index aea298d..580db39 100644 --- a/pelican-bootstrap3/templates/base.html +++ b/pelican-bootstrap3/templates/base.html @@ -20,9 +20,9 @@ {% endif %} {% if article %} <meta property="og:type" content="article"/> - <meta property="og:title" content="{{ article.title }}"/> + <meta property="og:title" content="{{ article.title|striptags }}"/> <meta property="og:url" content="{{ SITEURL }}/{{ article.url }}"/> - <meta property="og:description" content="{{ article.summary|striptags|e }}"/> + <meta property="og:description" content="{{ article.summary|striptags }}"/> {% elif page %} <meta property="og:type" content="article"/> <meta property="og:title" content="{{ page.title }}"/> @@ -46,11 +46,16 @@ <link rel="stylesheet" href="{{ SITEURL }}/theme/css/bootstrap.min.css" type="text/css"/> {% endif %} <link href="{{ SITEURL }}/theme/css/font-awesome.min.css" rel="stylesheet"> - <link href="{{ SITEURL }}/theme/css/bootstrap-glyphicons.css" rel="stylesheet"> <link href="{{ SITEURL }}/theme/css/pygments.css" rel="stylesheet"> + {% if DOCUTIL_CSS %} + <link href="{{ SITEURL }}/theme/css/html4css1.css" rel="stylesheet"> + {% endif %} + {% if TYPOGRIFY %} + <link href="{{ SITEURL }}/theme/css/typogrify.css" rel="stylesheet"> + {% endif %} <link rel="stylesheet" href="{{ SITEURL }}/theme/css/style.css" type="text/css"/> <!-- JavaScript plugins (requires jQuery) --> - <script src="//code.jquery.com/jquery.min.js"></script> + <script src="http://code.jquery.com/jquery.js"></script> {% if FEED_ALL_ATOM %} <link href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" @@ -81,20 +86,22 @@ <li><a href="{{ link }}">{{ title }}</a></li> {% endfor %} {% if DISPLAY_PAGES_ON_MENU %} - {% for page in PAGES %} - <li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li> - {% endfor %} + {% for p in PAGES %} + <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}"> + {{ p.title }} + </a></li> + {% endfor %} {% endif %} {% if DISPLAY_CATEGORIES_ON_MENU %} {% for cat, null in categories %} <li {% if cat == category %}class="active"{% endif %}> - <a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a> + <a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | capitalize }}</a> </li> {% endfor %} {% endif %} </ul> <ul class="nav navbar-nav navbar-right"> - <li><a href="{{ SITEURL }}/archives.html"><i class="icon-th-list"></i>Archives</a></li> + <li><a href="{{ SITEURL }}/{{ ARCHIVES_URL | default('archives.html') }}"><i class="icon-th-list"></i>Archives</a></li> </ul> </div> <!-- /.navbar-collapse --> @@ -112,6 +119,7 @@ </div> </div> </div> +{% include 'includes/footer.html' %} <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="{{ SITEURL }}/theme/js/bootstrap.min.js"></script> @@ -119,5 +127,27 @@ <!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) --> <script src="{{ SITEURL }}/theme/js/respond.min.js"></script> {% include 'includes/disqus_script.html' %} + +{% if PIWIK_SITE_ID and PIWIK_URL %} + {% if PIWIK_SSL_URL is not defined %} + {% set PIWIK_SSL_URL = PIWIK_URL %} + {% endif %} +<!-- Piwik --> +<script type="text/javascript"> + var _paq = _paq || []; + _paq.push(["trackPageView"]); + _paq.push(["enableLinkTracking"]); + + (function() { + var u=(("https:" == document.location.protocol) ? "https://{{ PIWIK_SSL_URL }}/" : "http://{{ PIWIK_URL }}/"); + _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> +<!-- End Piwik Code --> +{% endif %} + </body> </html> diff --git a/pelican-bootstrap3/templates/categories.html b/pelican-bootstrap3/templates/categories.html index 2e1d523..fe3d6ac 100644 --- a/pelican-bootstrap3/templates/categories.html +++ b/pelican-bootstrap3/templates/categories.html @@ -6,7 +6,7 @@ <h1>Categories for {{ SITENAME }}</h1> <ul> {% for category, articles in categories %} - <li><a href="{{ category.url }}">{{ category }}</a></li> + <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li> {% endfor %} </ul> </section> diff --git a/pelican-bootstrap3/templates/includes/footer.html b/pelican-bootstrap3/templates/includes/footer.html new file mode 100644 index 0000000..7e2cf39 --- /dev/null +++ b/pelican-bootstrap3/templates/includes/footer.html @@ -0,0 +1,16 @@ +<footer> + <div class="container"> + <hr> + <p class="pull-right"><i class="icon-arrow-up"></i> <a href="#">Back to top</a></p> + + {% if articles %} + {% set copy_date = articles[0].date.strftime('%Y') %} + {% else %} + {% set copy_date = '' %} + {% endif %} + + <p>© {{ copy_date }} {{ AUTHOR }} · Powered by <a href="https://github.com/DandyDev/pelican-bootstrap3" target="_blank">pelican-bootstrap3</a>, + <a href="http://docs.getpelican.com/" target="_blank">Pelican</a>, + <a href="http://getbootstrap.com" target="_blank">Bootstrap</a></p> + </div> +</footer>
\ No newline at end of file diff --git a/pelican-bootstrap3/templates/includes/github.html b/pelican-bootstrap3/templates/includes/github.html index f8542c5..1d1e7f2 100644 --- a/pelican-bootstrap3/templates/includes/github.html +++ b/pelican-bootstrap3/templates/includes/github.html @@ -12,18 +12,6 @@ {% set GITHUB_SKIP_FORK = "false" %} {% endif %} {% endif %} - {% if GITHUB_SORT_ATTRIBUTE is not defined %} - {% set GITHUB_SORT_ATTRIBUTE = "pushed_at" %} - {% endif %} - {% if GITHUB_SORT_DESCENDING is not defined %} - {% set GITHUB_SORT_DESCENDING = "true" %} - {% else %} - {% if GITHUB_SORT_DESCENDING %} - {% set GITHUB_SORT_DESCENDING = "true" %} - {% else %} - {% set GITHUB_SORT_DESCENDING = "false" %} - {% endif %} - {% endif %} <section> <ul class="list-group list-group-flush"> @@ -49,9 +37,7 @@ user: '{{ GITHUB_USER }}', count: {{ GITHUB_REPO_COUNT }}, skip_forks: {{ GITHUB_SKIP_FORK }}, - target: '#gh_repos', - sort_attribute: '{{ GITHUB_SORT_ATTRIBUTE }}', - sort_descending: {{ GITHUB_SORT_DESCENDING }} + target: '#gh_repos' }); }); </script> diff --git a/pelican-bootstrap3/templates/includes/pagination.html b/pelican-bootstrap3/templates/includes/pagination.html new file mode 100644 index 0000000..d34c853 --- /dev/null +++ b/pelican-bootstrap3/templates/includes/pagination.html @@ -0,0 +1,21 @@ +{% if articles_page and articles_paginator.num_pages > 1 %} + <ul class="pagination"> + {% if articles_page.has_previous() %} + {% set num = articles_page.previous_page_number() %} + <li class="prev"><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">«</a> + </li> + {% else %} + <li class="prev disabled"><a href="#">«</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 }}/{{ articles_next_page.url }}">»</a></li> + {% else %} + <li class="next disabled"><a href="#">»</a></li> + {% endif %} + </ul> +{% endif %}
\ No newline at end of file diff --git a/pelican-bootstrap3/templates/includes/sidebar.html b/pelican-bootstrap3/templates/includes/sidebar.html index 1398ac7..9f712b4 100644 --- a/pelican-bootstrap3/templates/includes/sidebar.html +++ b/pelican-bootstrap3/templates/includes/sidebar.html @@ -1,3 +1,7 @@ +{% if DISPLAY_TAGS_ON_SIDEBAR is not defined %} + {% set DISPLAY_TAGS_ON_SIDEBAR = True %} +{% endif %} + <aside> <section> <ul class="list-group list-group-flush"> @@ -10,25 +14,42 @@ {% endfor %} {% endif %} - {# Uncomment if you want to show Categories #} + {% if DISPLAY_RECENT_POSTS_ON_SIDEBAR %} + {% if RECENT_POST_COUNT is not defined %} + {% set RECENT_POST_COUNT = 5 %} + {% endif %} + <li class="list-group-item"><h4><i class="icon-home icon-large"></i>Recent Posts</h4></li> + {% for article in articles[:RECENT_POST_COUNT] %} + <li class="list-group-item"> + <a href="{{ SITEURL }}/{{ article.url }}"> + {{ article.title }} + </a> + </li> + {% endfor %} + {% endif %} + + {% if DISPLAY_CATEGORIES_ON_SIDEBAR %} - {# <li class="list-group-item"><h4><i class="icon-home icon-large"></i>Categories</h4></li>#} - {# {% for cat, null in categories %}#} - {# <li class="list-group-item">#} - {# <a href="{{ SITEURL }}/{{ cat.url }}">#} - {# <i class="icon-folder-open icon-large"></i>{{ cat }}#} - {# </a>#} - {# </li>#} - {# {% endfor %}#} + <li class="list-group-item"><h4><i class="icon-home icon-large"></i>Categories</h4></li> + {% for cat, null in categories %} + <li class="list-group-item"> + <a href="{{ SITEURL }}/{{ cat.url }}"> + <i class="icon-folder-open icon-large"></i>{{ cat }} + </a> + </li> + {% endfor %} + {% endif %} - <li class="list-group-item"><a href="{{ SITEURL }}/tags.html"><h4><i class="icon-tags icon-large"></i>Tags</h4></a></li> - {% for tag in tag_cloud|sort(attribute='1') %} - <li class="list-group-item tag-{{ tag.1 }}"> - <a href="{{ SITEURL }}/{{ tag.0.url }}"> - {{ tag.0 }} - </a> - </li> - {% endfor %} + {% if DISPLAY_TAGS_ON_SIDEBAR %} + <li class="list-group-item"><a href="{{ SITEURL }}/tags.html"><h4><i class="icon-tags icon-large"></i>Tags</h4></a></li> + {% for tag in tag_cloud|sort(attribute='1') %} + <li class="list-group-item tag-{{ tag.1 }}"> + <a href="{{ SITEURL }}/{{ tag.0.url }}"> + {{ tag.0 }} + </a> + </li> + {% endfor %} + {% endif %} </ul> </section> {% include 'includes/github.html' %} diff --git a/pelican-bootstrap3/templates/includes/taglist.html b/pelican-bootstrap3/templates/includes/taglist.html index f71ddcd..bcaa470 100644 --- a/pelican-bootstrap3/templates/includes/taglist.html +++ b/pelican-bootstrap3/templates/includes/taglist.html @@ -1,13 +1,9 @@ {% if article.tags %} - {% if TAG_LIST_SEPARATOR is not defined %} - {% set TAG_LIST_SEPARATOR = "/" %} +<span class="label label-default">Tags</span> +{% for tag in article.tags %} + <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> + {% if not loop.last %} + / {% endif %} - - <span class="label label-default">Tags</span> - {% for tag in article.tags %} - <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> - {% if not loop.last %} - {{ TAG_LIST_SEPARATOR }} - {% endif %} - {% endfor %} +{% endfor %} {% endif %} diff --git a/pelican-bootstrap3/templates/index.html b/pelican-bootstrap3/templates/index.html index d948704..ec065e0 100644 --- a/pelican-bootstrap3/templates/index.html +++ b/pelican-bootstrap3/templates/index.html @@ -14,25 +14,5 @@ {% endfor %} {% endif %} - {% if articles_page and articles_paginator.num_pages > 1 %} - <ul class="pagination"> - {% 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">«</a> - </li> - {% else %} - <li class="prev disabled"><a href="#">«</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">»</a></li> - {% else %} - <li class="next disabled"><a href="#">«</a></li> - {% endif %} - </ul> - {% endif %} + {% include 'includes/pagination.html' %} {% endblock content %}
\ No newline at end of file |