Skip to content

Commit

Permalink
Calepin update. Display tags and categories in post footer.
Browse files Browse the repository at this point in the history
  • Loading branch information
jokull committed Nov 28, 2011
1 parent a633cf8 commit 0f3f0f3
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 8 deletions.
20 changes: 16 additions & 4 deletions calepin/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,31 @@

@import url(http://fonts.googleapis.com/css?family=Merriweather:400,700,300);

body { font-family: arial, helvetica, sans-serif; background: #f0f0f0; }
body { font-family: arial, helvetica, sans-serif; }
h1, h2, h3, h4, h5, h6 { font-family: 'Merriweather', serif; }


header {
margin-bottom: 30px;
background: white;
background: #f0f0f0;
border-bottom: 1px solid #e0e0e0; }

h1 { font-size: 18px; padding: 20px 0; margin: 0; }
h1 a:hover,
h1 a:visited,
h1 a { font-weight: bold; text-decoration: none; display: block; }

h2.section {
font-size: 13px;
font-weight: bold;
margin-bottom: 20px;
font-family: arial, helvetica, sans-serif;
}

iframe, object { margin-bottom: 1em; }

footer {
font-size: 14px;
font-weight: bold;
font-family: 'Merriweather', serif;
font-weight: bold;
text-shadow: 0 1px 0 white;
Expand Down Expand Up @@ -58,8 +66,8 @@ article h6,
article hr,
article table { max-width: 480px; }

article p { font-size: 100%; }
article ul { list-style: disc outside; margin-left: 2em; }
article blockquote { font-size: 14px; padding-top: 7px; }

article .entry-header { margin-bottom: 20px; }
article .entry-header h2 { margin: 20px 0; }
Expand All @@ -72,6 +80,10 @@ article .entry-content h4 { font-size: 12pt; }
article .entry-content h5 { font-size: 10pt; }
article .entry-content h6 { font-size: 10pt; margin-bottom: .3em; }

article .metadata { font-size: 11px; color: #888; }
article .metadata p { margin-bottom: 0; }
article .metadata a { color: #666; }

sup { vertical-align: .2em; font-size: 80%; margin: -2px 0 0 2px; }

p img { max-width: 100%; }
Expand Down
24 changes: 24 additions & 0 deletions calepin/templates/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,30 @@ <h2>{{ article.title }}</h2>
<div class="entry-content">
{{ article.content }}
</div>

<div class="metadata">

{#
{% if article.author %}
<address class="vcard author">
By <a class="url fn" href="{{ SITEURL }}/author/{{ article.author }}.html">{{ article.author }}</a>
</address>
{% endif %}
#}

{% if article.category and article.category != "misc" %}
<p>
Posted in <em><a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a></em>
</p>
{% endif %}

{% if article.tags %}
<p>
Tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/tag/{{ tag }}.html">{{ tag }}</a> {% endfor %}
</p>
{% endif %}

</div>

{% if DISQUS_SITENAME %}
<hr>
Expand Down
25 changes: 21 additions & 4 deletions calepin/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@

<link rel="stylesheet" href="{{ SITEURL }}/theme/base.css">
<link rel="stylesheet" href="{{ SITEURL }}/theme/skeleton.css">
<link rel="stylesheet" href="{{ SITEURL }}/theme/styles.css?b92kd">
<link rel="stylesheet" href="{{ SITEURL }}/theme/styles.css">

<script src="http://cachedcommons.org/cache/modernizr/1.5.0/javascripts/modernizr-min.js"></script>

</head>

<body id="index" class="home">


<header>
<div class="container">
<div class="sixteen columns">
Expand All @@ -36,8 +35,10 @@ <h1><a href="{{ SITEURL }}">{{ SITENAME }}</a></h1>

<div class="row">
<div class="sixteen columns">
{% block content %}
{% endblock %}
<h2 class="section">{% block section -%}

{% endblock %}</h2>
{% block content %}{% endblock %}
</div>
</div>

Expand All @@ -54,6 +55,22 @@ <h1><a href="{{ SITEURL }}">{{ SITENAME }}</a></h1>
</footer>

</div>

{% 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 -%}

</body>
</html>
4 changes: 4 additions & 0 deletions calepin/templates/tag.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% extends "index.html" %}
{% block title %}{{ tag }} - {{ SITENAME }}{% endblock %}
{% block section %}Posts in <em>{{ tag }}</em>{% endblock %}

0 comments on commit 0f3f0f3

Please sign in to comment.