Skip to content

Commit 9ee4442

Browse files
committed
Version 2
1 parent 89bc092 commit 9ee4442

File tree

6 files changed

+468
-25
lines changed

6 files changed

+468
-25
lines changed

application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#Mon Jan 20 16:51:47 PST 2014
33
app.grails.version=2.2.4
44
app.name=example
5-
app.version=1.0
5+
app.version=2.0

grails-app/views/index.gsp

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,44 @@
22
<html>
33
<head>
44
<meta name="layout" content="main"/>
5-
<title>Version 1</title>
5+
<title>Version 2</title>
66
</head>
77
<body>
8-
<h1>Welcome to Version 1</h1>
9-
<div id="status" role="complementary">
10-
<h1>Application Status</h1>
11-
<ul>
12-
<li>App version: <g:meta name="app.version"/></li>
13-
<li>Grails version: <g:meta name="app.grails.version"/></li>
14-
<li>Groovy version: ${GroovySystem.getVersion()}</li>
15-
<li>JVM version: ${System.getProperty('java.version')}</li>
16-
<li>Reloading active: ${grails.util.Environment.reloadingAgentEnabled}</li>
17-
<li>Controllers: ${grailsApplication.controllerClasses.size()}</li>
18-
<li>Domains: ${grailsApplication.domainClasses.size()}</li>
19-
<li>Services: ${grailsApplication.serviceClasses.size()}</li>
20-
<li>Tag Libraries: ${grailsApplication.tagLibClasses.size()}</li>
21-
</ul>
22-
</div>
23-
<div id="page-body" role="main">
24-
<h1>Welcome to Version 1</h1>
25-
<p>Congratulations, you have successfully deployed version 1</p>
26-
</div>
8+
<script type="text/javascript">
9+
// we need a full screen canvas, but the canvas tag doesn't support percentage widths
10+
// so we simply write out the canvas tag using javascript
11+
document.write('<div style="background:url(images/background.jpg) repeat-x;position:absolute;left:0;top:'+($(window).height()-193)+'px;width:100%;height:200px;"></div>');
12+
document.write('<canvas id="cv" width="'+$(window).width()+'" height="'+($(window).height()-100)+'" style="position:absolute;left:0;top:0;"></canvas>');
13+
// obviously, this become wrong if the browser window changes size
14+
// so we simply reload the page on resize
15+
</script>
16+
17+
<div id="message">
18+
Number of items on the screen: <div id="fireCount">1</div>
19+
<a href="http://kenneth.kufluk.com" target="_blank">&copy; Kenneth Kufluk 2010</a>
20+
<a href="http://github.com/kennethkufluk/js-fireworks" target="_blank">My code is open sourced at github.</a>
21+
</div>
22+
23+
<div id="attributions">
24+
Looking a little slow? <a href="http://www.google.com/chrome" target="_blank">Download Chrome!</a><br/>
25+
Panorama:<a href="http://www.flickr.com/photos/chrishudson/" target="_blank">flickr/ChrisH2006</a><br/>
26+
Eye:<a href="http://www.flickr.com/photos/mcdemoura/" target="_blank">flickr/Márcio Cabral de Moura</a><br/>
27+
Font: <a href="http://bitmapmania.m78.com/" target="_blank">BM Receipt</a> via <a href="http://cufon.shoqolate.com/generate/" target="_blank">Cufón Generator</a>
28+
</div>
29+
30+
<div id="slider_firework_speed"><span class="label" style="display:block;margin:10px 20px 10px -50px;">Speed</div>
31+
<div id="slider_fragment_spread"><span class="label" style="display:block;margin:10px 20px 10px -50px;">Blast Radius</div>
32+
<div id="slider_gravity"><span class="label" style="display:block;margin:10px 20px;">Gravity</div>
33+
<div id="slider_framerate"><span class="label" style="display:block;margin:20px 20px;">Framerate</span></div>
34+
35+
<div id="form">
36+
<form onsubmit="FireworkDisplay.launchText();return false;">
37+
<div>
38+
<span class="boxtext">Enter your own message and click Launch to see it written in Fireworks over London</span><br/>
39+
<input id="firetext" type="text" value="Version 2"/>
40+
<input id="launch" type="submit" value="Launch!"/>
41+
</div>
42+
</form>
43+
</div>
2744
</body>
2845
</html>

