summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorAlexis Metaireau <ametaireau@gmail.com>2010-09-24 20:30:09 +0100
committerAlexis Metaireau <ametaireau@gmail.com>2010-09-24 20:30:09 +0100
commit69c5fe38917b0b746cbb8fc1ee44dd3c171fa152 (patch)
tree276131ea3ad71d1aa4c1e0efe9f7e9bf03cb19f9 /samples
parentecd9a83ac8995b8c976325a45901f1f435205c20 (diff)
downloadpelican-69c5fe38917b0b746cbb8fc1ee44dd3c171fa152.tar.gz
Add a base URL to the template context, fix the notmyidea theme to be a bit more
prettier.
Diffstat (limited to 'samples')
-rw-r--r--samples/themes/notmyidea/css/main.css18
-rw-r--r--samples/themes/notmyidea/templates/article.html4
-rw-r--r--samples/themes/notmyidea/templates/base.html20
-rw-r--r--samples/themes/notmyidea/templates/categories.html8
-rw-r--r--samples/themes/notmyidea/templates/category.html1
-rw-r--r--samples/themes/notmyidea/templates/index.html3
6 files changed, 31 insertions, 23 deletions
diff --git a/samples/themes/notmyidea/css/main.css b/samples/themes/notmyidea/css/main.css
index 459eafdf..4431f59d 100644
--- a/samples/themes/notmyidea/css/main.css
+++ b/samples/themes/notmyidea/css/main.css
@@ -34,6 +34,7 @@ h2, h3, h4, h5, h6 {
font-weight: 400;
line-height: 1.1;
margin-bottom: .8em;
+ margin-top: .8em;
}
/* Anchors */
@@ -323,7 +324,7 @@ img.left, figure.left {float: right; margin: 0 0 2em 2em;}
li:last-child .hentry, #content > .hentry {border: 0; margin: 0;}
#content > .hentry {padding: 1em 0;}
-.entry-title {font-size: 1.429em; margin-bottom: 0;}
+.entry-title {font-size: 1.429em; margin-bottom: 5px; margin-top: 0; }
.entry-title a:link, .entry-title a:visited {text-decoration: none;}
.hentry .post-info * {font-style: normal;}
@@ -335,20 +336,13 @@ li:last-child .hentry, #content > .hentry {border: 0; margin: 0;}
/* Blog Index */
#posts-list {list-style: none; margin: 0;}
- #posts-list .hentry {padding-left: 200px; position: relative;}
- #posts-list .hentry:hover {
- background: #C64350;
- color: #fff;
- }
- #posts-list .hentry:hover a:link, #posts-list .hentry:hover a:visited {
- color: #F6CF74;
- text-shadow: 1px 1px 1px #333;
- }
+ #posts-list .hentry {padding-left: 10px; position: relative;}
#posts-list footer {
left: 10px;
- position: absolute;
- top: 1.5em;
+ position: relative;
+ float: left;
+ top: 0.5em;
width: 190px;
}
diff --git a/samples/themes/notmyidea/templates/article.html b/samples/themes/notmyidea/templates/article.html
index a9755195..3bc28f47 100644
--- a/samples/themes/notmyidea/templates/article.html
+++ b/samples/themes/notmyidea/templates/article.html
@@ -1,7 +1,9 @@
{% extends "base.html" %}
{% block content %}
<section id="content" class="body">
+<div class="hentry">
<header> <h2 class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a></h2> </header>
+ <div class="entry-content">
<footer class="post-info">
<abbr class="published" title="{{ article.date.isoformat() }}">
{{ article.date.strftime('%Y-%m-%d %H:%M') }}
@@ -10,8 +12,8 @@
By <a class="url fn" href="#">{{ article.author }}</a>
</address>
</footer><!-- /.post-info -->
- <div class="entry-content">
{{ article.content }}
</div><!-- /.entry-content -->
+</div>
</section>
{% endblock %}
diff --git a/samples/themes/notmyidea/templates/base.html b/samples/themes/notmyidea/templates/base.html
index 59508385..503f57d2 100644
--- a/samples/themes/notmyidea/templates/base.html
+++ b/samples/themes/notmyidea/templates/base.html
@@ -3,19 +3,19 @@
<head>
<title>{% block title %}{{ BLOGNAME }}{%endblock%}</title>
<meta charset="utf-8" />
- <link rel="stylesheet" href="css/main.css" type="text/css" />
- <link href="atom.xml" type="application/atom+xml" rel="alternate" title="{{ BLOGNAME }} ATOM Feed" />
+ <link rel="stylesheet" href="{{ BLOGURL }}/css/main.css" type="text/css" />
+ <link href="atom.xml" type="{{ BLOGURL }}/application/atom+xml" rel="alternate" title="{{ BLOGNAME }} ATOM Feed" />
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--[if lte IE 7]>
- <link rel="stylesheet" type="text/css" media="all" href="css/ie.css"/>
- <script src="js/IE8.js" type="text/javascript"></script><![endif]-->
+ <link rel="stylesheet" type="text/css" media="all" href="{{ BLOGURL }}/css/ie.css"/>
+ <script src="{{ BLOGURL }}/js/IE8.js" type="text/javascript"></script><![endif]-->
<!--[if lt IE 7]>
- <link rel="stylesheet" type="text/css" media="all" href="css/ie6.css"/><![endif]-->
+ <link rel="stylesheet" type="text/css" media="all" href="{{ BLOGURL }}/css/ie6.css"/><![endif]-->
</head>
@@ -24,10 +24,12 @@
<header id="banner" class="body">
<h1><a href="#">{{ BLOGNAME }} <strong>{{ BLOGSUBTITLE }}</strong></a></h1>
<nav><ul>
- <li class="active"><a href="{{ BLOGURL }}">blog</a></li>
{% for title, link in MENUITEMS %}
<li><a href="{{ link }}">{{ title }}</a></li>
{% endfor %}
+ {% for cat, null in categories %}
+ <li {% if cat == category %}class="active"{% endif %}><a href="{{ BLOGURL }}/category/{{ cat }}.html">{{ cat }}</a></li>
+ {% endfor %}
</ul></nav>
</header><!-- /#banner -->
{% block content %}
@@ -38,7 +40,7 @@
<h2>blogroll</h2>
<ul>
{% for name, link in BLOGROLL %}
- <li><a href="{{ link }}">{{ name }}</a></li>
+ <li><a href="{{ BLOGURL }}/{{ link }}">{{ name }}</a></li>
{% endfor %}
</ul>
</div><!-- /.blogroll -->
@@ -47,7 +49,7 @@
<div class="social">
<h2>social</h2>
<ul>
- <li><a href="atom.xml" rel="alternate">atom feed</a></li>
+ <li><a href="{{ BLOGURL }}/atom.xml" rel="alternate">atom feed</a></li>
{% for name, link in SOCIAL %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
@@ -58,7 +60,7 @@
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
- Proudly powered by <a href="#">pelican</a>, which takes great advantages of <a href="http://python.org">python</a>.
+ Proudly powered by <a href="http://hg.lolnet.org/pelican/">pelican</a>, which takes great advantages of <a href="http://python.org">python</a>.
</address><!-- /#about -->
<p>The theme is by<a href="http://smashingmagazine.com">Smashing Magazine</a>, thanks!</p>
diff --git a/samples/themes/notmyidea/templates/categories.html b/samples/themes/notmyidea/templates/categories.html
index e69de29b..7e4bd2c9 100644
--- a/samples/themes/notmyidea/templates/categories.html
+++ b/samples/themes/notmyidea/templates/categories.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+{% block content %}
+<ul>
+{% for category, articles in categories %}
+ <li>{{ category }}</li>
+{% endfor %}
+</ul>
+{% endblock %}
diff --git a/samples/themes/notmyidea/templates/category.html b/samples/themes/notmyidea/templates/category.html
index e69de29b..09763b9a 100644
--- a/samples/themes/notmyidea/templates/category.html
+++ b/samples/themes/notmyidea/templates/category.html
@@ -0,0 +1 @@
+{% extends "index.html" %}
diff --git a/samples/themes/notmyidea/templates/index.html b/samples/themes/notmyidea/templates/index.html
index 39967dc0..ab04853b 100644
--- a/samples/themes/notmyidea/templates/index.html
+++ b/samples/themes/notmyidea/templates/index.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% block content %}
+{% block content_title %}{% endblock %}
{% for article in articles %}
{% if loop.index == 1 %}
<aside id="featured" class="body"><article>
@@ -14,6 +15,7 @@
<h2 class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a></h2>
</header>
+ <div class="entry-content">
<footer class="post-info">
<abbr class="published" title="{{ article.date.isoformat() }}">
{{ article.date.strftime('%Y-%m-%d %H:%M') }}
@@ -23,7 +25,6 @@
By <a class="url fn" href="#">{{ article.author }}</a>
</address>
</footer><!-- /.post-info -->
- <div class="entry-content">
{{ article.summary }}
</div><!-- /.entry-content -->
</article></li>