Skip to content

Commit

Permalink
Add icon to link post heading in indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmistakes committed Mar 26, 2014
1 parent bcf509c commit 70d3af0
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 27 deletions.
10 changes: 7 additions & 3 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,15 @@
</div>

<div id="index">
<h3><a href="{{ site.url}}/articles/">Articles</a></h3>
<h3><a href="{{ site.url}}/articles/">Recent Posts</a></h3>
{% for post in site.posts limit:5 %}
<article>
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
{% if post.link %}
<h2><a href="{{ post.link }}" target="_blank" title="{{ post.title }}">{{ post.title }} <i class="icon-link"></i></a></h2>
{% else %}
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
{% endif %}
</article>
{% endfor %}
</div><!-- /#index -->
Expand Down
4 changes: 1 addition & 3 deletions _layouts/post-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ <h3>{{ post.date | date: '%Y' }}</h3>
{% endunless %}
<article>
{% if post.link %}
<h4><a href="{{ post.link }}" target="_blank" title="{{ post.title }}">{{ post.title }}</a></h4>
<p><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.date | date: "%B %d %H:%M %Z"}}</p>
<p>{{ post.content }}</p>
<h2><a href="{{ post.link }}" target="_blank" title="{{ post.title }}">{{ post.title }} <i class="icon-link"></i></a></h2>
{% else %}
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
Expand Down
2 changes: 1 addition & 1 deletion assets/css/main.min.css

Large diffs are not rendered by default.

Binary file modified assets/fonts/icomoon.eot
Binary file not shown.
1 change: 1 addition & 0 deletions assets/fonts/icomoon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fonts/icomoon.ttf
Binary file not shown.
Binary file modified assets/fonts/icomoon.woff
Binary file not shown.
43 changes: 23 additions & 20 deletions assets/less/icomoon.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@font-face {
font-family: 'icomoon';
src:url('../fonts/icomoon.eot?-w4tutt');
src:url('../fonts/icomoon.eot?#iefix-w4tutt') format('embedded-opentype'),
url('../fonts/icomoon.woff?-w4tutt') format('woff'),
url('../fonts/icomoon.ttf?-w4tutt') format('truetype'),
url('../fonts/icomoon.svg?-w4tutt#icomoon') format('svg');
src:url('../fonts/icomoon.eot?2ka38g');
src:url('../fonts/icomoon.eot?#iefix2ka38g') format('embedded-opentype'),
url('../fonts/icomoon.woff?2ka38g') format('woff'),
url('../fonts/icomoon.ttf?2ka38g') format('truetype'),
url('../fonts/icomoon.svg?2ka38g#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
Expand All @@ -23,24 +23,33 @@
-moz-osx-font-smoothing: grayscale;
}

.icon-link:before {
content: "\e611";
}
.icon-google-plus:before {
content: "\e600";
}
.icon-facebook:before {
content: "\e601";
}
.icon-instagram:before {
content: "\e610";
}
.icon-twitter:before {
content: "\e602";
}
.icon-feed:before {
content: "\e603";
}
.icon-feed2:before {
content: "\e604";
}
.icon-feed:before {
content: "\e603";
}
.icon-vimeo:before {
content: "\e605";
}
.icon-flickr:before {
content: "\e60e";
}
.icon-dribbble:before {
content: "\e606";
}
Expand All @@ -50,12 +59,15 @@
.icon-github:before {
content: "\e608";
}
.icon-lastfm:before {
content: "\e609";
}
.icon-tumblr:before {
content: "\e60a";
}
.icon-linkedin:before {
content: "\e60f";
}
.icon-lastfm:before {
content: "\e609";
}
.icon-stackoverflow:before {
content: "\e60b";
}
Expand All @@ -65,12 +77,3 @@
.icon-foursquare:before {
content: "\e60d";
}
.icon-flickr:before {
content: "\e60e";
}
.icon-linkedin:before {
content: "\e60f";
}
.icon-instagram:before {
content: "\e610";
}

0 comments on commit 70d3af0

Please sign in to comment.