Permalink
Browse files

Style: use <time> and move 'more' link up

* Use <time> wherever we show a date
* Add some elements and css to move the 'more' link closer to the
  summary.
  • Loading branch information...
1 parent 4d4d3c4 commit 7294b2efed111fd2613b93cdb0bb0d1cbbbf9cd0 @danielbeardsley danielbeardsley committed Mar 12, 2013
Showing with 29 additions and 13 deletions.
  1. +3 −1 _includes/post_header.html
  2. +15 −12 index.html
  3. +11 −0 stylesheets/styles.css
@@ -2,7 +2,9 @@ <h1>
<a href="{{ page.url }}">{{ page.title }}</a>
</h1>
<div class="date">
- {{ page.date | date: "%Y-%m-%d" }}
+ <time datetime="{{ page.date | date: "%Y-%m-%d" }}">
+ {{ page.date | date: "%Y-%m-%d" }}
+ </time>
{% if page.author %}
<small>-
{% if page.author_url %}
View
@@ -4,19 +4,22 @@
{% for page in paginator.posts %}
{% unless page.draft %}
- <div class="date">
- {{ page.date | date: "%Y-%m-%d" }}
+ <div class='short-post'>
+ <time datetime="{{ page.date | date: "%Y-%m-%d" }}">
+ {{ page.date | date: "%Y-%m-%d" }}
+ </time>
+ <h2>
+ <a href="{{ page.url }}">{{ page.title }}</a>
+ </h2>
+ <div class='summary'>
+ {% if page.summary %}
+ {{ page.summary | markdownify }}
+ {% else %}
+ {{ page.content | truncatewords: 130 }}
+ {% endif %}
+ <a class='more' href="{{ page.url }}">more</a>
+ </div>
</div>
- <h2>
- <a href="{{ page.url }}">{{ page.title }}</a>
- </h2>
- {% if page.summary %}
- {{ page.summary | markdownify }}
- {% else %}
- {{ page.content | truncatewords: 130 }}
- {% endif %}
- <a href="{{ page.url }}">more</a>
- <br /><br />
{% endunless %}
{% endfor %}
View
@@ -269,3 +269,14 @@ footer {
border-radius: 25px;
border: 2px solid #eee;
}
+
+/* Spacing between posts on index page. */
+.short-post > .summary {
+ margin-bottom:2em;
+}
+
+/* reduce spacing between summary and 'more' link */
+.summary > p {
+ margin-bottom:0.2em;
+}
+

0 comments on commit 7294b2e

Please sign in to comment.