Skip to content

Commit

Permalink
Version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
pas256 committed Jan 21, 2014
1 parent 89bc092 commit 9ee4442
Show file tree
Hide file tree
Showing 6 changed files with 468 additions and 25 deletions.
2 changes: 1 addition & 1 deletion application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#Mon Jan 20 16:51:47 PST 2014
app.grails.version=2.2.4
app.name=example
app.version=1.0
app.version=2.0
57 changes: 37 additions & 20 deletions grails-app/views/index.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,44 @@
<html>
<head>
<meta name="layout" content="main"/>
<title>Version 1</title>
<title>Version 2</title>
</head>
<body>
<h1>Welcome to Version 1</h1>
<div id="status" role="complementary">
<h1>Application Status</h1>
<ul>
<li>App version: <g:meta name="app.version"/></li>
<li>Grails version: <g:meta name="app.grails.version"/></li>
<li>Groovy version: ${GroovySystem.getVersion()}</li>
<li>JVM version: ${System.getProperty('java.version')}</li>
<li>Reloading active: ${grails.util.Environment.reloadingAgentEnabled}</li>
<li>Controllers: ${grailsApplication.controllerClasses.size()}</li>
<li>Domains: ${grailsApplication.domainClasses.size()}</li>
<li>Services: ${grailsApplication.serviceClasses.size()}</li>
<li>Tag Libraries: ${grailsApplication.tagLibClasses.size()}</li>
</ul>
</div>
<div id="page-body" role="main">
<h1>Welcome to Version 1</h1>
<p>Congratulations, you have successfully deployed version 1</p>
</div>
<script type="text/javascript">
// we need a full screen canvas, but the canvas tag doesn't support percentage widths
// so we simply write out the canvas tag using javascript
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>');
document.write('<canvas id="cv" width="'+$(window).width()+'" height="'+($(window).height()-100)+'" style="position:absolute;left:0;top:0;"></canvas>');
// obviously, this become wrong if the browser window changes size
// so we simply reload the page on resize
</script>

<div id="message">
Number of items on the screen: <div id="fireCount">1</div>
<a href="http://kenneth.kufluk.com" target="_blank">&copy; Kenneth Kufluk 2010</a>
<a href="http://github.com/kennethkufluk/js-fireworks" target="_blank">My code is open sourced at github.</a>
</div>

<div id="attributions">
Looking a little slow? <a href="http://www.google.com/chrome" target="_blank">Download Chrome!</a><br/>
Panorama:<a href="http://www.flickr.com/photos/chrishudson/" target="_blank">flickr/ChrisH2006</a><br/>
Eye:<a href="http://www.flickr.com/photos/mcdemoura/" target="_blank">flickr/Márcio Cabral de Moura</a><br/>
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>
</div>

<div id="slider_firework_speed"><span class="label" style="display:block;margin:10px 20px 10px -50px;">Speed</div>
<div id="slider_fragment_spread"><span class="label" style="display:block;margin:10px 20px 10px -50px;">Blast Radius</div>
<div id="slider_gravity"><span class="label" style="display:block;margin:10px 20px;">Gravity</div>
<div id="slider_framerate"><span class="label" style="display:block;margin:20px 20px;">Framerate</span></div>

<div id="form">
<form onsubmit="FireworkDisplay.launchText();return false;">
<div>
<span class="boxtext">Enter your own message and click Launch to see it written in Fireworks over London</span><br/>
<input id="firetext" type="text" value="Version 2"/>
<input id="launch" type="submit" value="Launch!"/>
</div>
</form>
</div>
</body>
</html>
13 changes: 9 additions & 4 deletions grails-app/views/layouts/main.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@
<link rel="shortcut icon" href="${resource(dir: 'images', file: 'favicon.ico')}" type="image/x-icon">
<link rel="apple-touch-icon" href="${resource(dir: 'images', file: 'apple-touch-icon.png')}">
<link rel="apple-touch-icon" sizes="114x114" href="${resource(dir: 'images', file: 'apple-touch-icon-retina.png')}">
<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">

<!-- Load jQuery -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>

<!-- Load the fireworks script and stylesheet -->
<script type="text/javascript" src="${resource(dir: 'js', file: 'fireworks.js')}"></script>
<link type="text/css" href="${resource(dir: 'css', file: 'fireworks.css')}" rel="stylesheet" />


<g:layoutHead/>
<r:layoutResources />
</head>
<body>
<div id="grailsLogo" role="banner"><a href="http://grails.org"><img src="${resource(dir: 'images', file: 'grails_logo.png')}" alt="Grails"/></a></div>
<g:layoutBody/>
<div class="footer" role="contentinfo"></div>
<div id="spinner" class="spinner" style="display:none;"><g:message code="spinner.alt" default="Loading&hellip;"/></div>
<g:javascript library="application"/>
<r:layoutResources />
</body>
Expand Down
96 changes: 96 additions & 0 deletions web-app/css/fireworks.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
body {
background: #010101;
font-size:62.5%;
}
html, body { overflow: hidden; }
#message {
font-family:verdana, sans serif;
color:#EEE;
position:absolute;
left:0;
bottom:10px;
width:100%;
text-align:right;
padding-right:10px;
}
#message a {
color:#EEE;
padding-right:10px;
}
#message a:hover {
color:#00f;
}
#attributions {
font-family:verdana;
color:#EEE;
position:absolute;
left:0;
bottom:10px;
width:50%;
text-align:left;
padding-left:10px;
display:block;
}
#attributions a {
color:#eee;
padding-left:10px;
}
#attributions a:hover {
color:#00f;
}
.boxtext {
margin:10px 3px;
padding:8px;
color:white;
font-weight:bold;
font-family:arial;
}
#launch {
cursor:pointer;
background:#67A4ED;
-webkit-border-radius:10px;
border:1px solid #3C75BA;
margin:10px 3px;
padding:8px;
color:white;
font-weight:bold;
}
input[type='text']{
border:2px solid #3C75BA;
padding:5px;
width:300px;
font-size:18px;
color:#3C75BA;
}
#form {
position:relative;
margin-left:auto;
margin-right:auto;
width:450px;
background:#569AEE;
padding:16px;
-webkit-border-radius:10px;
border:#3C75BA;
text-align:center;
display:none;
}
#ad {
font-family:verdana, sans serif;
position:absolute;
right:200px;
bottom:10px;
width:160px;
text-align:right;
padding-right:10px;
}
h1 {
position:absolute;
left:-1000px;
}
/* jQuery UI sliders */
#slider_framerate { margin: 40px 10px 0 10px; position:absolute; left:50px; bottom:200px; }
#slider_gravity { margin: 15px; position:absolute; left:10px; bottom:200px; }
#slider_firework_speed { margin: 15px; position:absolute; right:10px; bottom:200px; }
#slider_fragment_spread { margin: 15px; position:absolute; right:10px; bottom:50px; }
.ui-widget-content { color:#666;}

Binary file added web-app/images/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9ee4442

Please sign in to comment.