]> Git — Sourcephile - comptalang.git/blob - web/templates/homepage.hamlet
Correction : Lib.Leijen.plain : IfColor.
[comptalang.git] / web / templates / homepage.hamlet
1 <h1>Welcome to Yesod!
2
3 <ol>
4 <li>Now that you have a working project you should use the #
5 \<a href="http://www.yesodweb.com/book/">Yesod book<span class="glyphicon glyphicon-book"></span></a> to learn more. #
6 You can also use this scaffolded site to explore some basic concepts.
7
8 <li> This page was generated by the #{handlerName} handler in #
9 \<em>Handler/Home.hs</em>.
10
11 <li> The #{handlerName} handler is set to generate your site's home screen in Routes file #
12 <em>config/routes
13
14 <li> The HTML you are seeing now is actually composed by a number of <em>widgets</em>, #
15 most of them are brought together by the <em>defaultLayout</em> function which #
16 is defined in the <em>Foundation.hs</em> module, and used by <em>#{handlerName}</em>. #
17 All the files for templates and wigdets are in <em>templates</em>.
18
19 <li>
20 A Widget's Html, Css and Javascript are separated in three files with the #
21 \<em>.hamlet</em>, <em>.lucius</em> and <em>.julius</em> extensions.
22
23 <li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
24
25 <hr />
26 <li #form>
27 This is an example trivial Form. Read the #
28 \<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
29 on the yesod book to learn more about them.
30 $maybe (info,con) <- submission
31 <div .message .alert .alert-success>
32 Your file's type was <em>#{fileContentType info}</em>. You say it has: <em>#{con}</em>
33 <form method=post action=@{HomeR}#form enctype=#{formEnctype}>
34 ^{formWidget}
35 <button .btn .btn-primary type="submit">
36 Send it! <span class="glyphicon glyphicon-upload"></span>
37 <hr />
38
39 <li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
40 test suite that performs tests on this page. #
41 You can run your tests by doing: <pre>yesod test</pre>