Skip to content

Instantly share code, notes, and snippets.

@acsellers
Last active August 29, 2015 13:57
Show Gist options
  • Save acsellers/9898128 to your computer and use it in GitHub Desktop.
Save acsellers/9898128 to your computer and use it in GitHub Desktop.
Revel booking layout in multitemplate
{{ extends "layouts/base.html" }}
{{ block "head" }}
<title>{{.title}}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" media="screen" href="/public/css/main.css">
{{range .moreStyles}}
<link rel="stylesheet" type="text/css" href="/public/{{.}}">
{{end}}
<script src="/public/js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/public/js/sessvars.js" type="text/javascript" charset="utf-8"></script>
{{range .moreScripts}}
<script src="/public/{{.}}" type="text/javascript" charset="utf-8"></script>
{{end}}
{{ end_block }}
{{ block "content" }}
<div id="content">
{{if .flash.error}}
<p class="fError">
<strong>{{.flash.error}}</strong>
</p>
{{end}}
{{if .flash.success}}
<p class="fSuccess">
<strong>{{.flash.success}}</strong>
</p>
{{end}}
{{ yield }}
</div>
{{ end_block }}
!!!
%html
%head
= yield "head"
%body
= block "header"
#header
= if .user
#options
Connected as {{.user.Username}} |
%a(href="{{ url "Hotels.Index" }}") Search
|
%a(href="{{ url "Hotels.Settings" }}") Settings
|
%a(href="{{ url "Application.Logout" }}") Logout
= end_block
= yield "content"
= block "footer"
#footer
Created with the
%a(href="http://github.com/revel/revel") Revel framework
and really inspirated from the booking sample application provided by
%a(href="http://www.playframework.org") play framework,
which was really inspired by the booking sample application provided by the
%a(href="http://seamframework.org/") seam framework.
= end_block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment