Skip to content

Commit 2f6af16

Browse files
committed
Fix invalid Site HTML - exclude additional <html> element
1 parent 3c49950 commit 2f6af16

File tree

1 file changed

+73
-72
lines changed

1 file changed

+73
-72
lines changed

ratpack-site/src/ratpack/templates/layout.gtpl

Lines changed: 73 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -4,96 +4,97 @@ yieldUnescaped '''<!doctype html>
44
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
55
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
66
'''
7-
html {
8-
head {
9-
meta(charset:'utf-8')
10-
title('Ratpack: Simple, lean & powerful HTTP apps')
117

12-
meta(name: 'apple-mobile-web-app-title', content: 'Ratpack')
13-
meta(name: 'description', content: 'Ratpack apps are lightweight, fast, composable with other tools and libraries, easy to test and enjoyable to develop.')
14-
meta(name: 'viewport', content: 'width=device-width, initial-scale=1')
8+
head {
9+
meta(charset:'utf-8')
10+
title('Ratpack: Simple, lean & powerful HTTP apps')
1511

16-
link(rel: 'author', href: '/assets/humans.txt')
17-
link(rel: 'stylesheet', href: assets['assets/lib/normalize/normalize.css'])
18-
link(rel: 'stylesheet', href: assets['assets/styles/ratpack.css'])
12+
meta(name: 'apple-mobile-web-app-title', content: 'Ratpack')
13+
meta(name: 'description', content: 'Ratpack apps are lightweight, fast, composable with other tools and libraries, easy to test and enjoyable to develop.')
14+
meta(name: 'viewport', content: 'width=device-width, initial-scale=1')
1915

20-
script(src: assets['assets/lib/modernizr/modernizr.js']) {}
21-
script(src: assets['assets/lib/prism/prism.js']) {}
22-
}
23-
body {
16+
link(rel: 'author', href: '/assets/humans.txt')
17+
link(rel: 'stylesheet', href: assets['assets/lib/normalize/normalize.css'])
18+
link(rel: 'stylesheet', href: assets['assets/styles/ratpack.css'])
2419

20+
script(src: assets['assets/lib/modernizr/modernizr.js']) {}
21+
script(src: assets['assets/lib/prism/prism.js']) {}
22+
}
23+
body {
2524

2625

27-
header(id: 'page-header') {
28-
div(class: 'ratpack-logo') {
29-
a(href: '/') { h1('Ratpack') }
30-
p('Simple, lean &amp; powerful HTTP apps')
31-
}
3226

33-
nav(class: 'social') {
34-
h2('Ratpack is on&hellip;')
35-
a(href: 'http://github.com/ratpack/', title: 'ratpack on GitHub', rel: 'external', 'GitHub')
36-
newLine()
37-
span(class: 'join', '&amp;')
38-
newLine()
39-
a(href: 'http://twitter.com/ratpackweb', title: '@ratpackweb on Twitter', rel: 'external', 'Twitter')
40-
}
27+
header(id: 'page-header') {
28+
div(class: 'ratpack-logo') {
29+
a(href: '/') { h1('Ratpack') }
30+
p('Simple, lean &amp; powerful HTTP apps')
31+
}
4132

33+
nav(class: 'social') {
34+
h2('Ratpack is on&hellip;')
35+
a(href: 'http://github.com/ratpack/', title: 'ratpack on GitHub', rel: 'external', 'GitHub')
36+
newLine()
37+
span(class: 'join', '&amp;')
38+
newLine()
39+
a(href: 'http://twitter.com/ratpackweb', title: '@ratpackweb on Twitter', rel: 'external', 'Twitter')
4240
}
4341

44-
bodyContents()
42+
}
4543

46-
if (!nobanner) {
47-
footer(id: 'page-footer') {
48-
div(class: 'content') {
49-
section(class: 'about') {
50-
p {
51-
yield 'Ratpack is free to use, '
52-
a(href: 'https://github.com/ratpack/ratpack', rel: 'external', 'open source')
53-
yield ', and licensed under the '
54-
a(href: 'http://www.apache.org/licenses/LICENSE-2.0.html', rel: 'external', 'Apache License, Version 2.0.')
55-
}
56-
p {
57-
yield 'This site is a Ratpack application running on '
58-
a(href: 'https://www.heroku.com/', rel: 'external', 'Heroku')
59-
yield '.'
60-
}
61-
p {
62-
a(href: 'http://www.yourkit.com/java/profiler/index.jsp', 'YourKit')
63-
yield ' supports Ratpack open source project with its full-featured Java Profiler.'
64-
}
44+
bodyContents()
45+
46+
if (!nobanner) {
47+
footer(id: 'page-footer') {
48+
div(class: 'content') {
49+
section(class: 'about') {
50+
p {
51+
yield 'Ratpack is free to use, '
52+
a(href: 'https://github.com/ratpack/ratpack', rel: 'external', 'open source')
53+
yield ', and licensed under the '
54+
a(href: 'http://www.apache.org/licenses/LICENSE-2.0.html', rel: 'external', 'Apache License, Version 2.0.')
55+
}
56+
p {
57+
yield 'This site is a Ratpack application running on '
58+
a(href: 'https://www.heroku.com/', rel: 'external', 'Heroku')
59+
yield '.'
60+
}
61+
p {
62+
a(href: 'http://www.yourkit.com/java/profiler/index.jsp', 'YourKit')
63+
yield ' supports Ratpack open source project with its full-featured Java Profiler.'
6564
}
66-
def credits = [
67-
[href: 'https://bintray.com/', img: [src: 'bintray.png', alt: 'Bintray', width: 55, height: 40]],
68-
[href: 'https://github.com/', img: [src: 'github.png', alt: 'Octocat', width: 122, height: 40]],
69-
[href: 'http://www.gradle.org/', img: [src: 'gradle.png', alt: 'Gradle logo', width: 149, height: 40]],
70-
[href: 'http://groovy-lang.org/', img: [src: 'groovy.png', alt: 'Groovy logo', width: 80, height: 40]],
71-
[href: 'https://www.heroku.com/', img: [src: 'heroku.png', alt: 'Heroku logo', width: 120, height: 40]],
72-
[href: 'http://netty.io/', img: [src: 'netty.png', alt: 'Netty logo', width: 80, height: 40]],
73-
[href: 'http://www.yourkit.com/java/profiler/index.jsp', img: [src: 'yourkit.png', alt: 'YourKit logo', width: 132, height: 43]]
74-
]
75-
section(class: 'credits') {
76-
credits.each { credit ->
77-
a(href: credit.href, rel: 'external') {
78-
img(src: assets["assets/images/${credit.img.src}"], alt: credit.img.alt, width: credit.img.width, height: credit.img.height)
79-
}
65+
}
66+
def credits = [
67+
[href: 'https://bintray.com/', img: [src: 'bintray.png', alt: 'Bintray', width: 55, height: 40]],
68+
[href: 'https://github.com/', img: [src: 'github.png', alt: 'Octocat', width: 122, height: 40]],
69+
[href: 'http://www.gradle.org/', img: [src: 'gradle.png', alt: 'Gradle logo', width: 149, height: 40]],
70+
[href: 'http://groovy-lang.org/', img: [src: 'groovy.png', alt: 'Groovy logo', width: 80, height: 40]],
71+
[href: 'https://www.heroku.com/', img: [src: 'heroku.png', alt: 'Heroku logo', width: 120, height: 40]],
72+
[href: 'http://netty.io/', img: [src: 'netty.png', alt: 'Netty logo', width: 80, height: 40]],
73+
[href: 'http://www.yourkit.com/java/profiler/index.jsp', img: [src: 'yourkit.png', alt: 'YourKit logo', width: 132, height: 43]]
74+
]
75+
section(class: 'credits') {
76+
credits.each { credit ->
77+
a(href: credit.href, rel: 'external') {
78+
img(src: assets["assets/images/${credit.img.src}"], alt: credit.img.alt, width: credit.img.width, height: credit.img.height)
8079
}
8180
}
8281
}
8382
}
8483
}
85-
script {
86-
yieldUnescaped '''
87-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
88-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
89-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
90-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
84+
}
85+
script {
86+
yieldUnescaped '''
87+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
88+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
89+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
90+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
9191
92-
ga('create', 'UA-41264608-1', 'ratpack.io');
93-
ga('send', 'pageview');
92+
ga('create', 'UA-41264608-1', 'ratpack.io');
93+
ga('send', 'pageview');
9494
'''
95-
}
96-
97-
link(rel: 'stylesheet', href: assets['assets/styles/fonts.css'])
9895
}
96+
97+
link(rel: 'stylesheet', href: assets['assets/styles/fonts.css'])
9998
}
99+
100+
yieldUnescaped '</html>'

0 commit comments

Comments
 (0)