all repos — h3rald @ a443e54b04fd90c89f1aa1411893cdc22a250974

The sources of https://h3rald.com

Removed palette, slider and icons, for now.
h3rald h3rald@h3rald.com
Sun, 16 Aug 2009 14:10:34 +0200
commit

a443e54b04fd90c89f1aa1411893cdc22a250974

parent

c7d6d90175d3acf1638cfba44b660844b6b792d0

A content/about.textile

@@ -0,0 +1,39 @@

+----- +permalink: about +filters_pre: +- erb +- redcloth +title: About +type: page +----- +This is a _minimalist_ web site: I do not care about fancy graphics or nitfy effects. I do care, however, about content and I want you to read what I write comfortably. As you can see, this site has no sidebars: it only has a header, a main column and a footer, exactly where you expect them to be. + +This site was designed to work with all the major modern browsers (hint: Internet Explorer 6 is _not_ a modern browser). It validates as XHTML 1.1 Strict and CSS 2.1. + + +h3. Under the Hood + +This site is powered by: + +* -A customized version of the "Typo":http://www.typosphere.org blogging engine.- +* -The "Ruby on Rails":http://www.rubyonrails.org web framework for the "Ruby":http://www.ruby-lang.org programming language.- +* -The "MySQL":http://www.mysql.com database engine.- +* -The "Apache":http://www.apache.org web server.- +* Just "Nanoc":http://nanoc.stoneship.org/, <em>"[...] a site compiler written in Ruby for building awesome web sites."</em> + +h3. Licensing + +My "articles":/#archives and other material available on this web site are lincesed under the _Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported_license. For other uses, contact me. + + +<p style="text-align:center"> +<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png" /></a> +</p> + +h3. Credits + +I'd like to thank the following people for their work, which made this web site possible: + +* "Denis Defreyne":http://www.stoneship.org/, for creating the wonderful "Nanoc":http://nanoc.stoneship.org/ site compiler. +* "David J.Perry":http://scholarsfonts.net/, who designed the "Cardo font":http://scholarsfonts.net/cardofnt.html I used for the H3RALD logo. +
A content/archives.textile

@@ -0,0 +1,32 @@

+----- +permalink: archives +filters_pre: +- erb +title: Archives +type: page +----- +<% + tags = sorted_site_tags +%> + <div id="search_form"></div> + <div id="search_results"></div> + <h3>Articles by Topic</h3> + <table id="taglist"> + <% c = 0 + tags.each do |t| + c = c+1 %> + <%= "<tr>" if c%5 == 1 %> + <td><%= tag_link_with_count(t[0], t[1]) %></td> + <%= "</tr>" if c%5 == 0 %> + <% end %></tr> + </table> + <h3>Articles by Month</h3> + <table id="timeline"> + <% c = 0 + articles_by_month.each do |m| + c = c+1 %> + <%= "<tr>" if c%5 == 1 %> + <td><%= month_link_with_count(m[0], m[1].length) %></td> + <%= "</tr>" if c%5 == 0 %> + <% end %></tr> + </table>
M content/home.textilecontent/home.textile

@@ -3,14 +3,8 @@ permalink: home

filters_pre: - erb - redcloth -title: Home -comments: [] - -date: -tags: [] - +title: Welcome type: page -toc: true ----- <% max_items = 5

@@ -18,12 +12,9 @@

all_articles = latest_articles latest = latest_articles 5 popular = popular_articles 5 -tags = sorted_site_tags -%><div class="panel" id="home"> +%> -h2. Welcome - -This is Fabio Cevasco's web site, featuring <%= all_articles.length %> "articles":/#archives and <%= 5 %> open source "projects":/#projects. Fabio is a full-time technical writer working in Genoa, Italy. In his free time, he enjoys writing (surprise, surprise), reading about technology and programming a little bit in Ruby and other languages. +This is Fabio Cevasco's web site, featuring <%= all_articles.length %> "articles":/archives/ and <%= 5 %> open source "projects":/projects/. Fabio is a full-time technical writer working in Genoa, Italy. In his free time, he enjoys writing (surprise, surprise), reading about technology and programming a little bit in Ruby and other languages. You can contact him by writing an email to _h3rald [at] h3rald [dot] com_, or through:

@@ -53,76 +44,3 @@ <%= render 'article_item', :article => a %>

