Implemented new page headers.
h3rald h3rald@h3rald.com
Sun, 12 Sep 2010 13:10:36 +0200
10 files changed,
353 insertions(+),
340 deletions(-)
A
content/home.erb
@@ -0,0 +1,202 @@
+----- +permalink: home +filters_pre: +- erb +title: Home +type: page +feed: '/' +feed_url: "http://feeds.feedburner.com/h3rald" +feed_title: 'Latest Articles' +----- +<% +max_items = 5 + +all_articles = latest_articles.length +latest = latest_articles 5 +popular = popular_articles 5 +all_projects = @items.select{|a| a[:type] == 'project'}.length +%><section id="topbar"> + <nav id="social"> + <ul> + <li><a href="http://www.h3rald.com/rss/" rel="external"><img src="/images/social/rss.png" alt="RSS" /></a></li> + <li><a href="http://blog.h3rald.com/" rel="external"><img src="/images/social/posterous.png" alt="posterous" /></a></li> + <li><a href="http://www.twitter.com/h3rald/" rel="external"><img src="/images/social/twitter.png" alt="RSS" /></a></li> + <li><a href="http://it.linkedin.com/in/fabiocevasco" rel="external"><img src="/images/social/linkedin.png" alt="linkedin" /></a></li> + <li><a href="http://www.delicious.com/h3rald/" rel="external"><img src="/images/social/delicious.png" alt="delicious" /></a></li> + <li><a href="http://www.reddit.com/user/h3rald/" rel="external"><img src="/images/social/reddit.png" alt="reddit" /></a></li> + </ul> + </nav> + <aside id="search"> + <section id="search_form"></section> + </aside> +</section> +<section id="search_results"></section> +<section class="left" id="main-content"> + <article id="recent-1"> + <header> + <h1><a href="/page.html">H3RALD.com v8.1 Released</a></h1> + <h2>Featuring a a brand new newspaper-like design, powered by HTML5 and CSS3</h2> + <p class="pubdate"><time>September 4th 2010</time></p> + <p class="author">By <em>Fabio Cevasco</em></p> + </header> + <section class="three-columns"> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.</p> + <p>Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> + </section> + </article> + <section class="clear-left left"> + <script src="http://widgets.twimg.com/j/2/widget.js"></script> + <section> + <script id="twitter"> + new TWTR.Widget({ + version: 2, + type: 'profile', + rpp: 4, + interval: 6000, + width: 280, + height: 250, + theme: { + shell: { + background: '#ffffff', + color: '#333333' + }, + tweets: { + background: '#ffffff', + color: '#333333', + links: '#3b6deb' + } + }, + features: { + scrollbar: false, + loop: false, + live: false, + hashtags: true, + timestamp: true, + avatars: false, + behavior: 'all' + } + }).render().setUser('h3rald').start(); + </script> + </section> + <article id="recent-4"> + <header> + <h1><a href="#">Glyph 0.3.0 Released</a></h1> + <h2>The third release of the Glyph Authoring Framework features dramatic speed improvements, and much more</h2> + <p class="pubdate"><time>September 4th 2010</time></p> + <p class="author">By <em>Fabio Cevasco</em></p> + </header> + <section> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> + </section> + </article> + <article class="feature"> + <header> + <p>FEATURED CONTENT</p> + <h1><a href="#">Holidays in Italy?</a></h1> + <h2>Yes, I am really renting my house in the countryside!</h2> + </header> + <section> + <img src="/images/sessarego.jpg" alt="Sessarego" style="margin: 0 5px;" /> + <p>Looking for a peaceful and relaxing holiday in the Italian Riviera? I'm renting part of my family country home in the center of the old village of Sessarego, on a peaceful hill a few minutes away from Bogliasco, a small coastal town on the Golfo Paradiso. </p> + <p>The center of Genoa can be reached by car, bus or train in about 30 minutes and a lot of tourist locations like Camogli, Rapallo, Santa Margherita and Portofino are just a few train stops away.</p> + </section> + </article> + + </section> + <section class="right border-left"> + <article id="recent-2"> + <header> + <h1><a href="#">Glyph 0.4.0 Released</a></h1> + <h2>Featuring web output, HTML5 support, stats, wkhtmltopdf, and much more</h2> + <p class="pubdate"><time>September 4th 2010</time></p> + <p class="author">By <em>Fabio Cevasco</em></p> + </header> + <section> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> + </section> + </article> + <article id="recent-3"> + <header> + <h1><a href="#">Book Review: Distributed Programming with Ruby</a></h1> + <h2>Just what you need to get started with the right tools to build large and scalable applications in Ruby</h2> + <p class="pubdate"><time>September 4th 2010</time></p> + <p class="author">By <em>Fabio Cevasco</em></p> + </header> + <section> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> + </section> + </article> + <article id="recent-5"> + <header> + <h1><a href="#">Glyph 0.2.0 Released</a></h1> + <h2>Featuring single-file compilation, programmatic usage and auto-regeneration, and more</h2> + <p class="pubdate"><time>September 4th 2010</time></p> + <p class="author">By <em>Fabio Cevasco</em></p> + </header> + <section> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> + </section> + </article> + </section> +</section> +<section class="right" id="secondary-content"> + <article id="popular-1"> + <header> + <h1><a href="#">10 programming languages worth checking out</a></h1> + <h2>A quick comparison of 10 non-mainstream programming languages</h2> + <p class="pubdate"><time>September 4th 2010</time></p> + <p class="author">By <em>Fabio Cevasco</em></p> + </header> + <section class="two-columns"> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> + </section> + </article> + <article class="feature"> + <header> + <p>FEATURED CONTENT</p> + <h1><a href="#">Glyph – Rapid Document Authoring Framework</a></h1> + <h2>A free and extensible solution for personal publishing, 100% open source!</h2> + </header> + <section> + <img src="/images/glyph.png" alt="Glyph Logo" class="img-right" /> + <p>With Glyph, creating and maintaining any kind of document becomes as easy as... programming. </p> + <p>Glyph enables you to minimize text duplication, focus on content rather than presentation, manage references seamlessly and automate tedious tasks through a simple but effective macro language, specifically geared towards customization and extensibility.</p> + </section> + </article> + <section class="left border-right"> + <article id="popular-2"> + <header> + <h1><a href="#">Herald (Vim Color Scheme)</a></h1> + <h2>My very own VIM color scheme. Featuring 256, 16 and 8 color support, high readability and... pretty colors!</h2> + <p class="pubdate"><time>September 4th 2010</time></p> + <p class="author">By <em>Fabio Cevasco</em></p> + </header> + <section> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> + </section> + </article> + </section> + <section class="right"> + <article class="right popular3"> + <header> + <h1><a href="#">A closer look at Komodo Edit</a></h1> + <h2>A comprehensive review of the free editor from ActiveState</h2> + <p class="pubdate"><time>September 4th 2010</time></p> + <p class="author">By <em>Fabio Cevasco</em></p> + </header> + <section> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> + <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> + </section> + </article> + </section> +</section>
D
content/home.textile
@@ -1,52 +0,0 @@
------ -permalink: home -filters_pre: -- erb -- redcloth -title: Home -type: page -feed: '/' -feed_url: "http://feeds.feedburner.com/h3rald" -feed_title: 'Latest Articles' ------ -<% -max_items = 5 - -all_articles = latest_articles.length -latest = latest_articles 5 -popular = popular_articles 5 -all_projects = @items.select{|a| a[:type] == 'project'}.length -%> -!>/images/theme/heraldry/lion.png! - -<span class="dropcap">Y</span>ou have reached Fabio Cevasco's web site. I am a full-time technical writer living and working in Genoa, Italy. In my free time, I enjoy reading and writing about IT-related topics and programming in different programming language, especially "Ruby":http://www.ruby-lang.org. This web site is a collection of my works, both in writing and coding, and it currently features *<%= all_articles %>* "articles":/archives/ and *<%= all_projects %>* "projects":/projects/. - -My articles cover a wide range of topics, ranging from "Ruby programming":/tags/ruby/ to "software and book reviews":/tags/reviews/, "web development":/tags/webdevelopment/ and even "travelling":/tags/travelling. This web site does not have a main theme, therefore if you want to keep up-to-date about a particular topic, simply subscribe to a specific tag feed. - -I update this site regularly, but not every day (and maybe not every week): I only write a new article when I have something important to write about. For more frivolous, extemporaneous stuff feel free to have a look at my "blog":http://blog.h3rald.com, which is updated more frequently. - -You can contact me by writing an email to _h3rald [at] h3rald [dot] com_, or through "Twitter":http://www.twitter.com/h3rald, "LinkedIn":http://www.linkedin.com/pub/dir/Fabio/Cevasco, "Delicious":http://www.delicious.com/h3rald, "Facebook":http://www.facebook.com/h3rald, "Shelfari":http://www.shelfari.com/h3rald, "FriendFeed":http://friendfeed.com/h3rald or "Posterous":http://posterous.com/people/4aAQcmIVQl7H. - -<br style="clear:both" /> - -<div class="article-list left-column" id="latest-articles"> - -h3. Latest Articles - -<% -latest.each do |a| -%> -<%= render 'article_item', :article => a %> -<% end %> -</div> -<div class="article-list right-column" id="popular-articles"> - -h3. Popular Articles - -<% -popular.each do |a| -%> -<%= render 'article_item', :article => a %> -<% end %> -</div> -<div class="clearleft"></div>
M
content/styles/_layout.scss
→
content/styles/_layout.scss
@@ -106,11 +106,12 @@
#social { margin-top: 20px; float: left; + li { float:left;} a { - vertical-align: middle; - margin: 0 15px; + margin: 0 20px; img { opacity: 0.6; + vertical-align: middle; @include ease-in(opacity); &:hover { opacity: 1;
D
layouts/article_meta.erb
@@ -1,7 +0,0 @@
------ -filter: erb ------ -<ul class="article-meta"> - <li>Composed on <span class="date"><%= @article.attributes[:date].strftime("%A, %d %B %Y") %></span></li> - <li>Archived in <%= tags_for(@article) %></li> -</ul>
M
layouts/default.erb
→
layouts/default.erb
@@ -43,275 +43,64 @@
<link rel="stylesheet" type="text/css" href="/styles/html5reset.css" /> <link rel="stylesheet" type="text/css" href="/styles/style.css" /> - <![if lte IE 8]> + <!--[if lte IE 8]> <script src="/js/html5.js" type="text/javascript"></script> - <![endif]> + <![endif]--> </head> <body> - <![if lte IE 6]> + <!--[if lte IE 6]> <div id="ie-warning"> This site is not compatible with Internet Explorer 6 or lower. You should consider using a more modern browser for a better – and <em>safer</em> – web experience. [<a href="http://browsehappy.com/browsers/">Read More »</a>] </div> - <![endif]> + <![endif]--> <section id="container"> - <nav class="home"> - <%= ['projects', 'links'].map{|l| %{<a href="/#{l}/"><strong>#{l.upcase}</strong></a>} }.join("|") + "|" + - ['review', 'ruby', 'opensource', 'productivity', 'writing', 'software'].map{|l| %{<a href="/tags/#{l}/" rel="tag">#{l.upcase}</a>} }.join("|") + - %{|<a href="/archives/" rel="archives"><strong>MORE</strong> »</a> } %> - </nav> - <header class="home"> - <nav class="left"> - <script type="text/javascript"><!-- -google_ad_client = "pub-2871497824158668"; -/* 234x60, created 9/5/10 */ -google_ad_slot = "5027018393"; -google_ad_width = 234; -google_ad_height = 60; -//--> -</script> -<script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> -</script> - </nav> - <h1> - <a href="#"> - <img src="/images/h3rald.png" alt="H3RALD" class="default"/> - <![if !IE]> - <img src="/images/h3rald_hover.png" alt="H3RALD" class="hover"/> - <![endif]> - </a> - </h1> - <nav class="right"> - <script type="text/javascript"><!-- -google_ad_client = "pub-2871497824158668"; -/* 234x60, created 9/10/10 */ -google_ad_slot = "7316796658"; -google_ad_width = 234; -google_ad_height = 60; -//--> -</script> -<script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> -</script> - </nav> - <time></time> - </header> - <!-- TODO from here --> - <section id="topbar"> - <section id="social"> - <a href="http://www.h3rald.com/rss/"><img src="/images/social/rss.png" alt="RSS" /></a> - <a href="http://blog.h3rald.com/"><img src="/images/social/posterous.png" alt="posterous" /></a> - <a href="http://www.twitter.com/h3rald/"><img src="/images/social/twitter.png" alt="RSS" /></a> - <a href="http://it.linkedin.com/in/fabiocevasco"><img src="/images/social/linkedin.png" alt="linkedin" /></a> - <a href="http://www.delicious.com/h3rald/"><img src="/images/social/delicious.png" alt="delicious" /></a> - <a href="http://www.reddit.com/user/h3rald/"><img src="/images/social/reddit.png" alt="reddit" /></a> - </section> - <aside id="search"> - <section id="search_form"></section> - </aside> - </section> - <section id="search_results"></section> - <section class="left" id="main-content"> - <article id="recent-1"> - <header> - <h1><a href="/page.html">H3RALD.com v8.1 Released</a></h1> - <h2>Featuring a a brand new newspaper-like design, powered by HTML5 and CSS3</h2> - <p class="pubdate"><time>September 4th 2010</time></p> - <p class="author">By <em>Fabio Cevasco</em></p> - </header> - <section class="three-columns"> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.</p> - <p>Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> + <% if @item[:permalink] == 'home' then %> + <%= render 'home_header' %> + <% else %> + <%= render 'page_header', :item => @item %> + <% end %> + <% if @item[:permalink] == 'home' then%> + <%= yield %> + <% else %> + <article class="page"> + <%= render 'page_meta', :item => @item %> + <section> + <%= yield %> </section> </article> - <section class="clear-left left"> - <script src="http://widgets.twimg.com/j/2/widget.js"></script> - <section> - <script id="twitter"> - new TWTR.Widget({ - version: 2, - type: 'profile', - rpp: 4, - interval: 6000, - width: 280, - height: 250, - theme: { - shell: { - background: '#ffffff', - color: '#333333' - }, - tweets: { - background: '#ffffff', - color: '#333333', - links: '#3b6deb' - } - }, - features: { - scrollbar: false, - loop: false, - live: false, - hashtags: true, - timestamp: true, - avatars: false, - behavior: 'all' - } - }).render().setUser('h3rald').start(); + <% end %> + <!-- TODO from here --> + <footer> + <section class="ads"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 728x90, created 9/10/10 */ + google_ad_slot = "3963343166"; + google_ad_width = 728; + google_ad_height = 90; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </section> - <article id="recent-4"> - <header> - <h1><a href="#">Glyph 0.3.0 Released</a></h1> - <h2>The third release of the Glyph Authoring Framework features dramatic speed improvements, and much more</h2> - <p class="pubdate"><time>September 4th 2010</time></p> - <p class="author">By <em>Fabio Cevasco</em></p> - </header> - <section> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> - </section> - </article> - <article class="feature"> - <header> - <p>FEATURED CONTENT</p> - <h1><a href="#">Holidays in Italy?</a></h1> - <h2>Yes, I am really renting my house in the countryside!</h2> - </header> - <section> - <img src="/images/sessarego.jpg" alt="Sessarego" style="margin: 0 5px;" /> - <p>Looking for a peaceful and relaxing holiday in the Italian Riviera? I'm renting part of my family country home in the center of the old village of Sessarego, on a peaceful hill a few minutes away from Bogliasco, a small coastal town on the Golfo Paradiso. </p> - <p>The center of Genoa can be reached by car, bus or train in about 30 minutes and a lot of tourist locations like Camogli, Rapallo, Santa Margherita and Portofino are just a few train stops away.</p> - </section> - </article> - - </section> - <section class="right border-left"> - <article id="recent-2"> - <header> - <h1><a href="#">Glyph 0.4.0 Released</a></h1> - <h2>Featuring web output, HTML5 support, stats, wkhtmltopdf, and much more</h2> - <p class="pubdate"><time>September 4th 2010</time></p> - <p class="author">By <em>Fabio Cevasco</em></p> - </header> - <section> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> - </section> - </article> - <article id="recent-3"> - <header> - <h1><a href="#">Book Review: Distributed Programming with Ruby</a></h1> - <h2>Just what you need to get started with the right tools to build large and scalable applications in Ruby</h2> - <p class="pubdate"><time>September 4th 2010</time></p> - <p class="author">By <em>Fabio Cevasco</em></p> - </header> - <section> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> - </section> - </article> - <article id="recent-5"> - <header> - <h1><a href="#">Glyph 0.2.0 Released</a></h1> - <h2>Featuring single-file compilation, programmatic usage and auto-regeneration, and more</h2> - <p class="pubdate"><time>September 4th 2010</time></p> - <p class="author">By <em>Fabio Cevasco</em></p> - </header> - <section> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> - </section> - </article> - </section> - </section> - <section class="right" id="secondary-content"> - <article id="popular-1"> - <header> - <h1><a href="#">10 programming languages worth checking out</a></h1> - <h2>A quick comparison of 10 non-mainstream programming languages</h2> - <p class="pubdate"><time>September 4th 2010</time></p> - <p class="author">By <em>Fabio Cevasco</em></p> - </header> - <section class="two-columns"> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> - </section> - </article> - <article class="feature"> - <header> - <p>FEATURED CONTENT</p> - <h1><a href="#">Glyph – Rapid Document Authoring Framework</a></h1> - <h2>A free and extensible solution for personal publishing, 100% open source!</h2> - </header> <section> - <img src="/images/glyph.png" alt="Glyph Logo" class="img-right" /> - <p>With Glyph, creating and maintaining any kind of document becomes as easy as... programming. </p> - <p>Glyph enables you to minimize text duplication, focus on content rather than presentation, manage references seamlessly and automate tedious tasks through a simple but effective macro language, specifically geared towards customization and extensibility.</p> + <nav> + <a href="#">ABOUT</a>|<a href="#">CONTACT</a> + </nav> + <p>© 2010 — <em>Fabio Cevasco</em></p> </section> - </article> - <section class="left border-right"> - <article id="popular-2"> - <header> - <h1><a href="#">Herald (Vim Color Scheme)</a></h1> - <h2>My very own VIM color scheme. Featuring 256, 16 and 8 color support, high readability and... pretty colors!</h2> - <p class="pubdate"><time>September 4th 2010</time></p> - <p class="author">By <em>Fabio Cevasco</em></p> - </header> - <section> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> - </section> - </article> - </section> - <section class="right"> - <article class="right popular3"> - <header> - <h1><a href="#">A closer look at Komodo Edit</a></h1> - <h2>A comprehensive review of the free editor from ActiveState</h2> - <p class="pubdate"><time>September 4th 2010</time></p> - <p class="author">By <em>Fabio Cevasco</em></p> - </header> - <section> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> - <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p> - </section> - </article> - </section> + </footer> </section> - <footer> - <section class="ads"> - <script type="text/javascript"><!-- -google_ad_client = "pub-2871497824158668"; -/* 728x90, created 9/10/10 */ -google_ad_slot = "3963343166"; -google_ad_width = 728; -google_ad_height = 90; -//--> -</script> -<script type="text/javascript" - src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> -</script> -</section> -<section> - <nav> - <a href="#">ABOUT</a>|<a href="#">CONTACT</a> - </nav> - <p>© 2010 — <em>Fabio Cevasco</em></p> -</section> - </footer> - </section> - <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> - <script src="/js/jquery.js" type="text/javascript"></script> - <script src="/js/jquery-timeago.js" type="text/javascript"></script> - <script src="/js/jquery-easing.js" type="text/javascript"></script> - <script src="/js/jquery-fancybox.js" type="text/javascript"></script> - <script src="/js/jquery-toc.js" type="text/javascript"></script> - <script src="/js/date.js" type="text/javascript"></script> - <script src="/js/feeds.js" type="text/javascript"></script> - <script src="/js/search.js" type="text/javascript"></script> - <script src="/js/init.js" type="text/javascript"></script> -</body> + <script src="http://www.google.com/jsapi?key=ABQIAAAA6h3j8Jri5D_da53UPbEbThRlq2n1sm52B5HDRR5tm6o8XM18FhTKn3v155RpPeD0kWnWG81QEhhifQ" type="text/javascript"></script> + <script src="/js/jquery.js" type="text/javascript"></script> + <script src="/js/jquery-timeago.js" type="text/javascript"></script> + <script src="/js/jquery-easing.js" type="text/javascript"></script> + <script src="/js/jquery-fancybox.js" type="text/javascript"></script> + <script src="/js/jquery-toc.js" type="text/javascript"></script> + <script src="/js/date.js" type="text/javascript"></script> + <script src="/js/feeds.js" type="text/javascript"></script> + <script src="/js/search.js" type="text/javascript"></script> + <script src="/js/init.js" type="text/javascript"></script> + </body> </html>
A
layouts/home_header.erb
@@ -0,0 +1,43 @@
+----- +filter: erb +----- +<nav class="home"> +<%= ['projects', 'links'].map{|l| %{<a href="/#{l}/"><strong>#{l.upcase}</strong></a>} }.join("|") + "|" + +['review', 'ruby', 'opensource', 'productivity', 'writing', 'software'].map{|l| %{<a href="/tags/#{l}/" rel="tag">#{l.upcase}</a>} }.join("|") + +%{|<a href="/archives/" rel="archives"><strong>MORE</strong> »</a> } %> +</nav> +<header class="home"> +<nav class="left"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 234x60, created 9/5/10 */ + google_ad_slot = "5027018393"; + google_ad_width = 234; + google_ad_height = 60; + //--> + </script> + <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> + </script> + </nav> + <h1> + <a href="/"> + <img src="/images/h3rald.png" alt="H3RALD" class="default"/> + <!--[if !IE]> + <img src="/images/h3rald_hover.png" alt="H3RALD" class="hover"/> + <![endif]--> + </a> + </h1> + <nav class="right"> + <script type="text/javascript"><!-- + google_ad_client = "pub-2871497824158668"; + /* 234x60, created 9/10/10 */ + google_ad_slot = "7316796658"; + google_ad_width = 234; + google_ad_height = 60; + //--> + </script> + <script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> + </script> + </nav> + <time></time> +</header>
A
layouts/page_header.erb
@@ -0,0 +1,29 @@
+----- +filter: erb +----- +<% +link = nil +case +when @item[:section] then + section = @item[:section] + link = link_for_tag @item[:section].upcase, "/tags/" +when !@item[:tags].blank? then + link = link_for_tag @item[:tags][0].upcase, "/tags/" +when @item[:type] == 'project' then + link = %{<a href="/projects/" rel="archives">PROJECTS</a>} +end +%><header class="page"> + <nav class="home-link"> + <a href="/"> + <img src="/images/h3rald_small.png" alt="H3RALD" class="default"/> + <![if !IE]> + <img src="/images/h3rald_hover_small.png" alt="H3RALD" class="hover"/> + <![endif]> + </a> + </nav> + <% if link then %> + <nav class="section"> + /<%= link %> + </nav> + <% end %> +</header>
A
layouts/page_meta.erb
@@ -0,0 +1,25 @@
+----- +filter: erb +----- +<% + author = @item[:author] || "Fabio Cevasco" + pdf = %{<a href="/articles/#{@item[:permalink]}.pdf">PDF</a>} if @item[:pdf] + tools = %{<span class="tools">#{pdf}</span>} +%><header> + <hgroup> + <h1><%= @item[:title] %></h1> + <% if !@item[:subtitle].blank? then %> + <h2><%= @item[:subtitle] %></h2> + <% end %> + </hgroup> + <% if @item[:type] == 'article' then %> + <p class="toolbar"> + <span class="pubdate"> + Published on <time datetime="<%= @item[:date].strftime("%Y-%d-%d") %>" pubdate="pubdate"><%= @item[:date].strftime("%A, %B %d %Y") %></time> + </span> + <%= tools if pdf %> + </p> + <nav class="tags"><%= tags_for(@item) %></nav> + <p class="author">By <em><%= author %></em></p> + <% end %> +</header>
D
layouts/services.erb
@@ -1,21 +0,0 @@
------ -filter: erb ------ -<div id="services"> - <div class ="footer-left"> - <div id="backtype"> - <h3><span class="s-opinions preload"></span><a id="s-opinions" href="http://www.backtype.com/h3rald" title="Opinions"></a></h3> - </div> - </div> - <div class ="footer-center"> - <div id="twitter"> - <h3><span class="s-tweets preload"></span><a id="s-tweets" href="http://www.twitter.com/h3rald" title="Tweets"></a></h3> - </div> - </div> - <div class ="footer-right"> - <div id="delicious"> - <h3><span class="s-bookmarks preload"></span><a id="s-bookmarks" href="http://www.delicious.com/h3rald" title="Bookmarks"></a></h3> - </div> - </div> -</div> <!-- SERVICES END --> -
M
lib/helpers.rb
→
lib/helpers.rb
@@ -18,11 +18,11 @@ ts
end def tags_for(article) - article.attributes[:tags].map{|t| %{<a class="tag" href="/tags/#{t}/">#{t}</a>}}.join " · " + article.attributes[:tags].map{|t| %{<a class="tag" href="/tags/#{t}/">#{t}</a>}}.join end def link_for_tag(tag, base_url) - %[<a href="#{base_url}#{tag}/" rel="tag">#{tag}</a>] + %[<a href="#{base_url}#{tag.downcase}/" rel="tag">#{tag}</a>] end def tag_link_with_count(tag, count)@@ -151,6 +151,10 @@ def popular_articles(max=nil)
total = @site.items.select{|p| p.attributes[:date] && p.attributes[:type] == 'article' && p.attributes[:popular]}.sort{|a, b| a.attributes[:date] <=> b.attributes[:date]}.reverse max ||= total.length total[0..max-1] + end + + def by_permalink(articles, permalink) + articles.select{|a| a[:permalink] == permalink}[0] rescue nil end def articles_by_month