Merge branch 'master' of github.com:yogsototh/Scratch

This commit is contained in:
Yann Esposito (Yogsototh) 2012-01-20 22:37:07 +01:00
commit b54905374f
5 changed files with 20 additions and 20 deletions

View file

@ -337,7 +337,7 @@ If you take a look at them, the format is not %html but hamlet.
</code>
It is time to change the default %css.
Add a file named `default-layout.lucius` inside the `template/` directory containing:
Add a file named `default-layout.lucius` inside the `templates/` directory containing:
<code class="css" file="default-layout.lucius">
body {
@ -442,7 +442,7 @@ getEchoR theText = do
Some %html (more precisely hamlet) is written directly inside our handler.
We should put this part inside another file.
Create the new file `template/echo.hamlet` containing:
Create the new file `templates/echo.hamlet` containing:
<code class="haskell" file="echo.hamlet">
<h1> #{theText}
@ -614,7 +614,7 @@ getBlogR = do
-- Get the list of articles inside the database.
articles <- runDB $ selectList [] [Desc ArticleTitle]
-- We'll need the two "objects": articleWidget and enctype
-- to construct the form (see template/articles.hamlet).
-- to construct the form (see templates/articles.hamlet).
((_,articleWidget), enctype) <- generateFormPost entryForm
defaultLayout $ do
$(widgetFile "articles")
@ -702,7 +702,7 @@ getArticleR articleId = do
The `get404` function try to do a get on the DB.
If it fails it return a 404 page.
The rest should be clear.
Here is the content of `template/article.hamlet`:
Here is the content of `templates/article.hamlet`:
<code class="html" file="article.hamlet">
<h1> #{articleTitle article}

View file

@ -338,7 +338,7 @@ If you take a look at them, the format is not %html but hamlet.
</code>
It is time to change the default %css.
Add a file named `default-layout.lucius` inside the `template/` directory containing:
Add a file named `default-layout.lucius` inside the `templates/` directory containing:
<code class="css" file="default-layout.lucius">
body {
@ -443,7 +443,7 @@ getEchoR theText = do
Some %html (more precisely hamlet) is written directly inside our handler.
We should put this part inside another file.
Create the new file `template/echo.hamlet` containing:
Create the new file `templates/echo.hamlet` containing:
<code class="haskell" file="echo.hamlet">
<h1> #{theText}
@ -615,7 +615,7 @@ getBlogR = do
-- Get the list of articles inside the database.
articles <- runDB $ selectList [] [Desc ArticleTitle]
-- We'll need the two "objects": articleWidget and enctype
-- to construct the form (see template/articles.hamlet).
-- to construct the form (see templates/articles.hamlet).
((_,articleWidget), enctype) <- generateFormPost entryForm
defaultLayout $ do
$(widgetFile "articles")
@ -703,7 +703,7 @@ getArticleR articleId = do
The `get404` function try to do a get on the DB.
If it fails it return a 404 page.
The rest should be clear.
Here is the content of `template/article.hamlet`:
Here is the content of `templates/article.hamlet`:
<code class="html" file="article.hamlet">
<h1> #{articleTitle article}

View file

@ -343,7 +343,7 @@ If you take a look at them, the format is not %html but hamlet.
</code>
It is time to change the default %css.
Add a file named `default-layout.lucius` inside the `template/` directory containing:
Add a file named `default-layout.lucius` inside the `templates/` directory containing:
<code class="css" file="default-layout.lucius">
body {
@ -448,7 +448,7 @@ getEchoR theText = do
Some %html (more precisely hamlet) is written directly inside our handler.
We should put this part inside another file.
Create the new file `template/echo.hamlet` containing:
Create the new file `templates/echo.hamlet` containing:
<code class="haskell" file="echo.hamlet">
<h1> #{theText}
@ -620,7 +620,7 @@ getBlogR = do
-- Get the list of articles inside the database.
articles <- runDB $ selectList [] [Desc ArticleTitle]
-- We'll need the two "objects": articleWidget and enctype
-- to construct the form (see template/articles.hamlet).
-- to construct the form (see templates/articles.hamlet).
((_,articleWidget), enctype) <- generateFormPost entryForm
defaultLayout $ do
$(widgetFile "articles")
@ -708,7 +708,7 @@ getArticleR articleId = do
The `get404` function try to do a get on the DB.
If it fails it return a 404 page.
The rest should be clear.
Here is the content of `template/article.hamlet`:
Here is the content of `templates/article.hamlet`:
<code class="html" file="article.hamlet">
<h1> #{articleTitle article}

View file

@ -421,7 +421,7 @@ If you take a look at them, the format is not <span class="sc">html</span> but h
</pre>
<p>It is time to change the default <span class="sc">css</span>.
Add a file named <code>default-layout.lucius</code> inside the <code>template/</code> directory containing:</p>
Add a file named <code>default-layout.lucius</code> inside the <code>templates/</code> directory containing:</p>
<div class="code"><div class="file"><a href="/Scratch/en/blog/Yesod-tutorial-for-newbies/code/default-layout.lucius"> &#x27A5; default-layout.lucius </a></div><div class="withfile">
<pre class="twilight">
@ -530,7 +530,7 @@ getEchoR theText = <span class="Keyword">do</span>
<p>Some <span class="sc">html</span> (more precisely hamlet) is written directly inside our handler.
We should put this part inside another file.
Create the new file <code>template/echo.hamlet</code> containing:</p>
Create the new file <code>templates/echo.hamlet</code> containing:</p>
<div class="code"><div class="file"><a href="/Scratch/en/blog/Yesod-tutorial-for-newbies/code/echo.hamlet"> &#x27A5; echo.hamlet </a></div><div class="withfile">
<pre class="twilight">
@ -712,7 +712,7 @@ getBlogR = <span class="Keyword">do</span>
<span class="Comment"><span class="Comment">--</span> Get the list of articles inside the database.</span>
articles &lt;- runDB $ selectList [] [<span class="Constant">Desc</span> <span class="Constant">ArticleTitle</span>]
<span class="Comment"><span class="Comment">--</span> We'll need the two &quot;objects&quot;: articleWidget and enctype</span>
<span class="Comment"><span class="Comment">--</span> to construct the form (see template/articles.hamlet).</span>
<span class="Comment"><span class="Comment">--</span> to construct the form (see templates/articles.hamlet).</span>
((_,articleWidget), enctype) &lt;- generateFormPost entryForm
defaultLayout $ <span class="Keyword">do</span>
$(widgetFile <span class="String"><span class="String">&quot;</span>articles<span class="String">&quot;</span></span>)
@ -804,7 +804,7 @@ getArticleR articleId = <span class="Keyword">do</span>
<p>The <code>get404</code> function try to do a get on the DB.
If it fails it return a 404 page.
The rest should be clear.
Here is the content of <code>template/article.hamlet</code>:</p>
Here is the content of <code>templates/article.hamlet</code>:</p>
<div class="code"><div class="file"><a href="/Scratch/en/blog/Yesod-tutorial-for-newbies/code/article.hamlet"> &#x27A5; article.hamlet </a></div><div class="withfile">
<pre class="twilight">

View file

@ -422,7 +422,7 @@ If you take a look at them, the format is not <span class="sc">html</span> but h
</pre>
<p>It is time to change the default <span class="sc">css</span>.
Add a file named <code>default-layout.lucius</code> inside the <code>template/</code> directory containing:</p>
Add a file named <code>default-layout.lucius</code> inside the <code>templates/</code> directory containing:</p>
<div class="code"><div class="file"><a href="/Scratch/fr/blog/Yesod-tutorial-for-newbies/code/default-layout.lucius"> &#x27A5; default-layout.lucius </a></div><div class="withfile">
<pre class="twilight">
@ -531,7 +531,7 @@ getEchoR theText = <span class="Keyword">do</span>
<p>Some <span class="sc">html</span> (more precisely hamlet) is written directly inside our handler.
We should put this part inside another file.
Create the new file <code>template/echo.hamlet</code> containing:</p>
Create the new file <code>templates/echo.hamlet</code> containing:</p>
<div class="code"><div class="file"><a href="/Scratch/fr/blog/Yesod-tutorial-for-newbies/code/echo.hamlet"> &#x27A5; echo.hamlet </a></div><div class="withfile">
<pre class="twilight">
@ -713,7 +713,7 @@ getBlogR = <span class="Keyword">do</span>
<span class="Comment"><span class="Comment">--</span> Get the list of articles inside the database.</span>
articles &lt;- runDB $ selectList [] [<span class="Constant">Desc</span> <span class="Constant">ArticleTitle</span>]
<span class="Comment"><span class="Comment">--</span> We'll need the two &quot;objects&quot;: articleWidget and enctype</span>
<span class="Comment"><span class="Comment">--</span> to construct the form (see template/articles.hamlet).</span>
<span class="Comment"><span class="Comment">--</span> to construct the form (see templates/articles.hamlet).</span>
((_,articleWidget), enctype) &lt;- generateFormPost entryForm
defaultLayout $ <span class="Keyword">do</span>
$(widgetFile <span class="String"><span class="String">&quot;</span>articles<span class="String">&quot;</span></span>)
@ -805,7 +805,7 @@ getArticleR articleId = <span class="Keyword">do</span>
<p>The <code>get404</code> function try to do a get on the DB.
If it fails it return a 404 page.
The rest should be clear.
Here is the content of <code>template/article.hamlet</code>:</p>
Here is the content of <code>templates/article.hamlet</code>:</p>
<div class="code"><div class="file"><a href="/Scratch/fr/blog/Yesod-tutorial-for-newbies/code/article.hamlet"> &#x27A5; article.hamlet </a></div><div class="withfile">
<pre class="twilight">