<% end %> </div> <div class="clearleft"></div> -</div> -<div class="panel" id="archives"> -h2. Archives - -<notextile> - <div id="search_form"></div> - <div id="search_results"></div> - <h3>Articles by Topic</h3> - <table id="taglist"> - <% c = 0 - tags.each do |t| - c = c+1 %> - <%= "<tr>" if c%5 == 1 %> - <td><%= tag_link_with_count(t[0], t[1]) %></td> - <%= "</tr>" if c%5 == 0 %> - <% end %></tr> - </table> - <h3>Articles by Month</h3> - <table id="timeline"> - <% c = 0 - articles_by_month.each do |m| - c = c+1 %> - <%= "<tr>" if c%5 == 1 %> - <td><%= month_link_with_count(m[0], m[1].length) %></td> - <%= "</tr>" if c%5 == 0 %> - <% end %></tr> - </table> -</div> -</notextile> - - - -<div class="panel" id="projects"> - -h2. Projects - -</div> -<div class="panel" id="about"> - -h2. About - -This is a _minimalist_ web site: I do not care about fancy graphics or nitfy effects. I do care, however, about content and I want you to read what I write comfortably. As you can see, this site has no sidebars: it only has a header, a main column and a footer, exactly where you expect them to be. - -This site was designed to work with all the major modern browsers (hint: Internet Explorer 6 is _not_ a modern browser). It validates as XHTML 1.1 Strict and CSS 2.1. - - -h3. Under the Hood - -This site is powered by: - -* -A customized version of the "Typo":http://www.typosphere.org blogging engine.- -* -The "Ruby on Rails":http://www.rubyonrails.org web framework for the "Ruby":http://www.ruby-lang.org programming language.- -* -The "MySQL":http://www.mysql.com database engine.- -* -The "Apache":http://www.apache.org web server.- -* Just "Nanoc":http://nanoc.stoneship.org/, <em>"[...] a site compiler written in Ruby for building awesome web sites."</em> - -h3. Licensing - -My "articles":/#archives and other material available on this web site are lincesed under the _Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported_license. For other uses, contact me. - - -<p style="text-align:center"> -<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png" /></a> -</p> - -h3. Credits - -I'd like to thank the following people for their work, which made this web site possible: - -* "Denis Defreyne":http://www.stoneship.org/, for creating the wonderful "Nanoc":http://nanoc.stoneship.org/ site compiler. -* "David J.Perry":http://scholarsfonts.net/, who designed the "Cardo font":http://scholarsfonts.net/cardofnt.html I used for the H3RALD logo. - -</div>
M layouts/default.htmlayouts/default.htm

@@ -37,11 +37,7 @@ </script>

<!-- JQuery Plugins --> <script src="/js/jquery.preload.js" type="text/javascript"></script> -<script src="/js/tooltips.js" type="text/javascript"></script> <script src="/js/jquery.scrollTo-min.js" type="text/javascript"></script> -<script src="/js/jquery.localscroll-min.js" type="text/javascript"></script> -<script src="/js/jquery.serialScroll-min.js" type="text/javascript"></script> -<script src="/js/slider.js" type="text/javascript"></script> <script src="/js/jquery.jgfeed-min.js" type="text/javascript"></script> <script src="/js/jquery.timeago.js" type="text/javascript"></script>

@@ -65,10 +61,10 @@ <h1><img alt="H3RALD" id="logo" src="/images/logo.png" /></h1>

</div> <div id="header-right"> <ul id="navigation"> - <li><a href="<%= (@page.permalink == 'home') ? "#home" : "/#home" %>" class="cross-link">Home</a></li> - <li><a href="<%= (@page.permalink == 'home') ? "#archives" : "/#archives" %>" class="cross-link">Archives</a></li> - <li><a href="<%= (@page.permalink == 'home') ? "#projects" : "/#projects" %>" class="cross-link">Projects</a></li> - <li><a href="<%= (@page.permalink == 'home') ? "#about" : "/#about" %>" class="cross-link">About</a></li> + <li><a href="/" class="cross-link">Home</a></li> + <li><a href="/archives/" class="cross-link">Archives</a></li> + <li><a href="/projects/" class="cross-link">Projects</a></li> + <li><a href="/about/" class="cross-link">About</a></li> </ul> </div> </div>

