Skip to content

Commit

Permalink
Add TagClouds to side bar and add dedicated tab page
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelbernard committed Apr 11, 2012
1 parent 9036e3c commit a201053
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 2 deletions.
1 change: 1 addition & 0 deletions _ext/pipeline.rb
Expand Up @@ -6,6 +6,7 @@
extension Awestruct::Extensions::Posts.new('/blog', :posts)
extension Awestruct::Extensions::Paginator.new( :posts, '/blog/index', :per_page=>10 )
extension Awestruct::Extensions::Tagger.new( :posts, '/blog/index', '/blog/tags', :per_page=>10, :sanitize=>true )
extension Awestruct::Extensions::TagCloud.new(:posts, '/blog/tags/index.html', :layout=>'tab', :title=>'Tags')
extension Awestruct::Extensions::Indexifier.new
extension Awestruct::Extensions::Atomizer.new(
:posts,
Expand Down
31 changes: 31 additions & 0 deletions _layouts/blog-sidebar.html.haml
@@ -0,0 +1,31 @@
---
layout: base
tab: blog
---
//copied form constant-sidebar
.row
.span8
.main-text
~ content

.offset1.span3
.hidden-phone
%img#logo{:src=>"/images/emmanuel-conf.jpg"}
#flattr_button
= page.flattr_large_counter(:url=>"http://emmanuelbernard.com",
:title=>"Emmanuel Bernard",
:tags=>"emmanuelbernard,french,oss,java,hibernate,jboss")

#microbio
:markdown
__Name:__ Emmanuel Bernard
__Bio tags:__ French, Open Source actor, Hibernate, (No)SQL, JCP, JBoss, Snowboard, Economy
__Employer:__ [JBoss](http://jboss.org) by Red Hat
__Resume__: [LinkedIn](http://www.linkedin.com/in/emmanuelbernard)
__Team blog:__ [in.relation.to](http://in.relation.to)
__Personal blog:__ [No relation to](/blog/)
__Microblog:__ [Twitter](http://emmanuelbernard.com/@), [Google+](http://emmanuelbernard.com/+)
__Geoloc:__ Paris, France

%h2 Tags
= site.posts_tag_cloud
4 changes: 2 additions & 2 deletions _layouts/blog.html.haml
@@ -1,6 +1,6 @@
---
layout: constant-sidebar
tabl: blog
layout: blog-sidebar
tab: blog
---
.page-header
%h1
Expand Down
6 changes: 6 additions & 0 deletions _layouts/tab.html.haml
@@ -0,0 +1,6 @@
---
layout: blog
tab: blog
---
%h2 #{page.title}
~ content
24 changes: 24 additions & 0 deletions stylesheets/styles.scss
Expand Up @@ -161,5 +161,29 @@ h1, h2, h3, h4, h5, strong {
float: left;
}

//tags
@mixin tag-cloud-groups($groups, $increment: .1) {
@for $n from 0 through ($groups - 1) {
$opacity: $n * .05 + .8;
@if $opacity > 1 {
$opacity: 1;
}
.tag-#{$n} {
font-size: #{1 + $n * $increment}em;
opacity: $opacity;
}
}
}

.tag-cloud {
@include tag-cloud-groups(12, .15);
a {
padding: 3px;
text-decoration: none;
@include border-radius();
}
}


// Include responsive Bootstrap styles
@import "bootstrap-responsive";

0 comments on commit a201053

Please sign in to comment.