1
0
Fork 0

Compare commits

..

16 commits

Author SHA1 Message Date
Jo Wroten
4f46f34f51 Add LICENSE 2019-08-07 03:38:10 +00:00
Joe Wroten
7213f44192 Play store badge 2019-01-26 18:09:31 -06:00
sharpshark28
6d4ab9423e v2.0.5 2017-08-18 00:10:14 -05:00
Joe L Wroten
6d188edef3 Merge pull request #27 from sharpshark28/26
Sorting by level works as expected
2017-08-18 00:07:11 -05:00
Joe L Wroten
ba63c28e01 Merge branch 'master' into 26 2017-08-17 22:37:45 -05:00
sharpshark28
5c73ec1c9d Sorting by level works as expected 2017-08-17 22:37:18 -05:00
Joe L Wroten
b98b515564 Merge pull request #25 from sharpshark28/9
Same large/small spell visual, scroll fix
2017-08-17 07:51:35 -05:00
sharpshark28
8c89c6b5fa Same large/small spell visual, scroll fix 2017-08-17 07:46:33 -05:00
sharpshark28
a30d0db4e4 [Documentation]: Badges and Play Store Link 2017-08-13 07:13:31 -05:00
Joe L Wroten
cdcd9c19e9 Merge pull request #22 from sharpshark28/4
[ENHANCEMENT]: Android native
2017-08-12 19:36:39 -05:00
sharpshark28
b95bb89066 [ENHANCEMENT]: Android native 2017-08-12 19:35:34 -05:00
sharpshark28
52f7a2eed2 [FIX]: Undefined var errors 2017-08-11 20:42:50 -05:00
Joe L Wroten
5c7e0adabb Merge pull request #21 from sharpshark28/14
[FIX]: Cordova css lag fix for chosen spells
2017-08-11 20:26:31 -05:00
sharpshark28
bd9e0ee283 [FIX]: Cordova css lag fix for chosen spells 2017-08-11 08:18:56 -05:00
sharpshark28
b5b24a46f8 Spell list links center and take full height 2017-07-28 13:32:08 -05:00
sharpshark28
05683d77fd Fixed production build index generation 2017-07-28 13:11:23 -05:00
32 changed files with 581 additions and 59 deletions

View file