@@ -81,10 +77,6 @@ <!-- MAIN START -->

<div id="main"> <!-- CONTAINER START --> <div id="container"> - <ul id="palette"> - <li><a href="#" id="up-arrow"></a></li> - <li><a href="#" id="down-arrow"></a></li> - </ul> <!-- CONTENT START --> <div id="content" class="clearfix"> <% if @page.permalink == 'home' then %>
M layouts/services.htmlayouts/services.htm

@@ -4,17 +4,17 @@ -----

<div id="services"> <div class ="footer-left"> <div id="backtype"> - <img src="/images/icons/feed.png" alt="BackType"/>&nbsp;<h3><a href="http://www.backtype.com/h3rald">Comments</a></h3> + <h3><a href="http://www.backtype.com/h3rald">Comments</a></h3> </div> </div> <div class ="footer-center"> <div id="twitter"> - <img src="/images/icons/twitter.png" alt="Twitter" />&nbsp;<h3><a href="http://www.twitter.com/h3rald">Tweets</a></h3> + <h3><a href="http://www.twitter.com/h3rald">Tweets</a></h3> </div> </div> <div class ="footer-right"> <div id="delicious"> - <img src="/images/icons/delicious.png" alt="Delicious" />&nbsp;<h3><a href="http://www.delicious.com/h3rald">Bookmarks</a></h3> + <h3><a href="http://www.delicious.com/h3rald">Bookmarks</a></h3> </div> </div> </div> <!-- SERVICES END -->
M resources/css/layout.cssresources/css/layout.css

@@ -113,29 +113,6 @@ {

background: #fff url('../images/bkg.png') top repeat; } -#palette -{ - position: fixed; - margin-top: 20px; - margin-left: -46px; - width: 32px; - z-index: 3000; -} - -#palette li -{ - list-style-image: none; - list-style-type: none; - height: 32px; - width: 32px; - vertical-align: middle; - text-align: center; -} - -#palette li:hover -{ -} - #content { text-align: justify;
M resources/js/init.jsresources/js/init.js

@@ -1,13 +1,8 @@

- $(document).ready(function() { - $.preloadCssImages(); - $.slider(); - $('#up-arrow').click(function(){ $.scrollTo('#header', 1000)}); - $('#down-arrow').click(function(){ $.scrollTo('#footer', 1000)}); // Feeds - backtype_comments(8); - $.jGFeed('http://twitter.com/statuses/user_timeline/h3rald.rss', twitter_feed, 8); - $.jGFeed('http://feeds.delicious.com/v2/rss/h3rald', delicious_feed, 8); + backtype_comments(7); + $.jGFeed('http://twitter.com/statuses/user_timeline/h3rald.rss', twitter_feed, 7); + $.jGFeed('http://feeds.delicious.com/v2/rss/h3rald', delicious_feed, 7); // Drop Caps $('h2 + p').each(function(){ var first_paragraph = this;//$('#content p')[0];

@@ -18,11 +13,9 @@ node = node.firstChild;

} var text = node.nodeValue; var first_letter = text.substr(0,1); - if (first_letter.match(/[a-zA-Z]/)){ - node.nodeValue = text.slice(1,text.length); - $('<span></span>').addClass('dropcap').html(first_letter).prependTo( first_paragraph ); - Cufon.replace('.dropcap', {fontFamily: 'Mutlu', fontSize: '40px'}); - }; + node.nodeValue = text.slice(1,text.length); + $('<span></span>').addClass('dropcap').html(first_letter).prependTo( first_paragraph ); }); + Cufon.replace('.dropcap', {fontFamily: 'Mutlu'}); });
D resources/js/jquery.localscroll-min.js

@@ -1,9 +0,0 @@

