summaryrefslogtreecommitdiff
path: root/templates/homepage.hamlet
blob: c40be5cd2d542dbd0418502d55c91104419502ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<h1>_{MsgHello}

<ol>
  <li>Now that you have a working project you should use the #
    \<a href="http://www.yesodweb.com/book/">Yesod book</a> to learn more. #
    You can also use this scaffolded site to explore some basic concepts.

  <li> This page was generated by the #{handlerName} handler in #
    \<em>Handler/Root.hs</em>.

  <li> The #{handlerName} handler is set to generate your site's home screen in Routes file #
    <em>config/routes

  <li> The HTML you are seeing now is actually composed by a number of <em>widgets</em>, #
    most of them are brought together by the <em>defaultLayout</em> function which #
    is defined in the <em>Foundation.hs</em> module, and used by <em>#{handlerName}</em>. #
    All the files for templates and wigdets are in <em>templates</em>.

  <li>
    A Widget's Html, Css and Javascript are separated in three files with the #
    \<em>.hamlet</em>, <em>.lucius</em> and <em>.julius</em> extensions. 

  <li ##{aDomId}>If you had javascript enabled then you wouldn't be seeing this.
    
  <li #form>
    This is an example trivial Form. Read the #
    \<a href="http://www.yesodweb.com/book/forms">Forms chapter</a> #
    on the yesod book to learn more about them.
    $maybe (info,con) <- submission
      <div .message>
        Your file's type was <em>#{fileContentType info}</em>. You say it has: <em>#{con}</em>
    <form method=post action=@{HomeR}#form enctype=#{formEnctype}>
      ^{formWidget}
      <input type="submit" value="Send it!">

  <li> And last but not least, Testing. In <em>tests/main.hs</em> you will find a #
    test suite that performs tests on this page. #
    You can run your tests by doing: <pre>yesod test</pre>