Java Reference
In-Depth Information
5.<!--[if IE 9 ]><html lang="en" class="no-js ie9"><![endif]-->
6.<!--[if (gt IE 9)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]-->
7.<head>
8.<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
9.<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
10.<title><g:layoutTitle default="Grails"/></title>
11.<meta name="viewport" content="width=device-width, initial-scale=1.0">
12.<link rel="shortcut icon" href="${resource(dir: 'images', file: 'favicon.ico')}"
type="image/x-icon">
13.<link rel="apple-touch-icon" href="${resource(dir: 'images', file: 'apple-touch-icon.png')}">
14.<link rel="apple-touch-icon" sizes="114x114" href="${resource(dir: 'images',
file: 'apple-touch-icon-retina.png')}">
15.<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">
16.<link rel="stylesheet" href="${resource(dir: 'css', file: 'mobile.css')}" type="text/css">
17.<g:layoutHead/>
18.<r:layoutResources />
19.</head>
20.<body>
21.<div id="grailsLogo" role="banner"><a href=" http://grails.org"><img src="${resource(dir:
'images', file: 'grails_logo.png')}" alt="Grails"/></a></div>
22.<g:layoutBody/>
23.<div class="footer" role="contentinfo"></div>
24.<div id="spinner" class="spinner" style="display:none;"><g:message code="spinner.alt"
default="Loading&hellip;"/></div>
25.<g:javascript library="application"/>
26.<r:layoutResources />
27.</body>
28.</html>
Lines 1 to 6 : The main.gsp page starts with <!doctype html> . This is an HTML5
doc type. Grails supports HTML5 out of the box.
Line 10 : <g:layoutTitle> is used in layouts to render the contents of the title tag
of the decorated page. The <g:layoutTitle> tag substitutes the <title> from
the view that is being merged and links it in a style sheet and favicon that will be
used by all views.
Line 17 : The <g:layoutHead> tag merges in the contents of the target view's
<head> section. <g:layoutHead> is used in layouts to render the contents of the
head tag of the decorated page.
Line 22 : <g:layoutBody> is used in layouts to output the contents of the body
tag of the decorated page. The <g:layoutBody> tag merges in the <body>
contents of the target view.
Line 25 : <g:javascript> includes JavaScript libraries and scripts and provides
a shorthand for inline JavaScript. Specifying a library tells the Ajax tags which
JavaScript provider to use.
Search WWH ::




Custom Search