This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Architecture - Views
Views are templates that produce (X)HTML. You write them using:
- Special versions of Text.XHtml tags. See the Turbinado.View.XHtml docs.
- Well-formed XHTML and special tags (much as with PHP).
- HAML-ish code.
Views (as all of Haskell) are white space sensitive.
Turbinado.View.XHtml Tags
… coming soon…
XHtml Tags
… coming soon…
HAML Tags
… coming soon…
The ‘markup’ function
All Views must have a markup function. The system automatically looks for the markup function in Views when rendering pages.
Example
For a large example, see the Layout used by the Turbinado website. This Layout includes a helper function within the Layout file.
A simpler example which shows both embedded XHTML and HAML:
import Data.Maybe
markup=
<div>
<h1>Turbinado?</h1>
<div style="float:right">
<img src="http://upload.wikimedia.org/wikipedia/en/thumb/0/0e/TurbinadoSugar.jpg/757px-TurbinadoSugar.jpg" width="300" />
<% someFunction 1 %>
</div>
<p>Turbinado is an easy-to-use, <% anchorTag "/Home/Performance" "fricking fast" %> web
application framework for Haskell (and the <ahref="http://www.haskell.org/ghc">Glorious Glasgow
Haskell Compiler</a>). Naturally, this website is written in Turbinado, so head over to the
<% anchorTag"http://github.com/alsonkemp/turbinado-website/tree/master" "Git repo" %> to
see how easy it is to code websites in Turbinado.</p>
</div>
someFunction :: Int -> VHtml
someFunction i =
%span= show i
In the example above:
- Standard-ish HTML markup is used.
- Proper whitespace indentation is used.
- A call is made to anchorTag to automatically format an anchor tag.
- A module is imported (though not used).
- A function is defined and it uses HAML for its markup.
trtubinado
trturbinado is a pre-processor that converts XHTML and HAML into valid Turbinado.View.XHtml tags.







