Browse code

1. Styled pagination for blog index 2. Fixed Newer pagination link on page 2 3. Improved sidebar section breakdown on collapse 4. Removed sharing links from the blog index page (moved to pages) 5. Improved styling for metadata on the blog index 6. Moved /blog/archives.html to /blog/archives/index.html 7. Improved responsive layout styling bugs

Brandon Mathis authored on 14/07/2011 at 02:23:19
Showing 13 changed files
... ...
@@ -19,7 +19,7 @@ body {
19 19
   max-width: $max-width;
20 20
   position: relative;
21 21
   margin: 0 auto;
22
-  > header, > nav, > footer, #content > article, #content > div > article, #content > div > nav {
22
+  > header, > nav, > footer, #content > article, #content > div > article, #content > div > section, nav[role=pagination] {
23 23
     @extend .group;
24 24
     padding-left: $pad-min;
25 25
     padding-right: $pad-min;
... ...
@@ -59,11 +59,6 @@ body {
59 59
   body > header { font-size: 1em; }
60 60
   #content aside {
61 61
     @extend .group;
62
-    section {
63
-      &.odd, &.even { float: left; width: 48%; }
64
-      &.odd { margin-left: 0; }
65
-      &.even { margin-left: 4%; }
66
-    }
67 62
   }
68 63
 }
69 64
 @media only screen and (min-width: 768px) {
... ...
@@ -4,7 +4,7 @@ $img-border: inline-image('dotted-border.png');
4 4
 // Main Link Colors
5 5
 $link-color: lighten(#165b94, 3) !default;
6 6
 $link-color-hover: adjust-color($link-color, $lightness: 10, $saturation: 25) !default;
7
-$link-color-visited: adjust-color($link-color, $hue: 80, $lightness: -2) !default;
7
+$link-color-visited: adjust-color($link-color, $hue: 80, $lightness: -4) !default;
8 8
 $link-color-active: adjust-color($link-color-hover, $lightness: -15) !default;
9 9
 
10 10
 // Main Section Colors
... ...
@@ -38,7 +38,7 @@ $nav-border-left: darken($nav-bg, 11) !default;
38 38
 $nav-border-right: lighten($nav-bg, 7) !default;
39 39
 
40 40
 /* Sidebar colors */
41
-$sidebar-bg: #eee !default;
41
+$sidebar-bg: #f2f2f2 !default;
42 42
 $sidebar-link-color: $link-color !default;
43 43
 $sidebar-link-color-hover: $link-color-hover !default;
44 44
 $sidebar-color: change-color(mix($text-color, $sidebar-bg, 80), $hue: hue($sidebar-bg), $saturation: saturation($sidebar-bg)/2) !default;
... ...
@@ -5,8 +5,7 @@
5 5
   }
6 6
   > article, > div > article {
7 7
     overflow: hidden;
8
-    padding-bottom: 1em;
9
-    &:last-child { margin-bottom: 0;  }
8
+    padding-top: 1em;
10 9
     h2 {
11 10
       padding-top: 0.8em;
12 11
       background: $img-border top left repeat-x;
... ...
@@ -32,16 +31,16 @@
32 32
       font-size: .9em;
33 33
       color: $text-color-light;
34 34
       margin: 0;
35
-      @extend .sans;
36 35
       &.meta {
36
+        @extend .sans;
37 37
         text-transform: uppercase;
38
+        position: absolute; top: 0;
38 39
       }
39 40
     }
40 41
     @media only screen and (min-width: 768px) {
41 42
       margin-bottom: 1.5em;
42 43
       padding-bottom: 1em;
43 44
       background: $img-border bottom left repeat-x;
44
-      p.meta { position: absolute; top: 0; }
45 45
     }
46 46
   }
47 47
   .feature {
... ...
@@ -82,12 +81,13 @@
82 82
     }
83 83
   }
