Removed cordova boilerplate

This commit is contained in:
Jake Howard 2015-12-20 16:06:38 +00:00
parent 6dd6c92735
commit 03a4c83d90
4 changed files with 56 additions and 153 deletions

View file

@ -1,24 +1,23 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"> <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no"> <meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<link rel="stylesheet" type="text/css" href="css/style.css"> <link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.js"></script>
<title>Hello World</title> <title>Oriment</title>
</head> </head>
<body> <body id="main">
<div class="app"> <div class="container jumbotron header">
<h1>Apache Cordova</h1> <h1 class="animated rubberBand">Hi There</h1>
<div id="deviceready" class="blink"> </div>
<p class="event listening">Connecting to Device</p> <footer>
<p class="event received">Device is Ready</p> <a class="btn btn-success btn-lg">Continue</a>
</div> </footer>
</div> <script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="cordova.js"></script> <script type="text/javascript" src="js/libs.js"></script>
<script type="text/javascript" src="js/libs.js"></script> <script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/app.js"></script> </body>
</body>
</html> </html>

View file

@ -1,33 +0,0 @@
var app = {
// Application Constructor
initialize: function() {
this.bindEvents();
},
// Bind Event Listeners
//
// Bind any events that are required on startup. Common events are:
// 'load', 'deviceready', 'offline', and 'online'.
bindEvents: function() {
document.addEventListener('deviceready', this.onDeviceReady, false);
},
// deviceready Event Handler
//
// The scope of 'this' is the event. In order to call the 'receivedEvent'
// function, we must explicitly call 'app.receivedEvent(...);'
onDeviceReady: function() {
app.receivedEvent('deviceready');
},
// Update DOM on a Received Event
receivedEvent: function(id) {
var parentElement = document.getElementById(id);
var listeningElement = parentElement.querySelector('.listening');
var receivedElement = parentElement.querySelector('.received');
listeningElement.setAttribute('style', 'display:none;');
receivedElement.setAttribute('style', 'display:block;');
console.log('Received Event: ' + id);
}
};
app.initialize();

View file

@ -14,91 +14,29 @@ body {
-webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
-webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
background-color:#E4E4E4; background-color:#E4E4E4;
background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); font-family: Roboto sans-serif;
background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
background-image:-webkit-gradient(
linear,
left top,
left bottom,
color-stop(0, #A7A7A7),
color-stop(0.51, #E4E4E4)
);
background-attachment:fixed;
font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
font-size:12px; font-size:12px;
text-align: center;
height:100%; height:100%;
margin:0px; margin:0px;
padding:0px; padding:0px;
text-transform:uppercase;
width:100%; width:100%;
} }
/* Portrait layout (default) */ #main {
.app { height: 100vh;
background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */ overflow: hidden;
position:absolute; /* position in the center of the screen */ .header {
left:50%; background-color: transparent;
top:50%; h1 {
height:50px; /* text area height */ font-size: 45px;
width:225px; /* text area width */
text-align:center;
padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */
margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */
/* offset horizontal: half of text area width */
}
/* Landscape layout (with min-width) */
@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
.app {
background-position:left center;
padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */
margin:-90px 0px 0px -198px; /* offset vertical: half of image height */
/* offset horizontal: half of image width and text area width */
} }
}
} }
footer {
h1 { position: absolute;
font-size:24px; bottom: 0;
font-weight:normal; left: 0;
margin:0px; width: 100%;
overflow:visible; height: 10vh;
padding:0px;
text-align:center;
}
.event {
border-radius:4px;
-webkit-border-radius:4px;
color:#FFFFFF;
font-size:12px;
margin:0px 30px;
padding:2px 0px;
}
.event.listening {
background-color:#333333;
display:block;
}
.event.received {
background-color:#4B946A;
display:none;
}
@keyframes fade {
from { opacity: 1.0; }
50% { opacity: 0.4; }
to { opacity: 1.0; }
}
@-webkit-keyframes fade {
from { opacity: 1.0; }
50% { opacity: 0.4; }
to { opacity: 1.0; }
}
.blink {
animation:fade 3000ms infinite;
-webkit-animation:fade 3000ms infinite;
} }

View file

@ -1,24 +1,23 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"> <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no"> <meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<link rel="stylesheet" type="text/css" href="css/style.css"> <link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.js"></script>
<title>Hello World</title> <title>Oriment</title>
</head> </head>
<body> <body id="main">
<div class="app"> <div class="container jumbotron header">
<h1>Apache Cordova</h1> <h1 class="animated rubberBand">Hi There</h1>
<div id="deviceready" class="blink"> </div>
<p class="event listening">Connecting to Device</p> <footer>
<p class="event received">Device is Ready</p> <a class="btn btn-success btn-lg">Continue</a>
</div> </footer>
</div> <script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="cordova.js"></script> <script type="text/javascript" src="js/libs.js"></script>
<script type="text/javascript" src="js/libs.js"></script> <script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/app.js"></script> </body>
</body>
</html> </html>