<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5669770194033283652</id><updated>2011-07-30T21:45:53.969+02:00</updated><category term='mootools'/><category term='processing'/><category term='snipts'/><category term='blogger'/><category term='javascript'/><title type='text'>snipts</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5669770194033283652.post-7144547759280808389</id><published>2010-05-26T06:09:00.001+02:00</published><updated>2010-06-15T10:17:44.903+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snipts'/><title type='text'>rare articles - fall asleep</title><content type='html'>Analytics told me that the Snipts.blog seems to be nothing from interest. Because of this I'll use it as an experimental platform for myself in future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5669770194033283652-7144547759280808389?l=snipts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/7144547759280808389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://snipts.blogspot.com/2010/05/rare-articles.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/7144547759280808389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/7144547759280808389'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/2010/05/rare-articles.html' title='rare articles - fall asleep'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5669770194033283652.post-1755776556697302611</id><published>2010-04-06T22:36:00.013+02:00</published><updated>2010-06-15T10:11:08.005+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mootools'/><title type='text'>sniptskwicks - my very first moo-class</title><content type='html'>tahtahh. Something I wanted to do for a long time. Creating my first mootools-class. I spent so much time on understanding javascript, mootools, and github (not to mention uncountable mistakes), that I'm really proud to present you this little thing: sniptskwicks. It's a small mootools-class based on a plugin by &lt;a href="http://davidwalsh.name/mootools-kwicks" target="_blank" title="→ the article on the David Walsh Blog"&gt;David Walsh&lt;/a&gt; (again this guy, thank you man).&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;h5&gt;How to use&lt;/h5&gt;Take it the easy way or, a bit more flexible, with some options.&lt;br /&gt;&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;// the simple way - with default values:&lt;br /&gt;var mySniptsKwicky = new SniptsKwicks();&lt;br /&gt;&lt;br /&gt;// or, more flexible - using the options:&lt;br /&gt;var mySniptsKwicky = new SniptsKwicks('kwicks', {&lt;br /&gt; kwickname: 'kwk',&lt;br /&gt; starter: 1,&lt;br /&gt; duration: 600,&lt;br /&gt; opacity: [.5, .9],&lt;br /&gt; fullWidth: true,&lt;br /&gt; onShow: function(el){&lt;br /&gt;  // do something &lt;br /&gt; },&lt;br /&gt; onHide: function(el){&lt;br /&gt;  // do something&lt;br /&gt; },&lt;br /&gt; onStart: function(){&lt;br /&gt;  // do something&lt;br /&gt; }&lt;br /&gt;});&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h5&gt;Arguments&lt;/h5&gt;&lt;b&gt;list&lt;/b&gt; - (&lt;i&gt;string&lt;/i&gt;) Name of ul-element containing the kwicks.&lt;br /&gt;&lt;b&gt;options&lt;/b&gt; - (&lt;i&gt;object&lt;/i&gt;: optional) See below.&lt;br /&gt;&lt;h5&gt;Options&lt;/h5&gt;&lt;b&gt;kwickname&lt;/b&gt; - (&lt;i&gt;string&lt;/i&gt;: defaults to 'kwk') Name of the numerated html-files containing the content.&lt;br /&gt;&lt;b&gt;starter&lt;/b&gt; - (&lt;i&gt;number&lt;/i&gt;: defaults to 1) Number of the Kwick you wish to open at start.&lt;br /&gt;&lt;b&gt;duration&lt;/b&gt; - (&lt;i&gt;number&lt;/i&gt;: defaults to 500) Transition-duration for opening.&lt;br /&gt;&lt;b&gt;opacity&lt;/b&gt; - (&lt;i&gt;array&lt;/i&gt;: defaults to []) [inactive, active] numeric values for opacity 0 to 1, no Values - no fade-effect&lt;br /&gt;&lt;b&gt;fullWidth&lt;/b&gt; - (&lt;i&gt;boolean&lt;/i&gt;: defaults to false) If true maximum Width is set to window-Width, else to list-Width.&lt;br /&gt;&lt;b&gt;onShow&lt;/b&gt; - (&lt;i&gt;function&lt;/i&gt;: passes the affected element as argument) Custom event to start after a kwick is shown.&lt;br /&gt;&lt;b&gt;onHide&lt;/b&gt; - (&lt;i&gt;function&lt;/i&gt;: passes the affected element as argument) Custom event to start after a kwick is hidden.&lt;br /&gt;&lt;b&gt;onStart&lt;/b&gt; - (&lt;i&gt;function&lt;/i&gt;) Custom event to start with a delay of 600 after initialization.&lt;br /&gt;&lt;h5&gt;Example&lt;/h5&gt;Load the javascript-files to your head-section:&lt;br /&gt;&lt;pre&gt;&lt;code class="html"&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="path_to_js/mootools.core.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="path_to_js/mootools.more.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="path_to_js/sniptskwicks.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;&lt;br /&gt;s&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;Integrate the CSS-styles needed:&lt;br /&gt;&lt;pre&gt;&lt;code class="css"&gt;&lt;br /&gt;/* defines width */&lt;br /&gt;.kwicks {&lt;br /&gt;width: 1004px;&lt;br /&gt;margin: 0;&lt;br /&gt;padding: 0;&lt;br /&gt;list-style-type:none;&lt;br /&gt;clear: both;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.kwicks li {&lt;br /&gt;overflow: hidden;&lt;br /&gt;float:left;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.kwick {cursor:pointer;}&lt;br /&gt;&lt;br /&gt;/* defines kwicks-height */&lt;br /&gt;#kwicks .kwick {height: 548px;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;&lt;br /&gt;s&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;Place your kwicks-ul somewhere inside the body,...&lt;br /&gt;&lt;pre&gt;&lt;code class="html"&gt;&lt;br /&gt;&amp;lt;ul id="kwicks" class="kwicks"&amp;gt;&lt;br /&gt; &amp;lt;li&amp;gt;kwick&amp;lt;/li&amp;gt;&lt;br /&gt; &amp;lt;li&amp;gt;kwick&amp;lt;/li&amp;gt;&lt;br /&gt; &amp;lt;li&amp;gt;kwick&amp;lt;/li&amp;gt;&lt;br /&gt; &amp;lt;li&amp;gt;kwick&amp;lt;/li&amp;gt;&lt;br /&gt; &amp;lt;li&amp;gt;kwick&amp;lt;/li&amp;gt;&lt;br /&gt; &amp;lt;li&amp;gt;kwick&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;&lt;br /&gt;s&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="xs"&gt;&lt;b&gt;note:&lt;/b&gt; You'll have to define several html-files corresponding to the number of your li-elements. The class loads them inside the li's as content. Watch the &lt;a href="http://github.com/vedam/snipts.kwicks/tree/master/Demos/files/" target="_blank" title="→ Demos-directory with kwick-content files"&gt;files on github&lt;/a&gt;.&lt;/div&gt;...and on domready tell the class to do the work:&lt;br /&gt;&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;window.addEvent('domready', function(){&lt;br /&gt; var myFirstKwicky = new SniptsKwicks('kwicks', {&lt;br /&gt;  kwickname: 'kwk',&lt;br /&gt;  starter: 1,&lt;br /&gt;  duration: 600,&lt;br /&gt;  opacity: [.5, 1],&lt;br /&gt;  fullWidth: false&lt;br /&gt; });&lt;br /&gt;});&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;&lt;br /&gt;s&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5669770194033283652-1755776556697302611?l=snipts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/1755776556697302611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://snipts.blogspot.com/2010/04/sniptskwicks-my-very-first-moo-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/1755776556697302611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/1755776556697302611'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/2010/04/sniptskwicks-my-very-first-moo-class.html' title='sniptskwicks - my very first moo-class'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5669770194033283652.post-2883504527547449283</id><published>2010-04-01T14:31:00.004+02:00</published><updated>2010-04-11T11:23:41.079+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mootools'/><title type='text'>the snipts scroll-buttons</title><content type='html'>One thing I found on the &lt;a class="auto"&gt;walsh&lt;/a&gt; was a snippet for the scroll-buttons on the left here.&lt;br /&gt;I've placed the two scroll-buttons inside a wrap, which I'd like to fade a bit later on.&lt;pre&gt;&lt;code class="html"&gt;&lt;br /&gt;&amp;lt;div id="the_bttns_wrap"&amp;gt;&lt;br /&gt; &amp;lt;a id="the_totopBttn" class="bttn" title="&amp;#x2191; to top of the page"&amp;gt;h&amp;lt;/a&amp;gt;&lt;br /&gt; &amp;lt;a id="the_nextBttn" class="bttn" title="&amp;#x2193; scroll down"&amp;gt;i&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="xs"&gt;&lt;strong&gt;note:&lt;/strong&gt; I'm using my buttons with letters that get replaced by a cufon-font, so the buttons-text is just one char here. See this &lt;a href="http://snipts.blogspot.com/2010/04/button-system-using-cufon.html" title="&amp;#x2192; button system using cufon"&gt;article&lt;/a&gt; for more information.&lt;/p&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;Some lines of css. The position of the wrap is fixed.&lt;pre&gt;&lt;code class="css"&gt;&lt;br /&gt;#the_bttns_wrap {&lt;br /&gt;left: 10px;&lt;br /&gt;top: 200px;&lt;br /&gt;position: fixed;&lt;br /&gt;z-index: 10000;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.bttn {&lt;br /&gt;width: 26px;&lt;br /&gt;height: 30px;&lt;br /&gt;display: block;&lt;br /&gt;font-size: 185%;&lt;br /&gt;cursor: pointer;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;and a little bit of moo-magic&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;// the scroll-buttons function&lt;br /&gt;var scrollButtons = function () {&lt;br /&gt; var the_totopBttn = $('the_totopBttn');&lt;br /&gt; var the_nextBttn = $('the_nextBttn');&lt;br /&gt;&lt;br /&gt; // at the beginning totop is not needed. We are at top   ;-)&lt;br /&gt; the_totopBttn.set('opacity','0').setStyle('display','block');&lt;br /&gt;&lt;br /&gt; var scroll = new Fx.Scroll(document.body, {&lt;br /&gt;  duration: 500,&lt;br /&gt;  wait: false&lt;br /&gt; });&lt;br /&gt;&lt;br /&gt; // check the current scroll and fade the buttons in or out if necessary&lt;br /&gt; window.addEvent('scroll',function(e) {&lt;br /&gt;  the_totopBttn.fade((window.getScroll().y &gt; 300) ? 'in' : 'out');&lt;br /&gt;  the_nextBttn.fade((window.getScroll().y + window.getSize().y &lt; window.getScrollSize().y) ? 'in' : 'out');&lt;br /&gt; });&lt;br /&gt;&lt;br /&gt; // fading of the wrap&lt;br /&gt; $('the_bttns_wrap').addEvents({&lt;br /&gt;  'mouseenter': function(){this.fade(1)},&lt;br /&gt;  'mouseleave': function (){this.fade(.3)}&lt;br /&gt; }).fade(.3);&lt;br /&gt;&lt;br /&gt; the_totopBttn.addEvent('click', function(){&lt;br /&gt;  scroll.start(0, 0);&lt;br /&gt; });&lt;br /&gt;&lt;br /&gt; the_nextBttn.addEvent('click', function(){&lt;br /&gt;  scroll.start(0, window.getScroll().y + 450); &lt;br /&gt;  // 450 is the value to scroll down&lt;br /&gt; });&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// and on domready call the function&lt;br /&gt;window.addEvent('domready',function() {&lt;br /&gt; scrollButtons();&lt;br /&gt;});&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;s&lt;/div&gt;&lt;/pre&gt;done.&lt;br /&gt;&lt;div class="xs"&gt;&lt;strong&gt;requires: &lt;/strong&gt;&lt;a class="auto"&gt;core&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5669770194033283652-2883504527547449283?l=snipts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/2883504527547449283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://snipts.blogspot.com/2010/04/snipts-scroll-buttons.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/2883504527547449283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/2883504527547449283'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/2010/04/snipts-scroll-buttons.html' title='the snipts scroll-buttons'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5669770194033283652.post-5935692872126883829</id><published>2010-04-01T08:21:00.014+02:00</published><updated>2010-04-11T11:24:21.951+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>a button system using cufón</title><content type='html'>One idea &lt;a class="auto"&gt;cufon&lt;/a&gt; inspired me, was to create a button-font that I'm able to use where I like, in which color I like, in which size I like etc. All the advantages a normal text-link has, combined with the grafical aesthetic of image-based buttons. Plus infinite scalability. Sounds nice?&lt;a name='more'&gt;&lt;/a&gt;&lt;h5&gt;the font&lt;/h5&gt;I've done a really simple Illustrator-file which could be easily transfered to the font-editor. You'll have to generate a font with a Font-Editor (&lt;a href="http://openfontlibrary.org/wiki/FontForge" title="&amp;#x2192; FontForge" target="_blank"&gt;FontForge&lt;/a&gt; for example). This font has to get converted at the &lt;a class="auto"&gt;cufon&lt;/a&gt;-site (with the generator) into a js-file that cufon is able to render. But I don't want to dive deeper into font-creation here, that alone is enough stuff for an own blog.&lt;br /&gt;&lt;br /&gt;I've done a simple font covering my needs where the button-images are laying on the lowercase glyphs, which looks like that:&lt;br /&gt;&lt;table border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr id="buttons"&gt;  &lt;th class="xs" style="vertical-align: middle;"&gt;button&amp;nbsp;&amp;nbsp;&lt;/th&gt; &lt;/tr&gt; &lt;tr id="letters" style="height: 10px;"&gt;  &lt;th class="xs"&gt;letter&amp;nbsp;&amp;nbsp;&lt;/th&gt; &lt;/tr&gt;&lt;/table&gt;Having the font, I'm able to do more stuff, like that...&lt;br /&gt;&lt;a class="ex0"&gt;v&lt;/a&gt;&lt;br /&gt;...like that...&lt;br /&gt;&lt;a class="ex1"&gt;a&lt;/a&gt;&lt;a class="ex1"&gt;p&lt;/a&gt;&lt;a class="ex1"&gt;r&lt;/a&gt;&lt;br /&gt;&lt;a class="ex3"&gt;e&lt;/a&gt;&lt;a class="ex3"&gt;i&lt;/a&gt;&lt;a class="ex3"&gt;g&lt;/a&gt;&lt;a class="ex3"&gt;h&lt;/a&gt;&lt;a class="ex3"&gt;j&lt;/a&gt;&lt;a class="ex3"&gt;p&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a class="ex2"&gt;d&lt;/a&gt;&lt;a class="ex2"&gt;j&lt;/a&gt;&lt;a class="ex2"&gt;m&lt;/a&gt;&lt;a class="ex2"&gt;p&lt;/a&gt;&lt;a class="ex2"&gt;q&lt;/a&gt;&lt;a class="ex2"&gt;u&lt;/a&gt;&lt;a class="ex2"&gt;v&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;...or, or, or.&lt;br /&gt;Infinite possibilities.&lt;br /&gt;No Images.&lt;br /&gt;No size-limits.&lt;script type="text/javascript" charset="utf-8"&gt; var chars = ["a", "b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","z"]; var bts = $('buttons'); var ltr = $('letters');  for (var i=0; i &lt; chars.length; i++) {  var tdb = new Element('td', { 'html': '&lt;a&gt;' + chars[i] + '&lt;/a&gt;' }).inject(bts);  var tdl = new Element('td', { 'text': chars[i], 'class': 'xs'}).inject(ltr).setStyles({   'text-align': 'center'  }); };  Cufon.replace('tr#buttons td', {fontFamily: 'roundedOne',  fontSize: '28px',  color: '#5f6141',  hover: {color: '#ff3300'} });   Cufon.replace('a.ex0', {fontFamily: 'roundedOne',  fontSize: '820px',  color: '#a33cb9',  hover: {color: '#d123a3'} }); $$('a.ex1').setStyles({'margin': '0 10px 0 0'}); Cufon.replace('a.ex1', {fontFamily: 'roundedOne',  fontSize: '220px',  color: '#c2d100',  hover: {color: '#00c4c2'} });  Cufon.replace('a.ex2', {fontFamily: 'roundedOne',  fontSize: '20px',  color: '#8c520c',  hover: {color: '#0c5185'} }); $$('a.ex2').setStyles({'margin': '0 20px 0 20px'});  Cufon.replace('a.ex3', {fontFamily: 'roundedOne',  fontSize: '70px',  color: '#ef592a',  hover: {color: '#000'} }); $$('a.ex3').setStyles({'margin': '0 10px 0 10px'});&lt;/script&gt;&lt;br /&gt;All you have to do is loading &lt;a class="auto"&gt;cufon&lt;/a&gt; and the button-font &lt;a href="http://fonts.snipts.de/roundedOne_400.font.js" title="&amp;#x2192; get the button-font" target="_blank"&gt;roundedOne&lt;/a&gt;.&lt;pre&gt;&lt;code class="html"&gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt; ...&lt;br /&gt; &amp;lt;script type="text/javascript" src="path_to_js/cufon.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt; &amp;lt;script type="text/javascript" src="path_to_js/roundedOne_400.font.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt; ...&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Place a button inside the html where needed.&lt;pre&gt;&lt;code class="html"&gt;&lt;br /&gt;&lt;!-- a home-button --&gt;&lt;br /&gt;&amp;lt;a class="myButtonClass" href="http://somewhere.com"&amp;gt;a&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;strong&gt;note:&lt;/strong&gt; a is the letter for the home-icon.&lt;br /&gt;And, on domready, tell cufon to replace.&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;// domready&lt;br /&gt;window.addEvent('domready',function() {&lt;br /&gt; Cufon.replace('a.myButtonClass', {&lt;br /&gt;  fontFamily: 'roundedOne',&lt;br /&gt;  // this could be done in css too if you like&lt;br /&gt;  color: '#8c520c',&lt;br /&gt;  hover: {color: '#0c5185'}&lt;br /&gt; });&lt;br /&gt;}); // end domready&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;that's all.&lt;br /&gt;Next idea: using cufon for interface-elements, but I think that's something for another article.  ;-)&lt;br /&gt;&lt;div class="xs"&gt;&lt;strong&gt;requires: &lt;/strong&gt;&lt;a class="auto"&gt;cufon&lt;/a&gt;, the button-font &lt;a href="http://fonts.snipts.de/roundedOne_400.font.js" title="&amp;#x2192; get the button-font" target="_blank"&gt;roundedOne&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5669770194033283652-5935692872126883829?l=snipts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/5935692872126883829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://snipts.blogspot.com/2010/04/button-system-using-cufon.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/5935692872126883829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/5935692872126883829'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/2010/04/button-system-using-cufon.html' title='a button system using cufón'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5669770194033283652.post-8614298068042660165</id><published>2010-03-30T18:09:00.009+02:00</published><updated>2010-06-15T10:19:37.928+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snipts'/><title type='text'>discussion</title><content type='html'>For my taste discussing scripts or articles isn't really elegant within blogger, so I decided to create a google group. You'll find it here: &lt;a class="auto"&gt;&lt;strike&gt;group&lt;/strike&gt;&lt;/a&gt;. We'll have to see, if it works better there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5669770194033283652-8614298068042660165?l=snipts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/8614298068042660165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://snipts.blogspot.com/2010/03/discussing-and-commenting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/8614298068042660165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/8614298068042660165'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/2010/03/discussing-and-commenting.html' title='discussion'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5669770194033283652.post-7602452868703466701</id><published>2010-03-30T16:06:00.015+02:00</published><updated>2010-04-11T11:24:51.359+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='mootools'/><title type='text'>auto-linking with mootools</title><content type='html'>I hate doing things more than, let's say, twice. So I decided to do this little snippet to simplify linking inside articles.&lt;a name='more'&gt;&lt;/a&gt;&lt;h5&gt;preparation&lt;/h5&gt;First I've defined an object containing all often-used links I want to get replaced. Shortnames as key, display-name and link as value-array.&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;var linkObj = {&lt;br /&gt; // these here are for my special needs. Modify them matching yours.&lt;br /&gt; // syntax&lt;br /&gt; // 'short name': ['display name', 'http://link-adress']&lt;br /&gt; 'moo': ["mootools", "http://mootools.net"], &lt;br /&gt; 'core': ["mootools.core", "http://mootools.net/core"],&lt;br /&gt; 'more': ["mootools.more", "http://mootools.net/more"],&lt;br /&gt; 'cufon': ["cufón", "http://cufon.shoqolate.com/generate/"],&lt;br /&gt; 'lighter': ["lighter.js", "http://pradador.com/code/lighterjs/"],&lt;br /&gt; 'pjs': ["processing.js", "http://processingjs.org/"]&lt;br /&gt;};&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The auto-link-element have to be placed in the text where needed. The element-text should correspond to a key in the defined linkObj-var.&lt;pre&gt;&lt;code class="html"&gt;&lt;br /&gt;&amp;lt;a class="auto"&amp;gt;core&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;!-- after the autoLinker-function it gets replaced with: --&gt;&lt;br /&gt;&amp;lt;a class="auto" title="&amp;#x2192; mootools.core" href="http://mootools.net/core" target="_blank"&amp;gt;mootools.core&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;strong&gt;note:&lt;/strong&gt; these values match my linkObj-var.&lt;br /&gt;&lt;h5&gt;the replacement-function&lt;/h5&gt;This function connects the text inside the found links with the corresponding key-value-pair inside the defined linkObj.&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;var autoLinker = function (links) {&lt;br /&gt; $each(links, function (link) {&lt;br /&gt;  link.set({&lt;br /&gt;   'href': linkObj[link.get('text')][1],&lt;br /&gt;   'text': linkObj[link.get('text')][0],&lt;br /&gt;   'title': '\u2192 ' + linkObj[link.get('text')][0],&lt;br /&gt;   'target': '_blank'&lt;br /&gt;  })&lt;br /&gt; });&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h5&gt;a little moooh&lt;/h5&gt;Search for replacement elements and if found replace them. The $$('a.auto') catches all the links and then we send them to the autoLinker-function.&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;// domready&lt;br /&gt;window.addEvent('domready',function() {&lt;br /&gt; if ($$('a.auto').length) {autoLinker($$('a.auto'))};&lt;br /&gt;}); // end domready&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h5&gt;the complete code&lt;/h5&gt;&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;var linkObj = {&lt;br /&gt; // replace with key-value pairs that match your needs&lt;br /&gt; 'moo': ["mootools", "http://mootools.net"], &lt;br /&gt; 'core': ["mootools.core", "http://mootools.net/core"],&lt;br /&gt; 'more': ["mootools.more", "http://mootools.net/more"],&lt;br /&gt; 'cufon': ["cufón", "http://cufon.shoqolate.com/generate/"],&lt;br /&gt; 'lighter': ["lighter.js", "http://pradador.com/code/lighterjs/"],&lt;br /&gt; 'pjs': ["processing.js", "http://processingjs.org/"]&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;var autoLinker = function (links) {&lt;br /&gt; $each(links, function (link) {&lt;br /&gt;  link.set({&lt;br /&gt;   'href': linkObj[link.get('text')][1],&lt;br /&gt;   'text': linkObj[link.get('text')][0],&lt;br /&gt;   'title': '\u2192 ' + linkObj[link.get('text')][0],&lt;br /&gt;   'target': '_blank'&lt;br /&gt;  })&lt;br /&gt; });&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// domready&lt;br /&gt;window.addEvent('domready',function() {&lt;br /&gt; if ($$('a.auto').length) {autoLinker($$('a.auto'))};&lt;br /&gt;}); // end domready&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;s&lt;/div&gt;&lt;/pre&gt;Is that something that's worthy converting to a mootools-class? For my taste it's too simple, just standard-knowledge. What do you think? Let me know.&lt;div class="xs"&gt;&lt;strong&gt;requires: &lt;/strong&gt;&lt;a class="auto"&gt;core&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5669770194033283652-7602452868703466701?l=snipts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/7602452868703466701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://snipts.blogspot.com/2010/03/auto-linking-with-mootools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/7602452868703466701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/7602452868703466701'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/2010/03/auto-linking-with-mootools.html' title='auto-linking with mootools'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5669770194033283652.post-2960666371540378922</id><published>2010-03-30T10:23:00.013+02:00</published><updated>2010-04-11T11:43:05.908+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='mootools'/><title type='text'>blogger-archiv with mootools accordion</title><content type='html'>A practise I've done with my sidebar-archiv here on the rightusing &lt;a class="auto"&gt;core&lt;/a&gt; and &lt;a class="auto"&gt;more&lt;/a&gt;.&lt;h5&gt;the template-code&lt;/h5&gt;First of all the definition of my blogger-sidebar-widget "Archiv" inside my blogger-template.&lt;strong&gt;note:&lt;/strong&gt; the gadget should be defined as&lt;br /&gt;&lt;ul&gt; &lt;li&gt;hirarchy&lt;/li&gt; &lt;li&gt;show post-titles&lt;/li&gt; &lt;li&gt;and monthly (in the Gadget-Prefs)&lt;/li&gt;&lt;/ul&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;pre&gt;&lt;code class="html"&gt;&lt;br /&gt;&lt;b:section class="sidebar" id="sidebar" preferred="yes"&gt;&lt;br /&gt;  &lt;b:widget id="BlogArchive1" locked="false" title="archiv" type="BlogArchive"&gt;&lt;/b:widget&gt;&lt;br /&gt;&lt;/b:section&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;s&lt;/div&gt;&lt;/pre&gt;&lt;h5&gt;the css&lt;/h5&gt;Some lines of CSS for styling. &lt;strong&gt;note:&lt;/strong&gt; I've no need to show the archiv-title, so I set it to: display:none [line 01-03]&lt;pre&gt;&lt;code class="css"&gt;&lt;br /&gt;#sidebar h2 {&lt;br /&gt;display: none;&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;.BlogArchive #ArchiveList ul li {&lt;br /&gt;margin: 0;&lt;br /&gt;padding: 0;&lt;br /&gt;text-indent: 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.BlogArchive #ArchiveList ul.posts li,&lt;br /&gt;.BlogArchive #ArchiveList ul ul li {&lt;br /&gt;padding-left: 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebar li {&lt;br /&gt;margin-left: 0;&lt;br /&gt;list-style-type: none;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebar a.ytoggle {&lt;br /&gt;padding: 3px 0px 5px 8px;&lt;br /&gt;font: bold 145% Georgia, "Times New Roman", Times, serif;&lt;br /&gt;display: block;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebar ul.ycontent {&lt;br /&gt;margin-bottom: 1px;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebar a.mtoggle {&lt;br /&gt;padding: 3px 0px 3px 8px;&lt;br /&gt;font: normal 115% Georgia, "Times New Roman", Times, serif;&lt;br /&gt;display: block;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebar ul.mcontent {&lt;br /&gt;margin-bottom: 1px;&lt;br /&gt;background-color: #eef3a8;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebar ul.mcontent a {&lt;br /&gt;padding: 3px 3px 3px 10px;&lt;br /&gt;display: block;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebar ul.mcontent a:hover {&lt;br /&gt;background-color: #fafed6;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;s&lt;/div&gt;&lt;/pre&gt;&lt;h5&gt;preparing the elements&lt;/h5&gt;After the domready-Event get the Blog-archiv-Element, 'BlogArchive1_ArchiveList' in my case [line 01].Then start preparing for the accordion [02].I don't need the blogger-default-togglers, no counts and removed the blogger-default-states [06-08]. &lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;var blogArchiv = $('BlogArchive1_ArchiveList');&lt;br /&gt;buildArchiv(); // start preparing for accordion&lt;br /&gt;&lt;br /&gt;var buildArchiv = function () {&lt;br /&gt; var menus = blogArchiv.getElements('li a.post-count-link');&lt;br /&gt; blogArchiv.getElements('a.toggle').dispose();&lt;br /&gt; blogArchiv.getElements('span.post-count').dispose();&lt;br /&gt; blogArchiv.getElements('li.archivedate').removeClass('collapsed').removeClass('expanded');&lt;br /&gt; $each(menus, function (menu) {&lt;br /&gt;  var inhalt = menu.getParent('ul');&lt;br /&gt;  menu.inject(inhalt, 'before');&lt;br /&gt; });&lt;br /&gt;&lt;br /&gt; var yeartoggler = blogArchiv.getChildren('a.post-count-link').addClass('ytoggle roundedT5');&lt;br /&gt; var yearcontent = blogArchiv.getChildren('ul.hierarchy').addClass('ycontent');&lt;br /&gt; buildAccordion(yeartoggler, yearcontent);&lt;br /&gt; &lt;br /&gt; $each(yearcontent, function (year) {&lt;br /&gt;  var monthtoggler = year.getElements('a.post-count-link').addClass('mtoggle');&lt;br /&gt;  var monthcontent = year.getElements('ul.hierarchy').addClass('mcontent');&lt;br /&gt;  buildAccordion(monthtoggler, monthcontent);&lt;br /&gt; });&lt;br /&gt;};&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h5&gt;the accordion&lt;/h5&gt;I'm using the standard Accordion-Class from mootools-more here, and gave it 'mouseenter' as trigger-event [10].&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;var buildAccordion = function (toggler, elements) {&lt;br /&gt;  var accordion = new Fx.Accordion(toggler, elements, {&lt;br /&gt;   display: 0,&lt;br /&gt;   show: 0,&lt;br /&gt;   duration: 500,&lt;br /&gt;   opacity: true,&lt;br /&gt;   transition: Fx.Transitions.Quart.easeOut,&lt;br /&gt;   // I wanted my accordion to react on 'mouseenter'&lt;br /&gt;   // the default trigger is 'click'&lt;br /&gt;   trigger: 'mouseenter'&lt;br /&gt;  });&lt;br /&gt; }&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h5&gt;the complete code&lt;/h5&gt;&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;// the domready-function once the content is loaded&lt;br /&gt;window.addEvent('domready',function() {&lt;br /&gt; var blogArchiv = $('BlogArchive1_ArchiveList');&lt;br /&gt; buildArchiv(); // start preparing for accordion&lt;br /&gt; &lt;br /&gt; var buildArchiv = function () {&lt;br /&gt;  var years = blogArchiv.getElements('li a.post-count-link');&lt;br /&gt;  blogArchiv.getElements('a.toggle').dispose();&lt;br /&gt;  blogArchiv.getElements('span.post-count').dispose(); &lt;br /&gt;  blogArchiv.getElements('li.archivedate').removeClass('collapsed').removeClass('expanded');&lt;br /&gt;  &lt;br /&gt;  $each(years, function (year) {&lt;br /&gt;   var elements = year.getParent('ul');&lt;br /&gt;   year.inject(elements, 'before');&lt;br /&gt;  });&lt;br /&gt;  &lt;br /&gt;  // getting the year and adding CSS-Classes&lt;br /&gt;  var yeartoggler = blogArchiv.getChildren('a.post-count-link').addClass('ytoggle roundedT5');&lt;br /&gt;  var yearcontent = blogArchiv.getChildren('ul.hierarchy').addClass('ycontent');&lt;br /&gt;  buildAccordion(yeartoggler, yearcontent);&lt;br /&gt;  &lt;br /&gt;  // same with months&lt;br /&gt;  $each(yearcontent, function (year) {&lt;br /&gt;   var monthtoggler = year.getElements('a.post-count-link').addClass('mtoggle');&lt;br /&gt;   var monthcontent = year.getElements('ul.hierarchy').addClass('mcontent');&lt;br /&gt;   buildAccordion(monthtoggler, monthcontent);&lt;br /&gt;  });&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; var buildAccordion = function (toggler, elements) {&lt;br /&gt;  var accordion = new Fx.Accordion(toggler, elements, {&lt;br /&gt;   display: 0,&lt;br /&gt;   show: 0,&lt;br /&gt;   duration: 500,&lt;br /&gt;   opacity: true,&lt;br /&gt;   transition: Fx.Transitions.Quart.easeOut,&lt;br /&gt;   // I wanted my accordion to react on 'mouseenter'&lt;br /&gt;   // the default trigger is 'click'&lt;br /&gt;   trigger: 'mouseenter'&lt;br /&gt;  });&lt;br /&gt; }&lt;br /&gt;}); // end domready&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;s&lt;/div&gt;&lt;/pre&gt;&lt;div class="xs"&gt;&lt;strong&gt;requires: &lt;/strong&gt;&lt;a class="auto"&gt;core&lt;/a&gt;&lt;a class="auto"&gt;more&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5669770194033283652-2960666371540378922?l=snipts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/2960666371540378922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://snipts.blogspot.com/2010/03/adding-accordion-to-blogger-sidebar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/2960666371540378922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/2960666371540378922'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/2010/03/adding-accordion-to-blogger-sidebar.html' title='blogger-archiv with mootools accordion'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5669770194033283652.post-5357676518904112923</id><published>2010-03-28T16:57:00.019+02:00</published><updated>2010-04-01T11:51:04.549+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><title type='text'>Processing.js with Random lines</title><content type='html'>To dive a bit more into Pjs, I've just modified some existing example-scripts there a bit. A good starting point, I think. Watch the &lt;a href="http://labs.snipts.de/processing/random-lines_one.html" rel="lightbox[pjs1 750 530]" title="processing.js:: example: random lines 1"&gt;lab »&lt;/a&gt;&lt;a href="http://labs.snipts.de/processing/random-lines_two.html" rel="lightbox[pjs1 750 530]" title="processing.js:: example: random lines 2"&gt;&lt;/a&gt;&lt;a href="http://labs.snipts.de/processing/random-lines_three.html" rel="lightbox[pjs1 1000 600]" title="processing.js:: example: random lines 3"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5669770194033283652-5357676518904112923?l=snipts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/5357676518904112923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://snipts.blogspot.com/2010/03/processingjs-with-random-lines.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/5357676518904112923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/5357676518904112923'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/2010/03/processingjs-with-random-lines.html' title='Processing.js with Random lines'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5669770194033283652.post-2397326368256918473</id><published>2010-03-21T21:44:00.029+01:00</published><updated>2010-03-28T20:21:27.984+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><title type='text'>processing.js? What?</title><content type='html'>The short description from the &lt;a href="http://processingjs.org/" target="_blank" title="watch processing.js"&gt;processing.js-site »&lt;/a&gt;:Processing.js (Oh man, I'll name that Pjs to simplify) is an open programming language for people who want to program images, animation, and interactions for the web without using Flash or Java applets. Pjs uses Javascript to draw shapes and manipulate images on the HTML5 Canvas element.&lt;br /&gt;The Processing language was created by Ben Fry and Casey Reas.In 2008, John Resig ported the 2D context of Processing to Javascript for use in web pages.&lt;br /&gt;&lt;br /&gt;I'm planning to setup some Pjs-examples in here regularly. For some deeper information have a look on their site. It's worth it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5669770194033283652-2397326368256918473?l=snipts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/2397326368256918473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://snipts.blogspot.com/2010/03/test-snipts-inline.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/2397326368256918473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/2397326368256918473'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/2010/03/test-snipts-inline.html' title='processing.js? What?'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5669770194033283652.post-7169314941707581267</id><published>2010-02-23T19:17:00.023+01:00</published><updated>2010-04-11T11:43:57.665+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mootools'/><title type='text'>syntax-highlighting with mootools</title><content type='html'>Fortunately I found this wonderful class which brings glance to my scripts.It's named "Lighter.js" and could be downloaded &lt;a href="http://pradador.com/code/lighterjs/" target="_blank" title="lighter.js at pradador.com »"&gt;here »&lt;/a&gt;. It's based on the mootools-framework and is really simple to use.&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;I've taken these instructions from the Lighter-site. For detailed information about all the options you should have a look there. Simply place mootools-core and Lighter.js into your html-header-section.&lt;br /&gt;&lt;pre&gt;&lt;code class="html"&gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt; ...&lt;br /&gt; &amp;lt;script type="text/javascript" src="path_to_js/mootools.core.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt; &amp;lt;script type="text/javascript" src="path_to_js/Lighter.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt; ...&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;&lt;br /&gt;s&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;Prepare the code you wish to get "highlighted". Put it inside a pre-tag.&lt;br /&gt;The class of the pre defines the language ('js') and which theme (':git') you'll like it to have.&lt;pre&gt;&lt;code class="html"&gt;&lt;br /&gt;&amp;lt;pre id="the_javascript_code" class="js:git"&amp;gt; &lt;br /&gt; // just a bit of code for demo&lt;br /&gt; var test = "this is your testscript";&lt;br /&gt; alert(test);&lt;br /&gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;s&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;And finally just use the following function inside a ‘domready’- or ‘onLoad’-function to get your code highlighted.&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;// $('the_javascript_code') is the defined pre-element&lt;br /&gt;// 'altLines' is just one of the options Lighter.js have&lt;br /&gt;$('the_javascript_code').light({ altLines: 'hover' });&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;s&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;Done. Lighter cares about styles for you.&lt;br /&gt;&lt;h5&gt;Highlight multiple elements&lt;/h5&gt;Because I'm too lazy to adress each single pre-tag with it's own id, I've done syntax-highlighting with a function, that uses an element-collection.&lt;pre&gt;&lt;code class="js"&gt;&lt;br /&gt;var convertSyntax = function (el) {&lt;br /&gt; var code = el.getElements('pre');&lt;br /&gt; if (code.length) {&lt;br /&gt;  for (var i=0; i &amp;lt; code.length; i++) {&lt;br /&gt;   code[i].getElement('code').light({&lt;br /&gt;    // these are some of the options&lt;br /&gt;    // 'Lighter.js' has to offer&lt;br /&gt;    altLines: 'hover',&lt;br /&gt;    indent: 2,&lt;br /&gt;    mode: 'ol',     &lt;br /&gt;    flame: 'git'&lt;br /&gt;   });&lt;br /&gt;  };&lt;br /&gt; };&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;// when all the content is loaded&lt;br /&gt;// just call the function with the element containing&lt;br /&gt;// all the pre-tags you'll want to get 'lighted'&lt;br /&gt;window.addEvent('domready',function() {&lt;br /&gt; convertSyntax($('page_element')); // $('page_element') contains all pre-tags&lt;br /&gt;});&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;div class="clipboard"&gt;s&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;As said, have a closer look at the &lt;a href="http://pradador.com/code/lighterjs/" target="_blank" title="lighter.js at pradador.com »"&gt;pradador-site »&lt;/a&gt; for a much more detailed description or watch the &lt;a href="http://pradador.com/code/lighterjs/demo/" target="_blank" title="examples with Lighter.js »"&gt;demos »&lt;/a&gt; there.&lt;div class="xs"&gt;&lt;strong&gt;requires: &lt;/strong&gt;&lt;a class="auto"&gt;core&lt;/a&gt;&lt;a class="auto"&gt;lighter&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5669770194033283652-7169314941707581267?l=snipts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/7169314941707581267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://snipts.blogspot.com/2010/02/syntax-highlighting-with-mootools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/7169314941707581267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/7169314941707581267'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/2010/02/syntax-highlighting-with-mootools.html' title='syntax-highlighting with mootools'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5669770194033283652.post-1922407150917114993</id><published>2010-02-23T17:46:00.000+01:00</published><updated>2010-02-24T07:43:17.534+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snipts'/><title type='text'>snipts started</title><content type='html'>Ok. It took me some time to get the blogger-template done, but now snipts is up, running and awaiting content.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5669770194033283652-1922407150917114993?l=snipts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snipts.blogspot.com/feeds/1922407150917114993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://snipts.blogspot.com/2010/02/snipts-started.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/1922407150917114993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5669770194033283652/posts/default/1922407150917114993'/><link rel='alternate' type='text/html' href='http://snipts.blogspot.com/2010/02/snipts-started.html' title='snipts started'/><author><name>snipts</name><uri>http://www.blogger.com/profile/13462284907256495643</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_K_p4ybfEGIk/S8GPsMiNoUI/AAAAAAAAAC0/GTPNgHZzX6M/s800/snipts_user.png'/></author><thr:total>0</thr:total></entry></feed>
