Browse Source

Change style of Recent Posts on front page

Close #59
Talha Mansoor 11 years ago
parent
commit
cd660425cf
2 changed files with 16 additions and 27 deletions
  1. 14 20
      static/css/elegant.css
  2. 2 7
      templates/index.html

+ 14 - 20
static/css/elegant.css

@@ -550,34 +550,26 @@ div.blog-archives h2 {
 div.blog-archives article, div.recent-posts article {
     border-bottom: 1px dotted #AAA;
 }
-div.blog-archives article {
+div.blog-archives article, div.recent-posts article {
     font-size: 1.1em;
-    margin-left: 6em;
     padding: .3em .2em;
     position: relative;
     overflow: auto;
 }
+div.blog-archives article {
+    margin-left: 6em;
+}
 div.blog-archives article.last-entry-of-year {
     margin-bottom: 1em;
 }
-div.blog-archives time {
+div.blog-archives time, div.recent-posts time {
     float: right;
     text-align: right;
 }
-div.blog-archives time, div.recent-posts section {
+div.blog-archives time, div.recent-posts time, div.recent-posts section {
     color: #8F8F8F;
     font: .9em 'PT Sans', 'Helvetica Neue', Arial, Sans-Serif;
 }
-div.recent-posts {
-    margin-left: 1em;
-}
-div.recent-posts h1 {
-    font-size: 2em;
-    margin-bottom: 0;
-}
-div.recent-posts h1 small {
-    font-size: .7em;
-}
 div.recent-posts section a {
     color: inherit;
     padding-left: .3em;
@@ -586,12 +578,9 @@ div.recent-posts section a:hover {
     border-bottom: 1px dashed;
     text-decoration: none;
 }
-div.recent-posts section time {
-    padding-right: .4em;
-}
-div.recent-posts footer {
-    font-size: 1.1em;
-    padding-bottom: 10px;
+div.recent-posts time {
+     display: inline;
+     font-size: inherit;
 }
 @media (max-width: 767px) {
     div.blog-archives h2 {
@@ -601,6 +590,11 @@ div.recent-posts footer {
         margin-left: 0;
         padding-left: 0;
     }
+    div.recent-posts time {
+        display: block;
+        float: none;
+        text-align: left;
+    }
 }
 /* MailChimp */
 #mc-embed-signup {

+ 2 - 7
templates/index.html

@@ -53,17 +53,12 @@
             {% endif %}
             {% if loop.index0 < RECENT_ARTICLES_COUNT %}
             <article>
-                <h1><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></h1>
-                {% set day = article.date.strftime('%d')|int %}
+                <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
                 <section>
-                <time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.date.strftime('%b') }} {{ day }}{{- article.date.strftime(', %Y') }}</time>
                     posted in
                 <a href="{{ SITEURL }}/categories.html#{{ article.category.slug }}-ref">{{ article.category }}</a>
+                <time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
                 </section>
-                <p>{{article.summary|striptags}}</p>
-                <footer>
-                    <a href="{{ SITEURL }}/{{ article.url }}">Continue reading →</a>
-                </footer>
             </article>
             {% endif %}
             {% endfor %}