=== added file '.excludes' --- .excludes 1970-01-01 00:00:00 +0000 +++ .excludes 2015-01-29 07:56:21 +0000 @@ -0,0 +1,6 @@ +Makefile +*.tmp +.bzr +.git +po + === added file 'help.apparmor' --- help.apparmor 1970-01-01 00:00:00 +0000 +++ help.apparmor 2015-01-29 07:56:21 +0000 @@ -0,0 +1,9 @@ +{ + "policy_groups": [ + "networking", + "webview" + ], + "policy_version": 1.2 +} + + === added file 'help.desktop' --- help.desktop 1970-01-01 00:00:00 +0000 +++ help.desktop 2015-01-29 07:56:21 +0000 @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=help +Exec=ubuntu-html5-app-launcher $@ --www=www --inspector +Icon=help.png +Terminal=false +Type=Application +X-Ubuntu-Touch=true + === added file 'help.png' Binary files help.png and help.png differ === added file 'help.ubuntuhtmlproject' --- help.ubuntuhtmlproject 1970-01-01 00:00:00 +0000 +++ help.ubuntuhtmlproject 2015-01-29 07:56:21 +0000 @@ -0,0 +1,61 @@ +import QmlProject 1.1 + +Project { + mainFile: "www/index.html" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + Files { + filter: "*.desktop" + } + Files { + filter: ".excludes" + } + Files { + filter: "www/*.html" + } + Files { + filter: "Makefile" + } + Files { + filter: "*.apparmor" + } + Files { + filter: "*.json" + } + Files { + directory: "www" + filter: "*" + } + Files { + directory: "www/img/" + filter: "*" + } + Files { + directory: "www/css/" + filter: "*" + } + Files { + directory: "www/js/" + filter: "*" + } + Files { + directory: "tests/" + filter: "*" + } + Files { + directory: "debian" + filter: "*" + } + /* List of plugin directories passed to QML runtime */ + importPaths: [ "." ,"/usr/bin","/usr/lib/x86_64-linux-gnu/qt5/qml" ] +} + === added file 'manifest.json' --- manifest.json 1970-01-01 00:00:00 +0000 +++ manifest.json 2015-01-29 07:56:21 +0000 @@ -0,0 +1,17 @@ +{ + "name": "help.dholbach", + "description": "description of help", + "architecture": "all", + "title": "help", + "hooks": { + "help": { + "apparmor": "help.apparmor", + "desktop": "help.desktop" + } + }, + "version": "0.1", + "maintainer": "Daniel Holbach ", + "framework" : "ubuntu-sdk-14.10-html" +} + + === added directory 'www' === added directory 'www/css' === added file 'www/css/app.css' --- www/css/app.css 1970-01-01 00:00:00 +0000 +++ www/css/app.css 2015-01-29 07:56:21 +0000 @@ -0,0 +1,38 @@ +#hello-page { + padding: 1rem; +} + +.title, .introduction, .button { + margin-bottom: 1rem; +} + +.is-hidden { + display: none; +} + +.img-cordova { + display: block; + margin: 0 auto; +} + +.cordova-indicator { + text-align: center; +} + +@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; +} + === added directory 'www/img' === added file 'www/img/cordova.png' Binary files www/img/cordova.png and www/img/cordova.png differ === added file 'www/index.html' --- www/index.html 1970-01-01 00:00:00 +0000 +++ www/index.html 2015-01-29 07:56:21 +0000 @@ -0,0 +1,75 @@ + + + + + An Ubuntu HTML5 application + + + + + + + + + + + + + + + + + + + + + +
+ +
+
    +
  • Hello World
  • +
+
+ +
+ + +
+ + +
Welcome to Ubuntu HTML5!
+ +

The Ubuntu Developer documentation is a good starting point to learn more about the HTML5 platform.

+ + + + + +
HTML5 API
+

The Ubuntu HTML5 platform offers plenty of APIs. An updated listing and documentation can be accessed below.

+ + + + + +
+ + +
+
+ + + + + === added directory 'www/js' === added file 'www/js/app.js' --- www/js/app.js 1970-01-01 00:00:00 +0000 +++ www/js/app.js 2015-01-29 07:56:21 +0000 @@ -0,0 +1,44 @@ +/** + * Wait before the DOM has been loaded before initializing the Ubuntu UI layer + */ +window.onload = function () { + function addClass(elem, className) { + elem.className += ' ' + className; + }; + + function removeClass(elem, className) { + elem.className = elem.className.replace(className, ''); + }; + + + var UI = new UbuntuUI(); + UI.init(); + + // Detect if Cordova script is uncommented or not and show the appropriate status. + var hasCordovaScript = false; + var scripts = [].slice.call(document.querySelectorAll('script')); + scripts.forEach(function (element) { + var attributes = element.attributes; + if (attributes && attributes.src && attributes.src.value.indexOf('cordova.js') !== -1) { + hasCordovaScript = true; + } + }); + + var cordovaLoadingIndicator = document.querySelector('.load-cordova'); + if (!hasCordovaScript) { + removeClass(document.querySelector('.ko-cordova'), 'is-hidden'); + addClass(cordovaLoadingIndicator, 'is-hidden'); + } + + // Add an event listener that is pending on the initialization + // of the platform layer API, if it is being used. + document.addEventListener("deviceready", function() { + if (console && console.log) { + console.log('Platform layer API ready'); + } + removeClass(document.querySelector('.ok-cordova'), 'is-hidden'); + addClass(cordovaLoadingIndicator, 'is-hidden'); + }, false); +}; + +