Removed cordova boilerplate
This commit is contained in:
parent
6dd6c92735
commit
03a4c83d90
4 changed files with 56 additions and 153 deletions
|
@ -7,16 +7,15 @@
|
||||||
<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">
|
|
||||||
<p class="event listening">Connecting to Device</p>
|
|
||||||
<p class="event received">Device is Ready</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
<a class="btn btn-success btn-lg">Continue</a>
|
||||||
|
</footer>
|
||||||
<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>
|
||||||
|
|
|
@ -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();
|
|
|
@ -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%;
|
|
||||||
height:50px; /* text area height */
|
|
||||||
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 */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size:24px;
|
font-size: 45px;
|
||||||
font-weight:normal;
|
|
||||||
margin:0px;
|
|
||||||
overflow:visible;
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
footer {
|
||||||
.event.received {
|
position: absolute;
|
||||||
background-color:#4B946A;
|
bottom: 0;
|
||||||
display:none;
|
left: 0;
|
||||||
}
|
width: 100%;
|
||||||
|
height: 10vh;
|
||||||
@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;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,16 +7,15 @@
|
||||||
<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">
|
|
||||||
<p class="event listening">Connecting to Device</p>
|
|
||||||
<p class="event received">Device is Ready</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
<a class="btn btn-success btn-lg">Continue</a>
|
||||||
|
</footer>
|
||||||
<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>
|
||||||
|
|
Reference in a new issue