diff options
author | root <root@hhvm.trawg.com> | 2015-04-15 05:42:32 +1000 |
---|---|---|
committer | root <root@hhvm.trawg.com> | 2015-04-15 05:42:32 +1000 |
commit | d61467b2002305a4fde8cb3c5d928ba1781e08cb (patch) | |
tree | c99fbd304bc027c3e83028c807e7bfd052267b9e /photowall/templates | |
parent | b2a02381f5f5630b9b269130ab092c3b1a39b649 (diff) | |
download | pelican-themes-d61467b2002305a4fde8cb3c5d928ba1781e08cb.tar.gz |
first commit of Photowall theme
Diffstat (limited to 'photowall/templates')
-rw-r--r-- | photowall/templates/analytics.html | 46 | ||||
-rw-r--r-- | photowall/templates/archives.html | 13 | ||||
-rw-r--r-- | photowall/templates/article.html | 71 | ||||
-rw-r--r-- | photowall/templates/article_infos.html | 9 | ||||
-rw-r--r-- | photowall/templates/author.html | 2 | ||||
-rw-r--r-- | photowall/templates/authors.html | 16 | ||||
-rw-r--r-- | photowall/templates/base.html | 83 | ||||
-rw-r--r-- | photowall/templates/category.html | 2 | ||||
-rw-r--r-- | photowall/templates/comments.html | 1 | ||||
-rw-r--r-- | photowall/templates/disqus_script.html | 11 | ||||
-rw-r--r-- | photowall/templates/github.html | 9 | ||||
-rw-r--r-- | photowall/templates/index.html | 35 | ||||
-rw-r--r-- | photowall/templates/page.html | 12 | ||||
-rw-r--r-- | photowall/templates/period_archives.html | 13 | ||||
-rw-r--r-- | photowall/templates/tag.html | 2 | ||||
-rw-r--r-- | photowall/templates/taglist.html | 2 | ||||
-rw-r--r-- | photowall/templates/tags.html | 16 | ||||
-rw-r--r-- | photowall/templates/translations.html | 8 | ||||
-rw-r--r-- | photowall/templates/twitter.html | 3 |
19 files changed, 354 insertions, 0 deletions
diff --git a/photowall/templates/analytics.html b/photowall/templates/analytics.html new file mode 100644 index 0000000..e27adf8 --- /dev/null +++ b/photowall/templates/analytics.html @@ -0,0 +1,46 @@ +{% if GOOGLE_ANALYTICS %} + <script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', '{{GOOGLE_ANALYTICS}}']); + _gaq.push(['_trackPageview']); + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + </script> +{% endif %} +{% if GAUGES %} + <script type="text/javascript"> + var _gauges = _gauges || []; + (function() { + var t = document.createElement('script'); + t.type = 'text/javascript'; + t.async = true; + t.id = 'gauges-tracker'; + t.setAttribute('data-site-id', '{{GAUGES}}'); + t.src = '//secure.gaug.es/track.js'; + var s = document.getElementsByTagName('script')[0]; + s.parentNode.insertBefore(t, s); + })(); + </script> +{% endif %} +{% if PIWIK_URL and PIWIK_SITE_ID %} + <script type="text/javascript"> + {% if PIWIK_SSL_URL %} + var pkBaseURL = "{{ PIWIK_SSL_URL }}"; + {% else %} + var pkBaseURL = "{{ PIWIK_URL }}"; + {% endif %} + var _paq = _paq || []; + _paq.push(["trackPageView"]); + _paq.push(["enableLinkTracking"]); + (function() { + var u=(("https:" == document.location.protocol) ? "https" : "http")+"://"+pkBaseURL+"/"; + _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> +{% endif %} diff --git a/photowall/templates/archives.html b/photowall/templates/archives.html new file mode 100644 index 0000000..f678494 --- /dev/null +++ b/photowall/templates/archives.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} +{% block content %} +<section id="content" class="body"> +<h1>Archives for {{ SITENAME }}</h1> + +<dl> +{% for article in dates %} + <dt>{{ article.locale_date }}</dt> + <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd> +{% endfor %} +</dl> +</section> +{% endblock %} diff --git a/photowall/templates/article.html b/photowall/templates/article.html new file mode 100644 index 0000000..5666ae7 --- /dev/null +++ b/photowall/templates/article.html @@ -0,0 +1,71 @@ +{% extends "base.html" %} +{% block title %}{{ article.title|striptags }}{% endblock %} +{% block content %} +<section id="pagecontent" class="body"> + <script> + Mousetrap.bind('left', prev); + Mousetrap.bind('right', next); + + + function prev(element) + { + document.getElementById('prev').click(); + } + function next(element) + { + document.getElementById('next').click(); + } + </script> + <article> + <header> + <div> + <div style="float:left"> + <h1 class="entry-title"> + <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" + title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a> + </h1> + </div> + <div style="float:right"><h2>{% include 'article_infos.html' %}</h2></div> + </div> + + <div style="clear:both"></div> + + {% if article.prev_article %} + <div style="float:left"> + <a href="{{ SITEURL }}/{{ article.prev_article.url}}" id="prev"> + Previous: {{ article.prev_article.title }} + </a> + </div> + {% endif %} + {% if article.next_article %} + <div style="float:right"> + <a href="{{ SITEURL }}/{{ article.next_article.url}}" id="next"> + Next: {{ article.next_article.title }} + </a> + </div> + {% endif %} + {% include 'twitter.html' %} + </header> + {{ article.content }} + + {% if DISQUS_SITENAME and SITEURL and article.status != "draft" %} + <div class="comments"> + <h2>Comments !</h2> + <div id="disqus_thread"></div> + <script type="text/javascript"> + var disqus_shortname = '{{ DISQUS_SITENAME }}'; + var disqus_identifier = '{{ article.url }}'; + var disqus_url = '{{ SITEURL }}/{{ article.url }}'; + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); + </script> + <noscript>Please enable JavaScript to view the comments.</noscript> + </div> + {% endif %} + + </article> +</section> +{% endblock %} diff --git a/photowall/templates/article_infos.html b/photowall/templates/article_infos.html new file mode 100644 index 0000000..0bca8ca --- /dev/null +++ b/photowall/templates/article_infos.html @@ -0,0 +1,9 @@ + <abbr class="published" title="{{ article.date.isoformat() }}"> + {{ article.locale_date }} + </abbr> + {% if article.modified %} + <br /> + <abbr class="modified" title="{{ article.modified.isoformat() }}"> + Updated: {{ article.locale_modified }} + </abbr> + {% endif %} diff --git a/photowall/templates/author.html b/photowall/templates/author.html new file mode 100644 index 0000000..0b37290 --- /dev/null +++ b/photowall/templates/author.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ author }}{% endblock %} diff --git a/photowall/templates/authors.html b/photowall/templates/authors.html new file mode 100644 index 0000000..e61a332 --- /dev/null +++ b/photowall/templates/authors.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Authors{% endblock %} + +{% block content %} + +<section id="content" class="body"> + <h1>Authors on {{ SITENAME }}</h1> + <ul> + {% for author, articles in authors|sort %} + <li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li> + {% endfor %} + </ul> +</section> + +{% endblock %} diff --git a/photowall/templates/base.html b/photowall/templates/base.html new file mode 100644 index 0000000..f5c01eb --- /dev/null +++ b/photowall/templates/base.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<html lang="{{ DEFAULT_LANG }}"> +<head> + <meta charset="utf-8" /> + <title>{% block title %}{{ SITENAME }}{%endblock%}</title> + <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/{{ CSS_FILE }}" /> + {% if FEED_ALL_ATOM %} + <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" /> + {% endif %} + {% if FEED_ALL_RSS %} + <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" /> + {% endif %} + + <!--[if IE]> + <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/mousetrap.js"> </script> +</head> + +<body id="index" class="home"> +<script> +function greyoff(img) +{ + document.getElementById(img).className = "greyoff"; +} + +function greyon(img) +{ + document.getElementById(img).className = "greyon"; +} +</script> + +{% include 'github.html' %} + <header id="banner" class="body"> + <h1><a href="{{ SITEURL }}/">{{ SITENAME }} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a></h1> + <!--nav><ul> + {% for title, link in MENUITEMS %} + <li><a href="{{ link }}">{{ title }}</a></li> + {% endfor %} + {% if DISPLAY_PAGES_ON_MENU -%} + {% for pg in PAGES %} + <li{% if pg == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ pg.url }}">{{ pg.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></li> + {% endfor %} + {% endif %} + </ul></nav--> + </header><!-- /#banner --> + {% block content %} + {% endblock %} + <section id="extras" class="body"> + {% if LINKS %} + {% endif %} + {% if SOCIAL or FEED_ALL_ATOM or FEED_ALL_RSS %} + <div class="social"> + <ul> + {% if FEED_ALL_ATOM %} + <li><a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate">atom feed</a></li> + {% endif %} + {% if FEED_ALL_RSS %} + <li><a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate">rss feed</a></li> + {% endif %} + + {% for name, link in SOCIAL %} + <li><a href="{{ link }}">{{ name }}</a></li> + {% endfor %} + </ul> + </div><!-- /.social --> + {% endif %} + </section><!-- /#extras --> + + <footer id="contentinfo" class="body"> + <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a> + </footer><!-- /#contentinfo --> + +{% include 'analytics.html' %} +{% include 'disqus_script.html' %} +</body> +</html> diff --git a/photowall/templates/category.html b/photowall/templates/category.html new file mode 100644 index 0000000..56f8e93 --- /dev/null +++ b/photowall/templates/category.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ category }}{% endblock %} diff --git a/photowall/templates/comments.html b/photowall/templates/comments.html new file mode 100644 index 0000000..bb033c0 --- /dev/null +++ b/photowall/templates/comments.html @@ -0,0 +1 @@ +{% if DISQUS_SITENAME %}<p>There are <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">comments</a>.</p>{% endif %} diff --git a/photowall/templates/disqus_script.html b/photowall/templates/disqus_script.html new file mode 100644 index 0000000..4ee419b --- /dev/null +++ b/photowall/templates/disqus_script.html @@ -0,0 +1,11 @@ +{% if DISQUS_SITENAME %} +<script type="text/javascript"> + var disqus_shortname = '{{ DISQUS_SITENAME }}'; + (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> +{% endif %} diff --git a/photowall/templates/github.html b/photowall/templates/github.html new file mode 100644 index 0000000..75592ac --- /dev/null +++ b/photowall/templates/github.html @@ -0,0 +1,9 @@ +{% if GITHUB_URL %} +<a href="{{ GITHUB_URL }}"> +{% if GITHUB_POSITION != "left" %} +<img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /> +{% else %} +<img style="position: absolute; top: 0; left: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_left_white_ffffff.png" alt="Fork me on GitHub" /> +{% endif %} +</a> +{% endif %} diff --git a/photowall/templates/index.html b/photowall/templates/index.html new file mode 100644 index 0000000..9abd15b --- /dev/null +++ b/photowall/templates/index.html @@ -0,0 +1,35 @@ +{% extends "base.html" %} +{% block content_title %}{% endblock %} +{% block content %} +{% if articles %} + + <aside id="featured" class="body"> + + {% for article in articles_page.object_list %} + + <div style="float:left"> + <a href="{{ SITEURL }}/{{ article.url }}"> + <img src="images/{{ article.thumbnail }}" class="bw" id="ima{{ loop.index }}" onmouseover="greyoff(this.id)" onmouseleave="greyon(this.id)" border="0" title="{{article.title}}" alt="{{ article.title }}" /></a> + </div> + {% if loop.last %} + {% if loop.length > 1 %} + </ol><!-- /#posts-list --> + {% endif %} + {% if articles_page.has_previous() or loop.length > 1 %} + <div style="clear:both"></div>{% include 'pagination.html' %} + {% endif %} + {% if loop.length > 1 %} + </section><!-- /#content --> + {% endif %} + {% endif %} + {% endfor %} + </aside><!-- /#featured --> +{% else %} +<section id="content" class="body"> +<h2>Pages</h2> + {% for page in PAGES %} + <li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li> + {% endfor %} +</section> +{% endif %} +{% endblock content %} diff --git a/photowall/templates/page.html b/photowall/templates/page.html new file mode 100644 index 0000000..5ac50b6 --- /dev/null +++ b/photowall/templates/page.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% block title %}{{ page.title }}{% endblock %} +{% block content %} +<section id="content" class="body"> + <h1 class="entry-title">{{ page.title }}</h1> + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">get + the pdf</a>{% endif %} + {{ page.content }} +</section> +{% endblock %} diff --git a/photowall/templates/period_archives.html b/photowall/templates/period_archives.html new file mode 100644 index 0000000..252e002 --- /dev/null +++ b/photowall/templates/period_archives.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} +{% block content %} +<section id="content" class="body"> +<h1>Archives for {{ period | reverse | join(' ') }}</h1> + +<dl> +{% for article in dates %} + <dt>{{ article.locale_date }}</dt> + <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd> +{% endfor %} +</dl> +</section> +{% endblock %} diff --git a/photowall/templates/tag.html b/photowall/templates/tag.html new file mode 100644 index 0000000..68cdcba --- /dev/null +++ b/photowall/templates/tag.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ tag }}{% endblock %} diff --git a/photowall/templates/taglist.html b/photowall/templates/taglist.html new file mode 100644 index 0000000..1e0b95a --- /dev/null +++ b/photowall/templates/taglist.html @@ -0,0 +1,2 @@ +{% if article.tags %}<p>tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag | escape }}</a> {% endfor %}</p>{% endif %} +{% if PDF_PROCESSOR %}<p><a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a></p>{% endif %} diff --git a/photowall/templates/tags.html b/photowall/templates/tags.html new file mode 100644 index 0000000..fb09955 --- /dev/null +++ b/photowall/templates/tags.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Tags{% endblock %} + +{% block content %} + +<section id="content" class="body"> + <h1>Tags for {{ SITENAME }}</h1> + <ul> + {% for tag, articles in tags|sort %} + <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li> + {% endfor %} + </ul> +</section> + +{% endblock %} diff --git a/photowall/templates/translations.html b/photowall/templates/translations.html new file mode 100644 index 0000000..7894bb0 --- /dev/null +++ b/photowall/templates/translations.html @@ -0,0 +1,8 @@ +{% macro translations_for(article) %} +{% if article.translations %} +Translations: + {% for translation in article.translations %} + <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a> + {% endfor %} +{% endif %} +{% endmacro %} diff --git a/photowall/templates/twitter.html b/photowall/templates/twitter.html new file mode 100644 index 0000000..7247a0c --- /dev/null +++ b/photowall/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="//platform.twitter.com/widgets.js"></script> +{% endif %} |