Compare commits

..

No commits in common. "master" and "1.2.0" have entirely different histories.

94 changed files with 2373 additions and 116758 deletions

2
.gitignore vendored
View File

@ -7,8 +7,6 @@ bin/*
plugins/*
platforms/*
tools/signing/*
/www/*
node_modules/*
/node_modules/*

17
.idea/php.xml generated Normal file → Executable file
View File

@ -1,15 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MessDetectorOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCSFixerOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCodeSnifferOptionsConfiguration">
<option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" />
</component>
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/vendor/zendframework/zend-paginator" />
@ -101,10 +91,5 @@
<path value="$PROJECT_DIR$/vendor/ainias/pwa-zf-core" />
</include_path>
</component>
<component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PsalmOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7" />
</project>

1
.npmrc
View File

@ -1 +0,0 @@
legacy-peer-deps=true

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="22" id="link.silas.wordrotator" version="1.3.3" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>WordRotator - Test</name>
<widget android-versionCode="1" id="link.silas.wordrotator" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>WordRotator</name>
<description>
A word-game
</description>
@ -9,8 +9,8 @@
</author>
<content src="index.html" />
<icon src="src/client/img/logo.png" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<access origin="cdvfile://*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
@ -21,11 +21,19 @@
<allow-intent href="market:*" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
</edit-config>
<preference name="android-targetSdkVersion" value="35" />
<icon src="src/client/img/logo.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="^1" />
<plugin name="cordova-plugin-webpack" spec="^0.4.7" />
<plugin name="cordova-plugin-nativestorage" spec="^2.3.2" />
<plugin name="cordova-plugin-tts" spec="^0.2.3" />
<plugin name="cordova-plugin-file" spec="^6.0.2" />
<plugin name="cordova-sqlite-storage" spec="^5.0.0" />
<plugin name="cordova-plugin-device" spec="^2.0.3" />
<engine name="browser" spec="^6.0.0" />
<engine name="ios" spec="^5.1.1" />
</widget>

File diff suppressed because it is too large Load Diff

30375
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,14 @@
{
"name": "wordrotator",
"displayName": "WordRotator",
"version": "1.3.2",
"version": "1.2.0",
"main": "index.js",
"scripts": {
"server": "ts-node src/server/index.ts",
"build": "webpack",
"run-browser": "cordova run browser",
"prepare-android": "cordova prepare android",
"prepare-browser": "cordova prepare browser",
"run-android": "cordova run android --device",
"release-android": "cordova build android --release --buildConfig=tools/signing/build.json",
"run browser": "cordova run browser",
"prepare browser": "cordova prepare browser",
"run android": "cordova run android --device",
"release android": "cordova build android --release",
"appium": "appium",
"appium-doctor": "appium-doctor",
"test browser": "wdio tests/wdio.config.browser.js",
@ -18,85 +17,87 @@
"typeorm": "ts-node ./node_modules/typeorm/cli -f ./ormconfig.ts"
},
"dependencies": {
"@types/node": "^15.3.0",
"@types/node": "^14.11.8",
"body-parser": "^1.19.0",
"cordova-ios": "^5.1.1",
"cordova-plugin-webpack": "^1.0.5",
"cordova-sites": "git+https://github.com/Ainias/cordova-sites.git#0.7.10",
"cordova-android": "^9.0.0",
"cordova-browser": "^6.0.0",
"cordova-ios": "^6.1.1",
"cordova-plugin-share": "^0.1.3",
"cordova-sites": "git+https://github.com/Ainias/cordova-sites.git#0.6.5",
"cordova-sites-database": "git+https://github.com/Ainias/cordova-sites-database.git#0.4.4",
"cordova-sites-easy-sync": "git+https://github.com/Ainias/cordova-sites-easy-sync.git#0.6.7",
"cordova-sites-user-management": "git+https://github.com/Ainias/cordova-sites-user-management.git#0.5.4",
"crypto": "^1.0.1",
"cs-event-manager": "git+https://git@github.com/Ainias/event-manager.git#0.2",
"dotenv": "^9.0.2",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"js-helper": "git+https://github.com/Ainias/js-helper.git#0.6.6",
"foundation-sites": "^6.6.3",
"js-helper": "git+https://github.com/Ainias/js-helper.git#0.4.1",
"jsonwebtoken": "^8.5.1",
"localforage": "^1.9.0",
"mysql": "^2.18.1",
"nodemailer": "^6.6.0",
"ts-node": "^9.1.1",
"typeorm": "^0.2.32",
"typescript": "^4.2.4"
"nodemailer": "^6.4.14",
"sql.js": "1.3.2",
"ts-node": "9.0.0",
"typeorm": "^0.2.28",
"ts-loader": "^8.0.5",
"typescript": "^4.0.3"
},
"devDependencies": {
"@babel/core": "^7.14.2",
"@babel/plugin-transform-runtime": "^7.14.2",
"@babel/core": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.14.2",
"@wdio/appium-service": "^7.5.7",
"@wdio/cli": "^7.5.7",
"@wdio/jasmine-framework": "^ 7.5.3",
"@wdio/local-runner": "^7.5.7",
"@wdio/selenium-standalone-service": "^7.5.7",
"@wdio/spec-reporter": "^7.5.7",
"appium": "^1.21.0",
"appium-doctor": "^1.16.0",
"autoprefixer": "^10.2.5",
"babel-loader": "^8.2.2",
"@babel/preset-env": "^7.12.1",
"@wdio/appium-service": "^6.6.3",
"@wdio/cli": "^6.6.6",
"@wdio/jasmine-framework": "^6.6.6",
"@wdio/local-runner": "^6.6.6",
"@wdio/selenium-standalone-service": "^6.6.5",
"@wdio/spec-reporter": "^6.6.6",
"appium": "1.15.1",
"appium-doctor": "^1.15.3",
"autoprefixer": "^10.0.1",
"babel-loader": "^8.1.0",
"babel-preset-env": "^1.7.0",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.1.2",
"cordova-android": "^13.0.0",
"cordova-browser": "^7.0.0",
"cordova-plugin-device": "^3.0.0",
"cordova-plugin-file": "^8.1.0",
"copy-webpack-plugin": "^6.2.1",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-nativestorage": "^2.3.2",
"cordova-plugin-share": "^0.1.3",
"cordova-plugin-tts": "^0.2.3",
"cordova-plugin-webpack": "^1.0.5",
"cordova-serve": "^4.0.0",
"cordova-sqlite-storage": "^6.0.0",
"css-loader": "^5.2.4",
"enhanced-resolve": "^5.8.2",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-sqlite-storage": "^5.1.0",
"css-loader": "^5.0.0",
"extract-loader": "^5.1.0",
"file-loader": "^6.2.0",
"foundation-sites": "^6.6.3",
"file-loader": "^6.1.1",
"html-loader": "^1.3.2",
"html-webpack-plugin": "^4.5.2",
"jasmine": "^3.7.0",
"localforage": "^1.9.0",
"node-sass": "^6.0.0",
"postcss-loader": "^4.3.0",
"sass-loader": "^10.2.0",
"sql.js": "1.5.0",
"terser-webpack-plugin": "^5.1.2",
"ts-loader": "^8.2.0",
"webpack": "^4.46.0",
"html-webpack-plugin": "^4.5.0",
"jasmine": "^3.6.2",
"node-sass": "^4.14.1",
"postcss-loader": "^4.0.4",
"sass-loader": "^10.0.3",
"terser-webpack-plugin": "^5.0.0",
"webpack": "^5.1.2",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.2"
"webpack-dev-server": "^3.11.0",
"workbox-precaching": "^5.1.4",
"workbox-webpack-plugin": "^5.1.4"
},
"cordova": {
"plugins": {
"cordova-plugin-webpack": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-nativestorage": {},
"cordova-plugin-keyboard": {},
"cordova-plugin-tts": {},
"cordova-plugin-device": {},
"cordova-plugin-file": {},
"cordova-sqlite-storage": {}
},
"platforms": [
"ios",
"browser",
"ios",
"android"
]
},

8
src/client/globals.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
declare var require: {
<T>(path: string): T;
(paths: string[], callback: (...modules: any[]) => void): void;
ensure: (
paths: string[],
callback: (require: <T>(path: string) => T) => void
) => void;
};

View File

@ -17,10 +17,6 @@
<span class="slider"></span>
</span>
</label>
<div class='grid-x setting-row' id='tutorial-button'>
<span class='columns small-6 translation'>tutorial</span>
<span class='columns small-6 text-right translation'>&gt;</span>
</div>
<div class='grid-x setting-row' id='credits-button'>
<span class='columns small-6 translation' >credits</span>
<span class='columns small-6 text-right translation'>&gt;</span>

View File

@ -1,5 +1,5 @@
<div>
<p class="translation" data-translation="credits-text"></p>
<p class="translation" data-translation="credits-sister-text"></p>
<p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p>
<p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p>
</div>

View File

@ -1,11 +1,11 @@
<div>
<h2>Impressum</h2>
<p>Silas Günther<br />
Peterstraße 10<br />
52062 Aachen<br/>
Mariabrunnstraße 48<br />
52064 Aachen<br/>
Deutschland
</p>
<p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br/>
<a href = "?s=contact" class = "link">Kontaktformular</a>
<p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br />
<a href = "?s=contact" class = "link" target="_blank">Kontaktformular</a>
</p>
</div>

View File

@ -30,7 +30,7 @@
<div class = 'step-3 hidden translation' data-translation="tutorial-step-3"></div>
<div class = 'step-4 hidden translation' data-translation="tutorial-step-4"></div>
</div>
<div class='height-20 show-when-won center flex-center fill-me' style = 'min-height: 60px'>
<div class='height-20 show-when-won center flex-center fill-me' style = 'min-height: 45px'>
<div class = 'grow max-width'>
<b class="translation" data-translation="won" id="won-text"></b>
</div>

View File

@ -21,15 +21,14 @@
</span>
</div>
<div class='height-30 flex-center fill-me'>
<button class='button grow text-center' id='play-button'><span class="translation"
data-translation="play"></span></button>
<button class='button grow text-center' id='play-button'><span class="translation" data-translation="play"></span></button>
<div class='max-width line-height-1 fill-me vertical'>
<label class="switch">
<div data-view="../../img/speaker.svg"></div>
<input type="checkbox" class="setting" id="play-sound">
<span class="slider"></span>
</label>
<div class="grow center" id="share-button"><span data-view="../../img/share.svg"></span></div>
<div class="grow center" id = "share-button"><span data-view="../../img/share.svg"></span></div>
<label class="switch right">
<div data-view="../../img/music.svg"></div>
<input type="checkbox" class="setting" id="play-music">

View File

@ -1,3 +1,17 @@
<div class="height-100">
<div id = "wordRotatorSettings" class="height-100" ></div>
<div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<div id = "wordRotatorSettings"></div>
</div>

View File

@ -1,39 +0,0 @@
<article id=tutorial-site>
<section>
<div id='segment-leaf-template' class='segment segment-leaf'>
<div class='leaf-element'></div>
</div>
<div id='segment-parent-template' class='segment segment-parent'>
<div class='child-container'></div>
</div>
<div id='segment-row-template' class='segment segment-row'>
<div class='child-container'></div>
</div>
<div id='segment-column-template' class='segment segment-column'>
<div class='child-container'></div>
</div>
<div id='segment-triangle-template' class='segment segment-triangle'>
<div class='child-container'></div>
</div>
</section>
<section id="tutorial-1">
<div class="tutorial-text translation">tutorial-1</div>
<div class="level-container"></div>
</section>
<section id="tutorial-2">
<div class="tutorial-text translation">tutorial-2</div>
<div class="tutorial-wrapper">
<button class="help-action">
<img src="../../img/help.png" class="action-image">
</button>
<div class="level-container"></div>
</div>
</section>
<section id="tutorial-3">
<div class="tutorial-text translation">tutorial-3</div>
<div class="tutorial-wrapper">
<div id='tutorial-pointer'></div>
<div class="level-container"></div>
</div>
</section>
</article>

View File

@ -12,7 +12,7 @@
content="default-src 'self' data: gap: cdvfile: * 'unsafe-eval';
style-src 'self' 'unsafe-inline';
media-src *; img-src 'self' * data: cdvfile: content:;
script-src 'self' data: 'unsafe-eval'">
script-src 'self' data: 'unsafe-eval'" ;>
<!--Element, mit dem Foundation die ViewQueries mitteilt-->
<meta class='foundation-mq'>
@ -22,7 +22,7 @@
<script src="scripts/sql-wasm.js"></script>
<script src="scripts/localforage.js"></script>
</head>
<body class="theme-blue">
<body class="default">
<div id="toast-container">
<div class='toast toast-template' style="opacity: 0">
<span class='message'></span>

View File

@ -1,15 +1,14 @@
import {TutorialSite} from "../Sites/TutorialSite";
const view = require("../../html/fragment/settings.html");
import {CreditsSite} from "../Sites/CreditsSite";
import {PrivacyPolicySite} from "../Sites/PrivacyPolicySite";
import {ImpressumSite} from "../Sites/ImpressumSite";
import {NativeStoragePromise} from "cordova-sites/dist/client/js/NativeStoragePromise";
import {AbstractFragment} from "cordova-sites/dist/client/js/Context/AbstractFragment";
import view from "../../html/fragment/settings.html";
import {LevelData} from "../../../shared/model/LevelData";
import {LastSyncDates} from "cordova-sites-easy-sync/dist/client/LastSyncDates";
import {SoundManager} from "cordova-sites/dist/client/js/Sound/SoundManager";
import {Toast} from "cordova-sites/dist/client/js/Toast/Toast";
import {Matomo} from "cordova-sites/dist/client/js/Legacy/Matomo";
import {LevelPlayed} from "../model/LevelPlayed";
import {ContactSite} from "../Sites/ContactSite";
@ -33,7 +32,7 @@ export class WordRotatorSettingFragment extends AbstractFragment {
});
if (location.hostname.includes("beta") || location.hostname.includes("127.0.0.1") || location.hostname.includes("localhost")) {
// this.findBy("#reset-levels").classList.remove("hidden");
this.findBy("#reset-levels").classList.remove("hidden");
}
let playMusicButton = this.findBy("#play-music");
@ -41,9 +40,9 @@ export class WordRotatorSettingFragment extends AbstractFragment {
playMusicButton.addEventListener("change", async () => {
await NativeStoragePromise.setItem("play-music", (playMusicButton.checked) ? "1" : "0");
let soundManager = SoundManager.getInstance();
soundManager.set({muted: !playMusicButton.checked}, "music");
soundManager.set({muted: !playMusicButton.checked}, SoundManager.CHANNELS.MUSIC);
if (playMusicButton.checked) {
await soundManager.play("music", undefined);
await soundManager.play(SoundManager.CHANNELS.MUSIC);
}
//TODO [MIG] Matomo
@ -55,7 +54,7 @@ export class WordRotatorSettingFragment extends AbstractFragment {
playSoundButton.addEventListener("change", async () => {
await NativeStoragePromise.setItem("play-sound", (playSoundButton.checked) ? "1" : "0");
let soundManager = SoundManager.getInstance();
soundManager.set({muted: !playSoundButton.checked}, "sound");
soundManager.set({muted: !playSoundButton.checked}, SoundManager.CHANNELS.SOUND);
//TODO [MIG] Matomo
Matomo.push(["trackEvent", "MainMenu", "PlaySound", "Play Sound", (playSoundButton.checked) ? 1 : 0]);
@ -67,9 +66,6 @@ export class WordRotatorSettingFragment extends AbstractFragment {
e.preventDefault();
});
this.findBy("#tutorial-button").addEventListener("click", () => {
this.getSite().startSite(TutorialSite);
});
this.findBy("#credits-button").addEventListener("click", () => {
this.getSite().startSite(CreditsSite);
});
@ -83,14 +79,13 @@ export class WordRotatorSettingFragment extends AbstractFragment {
this.findBy("#impressum-button").addEventListener("click", () => {
this.getSite().startSite(ImpressumSite);
});
// @ts-ignore
this.findBy("#version-info").innerText = __VERSION__;
this.findBy("#version-info").innerText = window["version"];
return res;
}
onStart(args) {
onStart() {
Matomo.update("Settings Sites");
return super.onStart(args);
super.onStart();
}
}

View File

@ -1,5 +1,5 @@
const view = require("../../html/sites/contactSite.html");
import view from "../../html/sites/contactSite.html"
import {App} from "cordova-sites/dist/client/js/App";
import {Form} from "cordova-sites/dist/client/js/Form";
import {DataManager} from "cordova-sites/dist/client/js/DataManager";
@ -15,7 +15,6 @@ export class ContactSite extends MenuSite {
onViewLoaded() {
let res = super.onViewLoaded();
// @ts-ignore
this.findBy("#contactText").appendChild(Translator.makePersistentTranslation("contact text", [__CONTACT_EMAIL__]))
new Form(this.findBy("#contact-form"), async values => {

View File

@ -0,0 +1,19 @@
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
import view from "../../html/sites/credits.html"
import {App} from "cordova-sites/dist/client/js/App";
export class CreditsSite extends WordRotatorBaseSite{
constructor(siteManager) {
super(siteManager, view);
}
onStart(args) {
// Matomo.update("Credits Sites");
return super.onStart(args);
}
}
App.addInitialization(app => {
app.addDeepLink("credits", CreditsSite);
});

View File

@ -1,13 +0,0 @@
const view = require("../../html/sites/credits.html");
import {App} from "cordova-sites/dist/client/js/App";
import {MenuSite} from "cordova-sites/dist/client";
export class CreditsSite extends MenuSite{
constructor(siteManager) {
super(siteManager, view);
}
}
App.addInitialization(app => {
app.addDeepLink("credits", CreditsSite);
});

View File

@ -1,15 +1,13 @@
import {UserMenuAction, UserSite} from "cordova-sites-user-management/dist/client";
const view = require("../../html/sites/deleteLevels.html");
import view from "../../html/sites/deleteLevels.html"
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
import {App} from "cordova-sites/dist/client/js/App";
import {NavbarFragment} from "cordova-sites/dist/client/js/Context/Menu/NavbarFragment";
import {DataManager} from "cordova-sites/dist/client/js/DataManager";
import {MenuSite} from "cordova-sites/dist/client";
export class DeleteWordsSite extends MenuSite {
private words: any;
export class DeleteWordsSite extends WordRotatorBaseSite {
constructor(siteManager) {
super(siteManager, view);
this.addDelegate(new UserSite(this, "admin"))
@ -18,12 +16,11 @@ export class DeleteWordsSite extends MenuSite {
async onConstruct(args) {
let res = super.onConstruct(args);
this.words = (await DataManager.load("getDoubleUsedWordsAction"))["result"];
console.log("word", this.words);
return res;
}
onViewLoaded() {
const res = super.onViewLoaded();
super.onViewLoaded();
let levelTemplate = this.findBy("#level-template");
let wordTemplate = this.findBy("#word-template");
@ -57,8 +54,6 @@ export class DeleteWordsSite extends MenuSite {
}
wordContainer.appendChild(wordElem);
}
return res;
}
}

View File

@ -0,0 +1,14 @@
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
import view from "../../html/sites/end.html"
export class EndSite extends WordRotatorBaseSite{
constructor(siteManager) {
super(siteManager, view);
}
onStart(args) {
// Matomo.update("End Sites");
return super.onStart(args);
}
}

View File

@ -1,8 +0,0 @@
const view = require("../../html/sites/end.html");
import {MenuSite} from "cordova-sites/dist/client";
export class EndSite extends MenuSite{
constructor(siteManager) {
super(siteManager, view);
}
}

View File

@ -1,8 +1,9 @@
const view = require("../../html/sites/impressum.html");
import {App} from "cordova-sites/dist/client/js/App";
import {MenuSite} from "cordova-sites/dist/client";
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
export class ImpressumSite extends MenuSite{
import view from "../../html/sites/impressum.html"
import {App} from "cordova-sites/dist/client/js/App";
export class ImpressumSite extends WordRotatorBaseSite{
constructor(siteManager) {
super(siteManager, view);
}

View File

@ -1,12 +1,9 @@
import {Level} from "../wordrotator/Level/Level";
const helpIcon = require("../../img/help.png").default;
const view = require("../../html/sites/level.html");
const coinSound = require("../../sound/single_coin_fall_on_concrete_.mp3").default;
import {TemplateContainer} from "../wordrotator/Segment/TemplateContainer";
import {LevelHelper} from "../wordrotator/Level/LevelHelper";
import {EndSite} from "./EndSite";
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
import helpIcon from "../../img/help.png";
import {
MenuAction,
@ -16,40 +13,19 @@ import {
NativeStoragePromise,
} from "cordova-sites/dist/client";
import view from "../../html/sites/level.html"
import {Helper} from "js-helper/dist/shared/Helper";
import {LevelData} from "../../../shared/model/LevelData";
import {LevelPlayed} from "../model/LevelPlayed";
import {ViewHelper} from "js-helper/dist/client/ViewHelper";
import coinSound from "../../sound/single_coin_fall_on_concrete_.mp3";
import {SoundManager} from "cordova-sites/dist/client/js/Sound/SoundManager";
import {MenuSite} from "cordova-sites/dist/client/js/Context/MenuSite";
export class LevelSite extends MenuSite {
public static readonly RENDERER_TYPES = [20, 40, 60, 80, 81, 82, 83, 100, 110, 111, 112, 120, 140, 160];
public static readonly TUTORIAL = {
FIRST_LEVEL: 67,
SECOND_LEVEL: 15,
BIG_SEGMENT_LEVEL: 1921
};
private coinAction: MenuAction;
private levelCounterAction: MenuAction;
private levelCounter: number;
private levelScaler: () => void;
private wonParams: { aborted: boolean; coinCounterTimer: any };
private coinPromise: Promise<any>;
private continueButtonScaler: () => Promise<unknown>;
private wonTextScaler: () => Promise<unknown>;
private wonText: HTMLElement;
private templateContainer: TemplateContainer;
private coinTemplate: HTMLElement;
private coinContainer: HTMLElement;
private level: Level;
export class LevelSite extends WordRotatorBaseSite {
constructor(siteManager) {
super(siteManager, view);
// this.getNavbarFragment().setBackgroundImage(null);
this._navbarFragment.setBackgroundImage(null);
}
async onCreateMenu(navbar) {
@ -58,7 +34,7 @@ export class LevelSite extends MenuSite {
let coinAction = new MenuAction(Helper.nonNull(await NativeStoragePromise.getItem("coins"), "0"), () => {
}, MenuAction.SHOW_ALWAYS, 900);
coinAction._shouldTranslate = false;
coinAction.setLiClass("coin-counter img");
coinAction._liClass = "coin-counter";
navbar.addAction(coinAction);
this.coinAction = coinAction;
@ -82,7 +58,7 @@ export class LevelSite extends MenuSite {
async onConstruct(args) {
this.levelCounter = Helper.nonNull(await NativeStoragePromise.getItem("levelCounter"), 1);
// this.levelCounter = 9999;
// this.levelCounter = 987;
this.levelScaler = () => {
};
this.wonParams = {
@ -94,11 +70,11 @@ export class LevelSite extends MenuSite {
let soundManager = SoundManager.getInstance();
soundManager.set({
audio: coinSound,
muted: ((await NativeStoragePromise.getItem("play-sound", "1")) !== "1"),
muted: (NativeStoragePromise.getItem("play-sound", "1") !== "1"),
volume: 0.7
}, "sound");
}, SoundManager.CHANNELS.SOUND);
soundManager.resume("music");
soundManager.resume(SoundManager.CHANNELS.MUSIC);
return super.onConstruct(args);
}
@ -125,15 +101,14 @@ export class LevelSite extends MenuSite {
let continueButton = this.findBy("#continue-button");
continueButton.addEventListener("click", () => {
continueButton.style.opacity = 0;
this.nextLevel();
});
let wonText = this.findBy("#won-text");
let scaleHelper = new ScaleHelper();
this.continueButtonScaler = await scaleHelper.scaleToFull(continueButton, continueButton.parentElement, false, true, 2, undefined, undefined, undefined);
this.wonTextScaler = await scaleHelper.scaleTo(0.9, wonText, wonText.parentElement, false, false, 2, null, 5, undefined);
this.continueButtonScaler = await scaleHelper.scaleToFull(continueButton, continueButton.parentElement, false, true, 2);
this.wonTextScaler = await scaleHelper.scaleToFull(wonText, wonText.parentElement, false, false, 2, null, 5);
this.wonText = wonText;
this.wonText.style.fontSize = "0";
@ -181,9 +156,10 @@ export class LevelSite extends MenuSite {
let levelSegment = this.findBy("#level");
ViewHelper.removeAllChildren(levelSegment).appendChild(level.getRootSegment().getElement());
let scaleHelper = new ScaleHelper();
this.levelScaler = await scaleHelper.scaleTo(1, levelSegment, levelSegment.parentElement, false, false, 1, level.words[0].length * 1.5, null, 0);
this.levelScaler = await scaleHelper.scaleToFull(levelSegment, levelSegment.parentElement, false, false, 1, level.words[0].length * 1.5, null, 0);
this.level = level;
// let res = this.tutorial();
Matomo.push(["trackEvent", "LevelSite", "LoadLastLevel"]);
this.level.checkHasWon();
return;
@ -216,8 +192,6 @@ export class LevelSite extends MenuSite {
this.showLoadingSymbol();
try {
let levelData = await LevelPlayed.getNextLevelData(LevelSite.RENDERER_TYPES);
// let levelData = await LevelData.findById(34);
// this.level = null;
if (Helper.isNull(levelData)) {
this.startEndSite();
@ -235,8 +209,8 @@ export class LevelSite extends MenuSite {
return this.nextLevel();
}
level.getWonPromise().then(async () => {
await this.levelWon(level);
level.getWonPromise().then(() => {
this.levelWon(level);
});
level.createSegments();
@ -276,8 +250,6 @@ export class LevelSite extends MenuSite {
}
async onStart(args) {
this.setTitle("WR", undefined);
Matomo.update("Level Sites");
let res = super.onStart(args);
@ -292,7 +264,7 @@ export class LevelSite extends MenuSite {
audio: coinSound,
muted: (await NativeStoragePromise.getItem("play-sound", "1") !== "1"),
volume: 0.7
}, "sound");
}, SoundManager.CHANNELS.SOUND);
await this.tutorial();
@ -303,31 +275,32 @@ export class LevelSite extends MenuSite {
try {
const savePromise = LevelPlayed.setPlayed(level.getLevelData());
// savePromise.then((r) => console.log("levelSaved!", r));
savePromise.then((r) => console.log("levelSaved!", r));
this.levelCounter++;
await NativeStoragePromise.setItem("levelCounter", this.levelCounter);
//Todo richtiges Element aufrufen?
this._view.classList.add('won');
await NativeStoragePromise.remove("currentLevel");
let continueButton = this.findBy("#continue-button");
continueButton.style.transition = "none";
continueButton.style.opacity = 0;
//Todo richtiges Element aufrufen?
this._view.classList.add('won');
ViewHelper.removeAllChildren(this.coinContainer);
let coinsPerLevel = await NativeStoragePromise.getItem("coinsPerLevel", 5);
let coinsBefore = 0;
let soundManager = SoundManager.getInstance();
let audioOptions = soundManager.get("sound");
let audioOptions = soundManager.get(SoundManager.CHANNELS.SOUND);
this.coinPromise = this.coinPromise.then(async () => {
coinsBefore = parseInt(Helper.nonNull(await NativeStoragePromise.getItem("coins"), "0"));
await NativeStoragePromise.setItem("coins", coinsBefore + parseInt(coinsPerLevel));
}).then(async () => {
return Promise.all([new Promise<void>((r) => {
return Promise.all([new Promise((r) => {
setTimeout(() => {
//TODO animationen einbauen
continueButton.style.opacity = 1;
@ -343,26 +316,26 @@ export class LevelSite extends MenuSite {
this.wonParams.aborted = false;
for (let i = 0; i < coinsPerLevel; i++) {
let coinElem = <HTMLElement>this.coinTemplate.cloneNode(true);
let coinElem = this.coinTemplate.cloneNode(true);
this.coinContainer.appendChild(coinElem);
this.coinPromise = this.coinPromise.then(() => {
return new Promise<void>(r => {
return new Promise(r => {
let timeout = 350;
if (!this.wonParams.aborted) {
//TODO animationen einbauen
coinElem.style.opacity = "1";
soundManager.play("sound", undefined);
coinElem.style.opacity = 1;
// coinElem.fadeIn(timeout / 1000);
soundManager.play(SoundManager.CHANNELS.SOUND);
this.wonParams.coinCounterTimer = setTimeout(() => {
if (!this.wonParams.aborted) {
this.coinAction.setName(++coinsBefore);
// this.coinAction.redraw();
}
}, timeout / 2);
} else {
r();
}
//Always do the next promise for garbage collection
setTimeout(r, timeout);
})
@ -377,16 +350,12 @@ export class LevelSite extends MenuSite {
this.continueButtonScaler();
this.levelScaler();
// Promise.all([this.wonTextScaler(), this.continueButtonScaler()]).then(() => {
// this.levelScaler();
// });
Matomo.push(["trackEvent", "LevelSite", "LevelWon", "Coins", parseInt(Helper.nonNull(await NativeStoragePromise.getItem("coins"), "0"))]);
let leafs = level.getLeafSegments();
leafs.forEach((leaf, i) => {
let elem = leaf.getElement();
elem.style.animationDelay = i * 50 + "ms";
elem.style.animationDelay = i*50+"ms";
elem.classList.add("jump-animation");
})
@ -427,8 +396,6 @@ export class LevelSite extends MenuSite {
}
async tutorial() {
const tutorialScale = 0.01;
if (this.level.id === LevelSite.TUTORIAL.FIRST_LEVEL) {
let currentStep = Helper.nonNull(await NativeStoragePromise.getItem("tutorial-step"), "1");
@ -444,10 +411,10 @@ export class LevelSite extends MenuSite {
this.tutorial();
});
// let textElem = this.findBy(".tutorial-text .step-1");
let textElem = this.findBy(".tutorial-text .step-1");
await this.levelScaler();
// scaleHelper.scaleTo(tutorialScale, textElem, textElem.parentElement, null, true, 2, 2);
scaleHelper.scaleToFull(textElem, textElem.parentElement, null, true, 1, 2);
break;
}
@ -464,12 +431,13 @@ export class LevelSite extends MenuSite {
this.coinAction.setName(Helper.nonNull(await NativeStoragePromise.getItem("coins"), "0"));
// this.coinAction.redraw();
});
// this.levelScaler();
});
// let textElem = this.findBy(".tutorial-text .step-2");
let textElem = this.findBy(".tutorial-text .step-2");
await this.levelScaler();
// scaleHelper.scaleTo(tutorialScale, textElem, textElem.parentElement, null, true, 1, 2);
scaleHelper.scaleToFull(textElem, textElem.parentElement, null, true, 1, 2);
break;
}
@ -496,10 +464,10 @@ export class LevelSite extends MenuSite {
};
this.findBy(".help-action").addEventListener("click", eventListener);
// let textElem = this.findBy(".tutorial-text .step-3");
let textElem = this.findBy(".tutorial-text .step-3");
await this.levelScaler();
// scaleHelper.scaleTo(tutorialScale, textElem, textElem.parentElement, null, true, 1, 2);
scaleHelper.scaleToFull(textElem, textElem.parentElement, null, true, 1, 2);
break;
}
default: {
@ -532,11 +500,10 @@ export class LevelSite extends MenuSite {
}
});
// let textElem = this.findBy(".tutorial-text .step-4");
let textElem = this.findBy(".tutorial-text .step-4");
await this.levelScaler();
// debugger;
// scaleHelper.scaleTo(tutorialScale, textElem, textElem.parentElement, null, true, 1, 2);
scaleHelper.scaleToFull(textElem, textElem.parentElement, null, true, 1, 2);
break;
}
@ -547,3 +514,11 @@ export class LevelSite extends MenuSite {
}
}
}
LevelSite.RENDERER_TYPES = [20, 40, 60, 80, 81, 82, 83, 100, 110, 111, 112, 120, 140, 160];
// LevelSite.RENDERER_TYPES = [120, 140, 160];
LevelSite.TUTORIAL = {
FIRST_LEVEL: 67,
SECOND_LEVEL: 15,
BIG_SEGMENT_LEVEL: 1921
};

View File

@ -1,11 +1,10 @@
const settingsIcon = require("../../img/settings.png").default;
const view = require("../../html/sites/menu.html");
import {App, Toast, DataManager, ScaleHelper, MenuSite} from "cordova-sites/dist/client";
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
import {App, Toast, DataManager, ScaleHelper} from "cordova-sites/dist/client";
import {Helper} from "js-helper/dist/shared";
import {LevelSite} from "./LevelSite";
import {TemplateContainer} from "../wordrotator/Segment/TemplateContainer";
import {MainMenuLevel} from "../wordrotator/Level/MainMenuLevel";
import view from "../../html/sites/menu.html"
import {NativeStoragePromise} from "cordova-sites/dist/client";
import {ViewHelper} from "js-helper/dist/client/ViewHelper";
import {LevelPlayed} from "../model/LevelPlayed";
@ -18,19 +17,14 @@ import {Matomo} from "cordova-sites/dist/client/js/Legacy/Matomo";
import {MenuAction} from "cordova-sites/dist/client/js/Context/Menu/MenuAction/MenuAction";
import {SettingsSite} from "./SettingsSite";
export class MainMenuSite extends MenuSite {
static app: App;
private loadLevelPromise: Promise<any>;
private listener: () => void;
private templateContainer: TemplateContainer;
private randomRotateTimeout;
import settingsIcon from "../../img/settings.png";
export class MainMenuSite extends WordRotatorBaseSite {
constructor(siteManager) {
super(siteManager, view);
this.loadLevelPromise = new SyncJob().sync([LevelData]).catch(e => console.error(e));
this.listener = null;
this.getNavbarFragment().setCanGoBack(false);
this._navbarFragment.setCanGoBack(false);
}
onCreateMenu(navbar) {
@ -42,69 +36,6 @@ export class MainMenuSite extends MenuSite {
return navbar;
}
async onViewLoaded() {
const res = super.onViewLoaded();
let playButton = this.findBy("#play-button");
playButton.addEventListener("click", () => {
// Matomo.push(["trackEvent", "MainMenu", "startButton"]);
this.startLevelSite();
});
let leafSegmentTemplate = this.findBy("#segment-leaf-template");
let parentSegmentTemplate = this.findBy("#segment-parent-template");
let rowSegmentTemplate = this.findBy("#segment-row-template");
let triangleTemplate = this.findBy("#segment-triangle-template");
leafSegmentTemplate.id = null;
parentSegmentTemplate.id = null;
rowSegmentTemplate.id = null;
triangleTemplate.id = null;
leafSegmentTemplate.remove();
parentSegmentTemplate.remove();
rowSegmentTemplate.remove();
triangleTemplate.remove();
this.templateContainer = new TemplateContainer(leafSegmentTemplate, parentSegmentTemplate, rowSegmentTemplate, triangleTemplate);
//TODO?
// if (Helper.nonNull(MainMenuSite.app._cookieClosePromise)) {
// MainMenuSite.app._cookieClosePromise.then(() => {
// if (this.listener) {
// this.listener();
// }
// });
// }
let soundManager = SoundManager.getInstance();
let playMusicButton = this.findBy("#play-music");
playMusicButton.checked = (await NativeStoragePromise.getItem("play-music", "1") === "1");
playMusicButton.addEventListener("change", async () => {
await NativeStoragePromise.setItem("play-music", (playMusicButton.checked) ? "1" : "0");
soundManager.set({muted: !playMusicButton.checked}, "music");
if (playMusicButton.checked) {
await soundManager.play("music", undefined);
}
//TODO [MIG] Matomo
Matomo.push(["trackEvent", "MainMenu", "PlayMusic", "Play Music", (playMusicButton.checked) ? 1 : 0]);
});
let playSoundButton = this.findBy("#play-sound");
playSoundButton.checked = (await NativeStoragePromise.getItem("play-sound", "1") === "1");
playSoundButton.addEventListener("change", async () => {
await NativeStoragePromise.setItem("play-sound", (playSoundButton.checked) ? "1" : "0");
soundManager.set({muted: !playSoundButton.checked}, "sound");
});
this.findBy("#share-button").addEventListener("click", () => {
new ShareManager().share(Translator.getInstance().translate("share-text", [window.location]));
});
return res;
}
async onStart(args) {
// Matomo.update("Menu Sites");
let res = super.onStart(args);
@ -166,10 +97,10 @@ export class MainMenuSite extends MenuSite {
let levelStyle = getComputedStyle(levelSegment);
playButton.style.width = levelStyle.getPropertyValue("width");
scaleHelper.scaleTo(0.65, playButton.children[0], playButton, null, null, null, 4, null, false);
scaleHelper.scaleToFull(playButton.children[0], playButton, null, null, null, 4, null, false);
await scaleHelper.scaleTo(0.1, levelNumber.parentElement, levelNumber.parentElement.parentElement, null, null, null, 10, null, false);
scaleHelper.scaleTo(1, levelNumber, levelNumber.parentElement, false, false, 5, null, null, false);
await scaleHelper.scaleTo(0.2, levelNumber.parentElement, levelNumber.parentElement.parentElement, null, null, null, 10, null, false);
scaleHelper.scaleToFull(levelNumber, levelNumber.parentElement, false, false, 8, null, null, false);
};
// this.listener();
@ -189,7 +120,7 @@ export class MainMenuSite extends MenuSite {
async startLevelSite() {
SoundManager.getInstance().resumeContext();
this.startSite(LevelSite, Promise.race([this.loadLevelPromise, new Promise<void>(async resolve => {
this.startSite(LevelSite, Promise.race([this.loadLevelPromise, new Promise(async resolve => {
let levelData = await LevelPlayed.getNextLevelData(LevelSite.RENDERER_TYPES);
if (levelData !== null) {
resolve();
@ -197,64 +128,130 @@ export class MainMenuSite extends MenuSite {
})]));
}
onPause() {
clearTimeout(this.randomRotateTimeout);
window.removeEventListener("resize", this.listener);
return super.onPause();
async onFirstStart() {
super.onFirstStart();
let playButton = this.findBy("#play-button");
playButton.addEventListener("click", () => {
// Matomo.push(["trackEvent", "MainMenu", "startButton"]);
this.startLevelSite();
});
let leafSegmentTemplate = this.findBy("#segment-leaf-template");
let parentSegmentTemplate = this.findBy("#segment-parent-template");
let rowSegmentTemplate = this.findBy("#segment-row-template");
let triangleTemplate = this.findBy("#segment-triangle-template");
leafSegmentTemplate.id = null;
parentSegmentTemplate.id = null;
rowSegmentTemplate.id = null;
triangleTemplate.id = null;
leafSegmentTemplate.remove();
parentSegmentTemplate.remove();
rowSegmentTemplate.remove();
triangleTemplate.remove();
this.templateContainer = new TemplateContainer(leafSegmentTemplate, parentSegmentTemplate, rowSegmentTemplate, triangleTemplate);
if (Helper.nonNull(MainMenuSite.app._cookieClosePromise)) {
MainMenuSite.app._cookieClosePromise.then(() => {
if (this.listener) {
this.listener();
}
});
}
let soundManager = SoundManager.getInstance();
let playMusicButton = this.findBy("#play-music");
playMusicButton.checked = (await NativeStoragePromise.getItem("play-music", "1") === "1");
playMusicButton.addEventListener("change", async () => {
await NativeStoragePromise.setItem("play-music", (playMusicButton.checked) ? "1" : "0");
soundManager.set({muted: !playMusicButton.checked}, SoundManager.CHANNELS.MUSIC);
if (playMusicButton.checked) {
soundManager.play(SoundManager.CHANNELS.MUSIC);
}
//TODO [MIG] Matomo
Matomo.push(["trackEvent", "MainMenu", "PlayMusic", "Play Music", (playMusicButton.checked) ? 1 : 0]);
});
let playSoundButton = this.findBy("#play-sound");
playSoundButton.checked = (await NativeStoragePromise.getItem("play-sound", "1") === "1");
playSoundButton.addEventListener("change", async () => {
await NativeStoragePromise.setItem("play-sound", (playSoundButton.checked) ? "1" : "0");
soundManager.set({muted: !playSoundButton.checked}, SoundManager.CHANNELS.SOUND);
//TODO [MIG] Matomo
Matomo.push(["trackEvent", "MainMenu", "PlaySound", "Play Sound", (playSoundButton.checked) ? 1 : 0]);
});
this.findBy("#share-button").addEventListener("click", () => {
new ShareManager().share(Translator.getInstance().translate("share-text", [window.location]));
});
// this.findBy("#share-buttons").appendChild(ShareManager.generateDefaultShareElement("https://wordrotator.silas.link"));
}
// async loadLevels() {
// try {
// const db = await WordRotatorDb.getInstance();
// const dateLastSync = Helper.nonNull(await db.loadDateLastSync(), 0);
// // const dateLastSync = Helper.nonNull(localStorage.getItem("date-last-sync"), 0);
//
// // let numberLevels = db.countLevels();
// let newLastSync = null;
// let maxRuns = 1;
// let levelPromises = [];
// for (let run = 0; run < maxRuns; run++) {
// let res = await DataManager.load("wordRotator/levels" + DataManager.buildQuery({
// "currentRun": run,
// "dateLastSync": dateLastSync
// }));
// if (!res["success"]) {
// if (await db.loadNextLevel(LevelSite.RENDERER_TYPES) === null) {
// new Toast("sync-error", 6000).show();
// }
// newLastSync = null;
// break;
// }
// res = res["result"];
// newLastSync = Helper.nonNull(newLastSync, res["currentSyncDate"]);
// maxRuns = res["maxRuns"];
//
// let levels = res["levels"];
// for (let i = 0; i < levels.length; i++) {
// let currentLevel = levels[i];
// levelPromises.push(db.loadLevel(levels[i]["id"]).then(level => {
// currentLevel["played"] = (Helper.nonNull(Helper.nonNull(level, {}).played, false));
// return currentLevel;
// }));
// }
// }
// let levels = await Promise.all(levelPromises);
// await db.saveManyLevels(levels);
//
// if (newLastSync != null && newLastSync !== "null") {
// await NativeStoragePromise.setItem("date-last-sync", newLastSync);
// db.saveDateLastSync(newLastSync);
// }
// }
// catch(e){
// // if (await db.loadNextLevel(LevelSite.RENDERER_TYPES) === null) {
// new Toast("sync-error", 6000);
// // }
// console.error(e);
// }
// }
onPause(args) {
clearTimeout(this.randomRotateTimeout);
window.removeEventListener("resize", this.listener);
return super.onPause(args);
}
async loadLevels() {
try {
const db = await WordRotatorDb.getInstance();
const dateLastSync = Helper.nonNull(await db.loadDateLastSync(), 0);
// const dateLastSync = Helper.nonNull(localStorage.getItem("date-last-sync"), 0);
// let numberLevels = db.countLevels();
let newLastSync = null;
let maxRuns = 1;
let levelPromises = [];
for (let run = 0; run < maxRuns; run++) {
let res = await DataManager.load("wordRotator/levels" + DataManager.buildQuery({
"currentRun": run,
"dateLastSync": dateLastSync
}));
if (!res["success"]) {
if (await db.loadNextLevel(LevelSite.RENDERER_TYPES) === null) {
new Toast("sync-error", 6000).show();
}
newLastSync = null;
break;
}
res = res["result"];
newLastSync = Helper.nonNull(newLastSync, res["currentSyncDate"]);
maxRuns = res["maxRuns"];
let levels = res["levels"];
for (let i = 0; i < levels.length; i++) {
let currentLevel = levels[i];
levelPromises.push(db.loadLevel(levels[i]["id"]).then(level => {
currentLevel["played"] = (Helper.nonNull(Helper.nonNull(level, {}).played, false));
return currentLevel;
}));
}
}
let levels = await Promise.all(levelPromises);
await db.saveManyLevels(levels);
if (newLastSync != null && newLastSync !== "null") {
await NativeStoragePromise.setItem("date-last-sync", newLastSync);
db.saveDateLastSync(newLastSync);
}
}
catch(e){
// if (await db.loadNextLevel(LevelSite.RENDERER_TYPES) === null) {
new Toast("sync-error", 6000);
// }
console.error(e);
}
}
}
MainMenuSite.app = null;
App.addInitialization(app => {
MainMenuSite.app = app;
});

View File

@ -1,9 +1,10 @@
const view = require("../../html/sites/privacyPolicy.html");
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
import view from "../../html/sites/privacyPolicy.html"
import {App} from "cordova-sites/dist/client/js/App";
import {Matomo} from "cordova-sites/dist/client/js/Legacy/Matomo";
import {MenuSite} from "cordova-sites/dist/client";
export class PrivacyPolicySite extends MenuSite {
export class PrivacyPolicySite extends WordRotatorBaseSite {
constructor(siteManager) {
super(siteManager,view);
}

View File

@ -1,19 +1,17 @@
const view = require("../../html/sites/selectWords.html");
import view from "../../html/sites/selectWords.html"
import {WordRotatorBaseSite} from "./WordRotatorBaseSite";
import {UserMenuAction, UserSite} from "cordova-sites-user-management/dist/client";
import {NavbarFragment} from "cordova-sites/dist/client/js/Context/Menu/NavbarFragment";
import {App} from "cordova-sites/dist/client/js/App";
import {DataManager} from "cordova-sites/dist/client/js/DataManager";
import {DataManager} from "cordova-sites/dist/dist/client/js/DataManager";
import {ViewHelper} from "js-helper/dist/client/ViewHelper";
import {MenuSite} from "cordova-sites/dist/client";
export class SelectWordsSite extends MenuSite{
private stats: any;
private words: any;
export class SelectWordsSite extends WordRotatorBaseSite{
constructor(siteManager) {
super(siteManager, view);
this.addDelegate(new UserSite(this, "select-words"))
this.addDelegate(new UserSite("select-words"))
}
async onConstruct(args) {

View File

@ -1,4 +1,5 @@
const view = require("../../html/sites/settingsSite.html");
import view from "../../html/sites/settingsSite.html"
import {MenuSite} from "cordova-sites/dist/client/js/Context/MenuSite";
import {WordRotatorSettingFragment} from "../Fragment/WordRotatorSettingFragment";
import {App} from "cordova-sites/dist/client/js/App";

View File

@ -1,132 +0,0 @@
import {Matomo, MenuSite, NativeStoragePromise, ScaleHelper, Toast} from "cordova-sites/dist/client";
import {App} from "cordova-sites/dist/client/js/App";
import {LevelPlayed} from "../model/LevelPlayed";
import {Helper} from "js-helper/dist/shared/Helper";
import {LevelHelper} from "../wordrotator/Level/LevelHelper";
import {ViewHelper} from "js-helper/dist/client/ViewHelper";
import {LevelData} from "../../../shared/model/LevelData";
import {TemplateContainer} from "../wordrotator/Segment/TemplateContainer";
import {LevelSite} from "./LevelSite";
import {SyncJob} from "cordova-sites-easy-sync/dist/client";
import {Level} from "../wordrotator/Level/Level";
const view = require("../../html/sites/tutorialSite.html");
export class TutorialSite extends MenuSite {
private templateContainer: TemplateContainer;
constructor(siteManager: any) {
super(siteManager, view);
}
async onConstruct(constructParameters: any): Promise<any[]> {
const res = super.onConstruct(constructParameters);
await Promise.race([new SyncJob().sync([LevelData]).catch(e => console.error(e)), new Promise<void>(async resolve => {
let levelData = await LevelData.findById(LevelSite.TUTORIAL.FIRST_LEVEL);
if (levelData !== null) {
resolve();
}
})]);
return res;
}
async onViewLoaded(): Promise<any[]> {
const res = super.onViewLoaded();
let leafSegmentTemplate = this.findBy("#segment-leaf-template");
let parentSegmentTemplate = this.findBy("#segment-parent-template");
let rowSegmentTemplate = this.findBy("#segment-row-template");
let triangleTemplate = this.findBy("#segment-triangle-template");
let columnTemplate = this.findBy("#segment-column-template");
leafSegmentTemplate.removeAttribute("id");
parentSegmentTemplate.removeAttribute("id");
rowSegmentTemplate.removeAttribute("id");
triangleTemplate.removeAttribute("id");
columnTemplate.removeAttribute("id");
leafSegmentTemplate.remove();
parentSegmentTemplate.remove();
rowSegmentTemplate.remove();
triangleTemplate.remove();
columnTemplate.remove();
this.templateContainer = new TemplateContainer(leafSegmentTemplate, parentSegmentTemplate, rowSegmentTemplate, triangleTemplate, columnTemplate);
const tutorial1Container = this.findBy("#tutorial-1 .level-container");
const tutorial2Container = this.findBy("#tutorial-2 .level-container");
const tutorial3Container = this.findBy("#tutorial-3 .level-container");
const level1 = await this.loadLevel(LevelSite.TUTORIAL.FIRST_LEVEL);
const level2 = await this.loadLevel(LevelSite.TUTORIAL.SECOND_LEVEL);
const level3 = await this.loadLevel(LevelSite.TUTORIAL.BIG_SEGMENT_LEVEL);
level1.setSaveAsCurrentAfterCheckWon(false);
level2.setSaveAsCurrentAfterCheckWon(false);
level3.setSaveAsCurrentAfterCheckWon(false);
tutorial1Container.appendChild(level1.getRootSegment().getElement());
tutorial2Container.appendChild(level2.getRootSegment().getElement());
tutorial3Container.appendChild(level3.getRootSegment().getElement());
let pointer = this.findBy("#tutorial-pointer");
pointer.remove();
let rotatableSegments = level3.getRotatableSegments();
let pointerSegment = rotatableSegments[2];
pointerSegment.element.appendChild(pointer);
this.findBy(".help-action").addEventListener("click", () => {
TutorialSite.help(level2);
})
return res;
}
static async help(level: Level) {
let rotatables = level.getRotatableSegments();
rotatables = rotatables.filter((segment) => {
return (!segment.isSolved(false));
});
if (rotatables.length === 0){
return;
}
let index = Math.floor(Math.random() * rotatables.length);
let segmentToHelp = rotatables[index];
while (segmentToHelp.rotation !== 0) {
segmentToHelp.rotate();
}
segmentToHelp.setIsRotatable(false);
}
async loadLevel(id) {
try {
let levelData = await LevelData.findById(id);
const level = LevelHelper.inflateLevel(levelData, this.templateContainer);
level.getWonPromise().then(() => {
console.log("level won!");
new Toast("you solved the tutorial level!").show();
//TODO
// this.levelWon(level);
});
level.createSegments();
level.getRootSegment()._updateElement();
return level;
} catch (e) {
console.log("Fehler!");
console.error(e);
// this.startEndSite();
return null;
}
}
}
App.addInitialization(app => {
app.addDeepLink("tutorial", TutorialSite);
})

View File

@ -0,0 +1,12 @@
import {MenuSite} from "cordova-sites/dist/client";
export class WordRotatorBaseSite extends MenuSite {
async onViewLoaded() {
let res = super.onViewLoaded();
await this.onFirstStart();
return res;
}
async onFirstStart(){}
}

View File

@ -2,7 +2,6 @@ import {BaseModel} from "cordova-sites-database/dist/BaseModel";
import {BaseDatabase} from "cordova-sites-database/dist/cordova-sites-database";
import {LevelData} from "../../../shared/model/LevelData";
import {Helper} from "js-helper/dist/shared/Helper";
import {SelectQueryBuilder} from "typeorm";
export class LevelPlayed extends BaseModel {
@ -21,7 +20,7 @@ export class LevelPlayed extends BaseModel {
target: LevelData.getSchemaName(),
type: "one-to-one",
joinColumn: true,
// cascade: true,
cascade: true,
};
return relations;
}
@ -36,7 +35,7 @@ export class LevelPlayed extends BaseModel {
}
static async getNextLevelData(renderer){
let qb = <SelectQueryBuilder<LevelData>>await this._database.createQueryBuilder(LevelData);
let qb = await this._database.createQueryBuilder(LevelData);
qb = qb.select("COUNT(*) as count, difficulty")
.leftJoin(LevelPlayed, "levelPlayed", "levelPlayed.levelData = LevelData.id")
@ -62,7 +61,7 @@ export class LevelPlayed extends BaseModel {
return null;
}
qb = <SelectQueryBuilder<LevelData>>await this._database.createQueryBuilder(LevelData);
qb = await this._database.createQueryBuilder(LevelData);
qb = qb
.leftJoin(LevelPlayed, "levelPlayed", "levelPlayed.levelData = LevelData.id")
.where("(deleted = 0 OR deleted = 'false')")

View File

@ -2,6 +2,7 @@ import translationGerman from '../translations/de.json';
import translationEn from '../translations/en.json';
import {App, Translator, DataManager, Toast} from "cordova-sites/dist/client";
import "cordova-sites-user-management/dist/client/js/translationInit"
import "cordova-sites/dist/client/js/translationInit"

View File

@ -16,8 +16,6 @@ export class Level {
this.hasWon = false;
this.id = null;
this.saveAsCurrentAfterCheckWon = true;
this.wonResolver = null;
this.giveUpResolver = null;
@ -31,7 +29,7 @@ export class Level {
});
this.segmentClickedListener = () => {
// console.log("clicked")
console.log("clicked")
};
}
@ -124,16 +122,10 @@ export class Level {
});
return true;
}
if (this.saveAsCurrentAfterCheckWon) {
this.saveAsCurrentLevel();
}
this.saveAsCurrentLevel();
return false;
}
setSaveAsCurrentAfterCheckWon(shouldSave){
this.saveAsCurrentAfterCheckWon = (shouldSave === true);
}
getWonPromise() {
return this.wonPromise;
}
@ -190,13 +182,13 @@ export class Level {
const leafs = this.getLeafSegments();
if (leafs.length > 0) {
const index = Random.getIntRandom(leafs.length - 1);
const index = Random.getIntRandom(leafs.length-1);
const leaf = leafs[index];
leaf.getElement().classList.add("shake");
setTimeout(() => {
leaf.getElement().classList.remove("shake");
}, Random.getIntRandom(350) + 650);
}, Random.getIntRandom(350)+650);
}
this._shakeLeafsTimeout = setTimeout(() => {
this.shakeLeafs();

View File

@ -12,25 +12,8 @@ import {SimpleFourWordsLevel10_3} from "./SimpleFourWordsLevel10_3";
import {TwoSegmentFourWordsLevel10_0_3} from "./TwoSegmentFourWordsLevel10_0_3";
import {TwoSegmentFourWordsLevel10_1_3} from "./TwoSegmentFourWordsLevel10_1_3";
import {TwoSegmentFourWordsLevel10_0_2} from "./TwoSegmentFourWordsLevel10_0_2";
import {Level} from "./Level";
export class LevelHelper {
public static readonly types = {
20: SimpleLevel,
40: RowLevel8,
60: RowLevel10,
80: SimpleFourWordsLevel10_0,
81: SimpleFourWordsLevel10_1,
82: SimpleFourWordsLevel10_2,
83: SimpleFourWordsLevel10_3,
100: SixWordsRowLevel8,
110: TwoSegmentFourWordsLevel10_0_3,
111: TwoSegmentFourWordsLevel10_1_3,
112: TwoSegmentFourWordsLevel10_0_2,
120: FourWordsLevel8,
140: SixWordsRowLevel12,
160: FourWordsLevel12,
};
static setLevelType(typeId, level) {
LevelHelper.types[typeId] = level;
}
@ -39,7 +22,7 @@ export class LevelHelper {
return LevelHelper.types[type];
}
static inflateLevel(levelData, templateContainer): Level {
static inflateLevel(levelData, templateContainer) {
let level = new (LevelHelper.types[levelData["renderer"]])(templateContainer);
level.setWords(JSON.parse(levelData["words"].replace(/&quot;/g, '"')));
level.setId(levelData["id"]);
@ -56,3 +39,20 @@ export class LevelHelper {
return level;
}
}
LevelHelper.types = {
20: SimpleLevel,
40: RowLevel8,
60: RowLevel10,
80: SimpleFourWordsLevel10_0,
81: SimpleFourWordsLevel10_1,
82: SimpleFourWordsLevel10_2,
83: SimpleFourWordsLevel10_3,
100: SixWordsRowLevel8,
110: TwoSegmentFourWordsLevel10_0_3,
111: TwoSegmentFourWordsLevel10_1_3,
112: TwoSegmentFourWordsLevel10_0_2,
120: FourWordsLevel8,
140: SixWordsRowLevel12,
160: FourWordsLevel12,
};

View File

@ -5,7 +5,7 @@ import {ViewHelper} from "js-helper/dist/client/ViewHelper";
export class ParentSegment extends Segment {
static initListener() {
window.addEventListener("mousedown", (e) => {
// console.log("mousedown");
console.log("mousedown");
ParentSegment.mouseDownTarget = e.target;
ParentSegment.clickPosition = {x: e.pageX, y: e.pageY};
});
@ -66,7 +66,7 @@ export class ParentSegment extends Segment {
this.mouseupListener = (e) => {
let now = new Date().getTime();
// console.log("mouseup", ParentSegment.mouseDownTarget);
console.log("mouseup", ParentSegment.mouseDownTarget);
if (ParentSegment.mouseDownTarget !== null && this.element.contains(ParentSegment.mouseDownTarget) && this.element.contains(e.target)) {
let position = {x: e.pageX, y: e.pageY};
e.stopPropagation();

View File

@ -12,13 +12,10 @@
}
.jump-animation {
//> .leaf-element {
animation-name: jump-animation;
animation-duration: 0.4s;
animation-fill-mode: none;
animation-timing-function: linear;
animation-delay: inherit;
//}
animation-name: jump-animation;
animation-duration: 0.4s;
animation-fill-mode: none;
animation-timing-function: linear;
}
$deg: 10deg;

View File

View File

@ -1,51 +0,0 @@
nav.top-bar {
padding: 0;
@each $breakpoint, $value in $margins {
@include breakpoint($breakpoint) {
margin-left: -$value;
margin-right: -$value;
//width: calc(100% + #{4*$value});
//max-width: calc(100% + #{4*$value});
}
}
&.with-image .background-img {
display: none;
}
.background-img {
display: none;
}
> .grid-container {
background: inherit;
position: fixed;
top: 0;
left: 0;
right: 0;
//padding-right: 0;
> .grid-padding-x {
display: block;
padding: 0.5rem;
margin: 0;
padding-right: 0;
> .small-12{
padding: 0;
}
}
}
ul > li {
display: flex;
align-items: center;
&.level-counter {
margin-top: 0.2rem;
}
}
}

View File

@ -1,115 +0,0 @@
// Blue
//$primaryColor: #427081;
//$secondaryColor: #4d575a;
//$accentColor: #e3ab6e;
//$textColor: white;
//$svgColor: black;
//Blue different Accent
$primaryColor: #427081;
$secondaryColor: #4d575a;
$accentColor: #d3e7eb;
$textColor: white;
$svgColor: black;
$secondaryBackgroundColor: rgba(66, 112, 129, 1);
$secondaryBackgroundColor: rgba(66, 112, 129, 0.95);
// Blau Invers
//$primaryColor: #4d575a;
//$secondaryColor: #427081;
//$accentColor: #e3ab6e;
//$textColor: white;
//$svgColor: black;
// Grün
//$primaryColor: #6b8778;
//$secondaryColor: #012f25;
//$accentColor: #c2ceca;
//$textColor: white;
//$svgColor: black;
// Grün 2
//$primaryColor: #234c42;
//$secondaryColor: #012f25;
//$accentColor: #b8acaa;
//$textColor: white;
//$svgColor: black;
// Grün invers
//$primaryColor: #012f25;
//$secondaryColor: #234c42;
//$accentColor: #b8acaa;
//$textColor: white;
//$svgColor: white;
// Grün invers andere Accent
//$primaryColor: #012f25;
//$secondaryColor: #234c42;
//$accentColor: #6b8778;
//$textColor: white;
//$svgColor: white;
body.theme-blue{
background: repeating-linear-gradient(
300deg,
$primaryColor,
$primaryColor 9%,
$secondaryBackgroundColor 13.5%,
$secondaryBackgroundColor 21.5%,
$primaryColor 26%,
);
//background: $primaryColor;
color: $textColor;
label{
color: $textColor;
}
.toast .message{
background: $secondaryColor;
}
nav.top-bar, nav.top-bar.with-image, nav.top-bar.with-image.solid{
background: $secondaryColor;
}
.button{
background: $secondaryColor;
}
.switch input:checked + .slider{
background: $accentColor;
}
#level-number-container{
background: $primaryColor;
}
svg {
color: $svgColor;
}
ul.menu li a {
color: $textColor;
}
a{
color: $accentColor;
&.hidden-link{
color: $textColor;
}
}
#site > :not(.won) .segment.locked {
//background-color: $accentColor;
//background-color: $secondaryColor;
background-color: #00000030;
//background-color: #81acb5;
}
#tutorial-pointer{
background: $accentColor;
}
}

View File

@ -23,13 +23,11 @@
.tutorial-blanket {
display: block;
}
.tutorial-text {
color: white;
font-size: 1.5rem;
display: flex;
transition: none !important;
* {
transition: none !important;
}
@ -40,12 +38,10 @@
.segment-row {
position: inherit;
}
.segment-parent:nth-child(3), .segment-parent:nth-child(3).rotating {
z-index: 9900 !important;
}
}
.tutorial-text .step-1 {
display: initial;
z-index: 9900 !important;
@ -57,7 +53,6 @@
#level {
z-index: 9900 !important;
}
.tutorial-text .step-2 {
display: initial;
z-index: 9900 !important;
@ -72,7 +67,7 @@
position: relative;
}
.top-bar {
.top-bar{
z-index: 9900 !important;
}
@ -87,7 +82,6 @@
box-shadow: 0 0 10px 5px #fff;
}
}
&.step-4 {
.tutorial-text .step-4 {
display: initial;
@ -98,11 +92,9 @@
#level {
.segment-row {
position: inherit;
> .child-container {
.segment-parent.layer-2, > .segment-parent.layer-2.rotating {
z-index: 9900 !important;
#tutorial-pointer {
width: 0.6em;
height: 0.6em;
@ -127,38 +119,3 @@
}
}
}
#tutorial-site {
display: flex;
justify-content: space-evenly;
flex-direction: column;
#tutorial-1, #tutorial-2, #tutorial-3{
text-align: center;
margin-top: 0.7rem;
margin-bottom: 0.5rem;
}
#tutorial-2 .help-action{
width: 100%;
margin-bottom: 0.3rem;
}
#tutorial-3 .tutorial-wrapper{
position: relative;
#tutorial-pointer {
width: 0.6em;
height: 0.6em;
border-radius: 50%;
left: 75%;
position: absolute;
top: 75%;
z-index: 1;
transform: translate(-50%, -50%);
animation: tutorialPointer 2s infinite;
pointer-events: none;
}
}
}

View File

@ -0,0 +1,394 @@
@import "settings";
@import "lib/_actionBar.scss";
@import "lib/_form.scss";
@import "lib/_listjs.scss";
@import "lib/_modal.scss";
@import "lib/_rotate.scss";
@import "lib/_share.scss";
@import "lib/_tabs.scss";
@import "lib/_core.scss";
@import "lib/_flashMessenger.scss";
@import "lib/_framework.scss";
@import "lib/_pwaAssets.scss";
@import "lib/_settingsSite.scss";
@import "lib/_style.scss";
@import "lib/_theme.scss";
@import "tutorial";
@import "wordrotatorTheme";
//ActionBar
nav.top-bar.title-bar {
padding: 0.3rem 0.6rem 0;
}
#logo {
max-width: 2rem;
transition: none;
}
#action-bar .top-bar-right .menu .action.img a {
padding-bottom: 0;
img {
max-height: 1.8rem;
}
}
.menu, .dropdown.menu {
a {
padding: 0.2rem 0.5rem;
}
}
#level-number-container {
z-index: 1;
transition: none;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border: 3px solid white;
border-radius: 50%;
visibility: hidden;
display: table-cell;
height: 35px;
width: 35px;
text-align: center;
vertical-align: middle;
&.visible {
visibility: visible;
}
&.in-main-menu {
background: white;
border-color: black;
height: 1em;
width: 1em;
min-height: 1em;
min-width: 1em;
max-height: 1em;
max-width: 1em;
}
#level-number {
transition: none;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-weight: bold;
}
}
$coinTowerDimension: 28px;
//coin element
.coin-counter {
display: inline-block;
position: relative;
font-size: 1.6rem;
@include breakpoint(small down) {
font-size: 1rem;
}
:after {
background-image: url('../img/coinTower.png');
background-size: $coinTowerDimension $coinTowerDimension;
width: $coinTowerDimension;
height: $coinTowerDimension;
display: inline-block;
content: "";
}
}
#coin-container {
line-height: 1;
.coin {
margin-left: 3px;
margin-right: 3px;
max-width: 20px;
display: inline-block;
@include breakpoint(smedium) {
max-width: 25px;
}
@include breakpoint(medium) {
max-width: 30px;
}
}
}
//Segments
@for $i from 1 through length($rotationDegrees) {
$startDegree: ((nth($rotationDegrees, $i)+270)%360);
@keyframes rotate-#{nth($rotationDegrees, $i)} {
0% {
//transform: rotate(#{$startDegree}deg);
transform: #{map-get($degreeMatrix, $startDegree)};
}
100% {
//transform: rotate(#{nth($rotationDegrees, $i)}deg);
transform: #{map-get($degreeMatrix, nth($rotationDegrees, $i))};
}
}
@keyframes rotate-reverse-#{nth($rotationDegrees, $i)} {
0% {
//transform: rotate(#{(nth($rotationDegrees, $i))+90}deg);
transform: #{map-get($degreeMatrix, nth($rotationDegrees, $i)+90)}
}
100% {
//transform: rotate(#{$startDegree+90}deg);
transform: #{map-get($degreeMatrix, $startDegree+90)};
}
}
}
.segment:not(.segment-row):not(.segment-triangle) {
&.rotating {
z-index: 10 !important;
overflow: hidden;
@for $i from 1 through length($rotationDegrees) {
&.rotate-#{nth($rotationDegrees, $i)} {
animation-name: rotate-#{nth($rotationDegrees, $i)};
animation-duration: $animationDuration;
animation-fill-mode: forwards;
animation-timing-function: linear;
> .child-container {
> .segment {
animation-name: rotate-#{450- nth($rotationDegrees, $i)};
animation-duration: $animationDuration;
animation-fill-mode: forwards;
animation-direction: reverse;
animation-timing-function: linear;
@for $j from 1 through length($rotationDegrees) {
$animationName: ((nth($rotationDegrees, $j)- nth($rotationDegrees, $i)+360)%360)+90;
&.rotate-#{nth($rotationDegrees, $j)} {
animation-name: rotate-#{$animationName};
}
}
}
}
&.reverse {
//animation-name: rotate-reverse-#{(nth($rotationDegrees, $i))%360+90};
animation-name: rotate-reverse-#{nth($rotationDegrees, $i)};
> .child-container {
> .segment {
//animation-name: rotate-reverse-#{360- (nth($rotationDegrees, $i)%360)};
animation-name: rotate-reverse-#{(540- nth($rotationDegrees, $i))%360+90};
@for $j from 1 through length($rotationDegrees) {
$animationName: ((nth($rotationDegrees, $j)- nth($rotationDegrees, $i)+360)%360)+90;
&.rotate-#{nth($rotationDegrees, $j)} {
animation-name: rotate-reverse-#{($animationName+90)%360+90};
}
}
}
}
}
}
}
}
&:not(.rotating) {
@for $i from 1 through length($rotationDegrees) {
&.rotate-#{nth($rotationDegrees, $i)} {
transform: rotate(#{nth($rotationDegrees, $i)}deg);
background-color: inherit;
z-index: 1;
> .child-container {
> .segment {
transform: rotate(#{360- nth($rotationDegrees, $i)}deg);
background-color: inherit;
z-index: 1;
@for $j from 1 through length($rotationDegrees) {
$animationName: ((nth($rotationDegrees, $j)- nth($rotationDegrees, $i)+360)%360);
@if $animationName==0 {
$animationName: 360;
}
&.rotate-#{nth($rotationDegrees, $j)} {
transform: rotate(#{$animationName}deg);
background-color: inherit;
z-index: 1;
&.rotating {
animation-name: rotate-#{$animationName};
animation-duration: $animationDuration;
animation-fill-mode: forwards;
animation-timing-function: linear;
&.reverse {
animation-name: rotate-reverse-#{$animationName};
}
}
}
}
}
}
}
}
}
}
#level {
user-select: none;
white-space: nowrap;
transition: none;
max-width: 100%;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
//width: 100%;
* {
transition: none;
}
overflow-y: visible;
}
.segment {
vertical-align: top;
white-space: initial;
cursor: pointer;
display: inline-block;
text-align: center;
position: relative;
transition: none;
user-select: none;
z-index: 1;
background-color: inherit;
line-height: 0;
&.segment-row {
display: block;
width: 100%;
animation: none !important;
white-space: nowrap;
}
&.segment-leaf {
background-color: transparent !important;
min-width: 1em;
padding: 0.8em;
&:before {
content: " ";
display: block;
padding-top: 100%;
}
.leaf-element {
position: absolute;
width: 100%;
height: 100%;
line-height: 1.5em;
top: 0;
left: 0;
}
}
&.segment-parent {
border: solid 1px #a9a9a9;
border-radius: 3px;
padding: 1px;
&.layer-2 {
border: solid 3px #000000;
}
}
&.segment-triangle {
> .child-container {
> .segment-parent {
//border: solid 3px #000000;
//position: relative;
}
}
}
}
//Won-screen
#site-content > :not(.won) {
.show-when-won {
display: none;
}
}
.level-container {
//flex: 1;
transition: none;
}
.won {
.level-container {
//height: 60%;
}
.show-when-won {
//visibility: initial;
}
.show-while-playing {
display: none;
}
}
.text-right {
text-align: right;
}
#continue-button {
margin-bottom: 2px;
@include breakpoint(small down) {
margin-bottom: 0;
padding: 0.3em .6em;
}
}
#play-button {
@include breakpoint(small down) {
margin-bottom: 2px;
}
}
#help-button {
margin: 0;
padding: 0.4em 0.4em;
max-width: 3em;
@include breakpoint(smedium down) {
padding: 0.2em 0.2em;
max-width: 2em;
}
}
.line-height-1 {
line-height: 1;
}
body {
overscroll-behavior: contain;
user-select: none;
}
#site-content {
overflow: visible;
}
div.mainContainer{
overflow-x: hidden;
}
//#img-sound:before {
// content: "";
// max-width: 1.4em;
// background: url('../img/speaker.svg')
//}
.clickable{
cursor: pointer;
}
#share-button svg{
cursor: pointer;
max-width: 1.5rem;
}

View File

@ -73,16 +73,9 @@ body {
}
&.default {
//background: #07076d;
background: #0f0f49;
//background: #1c1c44;
color: white;
* {
color: white;
}
//background: url('../img/background.png');
//background-size: cover;
//background-position: center;
background: url('../img/background.png');
background-size: cover;
background-position: center;
#level-number-container {
&.in-main-menu {
@ -151,13 +144,17 @@ body {
}
}
//.setting-row:not(.hidden) {
// line-height: 1;
// padding-top: 0.5em;
// padding-bottom: 0.5em;
// width: 100%;
// cursor: pointer;
// background: rgba(195, 195, 195, 0.13);
// //display: inline-block;
//}
label {
font-size: 1em !important;
}
.setting-row:not(.hidden) {
line-height: 1;
padding-top: 0.5em;
padding-bottom: 0.5em;
width: 100%;
cursor: pointer;
background: rgba(195, 195, 195, 0.13);
//display: inline-block;
}
}

67
src/client/sass/foundation.scss vendored Normal file
View File

@ -0,0 +1,67 @@
@import "../../node_modules/foundation-sites/scss/foundation";
@import "settings";
@include foundation-global-styles;
@include foundation-visibility-classes;
@include foundation-grid;
@include foundation-forms;
//@include foundation-flex-grid;
//@include foundation-flex-classes;
@include foundation-button;
@include foundation-top-bar;
@include foundation-menu;
@include foundation-menu-icon;
@include foundation-prototype-overflow;
@include foundation-dropdown;
@include foundation-dropdown-menu;
@include foundation-accordion;
@include foundation-accordion-menu;
@include foundation-prototype-spacing;
//@include foundation-everything;
.top-bar-title {
padding: 0;
}
.row:not(.expanded) .row {
max-width: 100%;
margin-right: 0;
margin-left: 0;
.column, .columns {
&.no-padding-left {
padding-left: 0 !important;
}
&.no-padding-right {
padding-right: 0 !important;
}
@each $size in $breakpoints {
&.#{nth($size, 1)}-first {
@include breakpoint(nth($size, 1)) {
padding-left: 0 !important;
}
}
&.#{nth($size, 1)}-last {
@include breakpoint(nth($size, 1)) {
padding-right: 0 !important;
}
}
}
}
}
.row.low-padding {
.column, .columns {
//&:not(:first-child)
//{
//}
padding-left: 0.15rem;
padding-right: 0.15rem;
}
}

View File

@ -1,7 +1,8 @@
@import "../../../node_modules/foundation-sites/scss/foundation";
//Settings nach foundation für mixins in settings
@import "settings";
@import "wordRotator";
@import "animations";
//Include foundation before other styles, so that other one can override foundation
@include foundation-everything;
@ -11,10 +12,6 @@
@import "../../../node_modules/cordova-sites-user-management/cordova-sites-user-management";
//Anderes nach Settings, damit Settings bereits angewendet werden
@import "wordRotator";
@import "animations";
@import "navbarOverride";
@import "themeBlue";
.translation{}
@ -184,12 +181,6 @@ a.hidden-link {
overflow: auto;
width: 100%;
> .grid-x{
overflow: auto;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
#main-content {
padding-top: 0;
padding-bottom: 0;

View File

@ -0,0 +1,250 @@
@import "../../../node_modules/foundation-sites/scss/foundation";
nav.top-bar.title-bar {
padding: 0.3rem 0.6rem 0;
}
#logo {
max-width: 2rem;
transition: none;
}
.menu, .dropdown.menu {
a {
padding: 0.2rem 0.5rem;
}
> li > a {
background-color: transparent;
padding: 0.2rem 0.7rem;
}
}
.top-bar-title
{
white-space: nowrap;
}
#action-bar {
.close-listener {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: transparent;
z-index: 9000;
}
#responsive-menu {
.top-bar-right {
position: relative;
text-align: right;
width: 100%;
}
}
.top-bar-right {
width: auto;
.menu {
&.action-bar {
a {
img + span {
display: none;
}
}
.action {
position: relative;
z-index: 9000;
&.is-dropdown-submenu-parent{
z-index: 9001;
}
&.hidden {
display: none;
}
@include breakpoint(small down) {
&.smedium {
display: none;
}
}
@include breakpoint(smedium down) {
li {
display: table-cell;
}
&.medium {
display: none;
}
}
@include breakpoint(medium down) {
&.large {
display: none;
}
}
&.never {
display: none;
}
}
&.hidden {
display: inline-block;
//float: right;
position: absolute;
z-index: 9000;
border: 1px solid rgb(202, 202, 202);
padding: 0.2rem;
transform: translateX(-100%);
text-align: left;
.action {
&.hidden {
display: none;
}
&.is-dropdown-submenu-parent {
z-index: 9001;
ul.is-dropdown-submenu {
top: auto;
> li.action, > .close-listener {
z-index: 9001;
}
}
> a:after {
display: block;
width: 0;
height: 0;
border: 6px inset;
content: "";
border-bottom-width: 0;
border-top-style: solid;
border-color: #ffffff transparent transparent;
right: 5px;
left: auto;
margin-top: -3px;
}
}
a {
white-space: nowrap;
img {
display: none;
+ span {
display: inherit;
}
}
}
@include breakpoint(medium) {
&.medium {
display: none;
}
}
@include breakpoint(smedium) {
&.smedium {
display: none;
}
}
@include breakpoint(large) {
&.large {
display: none;
}
}
@include breakpoint(small down) {
&.smedium {
display: block;
&.hidden {
display: none;
}
}
}
@include breakpoint(smedium down) {
&.medium {
display: block;
&.hidden {
display: none;
}
}
}
@include breakpoint(medium down) {
&.large {
display: block;
&.hidden {
display: none;
}
}
}
&.never {
display: block;
&.hidden {
display: none;
}
}
&.always {
display: none;
}
}
}
}
.action {
z-index: 100;
@include breakpoint(smedium down) {
a {
width: 100%;
//text-align: left;
}
}
@include breakpoint(smedium down) {
a {
padding-left: 0.68rem;
}
}
@include breakpoint(small down) {
a {
padding-left: 0.236rem;
}
}
&:not(.is-dropdown-submenu-parent) {
@include breakpoint(smedium down) {
a {
padding-right: 0.68rem;
}
}
@include breakpoint(small down) {
a {
padding-right: 0.236rem;
}
}
}
&.img a {
padding-top: 0;
padding-bottom: 0;
img {
vertical-align: inherit;
max-height: 1.8rem;
}
}
}
> li > ul.is-dropdown-submenu {
min-width: 0;
.action {
display: inherit;
}
}
> li.opens-right > ul.is-dropdown-submenu {
right: auto;
left: auto;
a {
text-align: left;
}
}
}
}
}
.dropdown.menu > li.is-dropdown-submenu-parent > a:after {
border-color: #ffffff transparent transparent;
}

View File

@ -8,7 +8,7 @@ html {
min-height: 100%;
width: 100%;
height: 100%;
//font-size: 18px;
font-size: 18px;
letter-spacing: 1px;
}

View File

@ -0,0 +1,86 @@
form {
position: relative;
}
.sending {
.sending-loader {
position: absolute;
background-color: rgba(125, 125, 125, 0.3);
display: block;
pointer-events: all;
width: 100%;
height: 100%;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 10;
.loader {
position: absolute
}
border-radius: 2px;
}
}
.sending-loader {
display: none;
}
//input.notEmpty:invalid {
// background-color: lightcoral;
//}
label {
position: relative;
[type='text'], [type='password'], [type='date'], [type='datetime'], [type='datetime-local'], [type='month'], [type='week'], [type='email'], [type='number'], [type='search'], [type='tel'], [type='time'], [type='url'], [type='color'], textarea, input[type=text], input:not([type]) {
display: block;
width: 100%;
height: 2.4375rem;
padding: 0.5rem;
box-shadow: none !important;
font-size: 1rem;
font-weight: normal;
line-height: 1.5;
border: none;
//border-bottom: solid black;
outline: 0;
margin: 0 0 15px;
&:focus {
border: none;
box-shadow: none !important;
//border-bottom: solid black;
}
&:focus, &.notEmpty:not(:focus) {
~ span {
top: -11px;
left: 0;
bottom: 0;
font-size: 11px;
opacity: 1;
//color: black;
}
}
~ span {
position: absolute;
pointer-events: none;
left: 10px;
bottom: 10px;
top: 7px;
transition: 0.2s ease all;
//color: #626262;
}
}
textarea {
height: 10rem;
//border: 1px solid rgba(136, 136, 136, 0.31);
//box-shadow: 0 0 3px 2px hsla(0, 0%, 53%, .31) !important;
border-top-right-radius: 3px;
border-top-left-radius: 3px;
}
[type="checkbox"].before-text {
margin-bottom: 0;
}
}

View File

@ -0,0 +1,621 @@
// Foundation for Sites Settings
// -----------------------------
//
// Table of Contents:
//
// 1. Global
// 2. Breakpoints
// 3. The Grid
// 4. Base Typography
// 5. Typography Helpers
// 6. Abide
// 7. Accordion
// 8. Accordion Menu
// 9. Badge
// 10. Breadcrumbs
// 11. Button
// 12. Button Group
// 13. Callout
// 14. Card
// 15. Close Button
// 16. Drilldown
// 17. Dropdown
// 18. Dropdown Menu
// 19. Forms
// 20. Label
// 21. Media Object
// 22. Menu
// 23. Meter
// 24. Off-canvas
// 25. Orbit
// 26. Pagination
// 27. Progress Bar
// 28. Responsive Embed
// 29. Reveal
// 30. Slider
// 31. Switch
// 32. Table
// 33. Tabs
// 34. Thumbnail
// 35. Title Bar
// 36. Tooltip
// 37. Top Bar
@import '../../../node_modules/foundation-sites/scss/util/util';
// 1. Global
// ---------
$global-font-size: 100%;
$global-width: rem-calc(1200);
$global-lineheight: 1.5;
$foundation-palette: (
primary: #1779ba,
secondary: #767676,
success: #3adb76,
warning: #ffae00,
alert: #cc4b37,
);
$light-gray: #e6e6e6;
$medium-gray: #cacaca;
$dark-gray: #8a8a8a;
$black: #0a0a0a;
$white: #fefefe;
$body-background: $white;
$body-font-color: $black;
$body-font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
$body-antialiased: true;
$global-margin: 1rem;
$global-padding: 1rem;
$global-weight-normal: normal;
$global-weight-bold: bold;
$global-radius: 0;
$global-text-direction: ltr;
$global-flexbox: false;
$print-transparent-backgrounds: true;
@include add-foundation-colors;
// 2. Breakpoints
// --------------
$breakpoints: (
small:0,
smedium: 400px,
medium: 640px,
large: 1024px,
xlarge: 1200px,
xxlarge: 1440px,
);
$print-breakpoint: large;
$breakpoint-classes: (small smedium medium large);
// 3. The Grid
// -----------
$grid-row-width: $global-width;
$grid-column-count: 12;
$grid-column-gutter: (
small: 20px,
medium: 30px,
);
$grid-column-align-edge: true;
$block-grid-max: 8;
// 4. Base Typography
// ------------------
$header-font-family: $body-font-family;
$header-font-weight: $global-weight-normal;
$header-font-style: normal;
$font-family-monospace: Consolas, 'Liberation Mono', Courier, monospace;
$header-color: inherit;
$header-lineheight: 1.4;
$header-margin-bottom: 0.5rem;
$header-styles: (
small: (
'h1': ('font-size': 24),
'h2': ('font-size': 20),
'h3': ('font-size': 19),
'h4': ('font-size': 18),
'h5': ('font-size': 17),
'h6': ('font-size': 16),
),
medium: (
'h1': ('font-size': 48),
'h2': ('font-size': 40),
'h3': ('font-size': 31),
'h4': ('font-size': 25),
'h5': ('font-size': 20),
'h6': ('font-size': 16),
),
);
$header-text-rendering: optimizeLegibility;
$small-font-size: 80%;
$header-small-font-color: $medium-gray;
$paragraph-lineheight: 1.6;
$paragraph-margin-bottom: 1rem;
$paragraph-text-rendering: optimizeLegibility;
$code-color: $black;
$code-font-family: $font-family-monospace;
$code-font-weight: $global-weight-normal;
$code-background: $light-gray;
$code-border: 1px solid $medium-gray;
$code-padding: rem-calc(2 5 1);
$anchor-color: $primary-color;
$anchor-color-hover: scale-color($anchor-color, $lightness: -14%);
$anchor-text-decoration: none;
$anchor-text-decoration-hover: none;
$hr-width: $global-width;
$hr-border: 1px solid $medium-gray;
$hr-margin: rem-calc(20) auto;
$list-lineheight: $paragraph-lineheight;
$list-margin-bottom: $paragraph-margin-bottom;
$list-style-type: disc;
$list-style-position: outside;
$list-side-margin: 1.25rem;
$list-nested-side-margin: 1.25rem;
$defnlist-margin-bottom: 1rem;
$defnlist-term-weight: $global-weight-bold;
$defnlist-term-margin-bottom: 0.3rem;
$blockquote-color: $dark-gray;
$blockquote-padding: rem-calc(9 20 0 19);
$blockquote-border: 1px solid $medium-gray;
$cite-font-size: rem-calc(13);
$cite-color: $dark-gray;
$cite-pseudo-content: '\2014 \0020';
$keystroke-font: $font-family-monospace;
$keystroke-color: $black;
$keystroke-background: $light-gray;
$keystroke-padding: rem-calc(2 4 0);
$keystroke-radius: $global-radius;
$abbr-underline: 1px dotted $black;
// 5. Typography Helpers
// ---------------------
$lead-font-size: $global-font-size * 1.25;
$lead-lineheight: 1.6;
$subheader-lineheight: 1.4;
$subheader-color: $dark-gray;
$subheader-font-weight: $global-weight-normal;
$subheader-margin-top: 0.2rem;
$subheader-margin-bottom: 0.5rem;
$stat-font-size: 2.5rem;
// 6. Abide
// --------
$abide-inputs: true;
$abide-labels: true;
$input-background-invalid: get-color(alert);
$form-label-color-invalid: get-color(alert);
$input-error-color: get-color(alert);
$input-error-font-size: rem-calc(12);
$input-error-font-weight: $global-weight-bold;
// 7. Accordion
// ------------
$accordion-background: $white;
$accordion-plusminus: true;
$accordion-title-font-size: rem-calc(12);
$accordion-item-color: $primary-color;
$accordion-item-background-hover: $light-gray;
$accordion-item-padding: 1.25rem 1rem;
$accordion-content-background: $white;
$accordion-content-border: 1px solid $light-gray;
$accordion-content-color: $body-font-color;
$accordion-content-padding: 1rem;
// 8. Accordion Menu
// -----------------
$accordionmenu-arrows: true;
$accordionmenu-arrow-color: $primary-color;
$accordionmenu-arrow-size: 6px;
// 9. Badge
// --------
$badge-background: $primary-color;
$badge-color: $white;
$badge-color-alt: $black;
$badge-palette: $foundation-palette;
$badge-padding: 0.3em;
$badge-minwidth: 2.1em;
$badge-font-size: 0.6rem;
// 10. Breadcrumbs
// ---------------
$breadcrumbs-margin: 0 0 $global-margin 0;
$breadcrumbs-item-font-size: rem-calc(11);
$breadcrumbs-item-color: $primary-color;
$breadcrumbs-item-color-current: $black;
$breadcrumbs-item-color-disabled: $medium-gray;
$breadcrumbs-item-margin: 0.75rem;
$breadcrumbs-item-uppercase: true;
$breadcrumbs-item-slash: true;
// 11. Button
// ----------
$button-padding: 0.85em 1em;
$button-margin: 0 0 $global-margin 0;
$button-fill: solid;
$button-background: $primary-color;
$button-background-hover: scale-color($button-background, $lightness: -15%);
$button-color: $white;
$button-color-alt: $black;
$button-radius: $global-radius;
$button-sizes: (
tiny: 0.6rem,
small: 0.75rem,
default: 0.9rem,
large: 1.25rem,
);
$button-palette: $foundation-palette;
$button-opacity-disabled: 0.25;
$button-background-hover-lightness: -20%;
$button-hollow-hover-lightness: -50%;
$button-transition: background-color 0.25s ease-out, color 0.25s ease-out;
// 12. Button Group
// ----------------
$buttongroup-margin: 1rem;
$buttongroup-spacing: 1px;
$buttongroup-child-selector: '.button';
$buttongroup-expand-max: 6;
$buttongroup-radius-on-each: true;
// 13. Callout
// -----------
$callout-background: $white;
$callout-background-fade: 85%;
$callout-border: 1px solid rgba($black, 0.25);
$callout-margin: 0 0 1rem 0;
$callout-padding: 1rem;
$callout-font-color: $body-font-color;
$callout-font-color-alt: $body-background;
$callout-radius: $global-radius;
$callout-link-tint: 30%;
// 14. Card
// --------
$card-background: $white;
$card-font-color: $body-font-color;
$card-divider-background: $light-gray;
$card-border: 1px solid $light-gray;
$card-shadow: none;
$card-border-radius: $global-radius;
$card-padding: $global-padding;
$card-margin: $global-margin;
// 15. Close Button
// ----------------
$closebutton-position: right top;
$closebutton-offset-horizontal: (
small: 0.66rem,
medium: 1rem,
);
$closebutton-offset-vertical: (
small: 0.33em,
medium: 0.5rem,
);
$closebutton-size: (
small: 1.5em,
medium: 2em,
);
$closebutton-lineheight: 1;
$closebutton-color: $dark-gray;
$closebutton-color-hover: $black;
// 16. Drilldown
// -------------
$drilldown-transition: transform 0.15s linear;
$drilldown-arrows: true;
$drilldown-arrow-color: $primary-color;
$drilldown-arrow-size: 6px;
$drilldown-background: $white;
// 17. Dropdown
// ------------
$dropdown-padding: 1rem;
$dropdown-background: $body-background;
$dropdown-border: 1px solid $medium-gray;
$dropdown-font-size: 1rem;
$dropdown-width: 300px;
$dropdown-radius: $global-radius;
$dropdown-sizes: (
tiny: 100px,
small: 200px,
large: 400px,
);
// 18. Dropdown Menu
// -----------------
$dropdownmenu-arrows: true;
$dropdownmenu-arrow-color: $anchor-color;
$dropdownmenu-arrow-size: 6px;
$dropdownmenu-min-width: 200px;
$dropdownmenu-background: $white;
$dropdownmenu-border: 1px solid $medium-gray;
// 19. Forms
// ---------
$fieldset-border: 1px solid $medium-gray;
$fieldset-padding: rem-calc(20);
$fieldset-margin: rem-calc(18 0);
$legend-padding: rem-calc(0 3);
$form-spacing: rem-calc(16);
$helptext-color: $black;
$helptext-font-size: rem-calc(13);
$helptext-font-style: italic;
$input-prefix-color: $black;
$input-prefix-background: $light-gray;
$input-prefix-border: 1px solid $medium-gray;
$input-prefix-padding: 1rem;
$form-label-color: $black;
$form-label-font-size: rem-calc(14);
$form-label-font-weight: $global-weight-normal;
$form-label-line-height: 1.8;
$select-background: $white;
$select-triangle-color: $dark-gray;
$select-radius: $global-radius;
$input-color: $black;
$input-placeholder-color: $medium-gray;
$input-font-family: inherit;
$input-font-size: rem-calc(16);
$input-font-weight: $global-weight-normal;
$input-background: $white;
$input-background-focus: $white;
$input-background-disabled: $light-gray;
$input-border: 1px solid $medium-gray;
$input-border-focus: 1px solid $dark-gray;
$input-shadow: inset 0 1px 2px rgba($black, 0.1);
$input-shadow-focus: 0 0 5px $medium-gray;
$input-cursor-disabled: not-allowed;
$input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
$input-number-spinners: true;
$input-radius: $global-radius;
$form-button-radius: $global-radius;
// 20. Label
// ---------
$label-background: $primary-color;
$label-color: $white;
$label-color-alt: $black;
$label-palette: $foundation-palette;
$label-font-size: 0.8rem;
$label-padding: 0.33333rem 0.5rem;
$label-radius: $global-radius;
// 21. Media Object
// ----------------
$mediaobject-margin-bottom: $global-margin;
$mediaobject-section-padding: $global-padding;
$mediaobject-image-width-stacked: 100%;
// 22. Menu
// --------
$menu-margin: 0;
$menu-margin-nested: 1rem;
$menu-item-padding: 0.7rem 1rem;
$menu-item-color-active: $white;
$menu-item-background-active: get-color(primary);
$menu-icon-spacing: 0.25rem;
$menu-item-background-hover: $light-gray;
$menu-border: $light-gray;
// 23. Meter
// ---------
$meter-height: 1rem;
$meter-radius: $global-radius;
$meter-background: $medium-gray;
$meter-fill-good: $success-color;
$meter-fill-medium: $warning-color;
$meter-fill-bad: $alert-color;
// 24. Off-canvas
// --------------
$offcanvas-size: 250px;
$offcanvas-vertical-size: 250px;
$offcanvas-background: $light-gray;
$offcanvas-shadow: 0 0 10px rgba($black, 0.7);
$offcanvas-push-zindex: 1;
$offcanvas-overlap-zindex: 10;
$offcanvas-reveal-zindex: 1;
$offcanvas-transition-length: 0.5s;
$offcanvas-transition-timing: ease;
$offcanvas-fixed-reveal: true;
$offcanvas-exit-background: rgba($white, 0.25);
$maincontent-class: 'off-canvas-content';
// 25. Orbit
// ---------
$orbit-bullet-background: $medium-gray;
$orbit-bullet-background-active: $dark-gray;
$orbit-bullet-diameter: 1.2rem;
$orbit-bullet-margin: 0.1rem;
$orbit-bullet-margin-top: 0.8rem;
$orbit-bullet-margin-bottom: 0.8rem;
$orbit-caption-background: rgba($black, 0.5);
$orbit-caption-padding: 1rem;
$orbit-control-background-hover: rgba($black, 0.5);
$orbit-control-padding: 1rem;
$orbit-control-zindex: 10;
// 26. Pagination
// --------------
$pagination-font-size: rem-calc(14);
$pagination-margin-bottom: $global-margin;
$pagination-item-color: $black;
$pagination-item-padding: rem-calc(3 10);
$pagination-item-spacing: rem-calc(1);
$pagination-radius: $global-radius;
$pagination-item-background-hover: $light-gray;
$pagination-item-background-current: $primary-color;
$pagination-item-color-current: $white;
$pagination-item-color-disabled: $medium-gray;
$pagination-ellipsis-color: $black;
$pagination-mobile-items: false;
$pagination-mobile-current-item: false;
$pagination-arrows: true;
// 27. Progress Bar
// ----------------
$progress-height: 1rem;
$progress-background: $medium-gray;
$progress-margin-bottom: $global-margin;
$progress-meter-background: $primary-color;
$progress-radius: $global-radius;
// 28. Responsive Embed
// --------------------
$responsive-embed-margin-bottom: rem-calc(16);
$responsive-embed-ratios: (
default: 4 by 3,
widescreen: 16 by 9,
);
// 29. Reveal
// ----------
$reveal-background: $white;
$reveal-width: 600px;
$reveal-max-width: $global-width;
$reveal-padding: $global-padding;
$reveal-border: 1px solid $medium-gray;
$reveal-radius: $global-radius;
$reveal-zindex: 1005;
$reveal-overlay-background: rgba($black, 0.45);
// 30. Slider
// ----------
$slider-width-vertical: 0.5rem;
$slider-transition: all 0.2s ease-in-out;
$slider-height: 0.5rem;
$slider-background: $light-gray;
$slider-fill-background: $medium-gray;
$slider-handle-height: 1.4rem;
$slider-handle-width: 1.4rem;
$slider-handle-background: $primary-color;
$slider-opacity-disabled: 0.25;
$slider-radius: $global-radius;
// 31. Switch
// ----------
$switch-background: $medium-gray;
$switch-background-active: $primary-color;
$switch-height: 2rem;
$switch-height-tiny: 1.5rem;
$switch-height-small: 1.75rem;
$switch-height-large: 2.5rem;
$switch-radius: $global-radius;
$switch-margin: $global-margin;
$switch-paddle-background: $white;
$switch-paddle-offset: 0.25rem;
$switch-paddle-radius: $global-radius;
$switch-paddle-transition: all 0.25s ease-out;
// 32. Table
// ---------
$table-background: $white;
$table-color-scale: 5%;
$table-border: 1px solid smart-scale($table-background, $table-color-scale);
$table-padding: rem-calc(8 10 10);
$table-hover-scale: 2%;
$table-row-hover: darken($table-background, $table-hover-scale);
$table-row-stripe-hover: darken($table-background, $table-color-scale + $table-hover-scale);
$table-is-striped: true;
$table-striped-background: smart-scale($table-background, $table-color-scale);
$table-stripe: even;
$table-head-background: smart-scale($table-background, $table-color-scale / 2);
$table-head-row-hover: darken($table-head-background, $table-hover-scale);
$table-foot-background: smart-scale($table-background, $table-color-scale);
$table-foot-row-hover: darken($table-foot-background, $table-hover-scale);
$table-head-font-color: $body-font-color;
$table-foot-font-color: $body-font-color;
$show-header-for-stacked: false;
// 33. Tabs
// --------
$tab-margin: 0;
$tab-background: $white;
$tab-color: $primary-color;
$tab-background-active: $light-gray;
$tab-active-color: $primary-color;
$tab-item-font-size: rem-calc(12);
$tab-item-background-hover: $white;
$tab-item-padding: 1.25rem 1.5rem;
$tab-expand-max: 6;
$tab-content-background: $white;
$tab-content-border: $light-gray;
$tab-content-color: $body-font-color;
$tab-content-padding: 1rem;
// 34. Thumbnail
// -------------
$thumbnail-border: solid 4px $white;
$thumbnail-margin-bottom: $global-margin;
$thumbnail-shadow: 0 0 0 1px rgba($black, 0.2);
$thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5);
$thumbnail-transition: box-shadow 200ms ease-out;
$thumbnail-radius: $global-radius;
// 35. Title Bar
// -------------
$titlebar-background: $black;
$titlebar-color: $white;
$titlebar-padding: 0.5rem;
$titlebar-text-font-weight: bold;
$titlebar-icon-color: $white;
$titlebar-icon-color-hover: $medium-gray;
$titlebar-icon-spacing: 0.25rem;
// 36. Tooltip
// -----------
$has-tip-font-weight: $global-weight-bold;
$has-tip-border-bottom: dotted 1px $dark-gray;
$tooltip-background-color: $black;
$tooltip-color: $white;
$tooltip-padding: 0.75rem;
$tooltip-font-size: $small-font-size;
$tooltip-pip-width: 0.75rem;
$tooltip-pip-height: $tooltip-pip-width * 0.866;
$tooltip-radius: $global-radius;
// 37. Top Bar
// -----------
$topbar-padding: 0.5rem;
$topbar-background: $light-gray;
$topbar-submenu-background: $topbar-background;
$topbar-title-spacing: 0.5rem 1rem 0.5rem 0;
$topbar-input-width: 200px;
$topbar-unstack-breakpoint: medium;

View File

@ -0,0 +1,54 @@
.listjs {
position: relative;
label {
display: inline-block;
input {
margin-bottom: 0;
}
}
table {
border-collapse: collapse;
thead, tfoot {
tr th {
text-align: left;
&.sort{
cursor: pointer;
}
}
}
tbody.list {
tr:first-child td {
border-top: solid 1px #696969;
}
tr:last-child td {
border-bottom: solid 1px #696969;
}
tr td {
border-top: solid 1px #c8c8c8;
padding: 0.3rem;
}
}
}
ul.pagination {
float: right;
display: inline-block;
margin: 0;
li {
display: inline-block;
padding-left: 5px;
padding-right: 5px;
text-decoration: underline;
&.active, &.disabled {
text-decoration: none;
}
a.page {
}
}
}
}

View File

@ -0,0 +1,91 @@
.background {
position: fixed;
z-index: 1000000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
//background-color: rgb(0, 0, 0); /* Fallback color */
background-color: rgba(55, 55, 55, 0.6);
.modal {
position: relative;
top: 50%;
//left: 10%;
//right: 10%;
margin: auto;
width: 80%;
//background-color: #fefefe;
transform: translateY(-50%);
padding: 0.5rem;
display: flex;
flex-direction: column;
max-height: 80%;
max-width: nth(nth($breakpoints, 4),2);
&.small-margin {
@include breakpoint(medium down) {
width: 90%;
}
@include breakpoint(small down) {
width: 95%;
}
}
@each $size in $breakpoints
{
&.max-#{nth($size, 1)}
{
max-width: nth($size, 2);
}
}
.title {
font-weight: bold;
padding-bottom: 0.5rem;
}
.content-container {
overflow-y: auto;
max-height: 100%;
.loader{
position:static;
transform: none;
}
}
.close {
text-align: right;
//color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
line-height: 1;
&:hover,
&:focus {
//color: black;
text-decoration: none;
cursor: pointer;
}
}
.modal-button-container {
padding-top: 0.5rem;
.button {
margin-left: 0.2rem;
margin-bottom: 0 !important;
padding: 0.6em 0.8em;
@include breakpoint(small down) {
margin-left: 0.1rem;
padding: 0.3em 0.5em;
}
}
}
}
}