84 84
   > div > article > footer {
85
-    margin-bottom: 1.5em;
86
-    background: $img-border top left repeat-x;
85
+    padding-bottom: 2.5em;
87 86
     margin-top: 2em;
88
-    padding-top: 1em;
89 87
     @extend .sans;
90
-    p.meta { display: inline-block; font-size: .8em; }
88
+    p.meta {
89
+      margin-bottom: .8em;
90
+      font-size: .85em;
91
+    }
91 92
   }
92 93
 
93 94
 }
... ...
@@ -95,6 +95,8 @@ article + article {
95 95
   background: $img-border top left repeat-x;
96 96
 }
97 97
 #content .blog-index {
98
+  padding: { top: 0; bottom: 0; }
99
+  article { padding-top: 2em; }
98 100
   article header { background: none; padding-bottom: 0; }
99 101
   article h1 {
100 102
     font-size: 2.2em;
... ...
@@ -126,3 +128,23 @@ article + article {
126 126
   padding: 0 .4em 0 .2em;
127 127
   display: inline-block;
128 128
 }
129
+
130
+nav[role=pagination] {
131
+  text-align: center;
132
+  font-size: .95em;
133
+  div {
134
+    position: relative;
135
+    background: $img-border top left repeat-x;
136
+    padding: {top: 1.5em; bottom: 1.5em;}
137
+  }
138
+  a {
139
+    text-decoration: none;
140
+    color: $text-color-light;
141
+    &.prev { position: absolute; left: 0; }
142
+    &.next { position: absolute; right: 0; }
143
+    &:hover { color: $link-color-hover; }
144
+    &[href*=archive] {
145
+      &:before, &:after { content: '\2014'; padding: 0 .3em; }
146
+    }
147
+  }
148
+}
... ...
@@ -86,7 +86,7 @@ body > nav {
86 86
       .search { width: 91%; }
87 87
     }
88 88
     fieldset[role=mobile-nav] { display: none; }
89
-    fieldset[role=site-search]{ width: 100%; }
89
+    fieldset[role=site-search]{ width: 99%; }
90 90
   }
91 91
 
