Vervis/templates/homepage.hamlet

50 lines
1.9 KiB
Text
Raw Normal View History

2016-02-13 04:35:30 +01:00
<h1.jumbotron>
Welcome to Yesod!
<.page-header><h2>Starting
<section.list-group>
<span .list-group-item>
Now that you have a working project you should use the
<a href=http://www.yesodweb.com/book/>
Yesod book <span class="glyphicon glyphicon-book"></span>
to learn more.
You can also use this scaffolded site to explore some basic concepts.
<span .list-group-item>
This page was generated by the <tt>#{handlerName}</tt> handler in
<tt>Handler/Home.hs</tt>.
<span .list-group-item>
The <tt>#{handlerName}</tt> handler is set to generate your
site's home screen in Routes file
<tt>config/routes
<span .list-group-item>
The HTML you are seeing now is actually composed by a number of <em>widgets</em>, #
most of them are brought together by the <tt>defaultLayout</tt> function which #
is defined in the <tt>Foundation.hs</tt> module, and used by <tt>#{handlerName}</tt>. #
All the files for templates and wigdets are in <tt>templates</tt>.
<span .list-group-item>
A Widget's Html, Css and Javascript are separated in three files with the
<tt>.hamlet</tt>, <tt>.lucius</tt> and <tt>.julius</tt> extensions.
<span .list-group-item ##{aDomId}>
If you had javascript enabled then you wouldn't be seeing this.
<section.page-header>
<h2>Forms
<div>
This is an example trivial Form. Read the
<a href="http://www.yesodweb.com/book/forms">Forms chapter<span class="glyphicon glyphicon-bookmark"></span></a> #
on the yesod book to learn more about them.
$maybe (info,con) <- submission
<div .message .alert .alert-success>
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}
<button .btn .btn-primary type="submit">
Send it! <span class="glyphicon glyphicon-upload"></span>