-/** - * jQuery.LocalScroll - Animated scrolling navigation, using anchors. - * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com - * Dual licensed under MIT and GPL. - * Date: 3/11/2009 - * @author Ariel Flesler - * @version 1.2.7 - **/ -;(function($){var l=location.href.replace(/#.*/,'');var g=$.localScroll=function(a){$('body').localScroll(a)};g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};g.hash=function(a){if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;if(a.reset){var e=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=e}i(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},g.defaults,b);return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$('<a> </a>').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery);
D resources/js/jquery.scrollTo-min.js

@@ -1,11 +0,0 @@

-/** - * jQuery.ScrollTo - Easy element scrolling using jQuery. - * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com - * Dual licensed under MIT and GPL. - * Date: 3/9/2009 - * @author Ariel Flesler - * @version 1.4.1 - * - * http://flesler.blogspot.com/2007/10/jqueryscrollto.html - */ -;(function($){var m=$.scrollTo=function(b,h,f){$(window).scrollTo(b,h,f)};m.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};m.window=function(b){return $(window).scrollable()};$.fn.scrollable=function(){return this.map(function(){var b=this,h=!b.nodeName||$.inArray(b.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!h)return b;var f=(b.contentWindow||b).document||b.ownerDocument||b;return $.browser.safari||f.compatMode=='BackCompat'?f.body:f.documentElement})};$.fn.scrollTo=function(l,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};if(l=='max')l=9e9;a=$.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=$(k),d=l,p,g={},q=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(d)){d=n(d);break}d=$(d,this);case'object':if(d.is||d.style)p=(d=$(d)).offset()}$.each(a.axis.split(''),function(b,h){var f=h=='x'?'Left':'Top',i=f.toLowerCase(),c='scroll'+f,r=k[c],s=h=='x'?'Width':'Height';if(p){g[c]=p[i]+(q?0:r-o.offset()[i]);if(a.margin){g[c]-=parseInt(d.css('margin'+f))||0;g[c]-=parseInt(d.css('border'+f+'Width'))||0}g[c]+=a.offset[i]||0;if(a.over[i])g[c]+=d[s.toLowerCase()]()*a.over[i]}else g[c]=d[i];if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],u(s));if(!b&&a.queue){if(r!=g[c])t(a.onAfterFirst);delete g[c]}});t(a.onAfter);function t(b){o.animate(g,j,a.easing,b&&function(){b.call(this,l,a)})};function u(b){var h='scroll'+b;if(!q)return k[h];var f='client'+b,i=k.ownerDocument.documentElement,c=k.ownerDocument.body;return Math.max(i[h],c[h])-Math.min(i[f],c[f])}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);
D resources/js/jquery.serialScroll-min.js

@@ -1,10 +0,0 @@

-/* - * jQuery.SerialScroll - Animated scrolling of series - * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com - * Dual licensed under MIT and GPL. - * Date: 06/14/2009 - * @author Ariel Flesler - * @version 1.2.2 - * http://flesler.blogspot.com/2008/02/jqueryserialscroll.html - */ -;(function(a){var b=a.serialScroll=function(c){return a(window).serialScroll(c)};b.defaults={duration:1e3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(c){return this.each(function(){var t=a.extend({},b.defaults,c),s=t.event,i=t.step,r=t.lazy,e=t.target?this:document,u=a(t.target||this,e),p=u[0],m=t.items,h=t.start,g=t.interval,k=t.navigation,l;if(!r){m=d()}if(t.force){f({},h)}a(t.prev||[],e).bind(s,-i,q);a(t.next||[],e).bind(s,i,q);if(!p.ssbound){u.bind("prev.serialScroll",-i,q).bind("next.serialScroll",i,q).bind("goto.serialScroll",f)}if(g){u.bind("start.serialScroll",function(v){if(!g){o();g=!0;n()}}).bind("stop.serialScroll",function(){o();g=!1})}u.bind("notify.serialScroll",function(x,w){var v=j(w);if(v>-1){h=v}});p.ssbound=!0;if(t.jump){(r?u:d()).bind(s,function(v){f(v,j(v.target))})}if(k){k=a(k,e).bind(s,function(v){v.data=Math.round(d().length/k.length)*k.index(this);f(v,this)})}function q(v){v.data+=h;f(v,this)}function f(B,z){if(!isNaN(z)){B.data=z;z=p}var C=B.data,v,D=B.type,A=t.exclude?d().slice(0,-t.exclude):d(),y=A.length,w=A[C],x=t.duration;if(D){B.preventDefault()}if(g){o();l=setTimeout(n,t.interval)}if(!w){v=C<0?0:y-1;if(h!=v){C=v}else{if(!t.cycle){return}else{C=y-v-1}}w=A[C]}if(!w||t.lock&&u.is(":animated")||D&&t.onBefore&&t.onBefore(B,w,u,d(),C)===!1){return}if(t.stop){u.queue("fx",[]).stop()}if(t.constant){x=Math.abs(x/i*(h-C))}u.scrollTo(w,x,t).trigger("notify.serialScroll",[C])}function n(){u.trigger("next.serialScroll")}function o(){clearTimeout(l)}function d(){return a(m,p)}function j(w){if(!isNaN(w)){return w}var x=d(),v;while((v=x.index(w))==-1&&w!=p){w=w.parentNode}return v}})}})(jQuery);
D resources/js/slider.js

@@ -1,111 +0,0 @@

-// Thanks http://jqueryfordesigners.com/coda-slider-effect/ -(function(){ - $.slider = function(){ - var $panels = $('#slider .panel'); - var $container = $('#slider .scrollContainer'); - if (!$panels[0]) return false - - // if false, we'll float all the panels left and fix the width - // of the container - var horizontal = true; - - // float the panels left if we're going horizontal - if (horizontal) { - $panels.css({ - 'float' : 'left', - 'position' : 'relative' // IE fix to ensure overflow is hidden - }); - - // calculate a new width for the container (so it holds all panels) - $container.css('width', $panels[0].offsetWidth * $panels.length); - } - - // collect the scroll object, at the same time apply the hidden overflow - // to remove the default scrollbars that will appear - var $scroll = $('#slider .scroll').css('overflow', 'hidden'); - - // apply our left + right buttons - //$scroll - //.before('<img class="scrollButtons left half-hidden" src="/images/icons/left.png" />') - //.after('<img class="scrollButtons right half-hidden" src="/images/icons/right.png" />'); - - // handle nav selection - function selectNav() { - $(this) - .parents('ul:first') - .find('a') - .removeClass('selected') - .end() - .end() - .addClass('selected'); - } - - $('#slider .navigation').find('a').click(selectNav); - - // go find the navigation link that has this target and select the nav - function trigger(data) { - var el = $('#slider .navigation').find('a[href$="' + data.id + '"]').get(0); - selectNav.call(el); - $.scrollTo('#header'); - } - - if (window.location.hash) { - trigger({ id : window.location.hash.substr(1) }); - } else { - $('ul.navigation a:first').click(); - } - - // offset is used to move to *exactly* the right place, since I'm using - // padding on my example, I need to subtract the amount of padding to - // the offset. Try removing this to get a good idea of the effect - var offset = parseInt((horizontal ? - $container.css('paddingTop') : - $container.css('paddingLeft')) - || 0) * -1; - - - var scrollOptions = { - target: $scroll, // the element that has the overflow - - // can be a selector which will be relative to the target - items: $panels, - - navigation: '.navigation a', - - // selectors are NOT relative to document, i.e. make sure they're unique - prev: 'img.left', - next: 'img.right', - - // allow the scroll effect to run both directions - axis: 'xy', - - onAfter: trigger, // our final callback - - offset: offset, - - // duration of the sliding effect - duration: 500, - - // easing - can be used with the easing plugin: - // http://gsgd.co.uk/sandbox/jquery/easing/ - easing: 'swing' - }; - - // apply serialScroll to the slider - we chose this plugin because it - // supports// the indexed next and previous scroll along with hooking - // in to our navigation. - $('#slider').serialScroll(scrollOptions); - - // now apply localScroll to hook any other arbitrary links to trigger - // the effect - $.localScroll(scrollOptions); - - // finally, if the URL has a hash, move the slider in to position, - // setting the duration to 1 because I don't want it to scroll in the - // very first page load. We don't always need this, but it ensures - // the positioning is absolutely spot on when the pages loads. - scrollOptions.duration = 1; - $.localScroll.hash(scrollOptions); - } -})(jQuery); -
D resources/js/tooltips.js

@@ -1,35 +0,0 @@

-var dark_tip = { - style: { background:'#222222', - color: '#cccccc', - border: { - width: 1, - radius: 6, - color: '#222222' - }, - tip: true }, - position: { - corner: { - target: 'center', - tooltip: 'bottomLeft' - } - } -}; - -var extended_tip = { - hide: {when: 'mouseout', fixed: true}, - style: { background:'#222222', - color: '#cccccc', - width: 600, - border: { - width: 1, - radius: 6, - color: '#222222' - }, - tip: true }, - position: { - corner: { - target: 'center', - tooltip: 'bottomLeft' - } - } -}