From 16dbb6d67620fd86adc44dfd704a5f590eaf8348 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 23 Feb 2015 16:01:17 -0500 Subject: f --- .gitignore | 5 ++ Makefile | 6 ++ info.txt | 26 ++++++++ platforms/android/.gitignore | 14 +++++ platforms/android/.project | 71 +++++++++++++++++++++ platforms/android/AndroidManifest.xml | 15 +++++ platforms/android/build.gradle | 94 +++++++++++++++++++++++++++ platforms/android/custom_rules.xml | 22 +++++++ platforms/android/project.properties | 14 +++++ platforms/android/settings.gradle | 18 ++++++ platforms/browser/config.xml | 15 +++++ plugins/android.json | 36 +++++++++++ plugins/browser.json | 26 ++++++++ www/css/index.css | 115 ---------------------------------- www/css/index.scss | 40 +++++++----- www/index.html | 49 +++++++-------- 16 files changed, 407 insertions(+), 159 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 info.txt create mode 100644 platforms/android/.gitignore create mode 100644 platforms/android/.project create mode 100644 platforms/android/AndroidManifest.xml create mode 100644 platforms/android/build.gradle create mode 100644 platforms/android/custom_rules.xml create mode 100644 platforms/android/project.properties create mode 100644 platforms/android/settings.gradle create mode 100644 platforms/browser/config.xml create mode 100644 plugins/android.json create mode 100644 plugins/browser.json delete mode 100644 www/css/index.css diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3d364dc --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/www/css/index.css +*.css.map +/plugins/*/ +/platforms/*/*/ +.sass-cache/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1c1ed6c --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +SCSS = scss + +all: www/css/index.css + +%.css: %.scss + $(SCSS) $< $@ diff --git a/info.txt b/info.txt new file mode 100644 index 0000000..9cd961b --- /dev/null +++ b/info.txt @@ -0,0 +1,26 @@ +Node version: v0.12.0 + +Cordova version: 4.2.0 + +Config.xml file: + + + + SafetyApp + + A sample Apache Cordova application that responds to the deviceready event. + + + Apache Cordova Team + + + + + + +Plugins: + +org.apache.cordova.camera + +Error retrieving Android platform information: Error: android: Command failed with exit code ENOENT + diff --git a/platforms/android/.gitignore b/platforms/android/.gitignore new file mode 100644 index 0000000..a1c8ff7 --- /dev/null +++ b/platforms/android/.gitignore @@ -0,0 +1,14 @@ +# Non-project-specific build files: +build.xml +local.properties +/gradlew +/gradlew.bat +/gradle +# Ant builds +ant-built +ant-gen +# Eclipse builds +gen +out +# Gradle builds +/build diff --git a/platforms/android/.project b/platforms/android/.project new file mode 100644 index 0000000..5e2a6bc --- /dev/null +++ b/platforms/android/.project @@ -0,0 +1,71 @@ + + + SafetyApp + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + + + config.xml + 1 + $%7BPARENT-2-PROJECT_LOC%7D/config.xml + + + www + 2 + $%7BPARENT-2-PROJECT_LOC%7D/www + + + merges + 2 + $%7BPARENT-2-PROJECT_LOC%7D/merges + + + + + 1390880034107 + + 30 + + org.eclipse.ui.ide.multiFilter + 1.0-projectRelativePath-matches-false-true-^(build.xml|ant-gen|ant-build|custom_rules.xml|CordovaLib|platform_www|cordova) + + + + 1390880034108 + + 30 + + org.eclipse.ui.ide.multiFilter + 1.0-projectRelativePath-matches-false-true-^(assets/www|res/xml/config.xml) + + + + + diff --git a/platforms/android/AndroidManifest.xml b/platforms/android/AndroidManifest.xml new file mode 100644 index 0000000..b7f945e --- /dev/null +++ b/platforms/android/AndroidManifest.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/platforms/android/build.gradle b/platforms/android/build.gradle new file mode 100644 index 0000000..9d1d45a --- /dev/null +++ b/platforms/android/build.gradle @@ -0,0 +1,94 @@ +import java.util.regex.Pattern + +apply plugin: 'android' + +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:0.10.+' + } +} + +ext.multiarch=false + +dependencies { + compile fileTree(dir: 'libs', include: '*.jar') + for (subproject in getProjectList()) { + compile project(subproject) + } +} + +android { + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + resources.srcDirs = ['src'] + aidl.srcDirs = ['src'] + renderscript.srcDirs = ['src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + } + } + + defaultConfig { + versionCode Integer.parseInt("" + getVersionCodeFromManifest() + "0") + } + + compileSdkVersion 19 + buildToolsVersion "19.0.0" + + if (multiarch || System.env.BUILD_MULTIPLE_APKS) { + productFlavors { + armv7 { + versionCode defaultConfig.versionCode + 2 + ndk { + abiFilters "armeabi-v7a", "" + } + } + x86 { + versionCode defaultConfig.versionCode + 4 + ndk { + abiFilters "x86", "" + } + } + all { + ndk { + abiFilters "all", "" + } + } + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } + +} + +task wrapper(type: Wrapper) { + gradleVersion = '1.12' +} + +def getVersionCodeFromManifest() { + def manifestFile = file(android.sourceSets.main.manifest.srcFile) + def pattern = Pattern.compile("versionCode=\"(\\d+)\"") + def matcher = pattern.matcher(manifestFile.getText()) + matcher.find() + return Integer.parseInt(matcher.group(1)) +} + +def getProjectList() { + def manifestFile = file("project.properties") + def pattern = Pattern.compile("android.library.reference.(\\d+)\\s*=\\s*(.*)") + def matcher = pattern.matcher(manifestFile.getText()) + def projects = [] + while (matcher.find()) { + projects.add(":" + matcher.group(2).replace("/",":")) + } + return projects +} diff --git a/platforms/android/custom_rules.xml b/platforms/android/custom_rules.xml new file mode 100644 index 0000000..66483d3 --- /dev/null +++ b/platforms/android/custom_rules.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/platforms/android/project.properties b/platforms/android/project.properties new file mode 100644 index 0000000..ef68eb7 --- /dev/null +++ b/platforms/android/project.properties @@ -0,0 +1,14 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt +# Project target. +target=android-19 +android.library.reference.1=CordovaLib diff --git a/platforms/android/settings.gradle b/platforms/android/settings.gradle new file mode 100644 index 0000000..baa1714 --- /dev/null +++ b/platforms/android/settings.gradle @@ -0,0 +1,18 @@ +import java.util.regex.Pattern + +def getProjectList() { + def manifestFile = file("project.properties") + def pattern = Pattern.compile("android.library.reference.(\\d+)\\s*=\\s*(.*)") + def matcher = pattern.matcher(manifestFile.getText()) + def projects = [] + while (matcher.find()) { + projects.add(":" + matcher.group(2).replace("/",":")) + } + return projects +} + +for (subproject in getProjectList()) { + include subproject +} + +include ':' diff --git a/platforms/browser/config.xml b/platforms/browser/config.xml new file mode 100644 index 0000000..f44d87a --- /dev/null +++ b/platforms/browser/config.xml @@ -0,0 +1,15 @@ + + + + + + SafetyApp + + A sample Apache Cordova application that responds to the deviceready event. + + + Apache Cordova Team + + + + diff --git a/plugins/android.json b/plugins/android.json new file mode 100644 index 0000000..d539e89 --- /dev/null +++ b/plugins/android.json @@ -0,0 +1,36 @@ +{ + "prepare_queue": { + "installed": [], + "uninstalled": [] + }, + "config_munge": { + "files": { + "res/xml/config.xml": { + "parents": { + "/*": [ + { + "xml": "", + "count": 1 + } + ] + } + }, + "AndroidManifest.xml": { + "parents": { + "/*": [ + { + "xml": "", + "count": 1 + } + ] + } + } + } + }, + "installed_plugins": { + "org.apache.cordova.camera": { + "PACKAGE_NAME": "org.usfirst.frc.team4272.safetyapp" + } + }, + "dependent_plugins": {} +} \ No newline at end of file diff --git a/plugins/browser.json b/plugins/browser.json new file mode 100644 index 0000000..3ed2a72 --- /dev/null +++ b/plugins/browser.json @@ -0,0 +1,26 @@ +{ + "prepare_queue": { + "installed": [], + "uninstalled": [] + }, + "config_munge": { + "files": { + "config.xml": { + "parents": { + "/*": [ + { + "xml": "", + "count": 1 + } + ] + } + } + } + }, + "installed_plugins": { + "org.apache.cordova.camera": { + "PACKAGE_NAME": "org.usfirst.frc.team4272.safetyapp" + } + }, + "dependent_plugins": {} +} \ No newline at end of file diff --git a/www/css/index.css b/www/css/index.css deleted file mode 100644 index 51daa79..0000000 --- a/www/css/index.css +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -* { - -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */ -} - -body { - -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */ - -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' */ - background-color:#E4E4E4; - background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); - 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; - height:100%; - margin:0px; - padding:0px; - text-transform:uppercase; - width:100%; -} - -/* Portrait layout (default) */ -.app { - background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */ - position:absolute; /* position in the center of the screen */ - left:50%; - 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 { - font-size:24px; - 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; -} - -.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; -} diff --git a/www/css/index.scss b/www/css/index.scss index 2f246a7..81d5a1a 100644 --- a/www/css/index.scss +++ b/www/css/index.scss @@ -5,14 +5,19 @@ html, body, table { height: 100%; padding: 0; margin: 0; + background-color: $red; + color: $yellow; + + font-family: sans-serif; + font-weight: bolder; } table { width: 100%; border-collapse: collapse; td, th { - border: solid 1px black; + border: solid 1px $yellow; } td { text-align: center; @@ -22,34 +27,35 @@ table { thead { height: 10%; background-color: $yellow; + color: $red; } tbody { td { width: 33%; height: 30%; - a { - /*display: inline-block;*/ - display: table-cell; + div { + /* A wrapper round cell contents allowing us to use fancy + table-positioning inside of the cell */ + display: table; width: 100%; height: 100%; - text-decoration: none; - /* What this does is insert a 0-width, but tall, element to the left - of the text, to stretch the line-height to the full - height of the element. *//* - span:before { - content: " "; - display: inline-block; + a { + display: table-cell; height: 100%; + width: 100%; vertical-align: middle; } - span { - display: inline-block; - }*/ } } } } -a:hover, a:active, a:focus { - text-decoration: underline; - background-color: $yellow; + +a { + text-decoration: none; + color: $yellow; + &:hover, &:active, &:focus { + text-decoration: underline; + background-color: $yellow; + color: $red; + } } diff --git a/www/index.html b/www/index.html index 1ec4720..fa3cb54 100644 --- a/www/index.html +++ b/www/index.html @@ -1,22 +1,4 @@ - @@ -28,14 +10,27 @@ Hello World -
-

Apache Cordova

- -
- - + + + + + + + + + + + + + + + + + + + + + +
4272 Safety
-- cgit v1.2.3