92 92
   @media only screen and (min-width: 992px) {
... ...
@@ -1,7 +1,6 @@
1
-footer .sharing {
2
-  display: inline-block;
3
-  position: relative;
4
-  top: .3em;
5
-  padding-left: .5em;
6
-  &:first-child { padding-left: 0; }
1
+.sharing {
2
+  p.meta + & {
3
+    padding: { top: 1em; left: 0; }
4
+    background: $img-border top left repeat-x;
5
+  }
7 6
 }
... ...
@@ -5,20 +5,17 @@
5 5
     {% else %}
6 6
       <h1 class="entry-title">{{ page.title | titlecase }}</h1>
7 7
     {% endif %}
8
-    {% unless page.no_meta or !index %}<p class="meta">{% include post_date.html %}</p>{% endunless %}
8
+    {% unless page.no_meta %}
9
+      <p class="meta">{% include post_date.html %}</p>
10
+    {% endunless %}
9 11
   </header>
12
+  {% if index %}
13
+  {% endif %}
10 14
 {% endunless %}
11 15
 {% if index %}
12 16
   <div class="entry-content">{{ content | exerpt | smart_quotes }}</div>
13
-  <p><a rel="full-article" href="{{ post.url }}">Read on &rarr;</a></p>
14 17
   <footer>
15
-    <p class="meta">
16
-      {% include post_author.html %}
17
-      {% include post_date.html %}
18
-      {% include post_categories.html %}
19
-      <span class="comments"><a rel="comments" href="{{ post.url }}#disqus_thread">Comments</a></span>
20
-      {% include sharing.html %}
21
-    </p>
18
+    <a rel="full-article" href="{{ post.url }}">Read on &rarr;</a>
22 19
   </footer>
23 20
 {% else %}
24 21
 <div class="entry-content">{{ content | smart_quotes }}</div>
... ...
@@ -12,5 +12,5 @@
12 12
 </form>
13 13
 <ul role="main-nav">
14 14
   <li><a href="/">Blog</a></li>
15
-  <li><a href="/blog/archives.html">Archives</a></li>
15
+  <li><a href="/blog/archives/index.html">Archives</a></li>
16 16
 </ul>
... ...
@@ -1,6 +1,6 @@
1 1
 {% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %}
2 2
 {% unless category == '0' %}
3
-<span class="categories"> in
3
+<span class="categories">
4 4
   {% if post %}
5 5
     {{ post.categories | category_links }}
6 6
   {% else %}
7 7
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-layout: page
2
-title: Blog Archive
3
-no_footer: true
4
-
5
-<div id="blog-archives">
6
-{% for post in site.posts reverse %}
7
-{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
8
-{% unless year == this_year %}
9
-  {% assign year = this_year %}
10
-  <h2>{{ year }}</h2>
11
-{% endunless %}
12
-<article>
13
-  {% include archive_post.html %}
14
-</article>
15
-{% endfor %}
16
-</div>
17 1
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+---
1
+layout: page
2
+title: Blog Archive
3
+no_footer: true
4
+---
5
+
6
+<div id="blog-archives">
7
+{% for post in site.posts reverse %}
8
+{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
9
+{% unless year == this_year %}
10
+  {% assign year = this_year %}
11
+  <h2>{{ year }}</h2>
12
+{% endunless %}
13
+<article>
14
+  {% include archive_post.html %}
15
+</article>
16
+{% endfor %}
17
+</div>
... ...
@@ -11,13 +11,17 @@ blog_index: true
11 11
   </article>
12 12
 {% endfor %}
13 13
 <nav role="pagination">
14
-  {% if paginator.next_page %}
15
-    <a href="/page{{paginator.next_page}}/">&larr; Older</a>
16
-  {% endif %}
17
-  <a href="/blog/archive.html">Blog Archive</a>
18
-  {% if paginator.previous_page %}
19
-    <a href="/page{{paginator.previous_page}}/">Newer &rarr;</a>
20
-  {% endif %}
14
+  <div>
15
+    {% if paginator.next_page %}
16
+      <a class="prev" href="/page{{paginator.next_page}}/">&larr; Older</a>
17
+    {% endif %}
18
+    <a href="/blog/archives/index.html">Blog Archives</a>
19
+    {% if paginator.previous_page and paginator.previous_page > 1 %}
20
+      <a class="next" href="/page{{paginator.previous_page}}/">Newer &rarr;</a>
21
+    {% elsif paginator.previous_page %}
22
+      <a class="next" href="/">Newer &rarr;</a>
23
+    {% endif %}
24
+  </div>
21 25
 </nav>
22 26
 {% if site.disqus_short_name %}
23 27
 <script type="text/javascript">
... ...
@@ -9,7 +9,7 @@ function getNav(){
9 9
   });
10 10
 }
11 11
 function addSidebarToggler() {
12
-  $('#content').prepend('<a href="#" class="toggle-sidebar">&raquo;</a>');
12
+  $('#content').append('<a href="#" class="toggle-sidebar">&raquo;</a>');
13 13
   $('.toggle-sidebar').bind('click', function(e){
14 14
     e.preventDefault();
15 15
     if($('body').hasClass('collapse-sidebar')){
... ...
@@ -28,7 +28,7 @@ simple_search: http://google.com/search
28 28
 email:
29 29
 
30 30
 # Twitter
31
-twitter_user:
31
+twitter_user: imathis
32 32
 twitter_tweet_count: 4
33 33
 twitter_show_replies: false
34 34
 twitter_follow_button: true
... ...
@@ -40,7 +40,7 @@ google_plus_one: true
40 40
 google_plus_one_size: medium
41 41
 
42 42
 # Pinboard
43
-pinboard_user:
43
+pinboard_user: imathis
44 44
 pinboard_count: 3
45 45
 
46 46
 # Delicious
... ...
@@ -48,7 +48,7 @@ delicious_user:
48 48
 delicious_count: 3
49 49
 
50 50
 # Disqus Comments
51
-disqus_short_name:
51
+disqus_short_name: octopress
52 52
 
53 53
 # Google Analytics
54 54
 google_analytics_tracking_id: