mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Add the notmyidea theme + settings as an example.
This commit is contained in:
parent
720bfeb435
commit
59f410673f
9 changed files with 148 additions and 0 deletions
18
samples/test_settings.py
Normal file
18
samples/test_settings.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
BLOGNAME = 'NotMyIdea.org'
|
||||
BLOGSUBTITLE = u"Alexis Métaireau's weblog"
|
||||
BLOGURL = 'http://blog.notmyidea.org'
|
||||
|
||||
BLOGROLL = (('Biologeek', 'http://biologeek.org'),
|
||||
('Filyb', "http://filyb.info/"),
|
||||
('Libert-fr', "http://www.libert-fr.com"),
|
||||
('N1k0', "http://prendreuncafe.com/blog/"),
|
||||
(u'Tarek Ziadé', "http://ziade.org/blog"),
|
||||
('Zubin Mithra', "http://zubin71.wordpress.com/"),)
|
||||
|
||||
MENUITEMS = (('home', 'http://notmyidea.org'),
|
||||
('contact', 'mailto: alexis notmyidea org'),)
|
||||
|
||||
SOCIAL = (('twitter', 'http://twitter.com/ametaireau'),
|
||||
('lastfm', 'http://lastfm.com/user/akounet'),)
|
||||
13
samples/themes/notmyidea/archives.html
Normal file
13
samples/themes/notmyidea/archives.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h1>Archives for {{ BLOGNAME }}</h1>
|
||||
|
||||
<dl>
|
||||
{% for date, articles in dates %}
|
||||
{% for article in articles %}
|
||||
<dt>{{ date }}</dt>
|
||||
<dd><a href='{{ article.url }}'>{{ article.title }}</a></dd>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endblock %}
|
||||
17
samples/themes/notmyidea/article.html
Normal file
17
samples/themes/notmyidea/article.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<section id="content" class="body">
|
||||
<header> <h2 class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a></h2> </header>
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="{{ article.date.isoformat() }}">
|
||||
{{ article.date.strftime('%Y-%m-%d %H:%M') }}
|
||||
</abbr>
|
||||
<address class="vcard author">
|
||||
By <a class="url fn" href="#">{{ article.author }}</a>
|
||||
</address>
|
||||
</footer><!-- /.post-info -->
|
||||
<div class="entry-content">
|
||||
{{ article.content }}
|
||||
</div><!-- /.entry-content -->
|
||||
</section>
|
||||
{% endblock %}
|
||||
66
samples/themes/notmyidea/base.html
Normal file
66
samples/themes/notmyidea/base.html
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{% block title %}{{ BLOGNAME }}{%endblock%}</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="css/main.css" type="text/css" />
|
||||
|
||||
<!--[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]-->
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="css/ie6.css"/><![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
<body id="index" class="home">
|
||||
|
||||
<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 %}
|
||||
</ul></nav>
|
||||
</header><!-- /#banner -->
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
<section id="extras" class="body">
|
||||
{% if BLOGROLL %}
|
||||
<div class="blogroll">
|
||||
<h2>blogroll</h2>
|
||||
<ul>
|
||||
{% for name, link in BLOGROLL %}
|
||||
<li><a href="{{ link }}">{{ name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div><!-- /.blogroll -->
|
||||
{% endif %}
|
||||
{% if SOCIAL %}
|
||||
<div class="social">
|
||||
<h2>social</h2>
|
||||
<ul>
|
||||
<li><a href="{{ FEEDURL }}" rel="alternate">rss</a></li>
|
||||
{% for name, link in SOCIAL %}
|
||||
<li><a href="{{ link }}">{{ name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div><!-- /.social -->
|
||||
{% endif %}
|
||||
</section><!-- /#extras -->
|
||||
|
||||
<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>.
|
||||
</address><!-- /#about -->
|
||||
|
||||
<p>The theme is by<a href="http://smashingmagazine.com">Smashing Magazine</a>, thanks!</p>
|
||||
</footer><!-- /#contentinfo -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
0
samples/themes/notmyidea/categories.html
Normal file
0
samples/themes/notmyidea/categories.html
Normal file
0
samples/themes/notmyidea/category.html
Normal file
0
samples/themes/notmyidea/category.html
Normal file
34
samples/themes/notmyidea/index.html
Normal file
34
samples/themes/notmyidea/index.html
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
{% for article in articles %}
|
||||
{% if loop.index == 1 %}
|
||||
<aside id="featured" class="body"><article>
|
||||
<hgroup> <h2>Last article</h2> <h3><a href="{{ article.url }}">{{ article.title }}</a></h3> </hgroup>
|
||||
{{ article.summary }}
|
||||
</article></aside><!-- /#featured -->
|
||||
<section id="content" class="body">
|
||||
<ol id="posts-list" class="hfeed">
|
||||
{% else %}
|
||||
<li><article class="hentry">
|
||||
<header>
|
||||
<h2 class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a></h2>
|
||||
</header>
|
||||
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="{{ article.date.isoformat() }}">
|
||||
{{ article.date.strftime('%Y-%m-%d %H:%M') }}
|
||||
</abbr>
|
||||
|
||||
<address class="vcard author">
|
||||
By <a class="url fn" href="#">{{ article.author }}</a>
|
||||
</address>
|
||||
</footer><!-- /.post-info -->
|
||||
<div class="entry-content">
|
||||
{{ article.summary }}
|
||||
</div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ol><!-- /#posts-list -->
|
||||
</section><!-- /#content -->
|
||||
{% endblock content %}
|
||||
0
samples/themes/notmyidea/tag.html
Normal file
0
samples/themes/notmyidea/tag.html
Normal file
0
samples/themes/notmyidea/tags.html
Normal file
0
samples/themes/notmyidea/tags.html
Normal file
Loading…
Add table
Add a link
Reference in a new issue