grails-app/views/layouts/main.gsp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,20 @@
1212
<link rel="shortcut icon" href="${resource(dir: 'images', file: 'favicon.ico')}" type="image/x-icon">
1313
<link rel="apple-touch-icon" href="${resource(dir: 'images', file: 'apple-touch-icon.png')}">
1414
<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">
15+
16+
<!-- Load jQuery -->
17+
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
18+
19+
<!-- Load the fireworks script and stylesheet -->
20+
<script type="text/javascript" src="${resource(dir: 'js', file: 'fireworks.js')}"></script>
21+
<link type="text/css" href="${resource(dir: 'css', file: 'fireworks.css')}" rel="stylesheet" />
22+
23+
1624
<g:layoutHead/>
1725
<r:layoutResources />
1826
</head>
1927
<body>
20-
<div id="grailsLogo" role="banner"><a href="http://grails.org"><img src="${resource(dir: 'images', file: 'grails_logo.png')}" alt="Grails"/></a></div>
2128
<g:layoutBody/>
22-
<div class="footer" role="contentinfo"></div>
23-
<div id="spinner" class="spinner" style="display:none;"><g:message code="spinner.alt" default="Loading&hellip;"/></div>
2429
<g:javascript library="application"/>
2530
<r:layoutResources />
2631
</body>

web-app/css/fireworks.css

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
body {
2+
background: #010101;
3+
font-size:62.5%;
4+
}
5+
html, body { overflow: hidden; }
6+
#message {
7+
font-family:verdana, sans serif;
8+
color:#EEE;
9+
position:absolute;
10+
left:0;
11+
bottom:10px;
12+
width:100%;
13+
text-align:right;
14+
padding-right:10px;
15+
}
16+
#message a {
17+
color:#EEE;
18+
padding-right:10px;
19+
}
20+
#message a:hover {
21+
color:#00f;
22+
}
23+
#attributions {
24+
font-family:verdana;
25+
color:#EEE;
26+
position:absolute;
27+
left:0;
28+
bottom:10px;
29+
width:50%;
30+
text-align:left;
31+
padding-left:10px;
32+
display:block;
33+
}
34+
#attributions a {
35+
color:#eee;
36+
padding-left:10px;
37+
}
38+
#attributions a:hover {
39+
color:#00f;
40+
}
41+
.boxtext {
42+
margin:10px 3px;
43+
padding:8px;
44+
color:white;
45+
font-weight:bold;
46+
font-family:arial;
47+
}
48+
#launch {
49+
cursor:pointer;
50+
background:#67A4ED;
51+
-webkit-border-radius:10px;
52+
border:1px solid #3C75BA;
53+
margin:10px 3px;
54+
padding:8px;
55+
color:white;
56+
font-weight:bold;
57+
}
58+
input[type='text']{
59+
border:2px solid #3C75BA;
60+
padding:5px;
61+
width:300px;
62+
font-size:18px;
63+
color:#3C75BA;
64+
}
65+
#form {
66+
position:relative;
67+
margin-left:auto;
68+
margin-right:auto;
69+
width:450px;
70+
background:#569AEE;
71+
padding:16px;
72+
-webkit-border-radius:10px;
73+
border:#3C75BA;
74+
text-align:center;
75+
display:none;
76+
}
77+
#ad {
78+
font-family:verdana, sans serif;
79+
position:absolute;
80+
right:200px;
81+
bottom:10px;
82+
width:160px;
83+
text-align:right;
84+
padding-right:10px;
85+
}
86+
h1 {
87+
position:absolute;
88+
left:-1000px;
89+
}
90+
/* jQuery UI sliders */
91+
#slider_framerate { margin: 40px 10px 0 10px; position:absolute; left:50px; bottom:200px; }
92+
#slider_gravity { margin: 15px; position:absolute; left:10px; bottom:200px; }
93+
#slider_firework_speed { margin: 15px; position:absolute; right:10px; bottom:200px; }
94+
#slider_fragment_spread { margin: 15px; position:absolute; right:10px; bottom:50px; }
95+
.ui-widget-content { color:#666;}
96+

web-app/images/background.jpg

150 KB
Loading

0 commit comments

Comments
 (0)