View File

@ -0,0 +1,7 @@
.no-transition{
transition: none !important;
* {
transition: none !important;
}
}

View File

@ -13,7 +13,6 @@
#settings-fragments {
> * {
display: none;
&.active {
display: block;
}
@ -25,31 +24,26 @@
.switch {
position: relative;
display: inline-block;
height: initial;
@include breakpoint(small down) {
@include breakpoint(small down){
font-size: 0.6em;
}
@include breakpoint(smedium down) {
@include breakpoint(smedium down){
font-size: 0.7em;
}
input {
display: none;
&:checked + .slider {
&:checked + .slider{
//background-color: #2196F3;
&:before {
&:before{
transform: translateX(1.5em);
}
}
&:focus + .slider {
&:focus + .slider{
//box-shadow: 0 0 1px #2196F3;
}
}
.slider {
display: inline-block;
position: relative;
@ -61,8 +55,7 @@
transition: .4s;
margin-bottom: 0;
margin-top: 0;
&:before {
&:before{
position: absolute;
content: "";
height: 1.1em;
@ -74,38 +67,30 @@
border-radius: 50%;
}
}
img, svg {
img, svg{
width: 1.4em;
display: inline;
vertical-align: initial;
path {
path{
stroke-color: inherit;
}
}
}
label {
label{
font-size: 1em !important;
}
.setting-row:not(.hidden) {
.setting-row:not(.hidden){
line-height: 1;
display: flex;
padding: 0.5rem 0.4rem;
align-items: center;
padding-top: 0.5em;
padding-bottom: 0.5em;
width: 100%;
cursor: pointer;
background: rgba(195, 195, 195, 0.13);
//display: inline-block;
> * {
flex: 1;
}
input[type=checkbox] {
input[type=checkbox]
{
margin: 0;
}
}

View File

@ -1,9 +1,11 @@
//@import "lib/_rotate.scss";
@import "settings";
@import "lib/_rotate.scss";
@import "lib/_share.scss";
//@import "lib/_tabs.scss";
@import "lib/_tabs.scss";
@import "lib/_core.scss";
//@import "lib/_flashMessenger.scss";
//@import "lib/_framework.scss";
@import "lib/_flashMessenger.scss";
@import "lib/_framework.scss";
@import "lib/_pwaAssets.scss";
@import "lib/_settingsSite.scss";
@import "lib/_style.scss";
@import "lib/_theme.scss";
@ -11,14 +13,19 @@
@import "wordrotatorTheme";
$text-shadow: 0 0.2rem 0.2rem #464646, 0.6rem 0.8rem 0.4rem #00000090;
$text-shadow: /*
0 0 3px #787878,
0 0 10px #000000;
*/
/*
0 3px 3px #787878,
15px 15px 8px #000000
*/
0 0.2rem 0.2rem #464646, 0.6rem 0.8rem 0.4rem #00000090;
.no-transition{
transition: none !important;
* {
transition: none !important;
}
}
//ActionBar
nav.top-bar.title-bar {
@ -81,19 +88,20 @@ nav.top-bar.title-bar {
&.level-counter {
position: fixed !important;
font-size: 1.8rem;
font-size: 2rem;
&.num-10 {
font-size: 1.3rem;
font-size: 1.4rem;
}
&.num-100 {
font-size: 0.9rem;
font-size: 1rem;
}
&.num-1000 {
font-size: 0.65rem;
font-size: 0.7rem;
}
}
&.in-main-menu {
@ -299,6 +307,7 @@ $coinTowerDimension: 28px;
}
.segment {
vertical-align: top;
white-space: initial;
cursor: pointer;
@ -346,19 +355,18 @@ $coinTowerDimension: 28px;
top: 0;
left: 0;
//text-shadow: $text-shadow;
text-shadow: $text-shadow;
}
}
&.segment-parent {
border: solid 2px #a9a9a9;
border: solid 1px #a9a9a9;
border-radius: 3px;
padding: 1px;
margin: 1px;
&.layer-2 {
border: solid 4px #000000;
border: solid 3px #000000;
}
}
@ -372,10 +380,6 @@ $coinTowerDimension: 28px;
}
}
.help-action{
border-radius: 4px;
}
//Won-screen
#site > :not(.won) {
.show-when-won {
@ -401,32 +405,10 @@ $coinTowerDimension: 28px;
display: none;
}
#won-text {
#won-text{
text-shadow: $text-shadow;
}
.segment:not(.segment-row):not(.segment-triangle):not(.rotating) {
@for $i from 1 through length($rotationDegrees) {
&.rotate-#{nth($rotationDegrees, $i)} {
//transform: rotate(#{nth($rotationDegrees, $i)}deg);
transform: none;
> .child-container {
> .segment {
//transform: rotate(#{360- nth($rotationDegrees, $i)}deg);
transform: none;
@for $j from 1 through length($rotationDegrees) {
&.rotate-#{nth($rotationDegrees, $j)} {
transform: none;
}
}
}
}
}
}
}
}
.text-right {
@ -434,7 +416,6 @@ $coinTowerDimension: 28px;
}
#continue-button {
border-radius: 4px;
margin-bottom: 2px;
@include breakpoint(small down) {
margin-bottom: 0;
@ -443,9 +424,8 @@ $coinTowerDimension: 28px;
}
#play-button {
border-radius: 4px;
@include breakpoint(small down) {
margin-bottom: 0.5rem;
margin-bottom: 2px;
}
}

View File

@ -23,7 +23,7 @@
"choose-theme-dialog-title": "Theme auswählen:",
"install": "Installieren",
"share-dialog": "Teilen:",
"credits-text": "Ein großer Dank geht an Hanna, denn ohne sie sähe die App nicht so aus, wie sie aussieht. Danke für deine guten Vorschläge und Ratschläge für das Design!",
"credits-sister-text": "Ich danke meiner Lieblingsschwester, denn ohne Sie würde diese App nicht so aussehen, wie sie aussieht (wahrscheinlich eher schlechter :p)",
"credits-coin-text": "Sound:<br/>Der Münz-Sound ist von der Webseite <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a>. Alle Rechte für diesen Münz-Sound gehören <a target='_blank' rel='noopener' href = '{0}' class = 'link'>{0}</a>.",
"credits-music-text": "Musik:<br/>Bright And Beautiful - GEMAfreie Musik von <a href = '{0}' target='_blank' rel='noopener' class = 'link'>{0}</a><br/>Licensed under Creative Commons: By Attribution 4.0 International (CC BY 4.0)<br/><a href = '{1}' target='_blank' rel='noopener' class = 'link'>{1}</a><br/>Angepasst (geschnitten) für diese App",
"storage-info": "Fortschritt {0} dauerhaft gespeichert",
@ -48,14 +48,5 @@
"privacy policy accepted": " akzeptiert",
"message": "Nachricht",
"send": "Senden",
"the message was sent": "Die Nachricht wurde gesendet.",
"wr": "WR",
"tutorial": "Spielregeln",
"tutorial-1": "Klicke auf ein Feld, um dieses rotieren zu lassen! Um zu gewinnen, drehe die Segmente so, dass du zwei Wörter lesen kannst.",
"tutorial-2": "Die Hilfe löst ein Segment, kostet aber 25 Münzen. Du erhältst 5 Münzen pro gewonnenes Level.",
"tutorial-3": "Große Segmente drehst du, indem du diese ziehst.",
"you solved the tutorial level!": "Du hast das Tutorial-Level gelöst!",
"WR": "WR",
"Spielregeln": "Spielregeln"
"the message was sent": "Die Nachricht wurde gesendet."
}

View File

@ -49,14 +49,5 @@
"privacy policy accepted": " akzeptiert",
"message": "Nachricht",
"send": "Senden",
"the message was sent": "Die Nachricht wurde gesendet.",
"tutorial": "Rules",
"tutorial-1": "Click on a field to rotate it! To win, rotate the segments so that you can read two words.",
"tutorial-2": "The help solves a segment, but costs 25 coins. You receive 5 coins per level won.",
"tutorial-3": "You rotate large segments by dragging them.",
"you solved the tutorial level!": "You have solved the tutorial level!",
"WR": "WR",
"Spielregeln": "Rules"
"the message was sent": "Die Nachricht wurde gesendet."
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,39 @@
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*!
*/
/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed 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
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="19" id="link.silas.wordrotator" version="1.3.2" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>WordRotator - Test</name>
<widget android-versionCode="1" id="link.silas.wordrotator" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>WordRotator</name>
<description>
A word-game
</description>
@ -10,7 +10,6 @@
<content src="index.html" />
<icon src="src/client/img/logo.png" />
<access origin="*" />
<access origin="cdvfile://*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />

View File

@ -18,6 +18,14 @@ module.exports = [
"id": "cordova-plugin-nativestorage.NativeStorageError",
"pluginId": "cordova-plugin-nativestorage"
},
{
"file": "plugins/cordova-plugin-keyboard/www/keyboard.js",
"id": "cordova-plugin-keyboard.keyboard",
"pluginId": "cordova-plugin-keyboard",
"clobbers": [
"window.Keyboard"
]
},
{
"file": "plugins/cordova-plugin-tts/www/tts.js",
"id": "cordova-plugin-tts.tts",
@ -26,14 +34,6 @@ module.exports = [
"TTS"
]
},
{
"file": "plugins/nl.madebymark.share/www/share.js",
"id": "nl.madebymark.share.Share",
"pluginId": "nl.madebymark.share",
"clobbers": [
"window.navigator.share"
]
},
{
"file": "plugins/cordova-plugin-device/www/device.js",
"id": "cordova-plugin-device.device",
@ -251,14 +251,13 @@ module.exports = [
module.exports.metadata =
// TOP OF METADATA
{
"cordova-plugin-webpack": "1.0.5",
"cordova-plugin-whitelist": "1.3.4",
"cordova-plugin-nativestorage": "2.3.2",
"cordova-plugin-keyboard": "1.2.0",
"cordova-plugin-tts": "0.2.3",
"nl.madebymark.share": "0.1.1",
"cordova-plugin-device": "2.0.3",
"cordova-plugin-file": "6.0.2",
"cordova-sqlite-storage": "6.0.0",
"cordova-plugin-whitelist": "1.3.4"
"cordova-sqlite-storage": "5.1.0"
}
// BOTTOM OF METADATA
});

View File

@ -1 +1 @@
<div class="window-container"> <div class="flex-container"> <span class="window-resize edge nw" data-direction="-1,-1">&nbsp;</span> <span class="window-resize top grow" data-direction="0,-1">&nbsp;</span> <span class="window-resize edge ne" data-direction="1,-1">&nbsp;</span> </div> <div class="flex-container grow overflow-hidden"> <div class="window-resize left" data-direction="-1,0">&nbsp;</div> <div class="grow flex-container flex-dir-column max-width-100"> <div class="flex-container"><h4 id="title" class="grow">&nbsp;</h4></div> <div class="window"> <span id="child-view"></span> </div> </div> <div class="window-resize right" data-direction="1,0">&nbsp;</div> </div> <div class="flex-container"> <div class="window-resize edge sw" data-direction="-1,1">&nbsp;</div> <div class="window-resize bottom grow" data-direction="0,1">&nbsp;</div> <div class="window-resize edge se" data-direction="1,1">&nbsp;</div> </div> </div>
<div class="window-container"> <div class="flex-container"> <span class="window-resize edge nw" data-direction="-1,-1">&nbsp;</span> <span class="window-resize top grow" data-direction="0,-1">&nbsp;</span> <span class="window-resize edge ne" data-direction="1,-1">&nbsp;</span> </div> <div class="flex-container grow overflow-hidden"> <div class="window-resize left" data-direction="-1,0">&nbsp;</div> <div class="grow flex-container flex-dir-column"> <h4 id="title">&nbsp;</h4> <div class="window grow"> <span id="child-view"></span> </div> </div> <div class="window-resize right" data-direction="1,0">&nbsp;</div> </div> <div class="flex-container"> <div class="window-resize edge sw" data-direction="-1,1">&nbsp;</div> <div class="window-resize bottom grow" data-direction="0,1">&nbsp;</div> <div class="window-resize edge se" data-direction="1,1">&nbsp;</div> </div> </div>

View File

@ -1 +1 @@
<div class="flex-container alphabetic-list"> <article class="grow alphabetic-list-container"> <span id="alphabetic-list-heading"></span> <span class="alphabet-section A"></span> <span class="alphabet-section B"></span> <span class="alphabet-section C"></span> <span class="alphabet-section D"></span> <span class="alphabet-section E"></span> <span class="alphabet-section F"></span> <span class="alphabet-section G"></span> <span class="alphabet-section H"></span> <span class="alphabet-section I"></span> <span class="alphabet-section J"></span> <span class="alphabet-section K"></span> <span class="alphabet-section L"></span> <span class="alphabet-section M"></span> <span class="alphabet-section N"></span> <span class="alphabet-section O"></span> <span class="alphabet-section P"></span> <span class="alphabet-section Q"></span> <span class="alphabet-section R"></span> <span class="alphabet-section S"></span> <span class="alphabet-section T"></span> <span class="alphabet-section U"></span> <span class="alphabet-section V"></span> <span class="alphabet-section W"></span> <span class="alphabet-section X"></span> <span class="alphabet-section Y"></span> <span class="alphabet-section Z"></span> </article> <span class="alphabetic-list-sidealphabet"> <span class="alphabet-scroll-to" data-letter="A">A</span> <span class="alphabet-scroll-to" data-letter="B">B</span> <span class="alphabet-scroll-to" data-letter="C">C</span> <span class="alphabet-scroll-to" data-letter="D">D</span> <span class="alphabet-scroll-to" data-letter="E">E</span> <span class="alphabet-scroll-to" data-letter="F">F</span> <span class="alphabet-scroll-to" data-letter="G">G</span> <span class="alphabet-scroll-to" data-letter="H">H</span> <span class="alphabet-scroll-to" data-letter="I">I</span> <span class="alphabet-scroll-to" data-letter="J">J</span> <span class="alphabet-scroll-to" data-letter="K">K</span> <span class="alphabet-scroll-to" data-letter="L">L</span> <span class="alphabet-scroll-to" data-letter="M">M</span> <span class="alphabet-scroll-to" data-letter="N">N</span> <span class="alphabet-scroll-to" data-letter="O">O</span> <span class="alphabet-scroll-to" data-letter="P">P</span> <span class="alphabet-scroll-to" data-letter="Q">Q</span> <span class="alphabet-scroll-to" data-letter="R">R</span> <span class="alphabet-scroll-to" data-letter="S">S</span> <span class="alphabet-scroll-to" data-letter="T">T</span> <span class="alphabet-scroll-to" data-letter="U">U</span> <span class="alphabet-scroll-to" data-letter="V">V</span> <span class="alphabet-scroll-to" data-letter="W">W</span> <span class="alphabet-scroll-to" data-letter="X">X</span> <span class="alphabet-scroll-to" data-letter="Y">Y</span> <span class="alphabet-scroll-to" data-letter="Z">Z</span> </span> </div>
<div class="flex-container alphabetic-list"> <article class="grow alphabetic-list-container"> <span class="alphabet-section A"></span> <span class="alphabet-section B"></span> <span class="alphabet-section C"></span> <span class="alphabet-section D"></span> <span class="alphabet-section E"></span> <span class="alphabet-section F"></span> <span class="alphabet-section G"></span> <span class="alphabet-section H"></span> <span class="alphabet-section I"></span> <span class="alphabet-section J"></span> <span class="alphabet-section K"></span> <span class="alphabet-section L"></span> <span class="alphabet-section M"></span> <span class="alphabet-section N"></span> <span class="alphabet-section O"></span> <span class="alphabet-section P"></span> <span class="alphabet-section Q"></span> <span class="alphabet-section R"></span> <span class="alphabet-section S"></span> <span class="alphabet-section T"></span> <span class="alphabet-section U"></span> <span class="alphabet-section V"></span> <span class="alphabet-section W"></span> <span class="alphabet-section X"></span> <span class="alphabet-section Y"></span> <span class="alphabet-section Z"></span> </article> <span class="alphabetic-list-sidealphabet"> <span class="alphabet-scroll-to" data-letter="A">A</span> <span class="alphabet-scroll-to" data-letter="B">B</span> <span class="alphabet-scroll-to" data-letter="C">C</span> <span class="alphabet-scroll-to" data-letter="D">D</span> <span class="alphabet-scroll-to" data-letter="E">E</span> <span class="alphabet-scroll-to" data-letter="F">F</span> <span class="alphabet-scroll-to" data-letter="G">G</span> <span class="alphabet-scroll-to" data-letter="H">H</span> <span class="alphabet-scroll-to" data-letter="I">I</span> <span class="alphabet-scroll-to" data-letter="J">J</span> <span class="alphabet-scroll-to" data-letter="K">K</span> <span class="alphabet-scroll-to" data-letter="L">L</span> <span class="alphabet-scroll-to" data-letter="M">M</span> <span class="alphabet-scroll-to" data-letter="N">N</span> <span class="alphabet-scroll-to" data-letter="O">O</span> <span class="alphabet-scroll-to" data-letter="P">P</span> <span class="alphabet-scroll-to" data-letter="Q">Q</span> <span class="alphabet-scroll-to" data-letter="R">R</span> <span class="alphabet-scroll-to" data-letter="S">S</span> <span class="alphabet-scroll-to" data-letter="T">T</span> <span class="alphabet-scroll-to" data-letter="U">U</span> <span class="alphabet-scroll-to" data-letter="V">V</span> <span class="alphabet-scroll-to" data-letter="W">W</span> <span class="alphabet-scroll-to" data-letter="X">X</span> <span class="alphabet-scroll-to" data-letter="Y">Y</span> <span class="alphabet-scroll-to" data-letter="Z">Z</span> </span> </div>

View File

@ -1 +1 @@
<div> <p class="translation" data-translation="credits-text"></p> <p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p> <p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p> </div>
<div> <p class="translation" data-translation="credits-sister-text"></p> <p class="translation" data-translation="credits-coin-text" data-translation-args='["https://www.freesfx.co.uk/"]'></p> <p class="translation" data-translation="credits-music-text" data-translation-args='["https://audeeyah.de", "http://creativecommons.org/licenses/by/4.0/"]'></p> </div>

View File

@ -1 +0,0 @@
<div class="image-selection"> <div class="flex-container"> <div class="image-selection-category-container grow"> <div class="image-selection-category"> <div class="image-selection-category-name"></div> <div class="image-selection-image-container"> <img class="image-selection-image"> <span class="image-selection-image-name"></span> </div> </div> </div> <div class="image-selection-preview"><button class="button height-100">Drag & Drop Image for own upload</button></div> </div> <input type="hidden" class="image-selection-value"> </div>

View File

@ -1 +1 @@
<div> <h2>Impressum</h2> <p>Silas Günther<br/> Mariabrunnstraße 48<br/> 52064 Aachen<br/> Deutschland </p> <p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br/> <a href="?s=contact" class="link">Kontaktformular</a> </p> </div>
<div> <h2>Impressum</h2> <p>Silas Günther<br/> Mariabrunnstraße 48<br/> 52064 Aachen<br/> Deutschland </p> <p>E-Mail: <a href="mailto:wordRotator@silas.link">wordRotator@silas.link</a><br/> <a href="?s=contact" class="link" target="_blank">Kontaktformular</a> </p> </div>

View File

@ -1 +1 @@
<div class="max-height overflow-hidden"> <div id="segment-leaf-template" class="segment segment-leaf"> <div class="leaf-element"></div> </div> <div id="segment-parent-template" class="segment segment-parent"> <div class="child-container"></div> </div> <div id="segment-row-template" class="segment segment-row"> <div class="child-container"></div> </div> <div id="segment-column-template" class="segment segment-column"> <div class="child-container"></div> </div> <div id="segment-triangle-template" class="segment segment-triangle"> <div class="child-container"></div> </div> <div id="tutorial-pointer"></div> <div class="max-height fill-me"> <div class="height-20 no-transition tutorial-text center flex-center hidden"> <div class="step-1 hidden translation" data-translation="tutorial-step-1"></div> <div class="step-2 hidden translation" data-translation="tutorial-step-2"></div> <div class="step-3 hidden translation" data-translation="tutorial-step-3"></div> <div class="step-4 hidden translation" data-translation="tutorial-step-4"></div> </div> <div class="height-20 show-when-won center flex-center fill-me" style="min-height:60px"> <div class="grow max-width"> <b class="translation" data-translation="won" id="won-text"></b> </div> <div id="coin-container"> <div id="coin-template" class="coin" style="opacity:0"> <img src="img/coin.png"/> </div> </div> </div> <div class="flex-center level-container grow"> <div id="level"> </div> </div> <div class="show-when-won flex-center height-20"> <button class="button max-width translation" id="continue-button" data-translation="continue"></button> </div> </div> <div class="tutorial-blanket"></div> </div>
<div class="max-height overflow-hidden"> <div id="segment-leaf-template" class="segment segment-leaf"> <div class="leaf-element"></div> </div> <div id="segment-parent-template" class="segment segment-parent"> <div class="child-container"></div> </div> <div id="segment-row-template" class="segment segment-row"> <div class="child-container"></div> </div> <div id="segment-column-template" class="segment segment-column"> <div class="child-container"></div> </div> <div id="segment-triangle-template" class="segment segment-triangle"> <div class="child-container"></div> </div> <div id="tutorial-pointer"></div> <div class="max-height fill-me"> <div class="height-20 no-transition tutorial-text center flex-center hidden"> <div class="step-1 hidden translation" data-translation="tutorial-step-1"></div> <div class="step-2 hidden translation" data-translation="tutorial-step-2"></div> <div class="step-3 hidden translation" data-translation="tutorial-step-3"></div> <div class="step-4 hidden translation" data-translation="tutorial-step-4"></div> </div> <div class="height-20 show-when-won center flex-center fill-me" style="min-height:45px"> <div class="grow max-width"> <b class="translation" data-translation="won" id="won-text"></b> </div> <div id="coin-container"> <div id="coin-template" class="coin" style="opacity:0"> <img src="img/coin.png"/> </div> </div> </div> <div class="flex-center level-container grow"> <div id="level"> </div> </div> <div class="show-when-won flex-center height-20"> <button class="button max-width translation" id="continue-button" data-translation="continue"></button> </div> </div> <div class="tutorial-blanket"></div> </div>

View File

@ -1 +1 @@
<div class="max-height fill-me"> <div class="grid-x max-width grow flex-center"> <div class="columns small-centered small-12 smedium-11 medium-9 large-7"> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">sound</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="play-sound" name="play-sound" value="1" data-default="1"> <span class="slider"></span> </span> </label> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">music</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="play-music" name="play-music" value="1" data-default="1"> <span class="slider"></span> </span> </label> <div class="grid-x setting-row" id="tutorial-button"> <span class="columns small-6 translation">tutorial</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <div class="grid-x setting-row" id="credits-button"> <span class="columns small-6 translation">credits</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <div class="grid-x setting-row" id="privacy-policy-button"> <span class="columns small-6 translation">privacy-policy</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <div class="grid-x setting-row" id="impressum-button"> <span class="columns small-6 translation">impressum</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <div class="grid-x setting-row" id="contact-button"> <span class="columns small-6 translation">contact</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">track</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="track-switch" name="matomoShouldTrack" value="1" data-default="1" data-raw="1"> <span class="slider"></span> </span> </label> <div class="grid-x setting-row hidden"> <span class="column small-10" id="storage-info"></span> <span class="columns small-2 text-right translation">&gt;</span> </div> <div class="grid-x setting-row"> <span class="column small-6 translation">version-label</span> <span class="column small-6 text-right" id="version-info"></span> </div> <button id="reset-levels" class="button hidden">reset-levels</button> </div> </div> </div>
<div class="max-height fill-me"> <div class="grid-x max-width grow flex-center"> <div class="columns small-centered small-12 smedium-11 medium-9 large-7"> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">sound</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="play-sound" name="play-sound" value="1" data-default="1"> <span class="slider"></span> </span> </label> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">music</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="play-music" name="play-music" value="1" data-default="1"> <span class="slider"></span> </span> </label> <div class="grid-x setting-row" id="credits-button"> <span class="columns small-6 translation">credits</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <div class="grid-x setting-row" id="privacy-policy-button"> <span class="columns small-6 translation">privacy-policy</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <div class="grid-x setting-row" id="impressum-button"> <span class="columns small-6 translation">impressum</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <div class="grid-x setting-row" id="contact-button"> <span class="columns small-6 translation">contact</span> <span class="columns small-6 text-right translation">&gt;</span> </div> <label class="switch grid-x setting-row"> <span class="columns small-6 translation">track</span> <span class="columns small-6 text-right"> <input type="checkbox" class="setting" id="track-switch" name="matomoShouldTrack" value="1" data-default="1" data-raw="1"> <span class="slider"></span> </span> </label> <div class="grid-x setting-row hidden"> <span class="column small-10" id="storage-info"></span> <span class="columns small-2 text-right translation">&gt;</span> </div> <div class="grid-x setting-row"> <span class="column small-6 translation">version-label</span> <span class="column small-6 text-right" id="version-info"></span> </div> <button id="reset-levels" class="button hidden">reset-levels</button> </div> </div> </div>

View File

@ -1 +1 @@
<div class="height-100"> <div id="wordRotatorSettings" class="height-100"></div> </div>
<div> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <div id="wordRotatorSettings"></div> </div>

View File

@ -1 +1 @@
<div class="tab-fragment"> <div class="tab-names flex-container flex-dir-row"> <div class="tab-button tab-button-template"></div> <div class="grow border-bottom">&nbsp;</div> </div> <div class="tab-content"> <div class="tab-site tab-site-template active"></div> </div> </div>
<div class="tab-fragment"> <div class="tab-names flex-container flex-dir-row"> <div class="tab-button tab-button-template"></div> <div class="grow border-bottom">&nbsp;</div> </div> <div class="tab-content"> <div class="tab-site tab-site-template"></div> </div> </div>

View File

@ -1 +0,0 @@
<article id="tutorial-site"> <section> <div id="segment-leaf-template" class="segment segment-leaf"> <div class="leaf-element"></div> </div> <div id="segment-parent-template" class="segment segment-parent"> <div class="child-container"></div> </div> <div id="segment-row-template" class="segment segment-row"> <div class="child-container"></div> </div> <div id="segment-column-template" class="segment segment-column"> <div class="child-container"></div> </div> <div id="segment-triangle-template" class="segment segment-triangle"> <div class="child-container"></div> </div> </section> <section id="tutorial-1"> <div class="tutorial-text translation">tutorial-1</div> <div class="level-container"></div> </section> <section id="tutorial-2"> <div class="tutorial-text translation">tutorial-2</div> <div class="tutorial-wrapper"> <button class="help-action"> <img src="img/help.png" class="action-image"> </button> <div class="level-container"></div> </div> </section> <section id="tutorial-3"> <div class="tutorial-text translation">tutorial-3</div> <div class="tutorial-wrapper"> <div id="tutorial-pointer"></div> <div class="level-container"></div> </div> </section> </article>

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 KiB

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<!doctype html><html><head><link rel="icon" type="image/png" href="img/logo.png"><meta charset="utf-8"/><meta name="format-detection" content="telephone=no"><meta name="msapplication-tap-highlight" content="no"><meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: cdvfile: * 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' * data: cdvfile: content:; script-src 'self' data: 'unsafe-eval'"><meta class="foundation-mq"><link rel="stylesheet" href="index.css"><title>WordRotator</title><script src="scripts/sql-wasm.js"></script><script src="scripts/localforage.js"></script></head><body class="theme-blue"><div id="toast-container"><div class="toast toast-template" style="opacity:0"><span class="message"></span></div></div><div id="site"><div class="loader overlay"><svg viewBox="0 0 32 32" width="32" height="32"><circle class="spinner" cx="16" cy="16" r="14" fill="none" style="stroke:#000"></circle></svg></div></div><script src="cordova.js"></script><script src="bundle.js"></script></body></html>
<!doctype html><html><head><link rel="icon" type="image/png" href="img/logo.png"><meta charset="utf-8"/><meta name="format-detection" content="telephone=no"><meta name="msapplication-tap-highlight" content="no"><meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: cdvfile: * 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' * data: cdvfile: content:; script-src 'self' data: 'unsafe-eval'" ;><meta class="foundation-mq"><link rel="stylesheet" href="index.css"><title>WordRotator</title><script src="scripts/sql-wasm.js"></script><script src="scripts/localforage.js"></script></head><body class="default"><div id="toast-container"><div class="toast toast-template" style="opacity:0"><span class="message"></span></div></div><div id="site"><div class="loader overlay"><svg viewBox="0 0 32 32" width="32" height="32"><circle class="spinner" cx="16" cy="16" r="14" fill="none" style="stroke:#000"></circle></svg></div></div><script src="cordova.js"></script><script src="bundle.js"></script></body></html>

View File

@ -1,8 +1,8 @@
{
"background_color": "#FFF",
"display": "standalone",
"name": "WordRotator - Test",
"short_name": "WordRotator - Test",
"name": "WordRotator",
"short_name": "WordRotator",
"version": "link.silas.wordrotator",
"description": "A word-game",
"author": "Silas Günther",

View File

@ -0,0 +1,108 @@
cordova.define("cordova-plugin-keyboard.keyboard", function(require, exports, module) { /*
*
* 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.
*
*/
var argscheck = require('cordova/argscheck'),
utils = require('cordova/utils'),
exec = require('cordova/exec');
var Keyboard = function() {
};
Keyboard.shrinkView = function(shrink, success) {
if (shrink !== null && shrink !== undefined) {
exec(success, null, "Keyboard", "shrinkView", [shrink]);
} else {
exec(success, null, "Keyboard", "shrinkView", []);
}
};
Keyboard.hideFormAccessoryBar = function(hide, success) {
if (hide !== null && hide !== undefined){
exec(success, null, "Keyboard", "hideFormAccessoryBar", [hide]);
} else {
exec(success, null, "Keyboard", "hideFormAccessoryBar", []);
}
};
Keyboard.disableScrollingInShrinkView = function(disable, success) {
if (disable !== null && disable !== undefined) {
exec(success, null, "Keyboard", "disableScrollingInShrinkView", [disable]);
} else {
exec(success, null, "Keyboard", "disableScrollingInShrinkView", []);
}
};
Keyboard.fireOnShow = function() {
Keyboard.isVisible = true;
cordova.fireWindowEvent('keyboardDidShow');
if(Keyboard.onshow) {
Keyboard.onshow();
}
};
Keyboard.fireOnHide = function() {
Keyboard.isVisible = false;
cordova.fireWindowEvent('keyboardDidHide');
if(Keyboard.onhide) {
Keyboard.onhide();
}
};
Keyboard.fireOnHiding = function() {
// Automatic scroll to the top of the page
// to prevent quirks when using position:fixed elements
// inside WebKit browsers (iOS specifically).
// See CB-6444 for context.
if (Keyboard.automaticScrollToTopOnHiding) {
document.body.scrollLeft = 0;
}
cordova.fireWindowEvent('keyboardWillHide');
if(Keyboard.onhiding) {
Keyboard.onhiding();
}
};
Keyboard.fireOnShowing = function() {
cordova.fireWindowEvent('keyboardWillShow');
if(Keyboard.onshowing) {
Keyboard.onshowing();
}
};
Keyboard.show = function() {
exec(null, null, "Keyboard", "show", []);
};
Keyboard.hide = function() {
exec(null, null, "Keyboard", "hide", []);
};
Keyboard.isVisible = false;
Keyboard.automaticScrollToTopOnHiding = false;
module.exports = Keyboard;
});

View File

@ -1,14 +0,0 @@
cordova.define("nl.madebymark.share.Share", function(require, exports, module) { module.exports = function(text,title,mimetype,success,error){
if(typeof text !== "string") {
text = "";
}
if(typeof title !== "string") {
title = "Share";
}
if(typeof mimetype !== "string") {
mimetype = "text/plain";
}
cordova.exec(success,error,"Share","share",[text,title,mimetype]);
return true;
};
});

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,6 @@
/*!
localForage -- Offline Storage, Improved
Version 1.9.0
https://localforage.github.io/localForage
(c) 2013-2017 Mozilla, Apache License 2.0
*/

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"scripts/localforage.js","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let a=Promise.resolve();return i[e]||(a=new Promise(async a=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=a}else importScripts(e),a()})),a.then(()=>{if(!i[e])throw new Error(`Module ${e} didnt register its module`);return i[e]})},a=(a,i)=>{Promise.all(a.map(e)).then(e=>i(1===e.length?e[0]:e))},i={require:Promise.resolve(a)};self.define=(a,t,r)=>{i[a]||(i[a]=Promise.resolve().then(()=>{let i={};const c={uri:location.origin+a.slice(1)};return Promise.all(t.map(a=>{switch(a){case"exports":return i;case"module":return c;default:return e(a)}})).then(e=>{const a=r(...e);return i.default||(i.default=a),i})}))}}define("./service-worker.js",["./workbox-69b5a3b7"],(function(e){"use strict";self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),e.precacheAndRoute([{url:"autobundle.js",revision:"13c52d778d9424443ebc2f01ea905320"},{url:"autohtml/abstractWindowTemplate.html",revision:"6c3ea1af1622920ddbc5bf4b548792f1"},{url:"autohtml/alphabeticListFragment.html",revision:"17b160c9c961ee83eced3a2c7d5f7749"},{url:"autohtml/changeUserSite.html",revision:"32ca48dd5c17c3ca7259a192c6ad3e5f"},{url:"autohtml/chooseDialog.html",revision:"1e4a0cfb29c721b64799c342f7586ad6"},{url:"autohtml/contactSite.html",revision:"2cdee4e20c1728e1f8e03110cbfcbd4c"},{url:"autohtml/container.html",revision:"7c9ef0046546b6535e2197845804df3d"},{url:"autohtml/credits.html",revision:"7ad14642353efd449a3890122bb73b1e"},{url:"autohtml/end.html",revision:"162cd57d50145eb4dbf51ca7bc97256a"},{url:"autohtml/forgotPasswordSite.html",revision:"ef290b527ae9e6ecf6e2ec31ecc99b87"},{url:"autohtml/impressum.html",revision:"1533d5dba0bd88309b004d65bc59c5f1"},{url:"autohtml/level.html",revision:"05cef7e7e823c25ed8bb735da3cf585b"},{url:"autohtml/loginSite.html",revision:"28536b28261bdd966784e32ef8e8bda2"},{url:"autohtml/menu.html",revision:"a356869e90f07077cc3a07dd36c238c5"},{url:"autohtml/menuSite.html",revision:"926a7a940ae8741445644f16132a9f20"},{url:"autohtml/navbar.html",revision:"04c4cb0adaa4e69cb43fb35cc8482b0a"},{url:"autohtml/notAllowedSite.html",revision:"da6b73654dccd61eebe8f4f1ba06e340"},{url:"autohtml/privacyPolicy.html",revision:"7319848c6b090b0af30ac56492101ee8"},{url:"autohtml/registrationSite.html",revision:"0911eeabc518befa874ea1661b64c3d7"},{url:"autohtml/selectUserDialog.html",revision:"23ae55ef46c250f2ab2528f4422a14d6"},{url:"autohtml/settings.html",revision:"d8a6ead5c9f8dd6f6319b61caab9d359"},{url:"autohtml/settingsSite.html",revision:"06f47ad4321d3ede658035e0411df0b0"},{url:"autohtml/shareDialog.html",revision:"cc8b45e9c7f6264e7b61d6da3e6210c6"},{url:"autohtml/swipeFragment.html",revision:"553c580ff0a282c49a2efe35dabad809"},{url:"autohtml/tabFragment.html",revision:"ca8c3b2c4a353a0ee7900aef656cc958"},{url:"autoimg/arrowLeft.svg",revision:"6bbb4f0e313bb88cd0cc80c2b3cd36fc"},{url:"autoimg/background.png",revision:"be3db85ac9a143f4bcac7db7f5a4856e"},{url:"autoimg/brightAndBeautifull__.mp3",revision:"2b40fd6c076d254cf639f8f46819d5ca"},{url:"autoimg/coin.png",revision:"5b380862ff8349f6b4b8d5241893f508"},{url:"autoimg/coinTower.png",revision:"50cef0780a1affcd301c2c4be09ccb25"},{url:"autoimg/errorIcon.png",revision:"b48a01a1871b83b30c317f0fc4aed555"},{url:"autoimg/help.png",revision:"45a8dc0493279dc37f72f8026af5bc10"},{url:"autoimg/logo.png",revision:"5246599497de18a878951e1e98083493"},{url:"autoimg/music.svg",revision:"ce36074e94a8d19dfa383f98bd66a1f4"},{url:"autoimg/settings.png",revision:"c44ce577ac56632e53208833ff78e67f"},{url:"autoimg/share.svg",revision:"ac8fc0221ee400fc843090a834df7c9d"},{url:"autoimg/single_coin_fall_on_concrete_.mp3",revision:"7f0de4f503644a7fc14de7e307bbf722"},{url:"autoimg/speaker.svg",revision:"0d926850f1558dd431e1c6b10fe0c2ef"},{url:"autoimg/telegram.svg",revision:"e366fed4603e06142a2d6b8221be51b8"},{url:"autoimg/whatsapp.svg",revision:"0fa4092ac1f91a5390e74a3c2c03d5e3"},{url:"autoindex.css",revision:"57dd368ab96459de433a2a3cbacc765d"},{url:"autoindex.html",revision:"d9da26b18b24767c7bedb06a44bc31ce"},{url:"autoscripts/localforage.js",revision:"7ae08028a75fed2acce92b8e75fbe08c"},{url:"autoscripts/sql-wasm.js",revision:"b34648b4b4c89ba52bcd7468fa035583"},{url:"autosql-wasm.wasm",revision:"bff856e0a3429d33cfb88d20b7f9fcff"}],{})}));
//# sourceMappingURL=service-worker.js.map

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -39,7 +39,7 @@ async function startTestServer() {
stdio: "pipe"
}, reject);
child.stdout.on("data", data => {
console.log("[SERVER]", data);
console.log("[SERVER]", data);
if (data.indexOf("Server started on Port: ") !== -1){
resolve();
}

View File

@ -5,7 +5,7 @@ const functions = require("../../lib/functions.js");
async function solveLevel() {
await functions.pause(500);
await browser.executeAsync((delayFactor, done) => {
await browser.executeAsync(async (delayFactor, done) => {
const delay = 100*delayFactor;
let promise = Promise.resolve();
@ -69,6 +69,7 @@ describe("fsj suite", () => {
let baseUrl = null;
beforeAll(async () => {
if (browser.config.baseUrl.trim() !== "") {
baseUrl = browser.config.baseUrl;
} else {
@ -81,6 +82,7 @@ describe("fsj suite", () => {
});
beforeEach(async function () {
await browser.url(baseUrl);
await browser.waitUntil(async () => {

View File

@ -56,7 +56,7 @@ exports.config = {
appium: {
args: {
chromedriverExecutable: path.join(__dirname, "misc/android/chromedriver_90"),
chromedriverExecutable: path.join(__dirname, "misc/chromedriver"),
}
},
@ -65,7 +65,7 @@ exports.config = {
capabilities: [{
automationName: "UiAutomator2",
// automationName: "Espresso",
chromedriverExecutable: path.join(__dirname, "misc/android/chromedriver_90"),
chromedriverExecutable: path.join(__dirname, "misc/chromedriver"),
// For Android, Appium uses the first device it finds using "adb devices". So, this
// string simply needs to be non-empty.

View File

@ -32,7 +32,7 @@ exports.config = {
bail: 0,
baseUrl: "http://127.0.0.1:8001",
baseUrl: "http://127.0.0.1:8000",
waitforTimeout: 10000,
@ -58,7 +58,6 @@ exports.config = {
maxInstances: 1,
}],
onPrepare: async function(){
console.log("on prepare");
await Service.setup();
},
onComplete: async function(){

View File

@ -8,10 +8,14 @@
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"allowJs": true,
"skipLibCheck": true
"allowJs": true
},
"include": [
// "./node_modules/cordova-sites/**/*",
// "./node_modules/cordova-sites-database/**/*",
// "./node_modules/cordova-sites-easy-sync/**/*",
// "./node_modules/cordova-sites-user-management/**/*",
// "./node_modules/js-helper/**/*",
"./src/client/**/*",
"./src/shared/**/*"
],

View File

@ -6,7 +6,7 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");
const webpack = require('webpack');
const path = require("path");
// const WorkboxPlugin = require('workbox-webpack-plugin');
const WorkboxPlugin = require('workbox-webpack-plugin');
const os = require('os');
const ifaces = os.networkInterfaces();
@ -55,7 +55,7 @@ let moduleExports = {
},
optimization: {
minimize: false,
// minimize: false,
minimizer: [
new TerserPlugin({
terserOptions: {
@ -90,20 +90,21 @@ let moduleExports = {
//Delete www before every Build (to only have nessesary files)
new CleanWebpackPlugin({cleanOnceBeforeBuildPatterns: ['**/*', '!**/.gitkeep']}),
new CopyWebpackPlugin([
{
from: path.resolve("./node_modules/sql.js/dist/sql-wasm.js"),
to: "scripts/"
},
{
from: path.resolve("./node_modules/sql.js/dist/sql-wasm.wasm"),
to: "sql-wasm.wasm"
},
{
from: path.resolve("./node_modules/localforage/dist/localforage.js"),
to: "scripts/"
},]
),
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve("./node_modules/sql.js/dist/sql-wasm.js"),
to: "scripts/"
},
{
from: path.resolve("./node_modules/sql.js/dist/sql-wasm.wasm"),
to: "sql-wasm.wasm"
},
{
from: path.resolve("./node_modules/localforage/dist/localforage.js"),
to: "scripts/"
},]
}),
new webpack.NormalModuleReplacementPlugin(/typeorm$/, function (result) {
result.request = result.request.replace(/typeorm/, "typeorm/browser");
@ -113,7 +114,6 @@ let moduleExports = {
new HtmlWebpackPlugin({
template: 'src/client/index.html'
}),
new webpack.DefinePlugin({
__HOST_ADDRESS__: "'" + (process.env.HOST_URI || ((process.env.HOST || ("http://" + getIp())) + ":" + (process.env.REQUEST_PORT || process.env.PORT || "3000") + "/api/v1/")) + "'",
__SYNCHRONIZE_DB__: mode !== "production",
@ -121,9 +121,9 @@ let moduleExports = {
__CONTACT_EMAIL__: "'" + process.env.CONTACT_EMAIL + "'",
}),
// new WorkboxPlugin.GenerateSW({
// maximumFileSizeToCacheInBytes: 1024 * 1024 * 1024 * 5
// }),
new WorkboxPlugin.GenerateSW({
maximumFileSizeToCacheInBytes: 1024 * 1024 * 1024 * 5
}),
// new webpack.ProvidePlugin({
// 'window.initSqlJs': path.join(__dirname, 'node_modules/sql.js/dist/sql-asm.js'),
@ -161,8 +161,7 @@ let moduleExports = {
urlFilter: (attribute, value, resourcePath) => {
return !value.endsWith(".js") && !value.endsWith(".css");
}
},
esModule: false
}
}
}
],
@ -205,8 +204,7 @@ let moduleExports = {
urlFilter: (attribute, value, resoucePath) => {
return true;
}
},
esModule: false
}
}
}
],
@ -255,10 +253,7 @@ let moduleExports = {
loader: 'extract-loader'
},
{
loader: 'css-loader',
options: {
esModule: false
}
loader: 'css-loader'
},
{
//Compiliert zu CSS