Permalink
Browse files

Added archive index generation

Removed project page generation until project posts are markdownified
  • Loading branch information...
1 parent d0c08ce commit ad06a4a76cdf8a7c880bb0981b40529aa3715286 @qdot qdot committed May 23, 2012
Showing with 66 additions and 14 deletions.
  1. +1 −1 _config.yml
  2. +10 −2 _layouts/archive_index.html
  3. +7 −9 _layouts/front.html
  4. +13 −1 _plugins/archives.rb
  5. +12 −0 archives/index.html
  6. +23 −1 style.css
View
@@ -3,4 +3,4 @@ permalink: pretty
paginate: 5
maruku:
use_divs: true
-exclude: ["mmorgy"]
+exclude: ["mmorgy", "projects"]
@@ -3,8 +3,16 @@
meta-robots: "noodp, noydir, noindex, noarchive, follow"
---
-{% for post in paginator.posts %}
-{% include post_front.html %}
+{% for p in paginator.posts %}
+<div class="post">
+ <h3>{{p.title}}</h3>
+ <div class="postinfo">
+ <a href="{{p.url}}">{{p.date | date: "%Y-%m-%d %H:%m:%S"}}</a>
+ </div>
+ <div class="postcontent">
+ {{ p.content | markdownify | postmorefilter: p.url, "Read the rest of this entry" }}
+ </div>
+</div>
{% endfor %}
<p class="navigation">
View
@@ -4,22 +4,20 @@
{% for post in paginator.posts %}
{% include post_front.html %}
{% endfor %}
-
-<!--
-<div class="PostNav">
- <div class="PostPrevious">
+<div class="fullhr"></div>
+<div class="postnav">
+ <div class="postprevious">
{% if paginator.next_page %}
- &lt;&lt; <a href="/page{{ paginator.next_page}}">Older Posts</a>
+ <a href="/page{{ paginator.next_page}}">&lt;&lt; Older Posts</a>
{% endif %}
</div>
- <div class="PostNext">
+ <div class="postnext">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
- <a href="/">Newer Posts</a> &gt;&gt;
+ <a href="/">Newer Posts &gt;&gt;</a>
{% else %}
- <a href="/page{{ paginator.previous_page }}">Newer Posts</a> &gt;&gt;
+ <a href="/page{{ paginator.previous_page }}">Newer Posts &gt;&gt;</a>
{% endif %}
{% endif %}
</div>
</div>
--->
View
@@ -184,11 +184,23 @@ module Filters
#
# Returns string
def archive_links(archives)
- archives.keys.sort.reverse.collect do |path|
+ archives.sort.reverse.collect do |path|
year, month = path.split('/').map(&:to_i)
%Q{<link rel="archives" title="#{Months[month]} #{year}" href="/archives/#{path}/" />}
end
end
+
+ # Outputs a list of archives for archive links in list format
+ #
+ # +archives+ is the list of archives to format.
+ #
+ # Returns string
+ def archive_lists(archives)
+ archives.sort.reverse.collect do |path, count|
+ year, month = path.split('/').map(&:to_i)
+ %Q{<li><a rel="archives" title="#{Months[month]} #{year}" href="/archives/#{path}/">#{Months[month]} #{year} - #{count} Posts</a></li>}
+ end
+ end
# Outputs a list of archives for archive select options in the sidebar
#
View
@@ -0,0 +1,12 @@
+---
+layout: default
+title: Slashdong Archives
+---
+
+<div class="archive-list">
+ <h3>Monthly Archives</h3>
+
+ <ul>
+ {{ site.archives | archive_lists }}
+ </ul>
+</div>
View
@@ -57,7 +57,7 @@ a {
}
.header-image {
- background-image:url("/images/slashdongle_small.jpg");
+ background-image:url("/images/slashdongle_small.png");
width:400px;
height:90px;
float:left;
@@ -252,4 +252,26 @@ input.gsc-input {
.sharecell {
display:table-cell;
vertical-align:middle;
+}
+
+.archive-list {
+ width:90%;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.archive-list h3 {
+ font-family: CartoGothic Caps Book;
+ font-size:20pt;
+ margin-top:20px;
+ margin-bottom:5px;
+}
+
+.archive-list ul {
+ list-style: none;
+}
+
+.archive-list li {
+ font-family: CartoGothic Caps Book;
+ margin-bottom: 5px;
}

0 comments on commit ad06a4a

Please sign in to comment.