Compare commits

..

No commits in common. "5595bbda61d4164ef7afe69bffcc848a9d49db4b" and "0d70067fe4ce854e7eed72d00a7561e97a416c07" have entirely different histories.

389 changed files with 19799 additions and 47591 deletions

19
.gitignore vendored
View File

@ -1,19 +0,0 @@
### ApacheCordova ###
# Apache Cordova generated files and directories
bin/*
!/plugins
!/plugins/android.json
!/plugins/fetch.json
plugins/*
platforms/*
/www/*
node_modules/*
/node_modules/*
www/index.js
js/**/*.js
js/**/*.js.map
.env
#idea-ide
/.idea/*

View File

@ -1,5 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

7
.idea/vcs.xml generated
View File

@ -2,5 +2,12 @@
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" /> <mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/vendor/ainias/pwa-assets" vcs="Git" />
<mapping directory="$PROJECT_DIR$/vendor/ainias/pwa-lib" vcs="Git" />
<mapping directory="$PROJECT_DIR$/vendor/ainias/pwa-zf-code-management" vcs="Git" />
<mapping directory="$PROJECT_DIR$/vendor/ainias/pwa-zf-contact" vcs="Git" />
<mapping directory="$PROJECT_DIR$/vendor/ainias/pwa-zf-core" vcs="Git" />
<mapping directory="$PROJECT_DIR$/vendor/ainias/pwa-zf-cronjob" vcs="Git" />
<mapping directory="$PROJECT_DIR$/vendor/ainias/pwa-zf-user-management" vcs="Git" />
</component> </component>
</project> </project>

View File

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

24
bin/afterUpdate.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
cd $(dirname "$0")/..
sourceDir=dist/public/*
jsSourceDir=dist/js/
scssSourdeDir=pwa/scss/
rm -rf src/scss/lib
mkdir -p src/js/lib/
mkdir -p src/scss/lib/
for d in "vendor/ainias/pwa"*/; do
find $d$jsSourceDir -name '*.js' -exec cp -r '{}' src/js/lib/ \;
find $d$scssSourdeDir -name '*.scss' -exec cp -r '{}' src/scss/lib/ \;
cp -r -R $d$sourceDir public/
done
node bin/concatTranslator.js
node bin/createImportScss.js
bin/build.sh

91
bin/build.js Executable file
View File

@ -0,0 +1,91 @@
const shouldIncludeSourcemap = (process.argv.length >= 3 && process.argv[2] === "2");
const shouldMangleAndTranspile = shouldIncludeSourcemap || (process.argv.length >= 3 && process.argv[2] === "1");
// const shouldMangleAndTranspile = (process.argv.wordLength >= 3 && process.argv[2] === "1"); || true;
const rollup = require('rollup');
const fs = require('fs');
var uglifyJs = null;
var babel = null;
var regenerator = null;
if (shouldMangleAndTranspile) {
uglifyJs = require('uglify-es');
babel = require('babel-core');
regenerator = require('regenerator');
}
let uglifyOptions = {
ecma: "es6",
mangle: {
// ecma:"es6",
properties: {
keep_quoted: true,
builtins: false,
reserved: require('../node_modules/uglify-es/tools/domprops')
},
// toplevel: true
},
output: {
beautify: true
}
};
let uglifyOptions2 = {
mangle: {toplevel: true}, compress: {
keep_fargs: false,
toplevel: true,
dead_code: true,
unused: true,
passes: 1,
},
};
let babelOptions = {
compact: true,
minified: true,
presets: ['env'],
// sourceMaps:"inline",
// plugins: ["regenerator-runtime"]
};
let regeneratorOptions = {
includeRuntime: true,
// sourceMaps:"inline",
};
if (shouldIncludeSourcemap){
uglifyOptions["sourceMap"] = {url: "inline"};
uglifyOptions2["sourceMap"] = {url: "inline", content: "inline"};
babelOptions["sourceMaps"] = "inline";
regeneratorOptions["sourceMaps"] = "inline";
}
const options = require('../rollup.config');
const outputOptions = options.output;
options.output = null;
const inputOptions = options;
async function build() {
const bundle = await rollup.rollup(inputOptions);
for (let i = 0, n = outputOptions.length; i < n; i++) {
let {code, map} = await bundle.generate(outputOptions[i]);
if (shouldMangleAndTranspile) {
const uglifyRes = uglifyJs.minify(code, uglifyOptions);
code = uglifyRes.code;
// fs.writeFileSync('transpiled.js', code);
const babelRes = babel.transform(code, babelOptions);
code = babelRes.code;
code = regenerator.compile(code, regeneratorOptions).code;
const uglifyRes2 = uglifyJs.minify(code, uglifyOptions2);
code = uglifyRes2.code;
}
fs.writeFileSync(outputOptions[i].file, code);
}
}
build();

4
bin/build.sh Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
cd $(dirname "$0")/..
npm run build

47
bin/concatTranslator.js Executable file
View File

@ -0,0 +1,47 @@
const moduleDirs = ['src/module', 'vendor/ainias'];
const outputDir = 'public/js/lang';
const fs = require('fs');
var translations = {};
var currentLangs = [];
for (var i = 2, n = process.argv.length; i < n; i++)
{
currentLangs.push(process.argv[i].split(".")[0]);
}
for (var i = 0, n = moduleDirs.length; i < n; i++) {
var currentModuleDir = moduleDirs[i];
var files = fs.readdirSync(currentModuleDir);
files.forEach(file => {
if (fs.existsSync(currentModuleDir + "/" + file + "/pwa/translations")) {
var translationFiles = fs.readdirSync(currentModuleDir + "/" + file + "/pwa/translations");
translationFiles.forEach(translationFile => {
var language = translationFile.split('.')[0];
if (currentLangs.length > 0 && currentLangs.indexOf(language) === -1)
{
return;
}
if (typeof translations[language] === 'undefined') {
translations[language] = {};
}
var res = fs.readFileSync(currentModuleDir + "/" + file + "/pwa/translations/" + translationFile, 'utf8');
var currentTranslations = JSON.parse(res);
for (var key in currentTranslations) {
translations[language][key] = currentTranslations[key];
}
});
}
});
}
for (var lang in translations)
{
// console.log(translations[lang]);
var langTranslations = JSON.stringify(translations[lang]);
fs.writeFile(outputDir+"/"+lang+".json", langTranslations, err => {
if (err){
throw err;
}
});
}

59
bin/createImportScss.js Normal file
View File

@ -0,0 +1,59 @@
const dir = "src/scss/lib";
const outputDir = "src/scss";
const fs = require('fs');
var settingsToImportString = "";
var filesToImportString = "";
var files = fs.readdirSync(dir);
files.forEach(file => {
let newFileName = file;
if (!fs.lstatSync(dir + "/" + file).isDirectory()) {
if (!file.startsWith("_")) {
newFileName = "_" + newFileName;
}
if (file.endsWith("settings.scss") || file.endsWith("Settings.scss")){
settingsToImportString += '@import "lib/' + newFileName + '";\n';
}
else{
filesToImportString += '@import "lib/' + newFileName + '";\n';
}
fs.readFile(dir + "/" + file, 'utf8',function (err, data) {
if (err) {
return console.log(err);
}
// console.log(data.match(/@import "\.\.\//g));
var result = data.replace(/@import "\.\.\//g, '@import "../../');
result = result.replace(/@import "[a-zA-z].*[\n\r]/g, "");
result = result.replace(/@import '\.\.\//g, "@import '../../");
result = result.replace(/@import '[a-zA-z].*[\n\r]/g, "");
// var result = data;
// console.log(result);
fs.unlink(dir + "/" + file, function (err) {
if (err) return console.log(err);
fs.writeFile(dir + "/" + newFileName, result, 'utf8', function (err) {
if (err) return console.log(err);
});
});
});
}
});
fs.writeFile(outputDir + "/_defaultSettings.scss", settingsToImportString, err => {
if (err) {
throw err;
}
});
// var newFileContent = settingsToImportString;
var newFileContent = '@import "settings";\n';
newFileContent += filesToImportString;
fs.writeFile(outputDir + "/_imports.scss", newFileContent, err => {
if (err) {
throw err;
}
});

5
bin/localLink.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
cd $(dirname "$0")/..
rm -rf /var/www/pwa/wordRotator/vendor/ainias/$2
ln -s $1 /var/www/pwa/wordRotator/vendor/ainias/$2

BIN
bin/newModule Executable file

Binary file not shown.

6
bin/test.sh Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
cd $(dirname "$0")/..
testcafe firefox test/test.testcafe.js --debug-on-fail
#node bin/testcafe.js;

25
bin/testcafe.js Normal file
View File

@ -0,0 +1,25 @@
'use strict';
const createTestCafe = require('testcafe');
const selfSignedSertificate = require('openssl-self-signed-certificate');
let runner = null;
const sslOptions = {
key: selfSignedSertificate.key,
cert: selfSignedSertificate.cert
};
createTestCafe('192.168.0.51', 5000, 5001, sslOptions).then(async testcafe => {
runner = testcafe.createRunner();
let remoteConnection = await testcafe.createBrowserConnection();
console.log(remoteConnection.url);
remoteConnection.once('ready', () => {
console.log("testing...");
return runner.src('test/test.testcafe.js').browsers(remoteConnection).run({debugOnFail: true}).then(failedCount => {
testcafe.close();
});
});
});

95
composer.json Executable file
View File

@ -0,0 +1,95 @@
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for Zend Framework zend-mvc applications",
"type": "project",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"mvc",
"zf2"
],
"homepage": "http://framework.zend.com/",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.0",
"zendframework/zend-component-installer": "^1.0 || ^0.7 || ^1.0.0-dev@dev",
"zendframework/zend-mvc": "^3.0.1",
"zfcampus/zf-development-mode": "^3.0",
"zendframework/zend-mvc-form": "^1.0",
"zendframework/zend-json": "^3.0",
"zendframework/zend-log": "^2.9",
"zendframework/zend-mvc-console": "^1.1.10",
"zendframework/zend-mvc-i18n": "^1.0",
"zendframework/zend-mvc-plugins": "^1.0.1",
"zendframework/zend-psr7bridge": "^0.2.2",
"zendframework/zend-session": "^2.7.1",
"zendframework/zend-servicemanager-di": "^1.0",
"zendframework/zend-navigation": "^2.8",
"zendframework/zend-modulemanager": "^2.7",
"zendframework/zend-servicemanager": "^3.1",
"zendframework/zend-mvc-plugin-flashmessenger": "^1.0",
"zendframework/zend-mail": "^2.7",
"zendframework/zend-permissions-acl": "^2.6",
"ccampbell/chromephp": "^4.1",
"doctrine/doctrine-module": "*",
"doctrine/doctrine-orm-module": "^1.1",
"ainias/pwa-zf-user-management": "dev-es6 as 0.0.10",
"ainias/pwa-zf-cronjob":"dev-es6 as 0.0.10",
"ainias/pwa-zf-code-management":"dev-es6 as 0.0.10",
"ainias/pwa-zf-core":"dev-es6 as 0.0.10",
"ainias/pwa-zf-contact": "dev-master as 0.0.10",
"ainias/pwa-lib": "dev-es6 as 0.0.10",
"ainias/pwa-assets": "dev-es6 as 0.0.10",
"ext-json": "*"
},
"autoload": {
"psr-4": {
"Application\\": "src/module/Application/src/"
}
},
"autoload-dev": {
"psr-4": {}
},
"extra": [],
"scripts": {
"development-disable": "zf-development-mode disable",
"development-enable": "zf-development-mode enable",
"development-status": "zf-development-mode status",
"serve": "php -S 0.0.0.0:8080 -t public/ public/index.php",
"post-update-cmd": "./bin/afterUpdate.sh"
},
"require-dev": {
},
"repositories": [
{
"type": "vcs",
"url": "silas.link:pwaContact"
},
{
"type": "vcs",
"url": "silas.link:pwaCore"
},
{
"type":"vcs",
"url":"silas.link:pwaLib"
},
{
"type": "vcs",
"url": "silas.link:pwaCronjob"
},
{
"type":"vcs",
"url":"silas.link:pwaCodeManagement"
},
{
"type": "vcs",
"url": "silas.link:pwaUserManagement"
},
{
"type":"vcs",
"url":"silas.link:pwaAssets"
}
]
}

View File

@ -1,39 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<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>
<author email="wordrotator@silas.link" href="https://wordrotator.silas.link">
Silas Günther
</author>
<content src="index.html" />
<icon src="src/client/img/logo.png" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
</edit-config>
<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>

68
config/application.config.php Executable file
View File

@ -0,0 +1,68 @@
<?php
/**
* @see http://framework.zend.com/manual/current/en/tutorials/config.advanced.html#environment-specific-system-configuration
* @see http://framework.zend.com/manual/current/en/tutorials/config.advanced.html#environment-specific-application-configuration
*/
return [
// Retrieve list of modules used in this application.
'modules' => require __DIR__ . '/modules.config.php',
// These are various options for the listeners attached to the ModuleManager
'module_listener_options' => [
// This should be an array of paths in which modules reside.
// If a string key is provided, the listener will consider that a module
// namespace, the value of that key the specific path to that module's
// Module class.
'module_paths' => [
'./src/module',
'./vendor',
],
// An array of paths from which to glob configuration files after
// modules are loaded. These effectively override configuration
// provided by modules themselves. Paths may use GLOB_BRACE notation.
'config_glob_paths' => [
realpath(__DIR__) . '/autoload/{,*.}global.php',
realpath(__DIR__) . '/autoload/local.php',
],
// Whether or not to enable a configuration cache.
// If enabled, the merged configuration will be cached and used in
// subsequent requests.
'config_cache_enabled' => true,
// The key used to create the configuration cache file name.
'config_cache_key' => 'application.config.cache',
// Whether or not to enable a module class map cache.
// If enabled, creates a module class map cache which will be used
// by in future requests, to reduce the autoloading process.
'module_map_cache_enabled' => true,
// The key used to create the class map cache file name.
'module_map_cache_key' => 'application.module.cache',
// The path in which to cache merged configuration.
'cache_dir' => 'data/cache/',
// Whether or not to enable modules dependency checking.
// Enabled by default, prevents usage of modules that depend on other modules
// that weren't loaded.
// 'check_dependencies' => true,
],
// Used to create an own service manager. May contain one or more child arrays.
//'service_listener_options' => [
// [
// 'service_manager' => $stringServiceManagerName,
// 'config_key' => $stringConfigKey,
// 'interface' => $stringOptionalInterface,
// 'method' => $stringRequiredMethodName,
// ],
// ],
// Initial configuration with which to seed the ServiceManager.
// Should be compatible with Zend\ServiceManager\Config.
// 'service_manager' => [],
];

View File

@ -0,0 +1,57 @@
<?php
/**
* Local Configuration Override
*
* This configuration override file is for overriding environment-specific and
* security-sensitive configuration information. Copy this file without the
* .dist extension at the end and populate values as needed.
*
* @NOTE: This file is ignored from Git by default with the .gitignore included
* in ZendSkeletonApplication. This is a good practice, as it prevents sensitive
* credentials from accidentally being committed into version control.
*/
return [
'doctrine' => [
'connection' => array(
'default' => array(
'params' => [
'user' => 'silas',
'password' => 'AbGonWigogNulfAyp',
'host' => '127.0.0.1',
'dbname' => 'silas_beta_wordRotator',
'driverOptions' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'
),
'useStrict' => true,
],
),
),
],
'mailEinstellungen' => array(
'options' => array(
'name' => 'WordRotator - Beta',
'host' => 'eltanin.uberspace.de',
'port' => '587',
'connection_class' => 'plain', // plain oder login
'connection_config' => array(
'username' => 'silas',
'password' => 'l$?%u<M4j)|>sN\\Oj\\/l0VQ%IF',
'ssl' => 'tls',
),
),
'sender' => 'beta@silas.link',
),
"contact" => [
"prefix" => "[WR]",
"contact-email" => "beta@silas.link",
"contact-name" => "Admin",
],
'systemvariablen' => array(
'passwordHash' => 'hencxkgj',
'websiteName' => 'WordRotator - Beta',
'maxAgeOfUserCodes' => 2 //In Tagen
),
];

69
config/autoload/global.php Executable file
View File

@ -0,0 +1,69 @@
<?php
/**
* Global Configuration Override
*
* You can use this file for overriding configuration values from modules, etc.
* You would place values in here that are agnostic to the environment and not
* sensitive to security.
*
* @NOTE: In practice, this file will typically be INCLUDED in your source
* control, so do not include passwords or other sensitive information in this
* file.
*/
use Zend\Session;
return [
'db' => array(
'driver' => 'Pdo',
'driver_options' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
),
'charset' => "UTF8",
),
'appVariables' => [
],
'doctrine' => array(
'driver' => array(
'entities' => array(
'class' => \Doctrine\ORM\Mapping\Driver\AnnotationDriver::class,
'cache' => 'array',
),
),
),
'session_config' => array(
'options' => array(
'name' => 'silasLinkId',
'cookie_httponly' => true,
),
// 'storage' => 'Zend\Session\Storage\SessionArrayStorage',
// 'validators' =>
),
'session_storage' => array(
'type' => Session\Storage\SessionArrayStorage::class,
),
'session_validators' => array(
'Zend\Session\Validator\RemoteAddr',
'Zend\Session\Validator\HttpUserAgent',
),
'session' => [
'config' => [
'class' => Session\Config\SessionConfig::class,
'options' => [
'name' => 'myapp',
],
],
'storage' => Session\Storage\SessionArrayStorage::class,
'validators' => [
// Session\Validator\RemoteAddr::class,
// Session\Validator\HttpUserAgent::class,
],
],
"userManager" => [
"canRegister" => false
],
];

72
config/autoload/local.php Executable file
View File

@ -0,0 +1,72 @@
<?php
/**
* Local Configuration Override
*
* This configuration override file is for overriding environment-specific and
* security-sensitive configuration information. Copy this file without the
* .dist extension at the end and populate values as needed.
*
* @NOTE: This file is ignored from Git by default with the .gitignore included
* in ZendSkeletonApplication. This is a good practice, as it prevents sensitive
* credentials from accidentally being committed into version control.
*/
if (!is_null($_SERVER) && isset($_SERVER["REQUEST_URI"]))
{
$uri = explode("/", $_SERVER["REQUEST_URI"]);
if ($uri[3] === "publicTest")
return include "test.local.php";
}
return [
'doctrine' => [
'connection' => array(
'default' => array(
'params' => [
'user' => 'root',
'password' => '123456',
'host' => '127.0.0.1',
'dbname' => 'silas_wordRotator',
'driverOptions' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'
),
'useStrict' => true,
'charset' => 'utf8'
],
),
),
],
'mailEinstellungen' => array(
'options' => array(
'name' => 'Stories',
'host' => 'eltanin.uberspace.de',
'port' => '587',
'connection_class' => 'plain', // plain oder login
'connection_config' => array(
'username' => 'silas',
'password' => 'l$?%u<M4j)|>sN\\Oj\\/l0VQ%IF',
'ssl' => 'tls',
),
),
'sender' => 'local@silas.link',
),
"contact" => [
"prefix" => "[WR]",
"contact-email" => "wordrotator@silas.link",
"contact-name" => "Admin",
],
'systemVariables' => array(
'passwordHash' => '123',
'websiteName' => '',
'maxAgeOfUserCodes' => 2 //In Tagen
),
'view_manager' => [
'display_exceptions' => true,
],
"userManager" => [
"canRegister" => true
],
];

57
config/autoload/prod.local.php Executable file
View File

@ -0,0 +1,57 @@
<?php
/**
* Local Configuration Override
*
* This configuration override file is for overriding environment-specific and
* security-sensitive configuration information. Copy this file without the
* .dist extension at the end and populate values as needed.
*
* @NOTE: This file is ignored from Git by default with the .gitignore included
* in ZendSkeletonApplication. This is a good practice, as it prevents sensitive
* credentials from accidentally being committed into version control.
*/
return [
'doctrine' => [
'connection' => array(
'default' => array(
'params' => [
'user' => 'silas',
'password' => 'AbGonWigogNulfAyp',
'host' => '127.0.0.1',
'dbname' => 'silas_WordRotator',
'driverOptions' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'
),
'useStrict' => true,
],
),
),
],
'mailEinstellungen' => array(
'options' => array(
'name' => 'WordRotator',
'host' => 'eltanin.uberspace.de',
'port' => '587',
'connection_class' => 'plain', // plain oder login
'connection_config' => array(
'username' => 'silas',
'password' => 'l$?%u<M4j)|>sN\\Oj\\/l0VQ%IF',
'ssl' => 'tls',
),
),
'sender' => 'wordRotator@silas.link',
),
"contact" => [
"prefix" => "[WR]",
"contact-email" => "wordrotator@silas.link",
"contact-name" => "Admin",
],
'systemvariablen' => array(
'passwordHash' => 'kxykgdgkhxyfbgxhjipab-lmk<s52f',
'websiteName' => 'WordRotator',
'maxAgeOfUserCodes' => 2 //In Tagen
),
];

View File

@ -0,0 +1,51 @@
<?php
return [
'doctrine' => [
'connection' => array(
'default' => array(
'params' => [
'user' => 'root',
'password' => '123456',
'host' => '127.0.0.1',
'dbname' => 'silas_beta_wordRotator',
'driverOptions' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'
),
'useStrict' => true,
],
),
),
],
'mailEinstellungen' => array(
'options' => array(
'name' => 'test.wordrotator',
'host' => 'eltanin.uberspace.de',
'port' => '587',
'connection_class' => 'plain', // plain oder login
'connection_config' => array(
'username' => 'silas',
'password' => 'l$?%u<M4j)|>sN\\Oj\\/l0VQ%IF',
'ssl' => 'tls',
),
),
'sender' => 'test.framework@silas.link',
),
"contact" => [
"prefix" => "[WR]",
"contact-email" => "local@silas.link",
"contact-name" => "Admin",
],
'systemVariables' => array(
'passwordHash' => 'sdvsdg',
'websiteName' => 'Test.WordRotator',
'maxAgeOfUserCodes' => 2 //In Tagen
),
'view_manager' => [
'display_exceptions' => true,
],
"userManager" => [
"canRegister" => true
],
];

View File

@ -0,0 +1,159 @@
<?php
/**
* This is configuration for the ZendDeveloperTools development toolbar.
*
* It will be enabled when you enable development mode.
*/
return [
'zenddevelopertools' => [
/**
* General Profiler settings
*/
'profiler' => [
/**
* Enables or disables the profiler.
*
* Expects: bool
* Default: true
*/
'enabled' => true,
/**
* Enables or disables the strict mode. If the strict mode is enabled, any error will throw an exception,
* otherwise all errors will be added to the report (and shown in the toolbar).
*
* Expects: bool
* Default: true
*/
'strict' => true,
/**
* If enabled, the profiler tries to flush the content before the it starts collecting data. This option
* will be ignored if the Toolbar is enabled.
*
* Note: The flush listener listens to the MvcEvent::EVENT_FINISH event with a priority of -9400. You have
* to disable this function if you wish to modify the output with a lower priority.
*
* Expects: bool
* Default: false
*/
'flush_early' => false,
/**
* The cache directory is used in the version check and for every storage type that writes to the disk.
* Note: The default value assumes that the current working directory is the application root.
*
* Expects: string
* Default: 'data/cache'
*/
'cache_dir' => 'data/cache',
/**
* If a matches is defined, the profiler will be disabled if the request does not match the pattern.
*
* Example: 'matcher' => array('ip' => '127.0.0.1')
* OR
* 'matcher' => array('url' => array('path' => '/admin')
* Note: The matcher is not implemented yet!
*/
'matcher' => [],
/**
* Contains a list with all collector the profiler should run. Zend Developer Tools ships with
* 'db' (Zend\Db), 'time', 'event', 'memory', 'exception', 'request' and 'mail' (Zend\Mail). If you wish to
* disable a default collector, simply set the value to null or false.
*
* Example: 'collectors' => array('db' => null)
* Expects: array
*/
'collectors' => [],
],
'events' => [
/**
* Set to true to enable event-level logging for collectors that will support it. This enables a wildcard
* listener onto the shared event manager that will allow profiling of user-defined events as well as the
* built-in ZF events.
*
* Expects: bool
* Default: false
*/
'enabled' => true,
/**
* Contains a list with all event-level collectors that should run. Zend Developer Tools ships with 'time'
* and 'memory'. If you wish to disable a default collector, simply set the value to null or false.
*
* Example: 'collectors' => array('memory' => null)
* Expects: array
*/
'collectors' => [],
/**
* Contains event identifiers used with the event listener. Zend Developer Tools defaults to listen to all
* events. If you wish to disable the default all-inclusive identifier, simply set the value to null or
* false.
*
* Example: 'identifiers' => array('all' => null, 'dispatchable' => 'Zend\Stdlib\DispatchableInterface')
* Expects: array
*/
'identifiers' => [],
],
/**
* General Toolbar settings
*/
'toolbar' => [
/**
* Enables or disables the Toolbar.
*
* Expects: bool
* Default: false
*/
'enabled' => true,
/**
* If enabled, every empty collector will be hidden.
*
* Expects: bool
* Default: false
*/
'auto_hide' => false,
/**
* The Toolbar position.
*
* Expects: string ('bottom' or 'top')
* Default: bottom
*/
'position' => 'bottom',
/**
* If enabled, the Toolbar will check if your current Zend Framework version is up-to-date.
* Note: The check will only occur once every hour.
*
* Expects: bool
* Default: false
*/
'version_check' => false,
/**
* Contains a list with all collector toolbar templates. The name of the array key must be same as the name
* of the collector.
*
* Example: 'profiler' => array(
* 'collectors' => array(
* // My_Collector_Example::getName() -> mycollector
* 'MyCollector' => 'My_Collector_Example',
* )
* ),
* 'toolbar' => array(
* 'entries' => array(
* 'mycollector' => 'example/toolbar/my-collector',
* )
* ),
* Expects: array
*/
'entries' => [],
],
],
];

15
config/development.config.php Executable file
View File

@ -0,0 +1,15 @@
<?php
return [
// Additional modules to include when in development mode
'modules' => [
// 'ZendDeveloperTools',
// 'ZendDeveloperToolsTime',
],
// Configuration overrides during development mode
'module_listener_options' => [
'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}-development.php'],
'config_cache_enabled' => false,
'module_map_cache_enabled' => false,
],
];

37
config/modules.config.php Executable file
View File

@ -0,0 +1,37 @@
<?php
/**
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
* @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/**
* List of enabled modules for this application.
*
* This should be an array of module namespaces used in the application.
*/
return [
'Zend\ServiceManager\Di',
'Zend\Session',
'Zend\Mvc\Plugin\Prg',
'Zend\Mvc\Plugin\Identity',
'Zend\Mvc\Plugin\FlashMessenger',
'Zend\Mvc\Plugin\FilePrg',
'Zend\Mvc\I18n',
'Zend\Mvc\Console',
'Zend\Log',
'Zend\Form',
'Zend\Router',
'Zend\Validator',
'DoctrineModule',
'DoctrineORMModule',
'Ainias\Core',
'Ainias\Contact',
'Ainias\Cronjob',
'Ainias\CodeManagement',
'Ainias\UserManagement',
'Application',
];

0
orga/database.sql Normal file → Executable file
View File

0
orga/deleteLevels.txt Normal file → Executable file
View File

0
orga/requirements.list Normal file → Executable file
View File

128
package.json Normal file → Executable file
View File

@ -1,111 +1,33 @@
{ {
"name": "wordrotator", "_name": "stories",
"displayName": "WordRotator", "version": "0.0.1",
"version": "1.1.0", "description": "",
"main": "index.js", "private": true,
"scripts": { "scripts": {
"server": "ts-node src/server/index.ts", "build": "node bin/build.js"
"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",
"test android": "wdio tests/wdio.config.android.js",
"selenium": "selenium-standalone",
"typeorm": "ts-node ./node_modules/typeorm/cli -f ./ormconfig.ts"
}, },
"dependencies": { "dependencies": {
"@types/node": "^14.11.8", "autoprefixer": "^7.1.4",
"body-parser": "^1.19.0", "cssnano": "^3.10.0",
"cordova-android": "^9.0.0", "foundation-sites": "^6.4.1",
"cordova-browser": "^6.0.0", "uglify-js2": "^2.1.11"
"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+ssh://git@github.com/Ainias/event-manager.git#0.2",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"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.4.14",
"sql.js": "1.3.2",
"ts-node": "9.0.0",
"typeorm": "^0.2.28"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.12.1", "babel-core": "^6.26.0",
"@babel/plugin-transform-runtime": "^7.12.1", "babel-plugin-transform-class-properties": "^6.24.1",
"@babel/polyfill": "^7.12.1", "babel-plugin-transform-object-rest-spread": "^6.26.0",
"@babel/preset-env": "^7.12.1", "babel-plugin-uglify": "^1.0.2",
"@wdio/appium-service": "^6.6.3", "babel-preset-env": "^1.6.1",
"@wdio/cli": "^6.6.6", "babel-preset-es2015": "^6.24.1",
"@wdio/jasmine-framework": "^6.6.6", "babel-preset-latest": "^6.24.1",
"@wdio/local-runner": "^6.6.6", "regenerator": "^0.13.2",
"@wdio/selenium-standalone-service": "^6.6.5", "rollup": "^0.57.1",
"@wdio/spec-reporter": "^6.6.6", "rollup-plugin-babel": "^3.0.3",
"appium": "1.15.1", "uglify-es": "^3.3.9",
"appium-doctor": "^1.15.3", "testcafe": "^0.22.1-alpha.3",
"autoprefixer": "^10.0.1", "openssl-self-signed-certificate": "^1.1.6"
"babel-loader": "^8.1.0",
"babel-preset-env": "^1.7.0",
"clean-webpack-plugin": "^3.0.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-tts": "^0.2.3",
"cordova-plugin-webpack": "^1.0.5",
"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.1.1",
"html-loader": "^1.3.2",
"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",
"ts-loader": "^8.0.5",
"typescript": "^4.0.3",
"webpack": "^5.1.2",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
"workbox-precaching": "^5.1.4",
"workbox-webpack-plugin": "^5.1.4"
}, },
"cordova": { "input": "src/js/init.js",
"plugins": { "output": "public/js/app.js",
"cordova-plugin-webpack": {}, "namesOutput": "public/version/x/app.names.json"
"cordova-plugin-whitelist": {},
"cordova-plugin-nativestorage": {},
"cordova-plugin-keyboard": {},
"cordova-plugin-tts": {},
"cordova-plugin-device": {},
"cordova-plugin-file": {},
"cordova-sqlite-storage": {}
},
"platforms": [
"browser",
"ios",
"android"
]
},
"private": true,
"browserslist": [
"last 2 versions",
"ie >= 9",
"android >= 4.4",
"ios >= 7"
]
} }

6
postcss.config.js Executable file
View File

@ -0,0 +1,6 @@
module.exports = {
plugins: [
require('autoprefixer')({}),
require('cssnano')({reduceIdents:false, zindex:false})
]
};

51
public/.htaccess Executable file
View File

@ -0,0 +1,51 @@
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^\.htaccess$ - [F]
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L]
# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting or installed the project in a subdirectory,
# the base path will be prepended to allow proper resolution of
# the index.php file; it will work in non-aliased environments
# as well, providing a safe, one-size fits all solution.
#RewriteCond %{REQUEST_URI}::$1 ^/((data|cached)/.*)::\2$
#RewriteRule ^(.*)$ %{ENV:BASE}/data.php [L]
RewriteCond %{REQUEST_URI}::$1 ^(/?.*)/((data|cached)/.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{REQUEST_URI}::$1 ^(/?.*)/((data|cached)/.*)::\2$
RewriteRule ^(.*)$ %{ENV:BASE}/data.php [L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}/index.html [L]
Options -Indexes
<IfModule mod_mime.c>
AddType application/x-javascript .js
AddType text/css .css
</IfModule>
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
<IfModule mod_setenvif.c>
SetEnvIfNoCase Request_URI \.(?:rar|zip)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:gif|jpg|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:avi|mov|mp4)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>

1
public/core/html/load.html Executable file
View File

@ -0,0 +1 @@
<div class=loader><svg viewBox="0 0 32 32" width=32 height=32><circle r=14 id=spinner cx=16 cy=16 fill=none></circle></svg></div>

1
public/core/html/settings.html Executable file
View File

@ -0,0 +1 @@
<div class="max-height fill-me"><h2 data-translation=settings></h2><div class="settings-container grow"><div class="row max-height"><div class="columns small-12 medium-4"><h3 class=show-for-medium>&nbsp;</h3><ul class="menu vertical plain dropdown" id=settings-fragment-list></ul></div><div class="columns small-12 medium-8 max-height" id=settings-fragments-container><div id=settings-fragments></div></div></div></div></div>

View File

@ -0,0 +1 @@
<div class=listjs><div class=sending-loader><div class=loader><svg viewBox="0 0 32 32" width=32 height=32><circle r=14 id=spinner cx=16 cy=16 fill=none></circle></svg></div></div><div><label><input class=fuzzy-search> <span data-translation=search></span></label><span class=right><span data-translation=site></span><ul class=pagination></ul></span></div><table class=max-width><thead><tbody class=list><tfoot></table></div>

2
public/css/foundation.css vendored Normal file

File diff suppressed because one or more lines are too long

1
public/css/wordRotator.css Executable file

File diff suppressed because one or more lines are too long

40
public/data.php Executable file
View File

@ -0,0 +1,40 @@
<?php
use Zend\Mvc\Application;
use Zend\Stdlib\ArrayUtils;
/**
* This makes our life easier when dealing with paths. Everything is relative
* to the application root now.
*/
chdir(dirname(__DIR__));
// Decline static file requests back to the PHP built-in webserver
if (php_sapi_name() === 'cli-server') {
$path = realpath(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
if (__FILE__ !== $path && is_file($path)) {
return false;
}
unset($path);
}
// Composer autoloading
include __DIR__ . '/../vendor/autoload.php';
if (! class_exists(Application::class)) {
throw new RuntimeException(
"Unable to load application.\n"
. "- Type `composer install` if you are developing locally.\n"
. "- Type `vagrant ssh -c 'composer install'` if you are using Vagrant.\n"
. "- Type `docker-compose run zf composer install` if you are using Docker.\n"
);
}
// Retrieve configuration
$appConfig = require __DIR__ . '/../config/application.config.php';
if (file_exists(__DIR__ . '/../config/development.config.php')) {
$appConfig = ArrayUtils::merge($appConfig, require __DIR__ . '/../config/development.config.php');
}
// Run the application!
Application::init($appConfig)->run();

View File

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

View File

@ -0,0 +1 @@
<div><div id=theme-choose-container><div id=choose-theme-template class="setting-row row"><div class="name column small-12"></div></div></div></div>

View File

@ -0,0 +1 @@
<div class="max-width center"></div>

View File

@ -0,0 +1 @@
<div class="max-height flex-center"><div data-translation=game-ended class=center></div></div>

View File

@ -0,0 +1 @@
<div class="max-height fill-me"><div class="row max-width grow flex-center"><div class="columns small-centered small-12 smedium-11 medium-9 large-7"><div class="row setting-row hidden" id=install-button><span class="columns small-6" data-translation=install></span> <span class="columns small-6 text-right" data-translation=">"></span></div><div class="row setting-row" id=theme-chooser><span class="columns small-6" data-translation=theme></span> <span class="columns small-6 text-right"><div id=theme-name></div></span></div><label class="switch row setting-row"><span class="columns small-6" data-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 row setting-row"><span class="columns small-6" data-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="row setting-row" id=credits-button><span class="columns small-6" data-translation=credits></span> <span class="columns small-6 text-right" data-translation=">"></span></div><div class="row setting-row" id=privacy-policy-button><span class="columns small-6" data-translation=privacy-policy></span> <span class="columns small-6 text-right" data-translation=">"></span></div><div class="row setting-row" id=impressum-button><span class="columns small-6" data-translation=impressum></span> <span class="columns small-6 text-right" data-translation=">"></span></div><div class="row setting-row" id=contact-button><span class="columns small-6" data-translation=contact></span> <span class="columns small-6 text-right" data-translation=">"></span></div><label class="switch row setting-row"><span class="columns small-6" data-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="row setting-row hidden"><span class="column small-10" id=storage-info></span> <span class="columns small-2 text-right" data-translation=">"></span></div><div class="row setting-row"><span class="column small-6" data-translation=version-label></span> <span class="column small-6 text-right" id=version-info></span></div><button id=reset-levels class="button hidden" data-translation=reset-levels></button></div></div></div>

View File

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

View File

@ -0,0 +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="text-right max-width"><button class="button show-while-playing" id=help-button><img src=img/help.png></button></div><div class="height-20 no-transition tutorial-text center flex-center hidden"><div class="step-1 hidden" data-translation=tutorial-step-1></div><div class="step-2 hidden" data-translation=tutorial-step-2></div><div class="step-3 hidden" data-translation=tutorial-step-3></div><div class="step-4 hidden" 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 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" id=continue-button data-translation=continue></button></div></div><div class=tutorial-blanket></div></div>

View File

@ -0,0 +1 @@
<div class="max-height flex-center"><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-triangle-template class="segment segment-triangle"><div class=child-container></div></div><div class="height-60 max-width flex-center relative-level-number"><div id=level></div><span id=level-number-container class="visible in-main-menu"><span id=level-number>1</span></span></div><div class="height-30 flex-center fill-me"><button class="button grow text-center" id=play-button><span 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><label class="switch right"><div data-view=img/music.svg></div><input type=checkbox class=setting id=play-music> <span class=slider></span></label></div></div></div>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<div class="max-height fill-me overflow-y-auto"><ul class="menu vertical plain dropdown hidden" id=settings-fragment-list></ul><div class=row><div class="columns small-centered small-12 smedium-11 medium-9 large-7"><h2 data-translation=settings></h2></div></div><div id=settings-fragments></div></div>

View File

@ -0,0 +1 @@
<div>Sync</div>

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 371 B

After

Width:  |  Height:  |  Size: 371 B

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 639 B

After

Width:  |  Height:  |  Size: 639 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
public/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
src/client/img/share.svg → public/img/share.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 533 B

After

Width:  |  Height:  |  Size: 533 B

0
src/client/img/sms.svg → public/img/sms.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

266
public/index.html Executable file
View File

@ -0,0 +1,266 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html" lang="de">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="description"
content="Finde die richtigen Wörter, indem du die Segmente drehst!">
<meta name="keywords" content="Spiel, Wort, Wörter, drehen">
<meta name="author" content="Silas Günther"/>
<meta name="robots" content="index"/>
<meta name="og:title" content="WordRotator">
<meta name="og:image" content="img/icons/android-chrome-512x512.png">
<meta name="og:description"
content="Finde die richtigen Wörter, indem du die Segmente drehst!">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta class='foundation-mq'>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="google-site-verification" content="xs1Cpm3ueMr5EMgCj8Kwj5c6oFvWPQ4h-2Q-Q4C93nQ" />
<link rel="manifest" href="js/manifest.json" crossOrigin="use-credentials">
<link rel="apple-touch-icon" sizes="180x180" href="img/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="img/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="img/icons/favicon-16x16.png">
<!--<link rel="manifest" href="img/icons/site.webmanifest">-->
<link rel="mask-icon" href="img/icons/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="img/icons/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="img/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<meta name="application-name" content="WordRotator">
<title>WordRotator</title>
<!-- Le styles -->
<link href="css/foundation.css" media="screen,print" rel="stylesheet" type="text/css">
<link href="css/wordRotator.css" media="screen,print" rel="stylesheet" type="text/css">
</head>
<body>
<script>
var defaultThemeClass = 'black';
var currentThemeClass = localStorage.getItem("currentTheme");
if (!currentThemeClass) {
currentThemeClass = defaultThemeClass;
}
document.body.classList.add(currentThemeClass);
</script>
<div id='print-content'>
</div>
<nav class="top-bar title-bar">
<div class="row">
<div class="top-bar-title">
<strong>
<a class="hidden-link" href=".">
<img src='img/logo.png' id='logo' alt='logo'/>
<span class="show-for-smedium">WordRotator</span>
</a>
</strong>
</div>
<span id='level-number-container' >
<span id='level-number'></span>
</span>
<span data-responsive-toggle="responsive-menu" id="responsive-menu-toggle" class="right" data-hide-for="always"
style="">
<button class="menu-icon" type="button" data-toggle=""></button>
</span>
<div id="action-bar">
<div class="top-bar-right">
<ul class="menu dropdown horizontal action-bar" id="action-bar-visible">
</ul>
</div>
<div id="responsive-menu" style="display: none;">
<div class='close-listener'></div>
<div class="top-bar-right">
<ul class="menu vertical action-bar hidden accordion-menu" id="action-bar-hidden"
data-responsive-menu="accordion medium-dropdown">
</ul>
</div>
</div>
</div>
</div>
</nav>
<div id='cookie-compliance' style="display: none">
<div class='row'>
<div class='columns small-9 medium-10' data-translation="we-use-cookie-hint"></div>
<div class='columns small-3 medium-2'>
<button id='close-cookie-msg' data-translation="close" class='button'>Close</button>
</div>
</div>
</div>
<div class="mainContainer">
<div class="row">
<div class="columns small-12" id="main-content">
<div id="site-content" role="main">
<div class='loader'>
<svg viewBox="0 0 32 32" width="32" height="32">
<circle r="14" id="spinner" cx="16" cy="16" fill="none"></circle>
</svg>
</div>
</div>
<div id="flashMessageContainerAbsoulte">
<div id="flashMessageContainer"></div>
</div>
</div>
</div>
</div>
<footer>
<a data-site-name='privacyPolicy' class='deep-link' data-translation="policy-heading" href="privacyPolicy">Privacy
Policy</a>&nbsp;&nbsp;
<a href="https://apps.silas.link" target="_blank" rel="noopener" data-translation="other-apps">Other Apps</a>
</footer>
<script>
var initPromise;
try {
function init() {
console.log("init started");
initPromise = new Promise(function (resolve) {
if (typeof Map === "undefined") {
console.log("defining maps");
window["Map"] = function () {
this.get = function (key) {
var hash = this.__createHash(key);
return this.__map[hash];
};
this.set = function (key, value) {
var hash = this.__createHash(key);
this.__map[hash] = value;
};
this.has = function (key) {
var hash = this.__createHash(key);
return this.__map[hash] === undefined;
};
this.__createHash = function (key) {
switch (typeof key) {
case 'function':
return 'function';
case 'undefined':
return 'undefined';
case 'string':
return '"' + key.replace('"', '""') + '"';
case 'object':
if (!key) {
return 'null';
}
switch (Object.prototype.toString.apply(key)) {
case '[object Array]':
var elements = [];
for (var i = 0; i < key.length; i++) {
elements.push(this.__createHash(key[i]));
}
return '[' + elements.join(',') + ']';
case '[object Date]':
return '#' + key.getUTCFullYear().toString()
+ (key.getUTCMonth() + 1).toString()
+ key.getUTCDate().toString()
+ key.getUTCHours().toString()
+ key.getUTCMinutes().toString()
+ key.getUTCSeconds().toString() + '#';
default:
var members = [];
for (var m in key) {
members.push(m + '=' + this.__createHash(key[m]));
}
members.sort();
return '{' + members.join(',') + '}';
}
default:
return key.toString();
}
};
this.__map = {};
}
}
resolve();
}).then(function () {
return new Promise(function (resolve) {
if (document.readyState === 'complete') {
resolve();
}
else {
window.addEventListener("load", function () {
resolve();
});
}
});
}).then(function () {
//No ServiceWorker for android!
if ('serviceWorker' in navigator && !window["android"]) {
console.log('sw in nav');
navigator.serviceWorker.register("service-worker.js").then(function (reg) {
if (reg.active) {
return;
}
reg.addEventListener("updatefound", function () {
var sw = (reg.installing || reg.waiting);
});
}).catch(function (err) {
console.log("SW-Error: ", err);
});
}
else {
console.log('sw not in nav');
}
}).then(function () {
var appScript = document.createElement("script");
appScript.defer = true;
var result = new Promise(function (resolve) {
appScript.onreadystatechange = function () {
if (appScript.readyState === "loaded" || appScript.readyState === "complete") {
appScript.onreadystatechange = null;
resolve();
}
}
});
appScript.src = "js/app.js";
// appScript.src = "js/app.min.js";
document.body.appendChild(appScript);
return result;
}).catch(function (e) {
console.log(e);
alert("There was an Error:\n" + e + "\nMaybe your Browser is too old.");
});
}
if (typeof Promise === 'undefined') {
console.log("defining promises");
// alert("Your Browser is maybe too old to run this site. Please update your browser!");
var promiseScript = document.createElement("script");
promiseScript.src = "//cdn.jsdelivr.net/bluebird/3.5.0/bluebird.min.js";
promiseScript.onload = function () {
init();
};
document.body.appendChild(promiseScript);
}
else {
init();
}
}
catch (e) {
console.log(e);
var error = "There was an Error:\n" + e.message + "\n\nMaybe your Browser is too old.";
alert(error);
document.body.innerHTML = error;
}
</script>
</body>
</html>

8020
public/js/app.js Executable file

File diff suppressed because it is too large Load Diff

1
public/js/lang/de.json Executable file

File diff suppressed because one or more lines are too long

1
public/js/lang/en.json Executable file

File diff suppressed because one or more lines are too long

20
public/js/manifest.json Executable file
View File

@ -0,0 +1,20 @@
{
"name": "WordRotator",
"short_name":"WordRotator",
"icons": [
{
"src": "../img/icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "../img/icons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone",
"start_url":"/"
}

View File

@ -0,0 +1 @@
<div><div class="tab-header-template tab-header"><div class=tab-name></div></div><div class=tab-header-container></div><div class=tab-container></div></div>

3
public/robots.txt Normal file
View File

@ -0,0 +1,3 @@
# robots.txt generated by https://seo-ranking-tools.de
User-agent: *
Disallow:

View File

@ -0,0 +1 @@
<div><h2 data-translation=not-allowed-title></h2><p data-translation=not-allowed></div>

View File

@ -0,0 +1 @@
<div><h3 data-translation=user-roles-heading></h3><h4 id=username class=no-margin-bottom></h4><h5 data-translation=user-roles-list class=no-margin-bottom></h5><div id=userRoles><div data-view=core/html/smartList.html></div></div><h5 data-translation=available-roles-list class=no-margin-bottom></h5><div id=availableRoles><div data-view=core/html/smartList.html></div></div></div>

View File

@ -0,0 +1 @@
<div class="max-height fill-me"><div class="row grow flex-center"><div class="columns small-centered small-12 smedium-9 medium-6 large-4"><form id=forgot-password-form><div class=sending-loader><div class=loader><svg viewBox="0 0 32 32" width=32 height=32><circle r=14 id=spinner cx=16 cy=16 fill=none></circle></svg></div></div><h3 data-translation=forgot-password-title></h3><p data-translation=forgot-password-text><div class=row><div class="columns small-12"><label for=email><input required type=email id=email name=email class=form-control><span data-translation=forgot-password-email></span></label></div><div class="columns small-12" data-equalizer-watch><input type=submit id=submitButton name=submitButton data-translation data-translation-value=forgot-password-submit></div></div></form></div></div></div>

View File

@ -0,0 +1 @@
<div class="max-height fill-me"><div class="row max-width grow flex-center"><div class="columns small-centered small-12 smedium-9 medium-11 large-7"><form id=change-password-form><div class=sending-loader><div class=loader><svg viewBox="0 0 32 32" width=32 height=32><circle r=14 id=spinner cx=16 cy=16 fill=none></circle></svg></div></div><h3 data-translation=change-password-title></h3><p><i data-translation=change-password-new-automated-login></i><div class="columns small-12" data-equalizer-watch><label for=oldPassword><input required type=password id=oldPassword class=form-control name=oldPassword><span data-translation=change-password-old-password></span></label></div><div class="columns small-12" data-equalizer-watch><label for=newPassword1><input required type=password id=newPassword1 class=form-control name=newPassword1><span data-translation=change-password-new-password1></span></label></div><div class="columns small-12" data-equalizer-watch><label for=newPassword2><input required type=password id=newPassword2 class=form-control name=newPassword2><span data-translation=change-password-new-password2></span></label></div><div class="row max-width" data-equalizer><div class="columns small-12" data-equalizer-watch><input type=submit name=submitButton class=form-control data-translation data-translation-value=change-password-submit></div></div></form></div></div></div>

View File

@ -0,0 +1 @@
<div class="max-height fill-me"><div class="row max-width grow flex-center"><div class="columns small-centered small-12 smedium-9 medium-11 large-7"><form id=user-settings-form><div class=sending-loader><div class=loader><svg viewBox="0 0 32 32" width=32 height=32><circle r=14 id=spinner cx=16 cy=16 fill=none></circle></svg></div></div><h3 data-translation=user-settings-title></h3><p><i data-translation=change-email-new-automated-login></i><div class=row data-equalizer><div class="columns small-12" data-equalizer-watch><label for=username><input required id=username name=username class=form-control><span data-translation=user-settings-form-username></span></label></div></div><div class=row data-equalizer><div class="columns small-12" data-equalizer-watch><label for=oldEmail><input type=email id=oldEmail name=oldEmail class=form-control readonly=readonly><span data-translation=user-settings-form-old-email></span></label></div><div class="columns small-12" data-equalizer-watch><label for=newEmail><input type=email id=newEmail name=newEmail class=form-control><span data-translation=user-settings-form-new-email></span></label></div></div><div class="row max-width" data-equalizer><div class="columns small-12" data-equalizer-watch><input type=submit name=submitButton class=form-control data-translation data-translation-value=user-settings-form-submit></div></div></form></div></div></div>

View File

@ -0,0 +1 @@
<div class="max-height fill-me"><div class="row grow flex-center"><div class="columns small-centered small-12 smedium-9 medium-6 large-4"><form id=login-form><div class=sending-loader><div class=loader><svg viewBox="0 0 32 32" width=32 height=32><circle r=14 id=spinner cx=16 cy=16 fill=none></circle></svg></div></div><h3 data-translation=login></h3><div class=row><div class="columns small-12"><label for=email><input required type=email id=email name=email class=form-control><span data-translation=login-email></span></label></div><div class="columns small-12" data-equalizer-watch><label for=password><input required type=password id=password class=form-control name=password><span data-translation=login-password></span></label></div><div class="columns small-12" data-equalizer-watch><input type=hidden name=automatedLogin value=0><label for=automatedLogin><span data-translation=login-automated-login></span><input class=form-control value=1 type=checkbox id=automatedLogin name=automatedLogin></label></div><div class="columns small-12" data-equalizer-watch><input type=submit id=submitButton name=submitButton data-translation data-translation-value=login-submit></div></div><a id=forgot-password-link data-translation=forgot-password></a></form></div></div></div>

View File

@ -0,0 +1 @@
<div class="max-height fill-me"><div class="row max-width grow flex-center"><div class="columns small-centered small-12 smedium-9 medium-11 large-7"><form id=registration-form><div class=sending-loader><div class=loader><svg viewBox="0 0 32 32" width=32 height=32><circle r=14 id=spinner cx=16 cy=16 fill=none></circle></svg></div></div><h3 data-translation=registration></h3><div class=row data-equalizer><div class="columns small-12 medium-6" data-equalizer-watch><label for=username><input required id=username name=username class=form-control><span data-translation=registration-username></span></label></div><div class="columns small-12 medium-6" data-equalizer-watch><label for=email><input required type=email id=email name=email class=form-control><span data-translation=registration-email></span></label></div></div><div class=row data-equalizer><div class="columns small-12 medium-6" data-equalizer-watch><label for=password1><input required type=password id=password1 name=password1 class=form-control><span data-translation=registration-password1></span></label></div><div class="columns small-12 medium-6" data-equalizer-watch><label for=password2><input required type=password id=password2 name=password2 class=form-control><span data-translation=registration-password2></span></label></div></div><div class="row max-width" data-equalizer><div class="columns small-12" data-equalizer-watch><input type=submit id=submitButton name=submitButton class=form-control data-translation data-translation-value=registration-submit></div></div></form></div></div></div>

View File

@ -0,0 +1 @@
<div class="max-height fill-me"><div class="row grow flex-center"><div class="columns small-centered small-12 smedium-9 medium-6 large-4"><form id=new-password-form><input type=hidden name=code id=code><div class=sending-loader><div class=loader><svg viewBox="0 0 32 32" width=32 height=32><circle r=14 id=spinner cx=16 cy=16 fill=none></circle></svg></div></div><h3 data-translation=new-password></h3><div class=row><div class="columns small-12"><label for=password1><input required type=password id=password1 class=form-control name=password1><span data-translation=new-password-password1></span></label></div><div class="columns small-12"><label for=password2><input required type=password id=password2 class=form-control name=password2><span data-translation=new-password-password2></span></label></div><div class="columns small-12"><input type=submit id=submitButton name=submitButton data-translation data-translation-value=new-password-submit></div></div></form></div></div></div>

View File

@ -0,0 +1 @@
<div><div id=level-template class=row><div class="columns small-3">id:</div><div class="column small-6 id"></div><div class="column small-3"><button class="clickable margin-0 delete-button">X</button></div><div class="columns small-3">words:</div><div class="column small-9 words"></div><div class="columns small-3">rotations:</div><div class="column small-9 positions"></div><div class="columns small-12" style="border-bottom: 1px solid black">&nbsp;</div></div><div id=word-template style="margin-bottom: 1.5rem"><span class=name></span>:<br><div class=level-container></div></div><div id=word-container></div></div>

View File

@ -0,0 +1 @@
<div><div class=row><div class="column small-6">Noch nicht geprüft:</div><div class="column small-6" id=not-checked></div><div class="column small-6">Gecheckt:</div><div class="column small-6" id=checked></div><div class="column small-6">Unsicher:</div><div class="column small-6" id=not-sure></div><div class="column small-6">Gelöscht:</div><div class="column small-6" id=deleted></div></div><br><br><div id=word-container><div id=word-template class=row><div class="column small-12"><span class=word></span> <span class=right><button class="button button-ok">OK</button> <button class="button button-unsure">Unsicher</button> <button class="button button-delete">Entf.</button></span></div></div></div></div>

2
public/version/1/listjs/list.min.js vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<div><div id=level-template class=row><div class="columns small-3">id:</div><div class="column small-6 id"></div><div class="column small-3"><button class="clickable margin-0 delete-button">X</button></div><div class="columns small-3">words:</div><div class="column small-9 words"></div><div class="columns small-3">rotations:</div><div class="column small-9 positions"></div><div class="columns small-12" style="border-bottom: 1px solid black">&nbsp;</div></div><div id=word-template style="margin-bottom: 1.5rem"><span class=name></span>:<br><div class=level-container></div></div><div id=word-container></div></div>

View File

@ -0,0 +1 @@
<div><div class=row><div class="column small-6">Noch nicht geprüft:</div><div class="column small-6" id=not-checked></div><div class="column small-6">Gecheckt:</div><div class="column small-6" id=checked></div><div class="column small-6">Unsicher:</div><div class="column small-6" id=not-sure></div><div class="column small-6">Gelöscht:</div><div class="column small-6" id=deleted></div><div class="column small-6">Unbenutzt:</div><div class="column small-6" id=unused></div></div><br><br><div id=word-container><div id=word-template class=row><div class="column small-12"><span class=word></span> <span class=right><button class="button button-ok">OK</button> <button class="button button-unsure">Unsicher</button> <button class="button button-delete">Entf.</button></span></div></div></div></div>

File diff suppressed because one or more lines are too long

34
rollup.config.js Executable file
View File

@ -0,0 +1,34 @@
// import pkg from './package.json';
const pkg = require('./package');
const externals = [
// ...Object.keys(pkg.dependencies || {}),
// ...Object.keys(pkg.peerDependencies || {}),
];
const makeExternalPredicate = (externalsArr => {
if (externalsArr.length === 0) {
return (() => false);
}
const externalPattern = new RegExp(`^(${externalsArr.join('|')})($|/)`);
return (id => externalPattern.test(id));
});
const ex = {
input: pkg.input,
external
:
makeExternalPredicate(externals),
output
:
[{
format: 'es',
file: pkg.output,
nameFile: pkg.namesOutput,
}],
};
if (typeof module !== 'undefined') {
module.exports = ex;
return;
}
// export default ex;

View File

@ -1,8 +0,0 @@
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

@ -1,57 +0,0 @@
<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,21 +0,0 @@
<h1 class = "translation">contact</h1>
<p id = "contactText">
</p>
<form class="grid-x" id = "contact-form">
<label class="small-12 medium-6 right">
<input type="checkbox" value="1" required name="policy">
<span>
<a class = "link translation" href="/?s=privacyPolicy">privacy-policy</a>
<span class = "translation">privacy policy accepted</span>
</span>
</label>
<label class = "small-12 medium-6">
<input type="email" required name="email">
<span class="translation">e-mail</span>
</label>
<label class="small-12">
<textarea required name="message"></textarea>
<span class="translation">message</span>
</label>
<button class="small-12 button translation">send</button>
</form>

View File

@ -1,5 +0,0 @@
<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,3 +0,0 @@
<div class = 'max-height flex-center'>
<div data-translation="game-ended" class = 'center translation'></div>
</div>

View File

@ -1,17 +0,0 @@
<div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<div id = "wordRotatorSettings"></div>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 KiB

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More