blog: refactor archive markup and add archive to landing page
authorStefano Zacchiroli <zack@upsilon.cc>
Mon, 17 Nov 2014 12:34:28 +0000 (13:34 +0100)
committerStefano Zacchiroli <zack@upsilon.cc>
Mon, 17 Nov 2014 12:34:28 +0000 (13:34 +0100)
blog.mdwn
blog/archives.mdwn
blog/blog.css
blog/monthly-archives.mdwn [new file with mode: 0644]
templates/inline-bare.tmpl [new file with mode: 0644]

index bc1b871..fd033c4 100644 (file)
--- a/blog.mdwn
+++ b/blog.mdwn
@@ -8,6 +8,10 @@ I'm [[Zack|index]], and this is my blog. Have a look at the **most recent
 posts** below, or browse the **tag cloud** here on the right.
 
 [[**Archives**|archives]] are available as well.
+[[!inline
+    pages="blog/monthly-archives"
+       feeds="no"
+       template="inline-bare"]]
 
 You can leave **comments** on my posts by following the relevant link
 associated to each post. You can also
index 4bfd57c..de7c276 100644 (file)
@@ -1,16 +1,6 @@
 Here you can find the monthly archives of [[my_blog|blog]].
 
-<div class="monthly-archives">
-<ul>
-<li>2014: [[!inline pages="blog/archives/2014/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
-<li>2013: [[!inline pages="blog/archives/2013/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
-<li>2012: [[!inline pages="blog/archives/2012/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
-<li>2011: [[!inline pages="blog/archives/2011/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
-<li>2010: [[!inline pages="blog/archives/2010/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
-<li>2009: [[!inline pages="blog/archives/2009/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
-<li>2008: [[!inline pages="blog/archives/2008/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
-<li>2007: [[!inline pages="blog/archives/2007/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
-<li>2006: [[!inline pages="blog/archives/2006/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
-</ul>
-</div>
-
+[[!inline
+    pages="blog/monthly-archives"
+       feeds="no"
+       template="inline-bare"]]
index 3364e59..4d6d26b 100644 (file)
@@ -51,3 +51,13 @@ pre {
   padding-bottom: 5px;
 }
 
+div.monthly-archives {
+  float: right;
+  width: 30%;
+  padding: 10px 10px;
+  margin-top: 10px;
+  border: 1px solid #aaa;
+  background: #eee;
+  color: black !important;
+  clear: both;
+}
diff --git a/blog/monthly-archives.mdwn b/blog/monthly-archives.mdwn
new file mode 100644 (file)
index 0000000..1d115a9
--- /dev/null
@@ -0,0 +1,13 @@
+<div class="monthly-archives">
+<ul>
+<li>2014: [[!inline pages="blog/archives/2014/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
+<li>2013: [[!inline pages="blog/archives/2013/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
+<li>2012: [[!inline pages="blog/archives/2012/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
+<li>2011: [[!inline pages="blog/archives/2011/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
+<li>2010: [[!inline pages="blog/archives/2010/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
+<li>2009: [[!inline pages="blog/archives/2009/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
+<li>2008: [[!inline pages="blog/archives/2008/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
+<li>2007: [[!inline pages="blog/archives/2007/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
+<li>2006: [[!inline pages="blog/archives/2006/*" reverse="yes" feeds="no" template="inline-monthly-archive"]]</li>
+</ul>
+</div>
diff --git a/templates/inline-bare.tmpl b/templates/inline-bare.tmpl
new file mode 100644 (file)
index 0000000..2d476b7
--- /dev/null
@@ -0,0 +1 @@
+<TMPL_VAR CONTENT>