@ -1,4 +1,4 @@
build/*.js
config/*.js
dist/*.js
tmp/*.js
src/tmp/*.js

2
.gitignore vendored
View file

@ -1,5 +1,5 @@
.DS_Store
tmp/
src/tmp/
node_modules/
dist/
src/statics/spells.json

24
LICENSE Normal file
View file

@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>

View file

@ -2,6 +2,8 @@
My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.
[![PlayStore](https://play.google.com/intl/en_us/badges/images/badge_new.png)](https://play.google.com/store/apps/details?id=io.cordova.myspells)
## License
Open Game License v1.0a Copyright 2000, Wizards of the Coast, Inc.
@ -21,10 +23,16 @@ App contains content from the SRD and is restricted and covered by the OGL. You
$ npm install
# serve with hot reload at localhost:8080
$ npm run dev
$ npm run dev_web
# build for production with minification
$ npm run build
$ npm run build_web # or build_app
# build cordova (android, iOS potentially in future) release
$ npm run build_app_cordova
# sign apk with android studio or jarsigner
# install on device
$ adp install cordova/platforms/android/build/apk/<BUILT-FILE.apk>
# lint code
$ npm run lint

View file

@ -1,5 +1,7 @@
'use strict'
const args = require('yargs').argv
const fs = require('fs')
const spells = require('../src/spells_original.json')
@ -14,6 +16,8 @@ const hashCode = function (str) {
return hash
}
console.log('Processing spells...', args.web ? 'for web!' : 'for apps!')
let spellsWithIDs = spells.map(spell => {
spell.id = hashCode(spell.name).toString()
return spell
@ -24,16 +28,26 @@ let indexedSpells = spellsWithIDs.map(spell => {
id: spell.id,
name: spell.name,
classes: spell.classes,
level: spell.level,
level: spell.level.toLowerCase() === 'cantrip' ? 0 : parseInt(spell.level),
link: '/spell/' + spell.id,
}
})
let dirs = ['tmp']
let dirs = ['dist', 'dist/statics', 'src/tmp']
dirs.forEach(dir => {
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir)
}
})
fs.writeFileSync('./src/statics/spells.json', JSON.stringify(spellsWithIDs))
fs.writeFileSync('./tmp/spells_index.js', `export default ${JSON.stringify(indexedSpells)};`)
fs.writeFileSync('./src/tmp/spells_index.js', `export default ${JSON.stringify(indexedSpells)};`)
if (args.web) {
fs.writeFileSync('./dist/statics/spells.json', JSON.stringify(spellsWithIDs));
fs.writeFileSync('./src/tmp/spells.js', `export default []; // Will fetch from web`)
}
else {
fs.writeFileSync('./src/tmp/spells.js', `export default ${JSON.stringify(spellsWithIDs)};`)
}
console.log('Processed spells')

View file

@ -2,5 +2,5 @@ var
shell = require('shelljs'),
path = require('path')
shell.rm('-rf', path.resolve(__dirname, '../dist ../tmp'))
shell.rm('-rf', path.resolve(__dirname, '../dist ../src/tmp'))
console.log(' Cleaned build artifacts.\n')

View file

@ -1,6 +1,5 @@
process.env.NODE_ENV = 'development'
require('./generate_index')
require('colors')
var

22
cordova/.idea/compiler.xml generated Normal file
View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>

View file

@ -0,0 +1,3 @@
<component name="CopyrightManager">
<settings default="" />
</component>

24
cordova/.idea/cordova.iml generated Normal file
View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/../gen" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/../gen" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/../../cordova/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/../../cordova/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/../../cordova/assets" />
<option name="LIBS_FOLDER_RELATIVE_PATH" value="/../../cordova/libs" />
<option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/../../cordova/proguard_logs" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

14
cordova/.idea/misc.xml generated Normal file
View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" default="false" assert-keyword="false" jdk-15="false" />
</project>

8
cordova/.idea/modules.xml generated Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/cordova.iml" filepath="$PROJECT_DIR$/.idea/cordova.iml" />
</modules>
</component>
</project>

291
cordova/.idea/workspace.xml generated Normal file
View file

@ -0,0 +1,291 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c5c4ced8-75d2-4b8c-a2ac-45d7a9743afa" name="Default" comment="" />
<ignored path="cordova.iws" />
<ignored path=".idea/workspace.xml" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FavoritesManager">
<favorites_list name="cordova" />
</component>
<component name="GenerateSignedApkSettings">
<option name="KEY_STORE_PATH" value="$USER_HOME$/android/keystore/sharpshark28-keystore.jks" />
<option name="KEY_ALIAS" value="key0" />
</component>
<component name="GradleLocalSettings">
<option name="externalProjectsViewState">
<projects_view />
</option>
</component>
<component name="ProjectFrameBounds">
<option name="y" value="23" />
<option name="width" value="1440" />
<option name="height" value="873" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectView">
<navigator currentView="AndroidView" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="Scope" />
<pane id="AndroidView">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cordova" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidViewProjectNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="ProjectPane" />
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="android.sdk.path" value="$USER_HOME$/Library/Android/sdk" />
<property name="settings.editor.selected.configurable" value="android.sdk-updates" />
<property name="settings.editor.splitter.proportion" value="0.2" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/platforms/android/build/outputs/apk/android-release-unsigned.apk" />
<property name="ExportedModule" value="cordova" />
<property name="ExportedApkPath" value="$PROJECT_DIR$/cordova.apk" />
<property name="AndroidRunProguardForReleaseBuild" value="false" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
</component>
<component name="RunManager">
<configuration default="true" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
<method />
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<method />
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<option name="OUTPUT_DIRECTORY" />
<option name="ANNOTATION_TYPE" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<envs />
<properties />
<listeners />
<method />
</configuration>
<configuration name="&lt;template&gt;" type="Applet" default="true" selected="false">
<option name="MAIN_CLASS_NAME" />
<option name="HTML_FILE_NAME" />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<option name="VM_PARAMETERS" />
</configuration>
<configuration name="&lt;template&gt;" type="JUnit" default="true" selected="false">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
</configuration>
<configuration name="&lt;template&gt;" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" default="true" selected="false">
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="c5c4ced8-75d2-4b8c-a2ac-45d7a9743afa" name="Default" comment="" />
<created>1502571896668</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1502571896668</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="873" extended-state="6" />
<editor active="false" />
<layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Android Monitor" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Captures" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24892704" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Android Model" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="Vcs.Log.UiProperties">
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<settings>
<artifact-editor />
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="FacetStructureConfigurable.UI">
<settings>
<last-edited>Android</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ModuleStructureConfigurable.UI">
<settings>
<last-edited>Android|cordova</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

2
cordova/.npmignore Normal file
View file

@ -0,0 +1,2 @@
# OS X
.DS_Store

31
cordova/config.xml Normal file
View file

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.myspells" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>My Spells DnD5e</name>
<description>
My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.
</description>
<author email="joe@wroten.me" href="https://www.wroten.me/">
Joe Wroten
</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="android">
<icon density="ldpi" src="res/android/ldpi.png" />
<icon density="mdpi" src="res/android/mdpi.png" />
<icon density="hdpi" src="res/android/hdpi.png" />
<icon density="xhdpi" src="res/android/xhdpi.png" />
<icon density="xxhdpi" src="res/android/xxhdpi.png" />
<icon density="xxxhdpi" src="res/android/xxxhdpi.png" />
</platform>
<engine name="android" spec="^6.2.3" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
</widget>

23
cordova/hooks/README.md Normal file
View file

@ -0,0 +1,23 @@
<!--
#
# 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.
#
-->
# Cordova Hooks
Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide.

24
cordova/package.json Normal file
View file

@ -0,0 +1,24 @@
{
"name": "my_spells_app",
"displayName": "My Spells - Cordova",
"version": "1.0.0",
"description": "My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Joe Wroten <joe@wroten.me>",
"license": "ISC",
"dependencies": {
"cordova-android": "^6.2.3",
"cordova-plugin-whitelist": "^1.3.2"
},
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {}
},
"platforms": [
"android"
]
}
}

29
cordova/res/README.md Normal file
View file

@ -0,0 +1,29 @@
<!--
#
# 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.
#
-->
Note that these image resources are not copied into a project when a project
is created with the CLI. Although there are default image resources in a
newly-created project, those come from the platform-specific project template,
which can generally be found in the platform's `template` directory. Until
icon and splashscreen support is added to the CLI, these image resources
aren't used directly.
See https://issues.apache.org/jira/browse/CB-5145

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

1
cordova/www Symbolic link
View file

@ -0,0 +1 @@
../dist

View file

@ -1,13 +1,16 @@
{
"name": "my_spells",
"version": "2.0.3",
"version": "2.0.5",
"description": "My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.",
"author": "Joe Wroten <joe@wroten.me>",
"license": "ISC",
"scripts": {
"clean": "node build/script.clean.js",
"dev": "node build/script.dev.js",
"build": "node build/script.build.js",
"dev_web": "node build/process_spells.js --web && node build/script.dev.js ",
"dev_app_cordova": "cd cordova && cordova run --device android",
"build_web": "node build/process_spells.js --web && node build/script.build.js",
"build_app": "node build/process_spells.js && node build/script.build.js",
"build_app_cordova": "cd cordova && cordova build --release",
"lint": "eslint --ext .js,.vue src"
},
"dependencies": {
@ -67,6 +70,7 @@
"webpack-dev-middleware": "^1.8.4",
"webpack-hot-middleware": "^2.17.0",
"webpack-merge": "^4.0.0",
"whatwg-fetch": "^2.0.3"
"whatwg-fetch": "^2.0.3",
"yargs": "^8.0.2"
}
}

View file

@ -25,6 +25,7 @@ import 'whatwg-fetch'
import { state, dispatch } from './store'
import Header from './components/Header'
import Footer from './components/Footer'
import bakedInSpells from './tmp/spells'
Vue.component('nav-header', Header)
Vue.component('nav-footer', Footer)
@ -50,11 +51,18 @@ function fetchFailure (reason) {
}
function fetchSpells () {
console.log('WOW DATA', bakedInSpells)
if (bakedInSpells.length) {
fetchSuccess(bakedInSpells)
Loading.hide()
}
else {
fetch('./statics/spells.json')
.then(response => response.json())
.then(fetchSuccess)
.catch(fetchFailure)
.then(() => { Loading.hide() })
}
}
export default {

View file

@ -24,13 +24,13 @@
>{{state.chosen.length}}</span>
</q-tab>
<q-tab
hidden="true"
hidden
route="/spell"
>
Spell
</q-tab>
<q-tab
hidden="true"
hidden
route="/about"
>
About
@ -52,4 +52,6 @@ export default {
<style scoped lang="stylus">
footer .q-tabs
width: 100%
.pointing-left:before
transform: translateX(-50%) translateY(-50%) rotate(225deg)
</style>

View file

@ -8,13 +8,6 @@
Back
</button>
<button
v-go-back=" '/' "
class="page-back-big primary circular big shadow-2"
>
<i>arrow_back</i>
</button>
<div class="card bg-white">
<div class="card-title bg-pink text-white">
{{spell.name}}
@ -170,17 +163,4 @@ export default {
.bookmark
font-size: 1.25em
line-height: 1em
@media screen and (min-height: 800px)
.card
position: relative
top: 50%
transform: translateY(-50%)
.page-back-big
display: block
position: absolute
top: 1rem
left: 1rem
z-index: 1
.page-back-small
display: none
</style>

View file

@ -1,16 +1,19 @@
<template>
<div v-bind:class="{'checked': checked}">
<div class="item-primary">
{{level}}
{{spell.level}}
</div>
<div class="item-content has-secondary">
<router-link :to="spell.link">
<div>
<span class="spell-link-alignment">
<span class="spell-name">
{{spell.name}}
</div>
<div>
</span>
<br />
<span class="spell-classes">
{{classes}}
</div>
</span>
</span>
</router-link>
</div>
<div class="item-secondary" v-on:click="toggle">
@ -32,9 +35,6 @@ import { capitalize } from '../utils'
export default {
computed: {
level () {
return this.spell.level.toLowerCase() === 'cantrip' ? '0' : this.spell.level.charAt(0)
},
school () {
return capitalize(this.spell.school)
},
@ -66,10 +66,19 @@ export default {
</script>
<style scoped lang="stylus">
.item-content a
color: black
div:not(:first-of-type)
.spell-classes
color: rgba(0, 0, 0, .54)
.item.two-lines > .item-content
height: 100%
padding: 0
a
color: black
display: table
height: 100%
width: 100%
.spell-link-alignment
display: table-cell
vertical-align: middle
.item-secondary
width: 50px
height: 50px

View file

@ -34,9 +34,11 @@ export default {
},
props: [ 'spells' ],
mounted () {
if (this.state.lastSpell) {
let lastSpellPosition = this.$refs[this.state.lastSpell][0].$el.offsetTop
let scrollingPageElement = document.getElementsByClassName('layout-view')[0]
scrollingPageElement.scrollTop = lastSpellPosition
}
},
computed: {
filteredSpells () {

View file

@ -1,5 +1,5 @@
import { LocalStorage } from 'quasar'
import indexedSpells from '../tmp/spells_index'
import indexedSpells from './tmp/spells_index'
export let state = {
indexedSpells,