aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap2/templates
diff options
context:
space:
mode:
authorJiachen Yang <farseerfc@gmail.com>2012-03-11 04:40:57 +0900
committerJiachen Yang <farseerfc@gmail.com>2012-03-11 04:40:57 +0900
commitd4e47e48d34326810c2e666b0ee774723291ce2a (patch)
tree04201c22a301a80319ecd22c93d640769df9655d /bootstrap2/templates
parent19755337b123da8c02f729ef7f4041f0cbf60545 (diff)
downloadpelican-themes-d4e47e48d34326810c2e666b0ee774723291ce2a.tar.gz
adjust bootstrap2
Diffstat (limited to 'bootstrap2/templates')
-rw-r--r--bootstrap2/templates/analytics.html18
-rw-r--r--bootstrap2/templates/archives.html20
-rw-r--r--bootstrap2/templates/article.html71
-rw-r--r--bootstrap2/templates/article_infos.html25
-rw-r--r--bootstrap2/templates/base.html74
-rw-r--r--bootstrap2/templates/categories.html12
-rw-r--r--bootstrap2/templates/index.html103
-rw-r--r--bootstrap2/templates/page.html22
-rw-r--r--bootstrap2/templates/piwik.html28
-rw-r--r--bootstrap2/templates/taglist.html14
-rw-r--r--bootstrap2/templates/tags.html13
-rw-r--r--bootstrap2/templates/translations.html8
12 files changed, 218 insertions, 190 deletions
diff --git a/bootstrap2/templates/analytics.html b/bootstrap2/templates/analytics.html
index ba174fc..b96f455 100644
--- a/bootstrap2/templates/analytics.html
+++ b/bootstrap2/templates/analytics.html
@@ -1,11 +1,11 @@
{% if GOOGLE_ANALYTICS %}
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- try {
- var pageTracker = _gat._getTracker("{{GOOGLE_ANALYTICS}}");
- pageTracker._trackPageview();
- } catch(err) {}</script>
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {
+ var pageTracker = _gat._getTracker("{{GOOGLE_ANALYTICS}}");
+pageTracker._trackPageview();
+} catch(err) {}</script>
{% endif %} \ No newline at end of file
diff --git a/bootstrap2/templates/archives.html b/bootstrap2/templates/archives.html
index 42870c2..83976a1 100644
--- a/bootstrap2/templates/archives.html
+++ b/bootstrap2/templates/archives.html
@@ -1,15 +1,13 @@
{% extends "base.html" %}
{% block content %}
-<div class="span12">
- <section id="content">
- <h1>Archives for {{ SITENAME }}</h1>
+<section id="content">
+<h1>Archives for {{ SITENAME }}</h1>
- <dl>
- {% for article in dates %}
- <dt>{{ article.locale_date }}</dt>
- <dd><a href='{{ article.url }}'>{{ article.title }}</a></dd>
- {% endfor %}
- </dl>
- </section>
-</div>
+<dl>
+{% for article in dates %}
+ <dt>{{ article.locale_date }}</dt>
+ <dd><a href='{{ article.url }}'>{{ article.title }}</a></dd>
+{% endfor %}
+</dl>
+</section>
{% endblock %}
diff --git a/bootstrap2/templates/article.html b/bootstrap2/templates/article.html
index f8c4672..3e210a2 100644
--- a/bootstrap2/templates/article.html
+++ b/bootstrap2/templates/article.html
@@ -1,40 +1,39 @@
{% extends "base.html" %}
{% block title %}{{ article.title }}{% endblock %}
{% block content %}
-<div class="span12">
- <section id="content">
- <article>
- <header>
- <h1>
- <a href="{{ pagename }}"
- rel="bookmark"
- title="Permalink to {{ article.title }}">
- {{ article.title}}
- </a>
- </h1> {% include 'twitter.html' %}
- </header>
- <div class="entry-content">
- {% include 'article_infos.html' %}
- {{ article.content }}
- </div><!-- /.entry-content -->
- {% if DISQUS_SITENAME %}
- <div class="comments">
- <h2>Comments !</h2>
- <div id="disqus_thread"></div>
- <script type="text/javascript">
- var disqus_identifier = "{{ article.url }}";
- (function() {
- var dsq = document.createElement('script');
- dsq.type = 'text/javascript'; dsq.async = true;
- dsq.src = 'http://{{ DISQUS_SITENAME }}.disqus.com/embed.js';
- (document.getElementsByTagName('head')[0] ||
- document.getElementsByTagName('body')[0]).appendChild(dsq);
- })();
- </script>
- </div>
- {% endif %}
-
- </article>
- </section>
-</div>
+<section id="content">
+ <article>
+ <header>
+ <h1>
+ <a href="{{ pagename }}"
+ rel="bookmark"
+ title="Permalink to {{ article.title }}">
+ {{ article.title}}
+ </a>
+ </h1> {% include 'twitter.html' %}
+ </header>
+ <div class="entry-content">
+ <div class="well">
+ {% include 'article_infos.html' %}
+ </div>
+ {{ article.content }}
+ </div><!-- /.entry-content -->
+ {% if DISQUS_SITENAME %}
+ <div class="comments">
+ <h2>Comments !</h2>
+ <div id="disqus_thread"></div>
+ <script type="text/javascript">
+ var disqus_identifier = "{{ article.url }}";
+ (function() {
+ var dsq = document.createElement('script');
+ dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://{{ DISQUS_SITENAME }}.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] ||
+ document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ </div>
+ {% endif %}
+ </article>
+</section>
{% endblock %}
diff --git a/bootstrap2/templates/article_infos.html b/bootstrap2/templates/article_infos.html
index a1993a0..7596f40 100644
--- a/bootstrap2/templates/article_infos.html
+++ b/bootstrap2/templates/article_infos.html
@@ -1,14 +1,21 @@
<footer class="post-info">
- <abbr class="published" title="{{ article.date.isoformat() }}">
- {{ article.locale_date }}
- </abbr>
+<span class="label">Date</span>
+<abbr class="published" title="{{ article.date.isoformat() }}">
+ {{ article.locale_date }}
+</abbr>
+{% if article.author %}
+<span class="label label-info">By</span>
+<a class="btn btn-primary xsmall" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
+{% endif %}
+<span class="label label-success">Category</span>
+<a class="btn btn-success xsmall" href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>.
- {% if article.author %}
- <address class="vcard author">
- By <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
- </address>
- {% endif %}
-<p>In <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>. {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>{% endif %}</p>
+{% if PDF_PROCESSOR %}
+<span class="label">
+<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">PDF</a>
+</span>
+{% endif %}
+
{% include 'taglist.html' %}
{% include 'translations.html' %}
</footer><!-- /.post-info -->
diff --git a/bootstrap2/templates/base.html b/bootstrap2/templates/base.html
index 6687460..9a270d4 100644
--- a/bootstrap2/templates/base.html
+++ b/bootstrap2/templates/base.html
@@ -17,8 +17,28 @@
.sidebar-nav {
padding: 9px 0;
}
+
+ .tag-1 {
+ font-size: 13pt;
+ }
+
+ .tag-2 {
+ font-size: 10pt;
+ }
+
+ .tag-2 {
+ font-size: 8pt;
+ }
+
+ .tag-4 {
+ font-size: 6pt;
+ }
+
</style>
<link href="{{ SITEURL }}/theme/css/bootstrap-responsive.css" rel="stylesheet">
+ <link href="{{ SITEURL }}/theme/css/font-awesome.css" rel="stylesheet">
+
+ <link href="{{ SITEURL }}/theme/css/pygments.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
@@ -66,6 +86,20 @@
<a href="{{ SITEURL }}/category/{{ cat }}.html">{{ cat }}</a>
</li>
{% endfor %}
+
+ <li class="divider-vertical"></li>
+
+ <li class="dropdown" id="othermenu">
+ <a class="dropdown-toggle" data-toggle="dropdown">
+ Others
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="{{ SITEURL }}/archives.html">Archives</a></li>
+ <li><a href="{{ SITEURL }}/tags.html">Tags</a></li>
+ </ul>
+ </li>
+
</ul>
<!--<p class="navbar-text pull-right">Logged in as <a href="#">username</a></p>-->
</div><!--/.nav-collapse -->
@@ -74,37 +108,46 @@
</div>
<div class="container-fluid">
- <div class="row-fluid">
-
- <div class="span9">
- {% block content %}
- {% endblock %}
- </div><!--/span-->
-
- <div class="span3">
- <div class="well sidebar-nav">
+ <div class="row">
+ <div class="span2 well sidebar-nav" id="sidebar">
<ul class="nav nav-list">
{% if LINKS %}
- <li class="nav-header">blogroll</li>
+ <li class="nav-header"><h4><i class="icon-external-link"></i>blogroll</h4></li>
{% for name, link in LINKS %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
{% endif %}
{% if SOCIAL %}
- <li class="nav-header">social</li>
+ <li class="nav-header"><h4><i class="icon-home icon-large"></i> social</h4></li>
<li><a href="{{ SITEURL }}/{{ FEED }}" rel="alternate">atom feed</a></li>
{% if FEED_RSS %}
<li><a href="{{ SITEURL }}/{{ FEED_RSS }}" rel="alternate">rss feed</a></li>
{% endif %}
{% for name, link in SOCIAL %}
- <li><a href="{{ link }}">{{ name }}</a></li>
+ <li><a href="{{ link }}"><i class="icon-{{ name }}-sign icon-large"></i>{{ name }}</a></li>
{% endfor %}
{% endif %}
+
+ <li class="nav-header"><h4><i class="icon-tags icon-large"></i>Tags</h4></li>
+ {% for tag in tag_cloud %}
+ <li class="tag-{{ tag.1 }}">
+ <a href="{{ SITEURL }}/tag/{{ tag.0 }}.html">
+ <i class="icon-tag icon-large"></i>{{ tag.0 }}
+ </a>
+ </li>
+ {% endfor %}
</ul>
- </div><!--/.well -->
+ </div><!--/.well -->
+
+ <div class="span10" id="content">
+ {% block content %}
+ {% endblock %}
</div><!--/span-->
+
+
+
</div><!--/row-->
<hr>
@@ -114,7 +157,7 @@
Proudly powered by <a href="http://pelican.notmyidea.org/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
</address><!-- /#about -->
- <p>The theme is by <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>, thanks!</p>
+ <p>The theme is from <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>, thanks!</p>
</footer>
</div><!--/.fluid-container-->
@@ -141,7 +184,8 @@
<script src="{{ SITEURL }}/theme/js/bootstrap-collapse.js"></script>
<script src="{{ SITEURL }}/theme/js/bootstrap-carousel.js"></script>
<script src="{{ SITEURL }}/theme/js/bootstrap-typeahead.js"></script>
-
+
+ <!--<script src="{{ SITEURL }}/theme/js/autosidebar.js"></script>-->
</body>
</html>
diff --git a/bootstrap2/templates/categories.html b/bootstrap2/templates/categories.html
index 911d6ec..4a9088f 100644
--- a/bootstrap2/templates/categories.html
+++ b/bootstrap2/templates/categories.html
@@ -1,10 +1,8 @@
{% extends "base.html" %}
{% block content %}
-<div class="span12">
- <ul>
- {% for category, articles in categories %}
- <li><a href="{{ category.url }}">{{ category }}</a></li>
- {% endfor %}
- </ul>
-</div>
+<ul>
+{% for category, articles in categories %}
+ <li><a href="{{ category.url }}">{{ category }}</a></li>
+{% endfor %}
+</ul>
{% endblock %}
diff --git a/bootstrap2/templates/index.html b/bootstrap2/templates/index.html
index 2a5b726..4dd4279 100644
--- a/bootstrap2/templates/index.html
+++ b/bootstrap2/templates/index.html
@@ -2,70 +2,47 @@
{% block content_title %}{% endblock %}
{% block content %}
{% if articles %}
- {% for article in articles_page.object_list %}
+ <h1>Articles</h1>
+ {% for article in (articles_page.object_list if articles_page else articles) %}
+ <div class='article'>
+ <h2><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h2>
+ <div class="well small">{% include "article_infos.html" %}</div>
+ <div class="summary">{{ article.summary }}
+ <a class="btn primary xsmall" href="{{ SITEURL }}/{{ article.url }}">more ...</a>
+ </div>
+ </div>
+ <hr />
+ {% endfor %}
+ {%endif%}
+
+ {% if articles_page and articles_paginator.num_pages > 1 %}
+ <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">&larr; Previous</a></li>
+ {% else %}
+ <li class="prev disabled"><a href="#">&larr; 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 &rarr;</a></li>
+ {% else %}
+ <li class="next disabled"><a href="#">&rarr; Next</a></li>
+ {% endif %}
+ </ul>
+ </div>
- {# First item #}
- {% if loop.first and not articles_page.has_previous() %}
- <div class="hero-unit">
- <aside id="featured">
- <article>
- <h1><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
- {% include 'article_infos.html' %}{{ article.content }}{% include 'comments.html' %}
- </article>
- {% if loop.length == 1 %}
- {% include 'pagination.html' %}
- {% endif %}
- </aside><!-- /#featured -->
- </div>
- {% if loop.length > 1 %}
- <div class="row-fluid">
- <section id="content">
- <h1>Other articles</h1>
- <hr />
- <ol id="posts-list">
- {% endif %}
- {# other items #}
- {% else %}
- {% if loop.first and articles_page.has_previous %}
- <div class="row-fluid">
- <section id="content">
- <ol id="posts-list" start="{{ articles_paginator.per_page -1 }}">
- {% endif %}
- <li>
- <div class="span6">
- <article>
- <header>
- <h1><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a></h1>
- </header>
-
- <div class="entry-content">
- {% include 'article_infos.html' %}
- {{ article.summary }}
- <a class="btn primary" href="{{ SITEURL }}/{{ article.url }}">read more</a>
- {% include 'comments.html' %}
- </div><!-- /.entry-content -->
- </article>
- </div>
- </li>
- {% endif %}
- {% if loop.last and (articles_page.has_previous()
- or not articles_page.has_previous() and loop.length > 1) %}
- {% include 'pagination.html' %}
- {% endif %}
- {% endfor %}
- {% if loop.length > 1 or articles_page.has_previous() %}
- </ol><!-- /#posts-list -->
- </section><!-- /#content -->
- </div>
- {% endif %}
{% else %}
- <div class="hero-unit">
- <section id="content" class="body">
- <h2>Pages</h2>
- {% for page in PAGES %}
- <li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
- {% endfor %}
- </section>
- </div>
+ {% if PAGES %}
+ <section id="content" class="body">
+ <h1>Pages</h1>
+ {% for page in PAGES %}
+ <li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
+ {% endfor %}
+ </section>
+ {% endif %}
{% endif %}
{% endblock content %}
diff --git a/bootstrap2/templates/page.html b/bootstrap2/templates/page.html
index b4a289e..8d51188 100644
--- a/bootstrap2/templates/page.html
+++ b/bootstrap2/templates/page.html
@@ -1,15 +1,13 @@
{% extends "base.html" %}
{% block title %}{{ page.title }}{% endblock %}
-{% block content %}
-<div class="span12">
- <section id="content" class="body">
- <h1 class="entry-title">{{ page.title }}</h1>
- {% if PDF_PROCESSOR %}
- <a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">
- get the pdf
- </a>
- {% endif %}
- {{ page.content }}
- </section>
-</div>
+{% block content %}
+<section id="content" class="body">
+ <h1 class="entry-title">{{ page.title }}</h1>
+ {% if PDF_PROCESSOR %}
+ <a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">
+ get the pdf
+ </a>
+ {% endif %}
+ {{ page.content }}
+</section>
{% endblock %}
diff --git a/bootstrap2/templates/piwik.html b/bootstrap2/templates/piwik.html
index ff459af..2202089 100644
--- a/bootstrap2/templates/piwik.html
+++ b/bootstrap2/templates/piwik.html
@@ -1,16 +1,16 @@
{% if PIWIK_URL and PIWIK_SITE_ID %}
- <script type="text/javascript">
- {% if PIWIK_SSL_URL %}
- var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ PIWIK_SSL_URL }}/" : "http://{{ PIWIK_URL }}/");
- {% else %}
- var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ PIWIK_URL }}/" : "http://{{ PIWIK_URL }}/");
- {% endif %}
- document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
- </script><script type="text/javascript">
- try {
- var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {{ PIWIK_SITE_ID }});
- piwikTracker.trackPageView();
- piwikTracker.enableLinkTracking();
- } catch( err ) {}
- </script><noscript><p><img src="http://{{ PIWIK_URL }}/piwik.php?idsite={{ PIWIK_SITE_ID }}" style="border:0" alt="" /></p></noscript>
+<script type="text/javascript">
+{% if PIWIK_SSL_URL %}
+ var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ PIWIK_SSL_URL }}/" : "http://{{ PIWIK_URL }}/");
+{% else %}
+ var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ PIWIK_URL }}/" : "http://{{ PIWIK_URL }}/");
+{% endif %}
+document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+</script><script type="text/javascript">
+try {
+var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {{ PIWIK_SITE_ID }});
+piwikTracker.trackPageView();
+piwikTracker.enableLinkTracking();
+} catch( err ) {}
+</script><noscript><p><img src="http://{{ PIWIK_URL }}/piwik.php?idsite={{ PIWIK_SITE_ID }}" style="border:0" alt="" /></p></noscript>
{% endif %} \ No newline at end of file
diff --git a/bootstrap2/templates/taglist.html b/bootstrap2/templates/taglist.html
index a4b3446..c7d5371 100644
--- a/bootstrap2/templates/taglist.html
+++ b/bootstrap2/templates/taglist.html
@@ -1,12 +1,6 @@
{% if article.tags %}
- <p>tags:
- {% for tag in article.tags %}
- <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
- {% endfor %}
- </p>
-{% endif %}
-{% if PDF_PROCESSOR %}
- <p><a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">
- get the pdf
- </a></p>
+<span class="label label-warning">Tags</span>
+{% for tag in article.tags %}
+ <a href="{{ SITEURL }}/{{ tag.url }}" class="btn btn-warning xsmall">{{ tag }}</a>
+{% endfor %}
{% endif %}
diff --git a/bootstrap2/templates/tags.html b/bootstrap2/templates/tags.html
index e69de29..6e8a22f 100644
--- a/bootstrap2/templates/tags.html
+++ b/bootstrap2/templates/tags.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+{% block content %}
+<ul>
+<li class="nav-header"><h4><i class="icon-tags icon-large"></i>Tags</h4></li>
+{% for tag in tag_cloud %}
+<li class="tag-{{ tag.1 }}">
+ <a href="{{ SITEURL }}/tag/{{ tag.0 }}.html">
+ <i class="icon-tag icon-large"></i>{{ tag.0 }}
+ </a>
+</li>
+{% endfor %}
+</ul>
+{% endblock %} \ No newline at end of file
diff --git a/bootstrap2/templates/translations.html b/bootstrap2/templates/translations.html
index 0079883..b869dfd 100644
--- a/bootstrap2/templates/translations.html
+++ b/bootstrap2/templates/translations.html
@@ -1,6 +1,6 @@
{% if article.translations %}
-Translations:
- {% for translation in article.translations %}
- <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
- {% endfor %}
+<span class="label label-important">Lang</span>
+{% for translation in article.translations %}
+ <a href="{{ SITEURL }}/{{ translation.url }}" class="btn btn-danger xsmall">{{ translation.lang }}</a>
+{% endfor %}
{% endif %}