Tibor Szász30 years old code addict

  • Home
  • About me
  • Projects
  • Contact me
  • RSS
  • Magyarul

2010 0202

JavaScript template engine upgraded

JavaScript template engine upgraded I'm a big fan of separating the business logic and the presentation layer. This can be easily done by PHP, ROR, Java, etc. but when you try to do it in JavaScript it's not obvious how to do it, or which is the best way.

I've researched a lot on the topic and found two schools that is used by JS template libraries:
- Template language parsing
- Procedural approach
Both are great ways to generate, it only depends on your needs.

Here are some projects worth noting:


  • JST - JavaScipt templates - Big and evolved library, Smarty like syntax, GPL
  • SWATO - Very similar to the above, it's created for Java develpers. Example.
  • Chain.js - a nice tutorial about this.
  • PURE - this is a hybrid one and library free
  • jTemplates - a jQuery plugin
  • JTL - A Django template engine port
I played with the last one. It had some basic functions such as for loop, counter, reverse order, if syntax for checking if a value exists. The only problem was that it didn't had a comparison operator for strings and variables, so I decided to upgrade it.


Category: Programming - Tags: javascript template free open-source Read more

2009 1205

Tabbed CSS only website template

Tabbed CSS only website template Did you know what a small anchor link can do for you? More, than you might think. You can turn it into an advanced navigation on your website. There is nothing new in this, it was designed to do this. This only make sense, if the scrollbars are visible in your browser, isn't it? Well, no. Anchor links even work, when the invisible content is in an overflow: hidden container. The target element should have the same ID as the anchor link's href attribute.

Show content
Very very long text... images... forms... btw my over flow is hidden...
I'm invisible by default, but your click just revealed me. :)
This is really nice, but this is too nice to be true. The bad guy this time is Opera. She refuses to play the game and anchoring simply doesn't work in overflow: hidden elements.

After some experimenting, I came up with a working solution: Opera jumps to the desired point, if the overflow is auto. Great, I only need to hide those scrollbars, and I'll have a cross browser, JavaScript free navigation system, that just rocks.

The trick is, that you have to put the overflow:auto element in an overflow: hidden wrapper, that crops the scrollbars.


Category: Programming - Tags: css template free tabs - 12 Read more

Briefing

Me myself and I
I love coding, especially for the web. I'm in the online industry for 6 years. My favourite toys are:
JavaScript, PHP, XHTML, MySQL, Canvas, Flash

My startup

The project's name is CloudDeck and you can read about it here in more detail.

Topics

  • Coffee break
  • Design & stuff
  • Generative arts
  • Programming
  • User experience

Friends

  • Kárpáti Róbert
  • Royaljerry
  • Bagi Zoltán
  • Pegazoo
  • Charles Alexander Deli
  • Bence Bangócs
  • Lunakid
  • Rapp design

Feeling so social

  • Facebook
  • IWIW
  • TurulMeme

Tags

javascript (14) php (6) mootools (5) codeigniter (4) iscaffold (4) tutorial (3) crud (3) structure-synth (2) template (2) css (2) free (2) renders (2) google (2) experience (1) design, (1) user (1) iscaffold, (1) facebook (1) twitter (1) interface (1) canvas (1) drupal (1) wordpress (1) joomla (1) data-visualisation (1) resizing (1) cms (1) soundcloud (1) beatfader (1) combinator (1) magyar (1) windows8 (1) microsoft (1) clouddeck (1) ux (1) navigation (1) progress (1) transitions (1) reason (1) email (1) music (1) ie8 (1) bugs (1) bermuda-triangle (1) easing (1) clouddeck, (1) rc1 (1) bugfix (1) slimbox (1) tagging (1) cfdg (1) experiment (1) drag-and-drop (1) svg (1) blackout (1) firefox-extension (1) class (1) library (1) sitebuild (1) utf8 (1) nl2br (1) slideshow (1) wikipedia (1) dns (1) open-source (1) infovis (1) table (1) hack (1) script (1) google-buzz (1) forge (1) data-uri (1) inspiration (1) lists (1) ajax (1) konami-codes (1) trick (1) tabs (1) rss (1)




All rights reserved, ©2008-2013 - Built on CodeIgniter framework - Konami codes - Mostly Valid XHTML 1.1 - Valid CSS 2.1