silverstrap 

silverstrap Commit Details

Date:2013-10-20 08:55:01 (7 years 1 month ago)
Author:Nicola Fontana
Branch:bootstrap2, dev, master, master-1.0, ss3
Commit:5c4590408016a4a42091ab4ca0cc7f130a51bc27
Parents: 56cc2877bc46d62ee39ffbdd9f6893f2ae55b9db
Message:Modularized the <head> section

Include the <head> code from external files instead of hardcoding it
inside Page.ss. This makes easier to modify the head in subtemplates or
to extend Page.ss.
Changes:
Atemplates/Includes/Html5Shiv.ss (full)
Atemplates/Includes/Metadata.ss (full)
Mtemplates/Page.ss (1 diff)

File differences

templates/Includes/Html5Shiv.ss
1
2
3
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
templates/Includes/Metadata.ss
1
2
3
4
5
6
<meta charset="utf-8">
<title>$Title</title><% if $MetaDescription %>
<meta name="description" content="$MetaDescription.ATT"><% end_if %><% if $MetaKeywords %>
<meta name="keywords" content="$MetaKeywords.ATT"><% end_if %>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
$ExtraMeta
templates/Page.ss
22
33
44
5
6
7
8
9
10
11
12
13
14
5
6
7
8
159
1610
17
18
19
20
21
22
23
24
25
26
11
12
13
14
15
16
17
18
19
20
21
2722
2823
2924
<html lang="$ContentLocale">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<% base_tag %>
<% if $MetaDescription %><meta name="description" content="$MetaDescription.ATT"><% end_if %>
<% if $MetaKeywords %><meta name="keywords" content="$MetaKeywords.ATT"><% end_if %>
$ExtraMeta<title>$Title</title>
<% include Favicon %>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<% include Metadata %>
<% base_tag %>
<% include Favicon %>
<% include Html5Shiv %>
</head>
<body data-spy="scroll" data-target=".toc">
<% include Navbar %>
$Layout
<% include Sitemap %>
<% include Footer %>
<%-- List of components loaded by this web-site --%>
<% include JQuery %>
<% include Bootstrap %>
<% include Colorbox %>
<% require themedCSS(silverstrap) %>
<%-- The template is silverstripe-autotoc ready --%>
<body$BodyAutotoc>
<% include Navbar %>
$Layout
<% include Sitemap %>
<% include Footer %>
<%-- List of components loaded by this website --%>
<% include JQuery %>
<% include Bootstrap %>
<% include Colorbox %>
<% require themedCSS(silverstrap) %>
</body>
</html>

Archive Download the corresponding diff file