diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-02-25 11:06:59 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-02-25 11:06:59 -0500 |
commit | 4a62fe6388e75ed11f61dab23c63721fa52aa54e (patch) | |
tree | 3aa0e340e339d8cd2be3ea3fcd3e508f1fac61cb | |
parent | 16dbb6d67620fd86adc44dfd704a5f590eaf8348 (diff) |
Stuff
51 files changed, 489 insertions, 433 deletions
@@ -1,5 +1,13 @@ /www/css/index.css +/www/MSDS.html +/www/pdfjs + *.css.map -/plugins/*/ -/platforms/*/*/ .sass-cache/ +/info.txt +/pdfjs-*.zip +hs_err_pid*.log + +/hooks/README.md +/plugins +/platforms @@ -1,6 +1,95 @@ SCSS = scss +CORDOVA = cordova -all: www/css/index.css +targets = \ + platforms/browser/build/package.zip \ + platforms/android/ant-build/CordovaApp-debug.apk + +sources = \ + www/pdfjs \ + \ + www/css/index.css \ + www/MSDS.html + +android_resources = \ + platforms/android/res/drawable/icon.png \ + platforms/android/res/drawable-ldpi/icon.png \ + platforms/android/res/drawable-mdpi/icon.png \ + platforms/android/res/drawable-hdpi/icon.png \ + platforms/android/res/drawable-xhdpi/icon.png \ + \ + platforms/android/res/drawable-land-ldpi/screen.png \ + platforms/android/res/drawable-land-mdpi/screen.png \ + platforms/android/res/drawable-land-hdpi/screen.png \ + platforms/android/res/drawable-land-xhdpi/screen.png \ + \ + platforms/android/res/drawable-port-ldpi/screen.png \ + platforms/android/res/drawable-port-mdpi/screen.png \ + platforms/android/res/drawable-port-hdpi/screen.png \ + platforms/android/res/drawable-port-xhdpi/screen.png +resources = $(android_resources) + +all: targets sources %.css: %.scss $(SCSS) $< $@ + +platforms/android/res/drawable/icon.png: www/img/logo.png + convert $< -resize 96x96 $@ +platforms/android/res/drawable-ldpi/icon.png: www/img/logo.png + convert $< -resize 36x36 $@ +platforms/android/res/drawable-mdpi/icon.png: www/img/logo.png + convert $< -resize 48x48 $@ +platforms/android/res/drawable-hdpi/icon.png: www/img/logo.png + convert $< -resize 72x72 $@ +platforms/android/res/drawable-xhdpi/icon.png: www/img/logo.png + convert $< -resize 96x96 $@ + +platforms/android/res/drawable-land-ldpi/screen.png: www/img/screen-landscape.png + convert $< -resize 320x200 $@ +platforms/android/res/drawable-land-mdpi/screen.png: www/img/screen-landscape.png + convert $< -resize 480x320 $@ +platforms/android/res/drawable-land-hdpi/screen.png: www/img/screen-landscape.png + convert $< -resize 800x480 $@ +platforms/android/res/drawable-land-xhdpi/screen.png: www/img/screen-landscape.png + convert $< -resize 1280x720 $@ + +platforms/android/res/drawable-port-ldpi/screen.png: www/img/screen-portrait.png + convert $< -resize 200x320 $@ +platforms/android/res/drawable-port-mdpi/screen.png: www/img/screen-portrait.png + convert $< -resize 320x480 $@ +platforms/android/res/drawable-port-hdpi/screen.png: www/img/screen-portrait.png + convert $< -resize 480x800 $@ +platforms/android/res/drawable-port-xhdpi/screen.png: www/img/screen-portrait.png + convert $< -resize 720x1280 $@ + +pdfjs = https://github.com/mozilla/pdf.js/releases/download/v1.0.907/pdfjs-1.0.907-dist.zip +$(notdir $(pdfjs)): + wget --no-use-server-timestamp $(pdfjs) + +www/pdfjs: $(notdir $(pdfjs)) + rm -rf -- $@ + mkdir -- $@ && bsdtar -xf $(abspath $<) -C $@ --strip-components 1 --exclude '*.pdf' || rm -rf -- $@ + +www/MSDS.html: www/MSDS.html.in www/MSDS Makefile + ls www/MSDS | sed 'p;s/_/ /g' | sed -r 'N;s,^(.*)\n(.*)\.pdf,<a href="pdfjs/web/viewer.html?file=../../MSDS/\1">\2</a>,' | sed $$'/@list@/{ s/@list@//; r/dev/stdin\n}' www/MSDS.html.in > $@ + +info.txt: config.xml FORCE + $(CORDOVA) info + +sources: $(sources) +resources: $(resources) + +clean-sources: PHONY + rm -f -- $(sources) +clean-resources: PHONY + rm -f -- $(resources) +clean: PHONY clean-sources clean-resources + rm -f -- hs_err_pid*.log + +distclean: PHONY + rm -f -- $(targets) + +.PHONY: PHONY FORCE +.DELETE_ON_ERROR: +.SECONDARY: @@ -2,10 +2,10 @@ <widget id="org.usfirst.frc.team4272.safetyapp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>SafetyApp</name> <description> - A sample Apache Cordova application that responds to the deviceready event. + FRC team 4272's safety application </description> - <author email="dev@cordova.apache.org" href="http://cordova.io"> - Apache Cordova Team + <author email="shumakl@purdue.edu" href="https://lukeshu.com"> + Luk Shumaker </author> <content src="index.html" /> <access origin="*" /> diff --git a/hooks/after_platform_add/add_plugins b/hooks/after_platform_add/add_plugins new file mode 100755 index 0000000..15c0af5 --- /dev/null +++ b/hooks/after_platform_add/add_plugins @@ -0,0 +1,2 @@ +#!/bin/sh +cordova plugin add org.apache.cordova.camera diff --git a/hooks/after_prepare/gen_resources b/hooks/after_prepare/gen_resources new file mode 100755 index 0000000..ac86515 --- /dev/null +++ b/hooks/after_prepare/gen_resources @@ -0,0 +1,3 @@ +#!/bin/sh +make clean-resources +make resources diff --git a/hooks/before_prepare/gen_sources b/hooks/before_prepare/gen_sources new file mode 100755 index 0000000..b25a53f --- /dev/null +++ b/hooks/before_prepare/gen_sources @@ -0,0 +1,2 @@ +#!/bin/sh +make sources diff --git a/info.txt b/info.txt deleted file mode 100644 index 9cd961b..0000000 --- a/info.txt +++ /dev/null @@ -1,26 +0,0 @@ -Node version: v0.12.0 - -Cordova version: 4.2.0 - -Config.xml file: - -<?xml version='1.0' encoding='utf-8'?> -<widget id="org.usfirst.frc.team4272.safetyapp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> - <name>SafetyApp</name> - <description> - A sample Apache Cordova application that responds to the deviceready event. - </description> - <author email="dev@cordova.apache.org" href="http://cordova.io"> - Apache Cordova Team - </author> - <content src="index.html" /> - <access origin="*" /> -</widget> - - -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 deleted file mode 100644 index a1c8ff7..0000000 --- a/platforms/android/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -# 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 deleted file mode 100644 index 5e2a6bc..0000000 --- a/platforms/android/.project +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>SafetyApp</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>com.android.ide.eclipse.adt.ApkBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>com.android.ide.eclipse.adt.AndroidNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> - <linkedResources> - <link> - <name>config.xml</name> - <type>1</type> - <locationURI>$%7BPARENT-2-PROJECT_LOC%7D/config.xml</locationURI> - </link> - <link> - <name>www</name> - <type>2</type> - <locationURI>$%7BPARENT-2-PROJECT_LOC%7D/www</locationURI> - </link> - <link> - <name>merges</name> - <type>2</type> - <locationURI>$%7BPARENT-2-PROJECT_LOC%7D/merges</locationURI> - </link> - </linkedResources> - <filteredResources> - <filter> - <id>1390880034107</id> - <name></name> - <type>30</type> - <matcher> - <id>org.eclipse.ui.ide.multiFilter</id> - <arguments>1.0-projectRelativePath-matches-false-true-^(build.xml|ant-gen|ant-build|custom_rules.xml|CordovaLib|platform_www|cordova)</arguments> - </matcher> - </filter> - <filter> - <id>1390880034108</id> - <name></name> - <type>30</type> - <matcher> - <id>org.eclipse.ui.ide.multiFilter</id> - <arguments>1.0-projectRelativePath-matches-false-true-^(assets/www|res/xml/config.xml)</arguments> - </matcher> - </filter> - </filteredResources> -</projectDescription> - diff --git a/platforms/android/AndroidManifest.xml b/platforms/android/AndroidManifest.xml deleted file mode 100644 index b7f945e..0000000 --- a/platforms/android/AndroidManifest.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?> -<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="org.usfirst.frc.team4272.safetyapp" xmlns:android="http://schemas.android.com/apk/res/android"> - <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> - <uses-permission android:name="android.permission.INTERNET" /> - <application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name"> - <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="CordovaApp" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize"> - <intent-filter android:label="@string/launcher_name"> - <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - </activity> - </application> - <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" /> - <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -</manifest> diff --git a/platforms/android/build.gradle b/platforms/android/build.gradle deleted file mode 100644 index 9d1d45a..0000000 --- a/platforms/android/build.gradle +++ /dev/null @@ -1,94 +0,0 @@ -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 deleted file mode 100644 index 66483d3..0000000 --- a/platforms/android/custom_rules.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project> - <target name="-pre-compile"> - <!-- Fix library references due to bug in build.xml: See: https://groups.google.com/forum/#!topic/android-developers/0ivH-YqCjzg --> - <pathconvert property="fixedJarsPath" refid="project.all.jars.path"> - <filtermapper> - <replacestring from="/bin/" to="/ant-build/"/> - <replacestring from="\bin\" to="\ant-build\"/> - </filtermapper> - </pathconvert> - <path id="project.all.jars.path"> - <pathelement path="${fixedJarsPath}"/> - </path> - <echo message="Set jars path to: ${toString:project.all.jars.path}"/> - </target> - <!-- Rename AndroidManifest.xml so that Eclipse's import wizard doesn't detect ant-build as a project --> - <target name="-post-build"> - <move file="ant-build/AndroidManifest.xml" tofile="ant-build/AndroidManifest.cordova.xml" failonerror="false" overwrite="true" /> - <move file="CordovaLib/ant-build/AndroidManifest.xml" tofile="CordovaLib/ant-build/AndroidManifest.cordova.xml" failonerror="false" overwrite="true" /> - </target> -</project> - diff --git a/platforms/android/project.properties b/platforms/android/project.properties deleted file mode 100644 index ef68eb7..0000000 --- a/platforms/android/project.properties +++ /dev/null @@ -1,14 +0,0 @@ -# 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 deleted file mode 100644 index baa1714..0000000 --- a/platforms/android/settings.gradle +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index f44d87a..0000000 --- a/platforms/browser/config.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?> -<widget id="org.usfirst.frc.team4272.safetyapp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> - <feature name="Camera"> - <param name="browser-package" value="Camera" /> - </feature> - <name>SafetyApp</name> - <description> - A sample Apache Cordova application that responds to the deviceready event. - </description> - <author email="dev@cordova.apache.org" href="http://cordova.io"> - Apache Cordova Team - </author> - <content src="index.html" /> - <access origin="*" /> -</widget> diff --git a/plugins/android.json b/plugins/android.json deleted file mode 100644 index d539e89..0000000 --- a/plugins/android.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "prepare_queue": { - "installed": [], - "uninstalled": [] - }, - "config_munge": { - "files": { - "res/xml/config.xml": { - "parents": { - "/*": [ - { - "xml": "<feature name=\"Camera\"><param name=\"android-package\" value=\"org.apache.cordova.camera.CameraLauncher\" /></feature>", - "count": 1 - } - ] - } - }, - "AndroidManifest.xml": { - "parents": { - "/*": [ - { - "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />", - "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 deleted file mode 100644 index 3ed2a72..0000000 --- a/plugins/browser.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "prepare_queue": { - "installed": [], - "uninstalled": [] - }, - "config_munge": { - "files": { - "config.xml": { - "parents": { - "/*": [ - { - "xml": "<feature name=\"Camera\"><param name=\"browser-package\" value=\"Camera\" /></feature>", - "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/2015 FRC Team Safety Manual- FINAL 2.6.15.pdf b/www/2015 FRC Team Safety Manual- FINAL 2.6.15.pdf Binary files differnew file mode 100644 index 0000000..d244936 --- /dev/null +++ b/www/2015 FRC Team Safety Manual- FINAL 2.6.15.pdf diff --git a/www/4272_Safety_Manual.pdf b/www/4272_Safety_Manual.pdf Binary files differnew file mode 100644 index 0000000..788142c --- /dev/null +++ b/www/4272_Safety_Manual.pdf diff --git a/www/Emergency_Procedures.html b/www/Emergency_Procedures.html new file mode 100644 index 0000000..2729093 --- /dev/null +++ b/www/Emergency_Procedures.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <meta name="format-detection" content="telephone=no" /> + <meta name="msapplication-tap-highlight" content="no" /> + <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --> + <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> + <link rel="stylesheet" type="text/css" href="css/index.css" /> + <script src="cordova.js"></script> + <title>FRC Team 4272 Safety</title> + </head> + <body id="emergency"> + <h1>Emergency Procedures</h1> + <h2>Fire Escape</h2> + <img src="img/Fire_Escape_Layout.jpg" /> + <h2>Tornado</h2> + <img src="img/Tornado_Layout.jpg" /> + </body> +</html> diff --git a/www/FIRST_Safety_Manual.pdf b/www/FIRST_Safety_Manual.pdf new file mode 120000 index 0000000..918ba1a --- /dev/null +++ b/www/FIRST_Safety_Manual.pdf @@ -0,0 +1 @@ +2015 FRC Team Safety Manual- FINAL 2.6.15.pdf
\ No newline at end of file diff --git a/www/MSDS.html.in b/www/MSDS.html.in new file mode 100644 index 0000000..4bfc689 --- /dev/null +++ b/www/MSDS.html.in @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <meta name="format-detection" content="telephone=no" /> + <meta name="msapplication-tap-highlight" content="no" /> + <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --> + <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> + <link rel="stylesheet" type="text/css" href="css/index.css" /> + <script src="cordova.js"></script> + <title>FRC Team 4272 Safety - Report an injury</title> + </head> + <body id="msds"> + <h1>MSDS</h1> + @list@ + </body> +</html> diff --git a/www/MSDS/3-IN-ONE_oil.pdf b/www/MSDS/3-IN-ONE_oil.pdf Binary files differnew file mode 100644 index 0000000..c42c851 --- /dev/null +++ b/www/MSDS/3-IN-ONE_oil.pdf diff --git a/www/MSDS/Alcohol_Prep_Pads.pdf b/www/MSDS/Alcohol_Prep_Pads.pdf Binary files differnew file mode 100644 index 0000000..d465b11 --- /dev/null +++ b/www/MSDS/Alcohol_Prep_Pads.pdf diff --git a/www/MSDS/Baking_Soda.pdf b/www/MSDS/Baking_Soda.pdf Binary files differnew file mode 100644 index 0000000..a82d791 --- /dev/null +++ b/www/MSDS/Baking_Soda.pdf diff --git a/www/MSDS/Burn_Cream.pdf b/www/MSDS/Burn_Cream.pdf Binary files differnew file mode 100644 index 0000000..3d7c6e9 --- /dev/null +++ b/www/MSDS/Burn_Cream.pdf diff --git a/www/MSDS/Expo_Dry_Erase_Cleaner.pdf b/www/MSDS/Expo_Dry_Erase_Cleaner.pdf Binary files differnew file mode 100644 index 0000000..3f21abd --- /dev/null +++ b/www/MSDS/Expo_Dry_Erase_Cleaner.pdf diff --git a/www/MSDS/Hand_Sanitizer.pdf b/www/MSDS/Hand_Sanitizer.pdf Binary files differnew file mode 100644 index 0000000..31965e1 --- /dev/null +++ b/www/MSDS/Hand_Sanitizer.pdf diff --git a/www/MSDS/Hydrogen_Peroxide.pdf b/www/MSDS/Hydrogen_Peroxide.pdf Binary files differnew file mode 100644 index 0000000..5b3ff5f --- /dev/null +++ b/www/MSDS/Hydrogen_Peroxide.pdf diff --git a/www/MSDS/Krazy_Glue.pdf b/www/MSDS/Krazy_Glue.pdf Binary files differnew file mode 100644 index 0000000..913fb38 --- /dev/null +++ b/www/MSDS/Krazy_Glue.pdf diff --git a/www/MSDS/Lead_Free_Solder.pdf b/www/MSDS/Lead_Free_Solder.pdf Binary files differnew file mode 100644 index 0000000..1f13ef9 --- /dev/null +++ b/www/MSDS/Lead_Free_Solder.pdf diff --git a/www/MSDS/MK-Battery.pdf b/www/MSDS/MK-Battery.pdf Binary files differnew file mode 100644 index 0000000..d9538c9 --- /dev/null +++ b/www/MSDS/MK-Battery.pdf diff --git a/www/MSDS/Metalset_A-4_Epoxy.pdf b/www/MSDS/Metalset_A-4_Epoxy.pdf Binary files differnew file mode 100644 index 0000000..e898f0b --- /dev/null +++ b/www/MSDS/Metalset_A-4_Epoxy.pdf diff --git a/www/MSDS/Neosporin_Ointment.pdf b/www/MSDS/Neosporin_Ointment.pdf Binary files differnew file mode 100644 index 0000000..0403c4e --- /dev/null +++ b/www/MSDS/Neosporin_Ointment.pdf diff --git a/www/MSDS/Paint_Thinner.pdf b/www/MSDS/Paint_Thinner.pdf Binary files differnew file mode 100644 index 0000000..9c4144f --- /dev/null +++ b/www/MSDS/Paint_Thinner.pdf diff --git a/www/MSDS/Scotch-Weld.pdf b/www/MSDS/Scotch-Weld.pdf Binary files differnew file mode 100644 index 0000000..c31590d --- /dev/null +++ b/www/MSDS/Scotch-Weld.pdf diff --git a/www/MSDS/SightSavers_Lens_Cleaner.pdf b/www/MSDS/SightSavers_Lens_Cleaner.pdf Binary files differnew file mode 100644 index 0000000..6513263 --- /dev/null +++ b/www/MSDS/SightSavers_Lens_Cleaner.pdf diff --git a/www/MSDS/WD-40.pdf b/www/MSDS/WD-40.pdf Binary files differnew file mode 100644 index 0000000..b5c06c8 --- /dev/null +++ b/www/MSDS/WD-40.pdf diff --git a/www/Member_Health_Information.pdf b/www/Member_Health_Information.pdf Binary files differnew file mode 100644 index 0000000..e276760 --- /dev/null +++ b/www/Member_Health_Information.pdf diff --git a/www/PPE_Information.html b/www/PPE_Information.html new file mode 100644 index 0000000..d26af6e --- /dev/null +++ b/www/PPE_Information.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <meta name="format-detection" content="telephone=no" /> + <meta name="msapplication-tap-highlight" content="no" /> + <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --> + <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> + <link rel="stylesheet" type="text/css" href="css/index.css" /> + <script src="cordova.js"></script> + <title>FRC Team 4272 Safety</title> + </head> + <body id="ppe"> + <h1>PPE Information</h1> + Safety glasses assignments: + <ul> + <li>1: Cassie Alsop</li> + <li>2: Eric Jacoby</li> + <li>3: Jeremiah Kemp</li> + <li>4. Michael Hoover</li> + <li>5. AnnaLaura Nufer</li> + <li>6. Nicole Whittle</li> + <li>7. Hunter Greene</li> + <li>8. Juan Salazar</li> + <li>9. Elizabeth Snyder</li> + <li>10. Mason Wilson</li> + <li>11. Evan Easton</li> + <li>12. Adi Ben-Yehoshua</li> + <li>13. Jared Heller</li> + <li>14. Mitchell Jorczak</li> + <li>15. Veronica Shaffer</li> + <li>16. Catherine Spyr</li> + <li>17. Luke Shumaker</li> + <li>18. Same Cook</li> + <li>19. Josh Chang</li> + <li>20. Jason Ang</li> + <li>21. Cole Griffin</li> + </ul> + </body> +</html> diff --git a/www/alert.html b/www/alert.html new file mode 100644 index 0000000..14195e9 --- /dev/null +++ b/www/alert.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <meta name="format-detection" content="telephone=no" /> + <meta name="msapplication-tap-highlight" content="no" /> + <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --> + <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> + <link rel="stylesheet" type="text/css" href="css/index.css" /> + <script src="cordova.js"></script> + <title>FRC Team 4272 Safety</title> + </head> + <body id="alert"> + <h1>Safety Committee Members</h1> + <a href="tel:+1-260-519-2905">Adi</a> + <a href="tel:+1-765-421-2086">Cassie</a> + <a href="tel:+1-???-???-????">Hunter</a> + </body> +</html> diff --git a/www/css/index.scss b/www/css/index.scss index 81d5a1a..ccacc30 100644 --- a/www/css/index.scss +++ b/www/css/index.scss @@ -1,61 +1,188 @@ $yellow: #E5B217; $red: #80181A; -html, body, table { +* { + box-sizing: border-box; +} + +html { height: 100%; - padding: 0; - margin: 0; + body { + margin: 0; + padding: 0; + + background-color: $red; + color: $yellow; + font-family: sans-serif; + font-weight: bolder; + h1 { + text-align: center; + } + a { + text-decoration: none; + color: $yellow; + /* no :hover or :focus because touch screens */ + &:active { + text-decoration: underline; + background-color: $yellow; + color: $red; + } + } + input[type=text], input[type=password], input[type=email], select { + padding: 0 0.25em; + border: none; + background: bottom left linear-gradient(#a9a9a9, #a9a9a9) no-repeat, + bottom center linear-gradient(#a9a9a9, #a9a9a9) repeat-x, + bottom right linear-gradient(#a9a9a9, #a9a9a9) no-repeat; + background-size: 1px 6px, 1px 1px, 1px 6px; + color: $yellow; + &:hover, &:active, &:focus { + background: bottom left linear-gradient($yellow, $yellow) no-repeat, + bottom center linear-gradient($yellow, $yellow) repeat-x, + bottom right linear-gradient($yellow, $yellow) no-repeat; + background-size: 1px 6px, 1px 1px, 1px 6px; + color: $yellow; + } + } + option[disabled] { display: none; } + } +} +body#index { + height: 100%; + table { + height: 100%; + padding: 0; + margin: 0; - background-color: $red; - color: $yellow; + width: 100%; + border-collapse: collapse; + td, th { + border: solid 1px $yellow; + } + td { + text-align: center; + vertical-align: middle; + } - font-family: sans-serif; - font-weight: bolder; + thead { + height: 10%; + background-color: $yellow; + color: $red; + } + tbody { + td { + width: 33%; + max-width: 33%; + height: 30%; + div { + /* A wrapper round cell contents allowing us to use fancy + table-positioning inside of the cell */ + display: table; + width: 100%; + height: 100%; + a { + display: table-cell; + height: 100%; + width: 100%; + vertical-align: middle; + } + &.logo { + background-image: url("../img/logo.png"); + background-size: auto 100%; + background-position: center center; + background-repeat: no-repeat; + } + } + } + } + } } -table { - width: 100%; - border-collapse: collapse; - td, th { - border: solid 1px $yellow; +body#report { + margin: 0.5em; + form { + width: 100%; + label { + display: table; + //border: solid 1px #0000FF; + width: 100%; + margin-bottom: 0.25em; + span { + display: table-cell; + width: 8em; + } + input, select { + display: table-cell; + width: 100%; + } + textarea { + display: inline-block; + width: 100%; + height: 3em; + border: 0; + } + } + input[type=submit] { + width: 100%; + height: 3em; + } } - td { + #camera-ui { + border: solid 1px $yellow; text-align: center; - vertical-align: middle; + button { + display: block; + margin-left: auto; + margin-right: auto; + } + img { + display: block; + margin-left: auto; + margin-right: auto; + max-width: 50%; + height: auto; + } } + & > video { + /* Camera feed for browser */ + position: absolute; + left: 0; + width: 100%; - thead { - height: 10%; - background-color: $yellow; - color: $red; + top: 0; + height: auto; + max-height: 100%; + display: block; } - tbody { - td { - width: 33%; - height: 30%; - div { - /* A wrapper round cell contents allowing us to use fancy - table-positioning inside of the cell */ - display: table; - width: 100%; - height: 100%; - a { - display: table-cell; - height: 100%; - width: 100%; - vertical-align: middle; - } - } - } + & > button { + /* Camera capture button for browser */ + position: absolute; + left: 0; + width: 100%; + + bottom: 0; + height: 3em; } } -a { - text-decoration: none; - color: $yellow; - &:hover, &:active, &:focus { - text-decoration: underline; - background-color: $yellow; - color: $red; +body#msds, body#alert { + a { + display: inline-block; + width: 100%; + padding-left: 1em; + line-height: 3em; + border: solid 1px #a9a9a9; + margin-top: -1px; } } + +body#ppe { + margin: 1em; +} + +body#emergency { + img { + width: 100%; + height: auto; + } +}
\ No newline at end of file diff --git a/www/find.html b/www/find.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/www/find.html diff --git a/www/img/Fire_Escape_Layout.jpg b/www/img/Fire_Escape_Layout.jpg Binary files differnew file mode 100644 index 0000000..09c3879 --- /dev/null +++ b/www/img/Fire_Escape_Layout.jpg diff --git a/www/img/Tornado_Layout.jpg b/www/img/Tornado_Layout.jpg Binary files differnew file mode 100644 index 0000000..73ece59 --- /dev/null +++ b/www/img/Tornado_Layout.jpg diff --git a/www/img/logo.png b/www/img/logo.png Binary files differindex 9519e7d..cabed2b 100644 --- a/www/img/logo.png +++ b/www/img/logo.png diff --git a/www/img/screen-landscape.png b/www/img/screen-landscape.png Binary files differnew file mode 100644 index 0000000..66c2346 --- /dev/null +++ b/www/img/screen-landscape.png diff --git a/www/img/screen-portrait.png b/www/img/screen-portrait.png Binary files differnew file mode 100644 index 0000000..a2d42e6 --- /dev/null +++ b/www/img/screen-portrait.png diff --git a/www/index.html b/www/index.html index fa3cb54..d66b84d 100644 --- a/www/index.html +++ b/www/index.html @@ -1,36 +1,37 @@ <!DOCTYPE html> <html> - <head> - <meta charset="utf-8" /> - <meta name="format-detection" content="telephone=no" /> - <meta name="msapplication-tap-highlight" content="no" /> - <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --> - <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> - <link rel="stylesheet" type="text/css" href="css/index.css" /> - <title>Hello World</title> - </head> - <body> - <table> - <thead> - <tr><th colspan=3>4272 Safety</th></tr> - </thead> - <tbody> - <tr> - <td><div><a href="./Emergency_Procedure.pdf">Emergency Procedures</a></div></td> - <td><div><a href="./PPE_Information.pdf">PPE Information</a></div></td> - <td><div><a href="./MSDS.pdf">MSDS</a></div></td> - </tr> - <tr> - <td><div><a href="./First_Aid_Instructions.pdf">First Aid Instructions</a></div></td> - <td><div><a href="./report.html">Report an Injury</a></div></td> - <td><div><a href="./alert.html">Alert Safety Person</a></div></td> - </tr> - <tr> - <td><div><a href="./Member_Health_Information.pdf">Member Health Information</a></div></td> - <td><div><a href="./find.html">Find Safety Mentor</a></div></td> - <td><div><a href="./FIRST_Safety_Manual.pdf">FIRST Safety Manual</a></div></td> - </tr> - </tbody> - </table> - </body> + <head> + <meta charset="utf-8" /> + <meta name="format-detection" content="telephone=no" /> + <meta name="msapplication-tap-highlight" content="no" /> + <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --> + <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> + <link rel="stylesheet" type="text/css" href="css/index.css" /> + <script src="cordova.js"></script> + <title>FRC Team 4272 Safety</title> + </head> + <body id="index"> + <table> + <thead> + <tr><th colspan=3>4272 Safety</th></tr> + </thead> + <tbody> + <tr> + <td><div><a href="./pdfjs/web/viewer.html?file=../../FIRST_Safety_Manual.pdf">FIRST Safety Manual</a></div></td> + <td><div><a href="./pdfjs/web/viewer.html?file=../../4272_Safety_Manual.pdf">4272 Safety Manual</a></div></td> + <td><div><a href="./report.html">Report an Injury</a></div></td> + </tr> + <tr> + <td><div><a href="./Emergency_Procedures.html">Emergency Procedures</a></div></td> + <td><div class=logo> </div></td> + <td><div><a href="./MSDS.html">MSDS</a></div></td> + </tr> + <tr> + <td><div><a href="./pdfjs/web/viewer.html?file=../../Member_Health_Information.pdf">Member Health Information</a></div></td> + <td><div><a href="./PPE_Information.html">PPE Information</a></div></td> + <td><div><a href="./alert.html">Alert Safety Committee Member</a></div></td> + </tr> + </tbody> + </table> + </body> </html> diff --git a/www/js/report.js b/www/js/report.js new file mode 100644 index 0000000..661d63f --- /dev/null +++ b/www/js/report.js @@ -0,0 +1,41 @@ +document.addEventListener("deviceready", onDeviceReady, false); +function onDeviceReady() { + var ui = document.getElementById("camera-ui"); + if (navigator.camera) { + ui.innerHTML = "<button onclick=\"takePhoto(true);return false\">Add Photo</button>" + } else { + ui.innerHTML = "Camera not supported on your device"; + } +} +function takePhoto(firstrun) { + var options = { + /*quality: 50,*/ + destinationType: Camera.DestinationType.DATA_URL, /* DATA_URL, FILE_URI, NATIVE_URI */ + sourceType: Camera.PictureSourceType.CAMERA, /* PHOTOLIBRARY, CAMERA, SAVEDPHOTOALBUM */ + allowEdit: true, + encodingType: Camera.EncodingType.JPEG, /* JPEG, PNG */ + /*targetWidth: 300,*/ + /*targetHeight: 300,*/ + mediaType: Camera.MediaType.PICTURE, /* PICTURE, VIDEO, ALLMEDIA */ + correctOrientation: true, + /* saveToPhotoAlbum: false, */ + /* popoverOptions: (iOS only), */ + cameraDirection: Camera.Direction.BACK /* BACK, FRONT */ + }; + navigator.camera.getPicture( + function(imgData) { + if (firstrun) { + var ui = document.getElementById("camera-ui"); + ui.innerHTML = "<input name=photo id=photo type=hidden /><button onclick=\"takePhoto(false);return false\">Change Photo</button><img id=thumbnail />" + } + var input = document.getElementById("photo"); + var img = document.getElementById("thumbnail"); + img.src = "data:image/jpeg;base64,"+imgData; + input.value = imgData; + }, + function() { + alert("Error taking picture", "Error"); + }, + options); + return false; +} diff --git a/www/report.html b/www/report.html new file mode 100644 index 0000000..7a853f6 --- /dev/null +++ b/www/report.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <meta name="format-detection" content="telephone=no" /> + <meta name="msapplication-tap-highlight" content="no" /> + <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --> + <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> + <link rel="stylesheet" type="text/css" href="css/index.css" /> + <script src="cordova.js"></script> + <script src="js/report.js"></script> + <title>FRC Team 4272 Safety - Report an injury</title> + </head> + <body id="report"> + <h1>Report an Injury</h1> + <form action="https://lukeshu.com/frc4272/app/reports" method="POST"> + <label><span>Name:</span><input type="text" name="name" /></label> + <label><span>Grade:</span> + <select name="grade"> + <option disabled selected value="">Select one</option> + <option value="9">9th / Freshman</option> + <option value="10">10th / Sophomore</option> + <option value="11">11th / Junion</option> + <option value="12">12th / Senior</option> + <option value="mentor">Mentor</option> + <option value="other">Other</option> + </select> + </label> + <label><span>Sub-team:</span><input type="text" name="subteam" /></label> + <label><span>Injury:</span><input type="text" name="injury" /></label> + <label>Detailed description of how the injury occurred <textarea></textarea></label> + <label>Detailed description of how the injury was treated <textarea></textarea></label> + <div id="camera-ui">Loading Camera...</div> + <input type="submit" value="Submit"/> + </form> + </body> +</html> |