Skip to content

Instantly share code, notes, and snippets.

@seyDoggy
Created October 10, 2012 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seyDoggy/3865565 to your computer and use it in GitHub Desktop.
Save seyDoggy/3865565 to your computer and use it in GitHub Desktop.
Frehmwerk rw-blog-n and rw-filesharing-n FontAwesome additions
/* Pages Functions
================================================== */
var div_blog_entry = jq.add('div.blog-entry'),
div_plugin_sidebar = jq.add('div#plugin_sidebar'),
group_plugin_sidebar = div_plugin_sidebar.find('div#blog-categories, div#blog-archives, ul.blog-tag-cloud, div#blog-rss-feeds'),
div_filesharing_item = jq.add('div.filesharing-item');
var pages_fn = (function () {
// when blog page (main content)
if (div_blog_entry.length) {
// add entry icons with font-awesome
div_blog_entry
.find('h1.blog-entry-title a').prepend('<i class="icon-pencil"/> &nbsp;')
.end().find('div.blog-entry-date').prepend('<i class="icon-calendar"/> &nbsp;');
// add blog sidebar icons with font-awesome
group_plugin_sidebar.prepend('<div class="before"><i/></div>');
div_plugin_sidebar
.find('div#blog-categories div.before')
.find('i').addClass('icon-folder-close')
.end().append('&nbsp; Categories:')
.end().find('div#blog-archives div.before')
.find('i').addClass('icon-calendar')
.end().append('&nbsp; Archives:')
.end().find('ul.blog-tag-cloud div.before')
.find('i').addClass('icon-tags')
.end().append('&nbsp; Tags:')
.end().find('div#blog-rss-feeds div.before')
.find('i').addClass('icon-rss')
.end().append('&nbsp; Feeds:');
}
// when file sharing page
if (div_filesharing_item.length) {
// add file sharing icons with font-awesome
div_filesharing_item.find('div.filesharing-item-title a').prepend('<i class="icon-download-alt"/> &nbsp;');
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment