Tutorial fertig gestellt, Theme geupdated, Tests angepasst

This commit is contained in:
silas 2018-09-27 22:08:07 +02:00
parent 9678354c92
commit e34a3e865f
35 changed files with 481 additions and 6680 deletions

2
.idea/scopes/scss.xml generated
View File

@ -1,3 +1,3 @@
<component name="DependencyValidationManager">
<scope name="scss" pattern="file[wordRotator]:src/scss//*" />
<scope name="scss" pattern="file[wordRotator]:src/scss/*" />
</component>

View File

@ -2,7 +2,7 @@
<project version="4">
<component name="ProjectTasksOptions">
<TaskOptions isEnabled="true">
<option name="arguments" value="--update $FileName$:$FileNameWithoutExtension$.css" />
<option name="arguments" value="--sourcemap=none --update $FileName$:$FileNameWithoutExtension$.css" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" />
<option name="exitCodeBehavior" value="ERROR" />
@ -22,7 +22,7 @@
<envs />
</TaskOptions>
<TaskOptions isEnabled="true">
<option name="arguments" value="$FilePath$ --no-map true -d $ContentRoot$/public/css -c $ContentRoot$" />
<option name="arguments" value="$FilePath$ --map false -d $ContentRoot$/public/css -c $ContentRoot$" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" />
<option name="exitCodeBehavior" value="ERROR" />

View File

@ -4,17 +4,23 @@ 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/ \;
# mv $d$jsFile
find $d$scssSourdeDir -name '*.scss' -exec cp -r '{}' src/scss/lib/ \;
cp -r -R $d$sourceDir public/
done
#bin/jsConcat.sh src/js public/js/app 1
node bin/concatTranslator.js
node bin/createImportScss.js
bin/build.sh

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;
}
});

58
log/error.log Executable file → Normal file
View File

@ -1,45 +1,13 @@
2018-09-25T13:32:08+02:00 ERR (3):
2018-09-26T12:47:13+02:00 ERR (3):
2018-09-26T12:49:14+02:00 ERR (3):
2018-09-26T12:52:31+02:00 ERR (3):
2018-09-26T12:56:16+02:00 ERR (3):
2018-09-26T13:21:28+02:00 ERR (3):
2018-09-26T13:23:06+02:00 ERR (3):
2018-09-26T13:25:37+02:00 ERR (3):
2018-09-26T13:30:09+02:00 ERR (3):
2018-09-26T13:31:23+02:00 ERR (3):
2018-09-26T13:31:25+02:00 ERR (3):
2018-09-26T13:41:58+02:00 ERR (3):
2018-09-26T13:43:07+02:00 ERR (3):
2018-09-26T13:44:29+02:00 ERR (3):
2018-09-26T13:44:50+02:00 ERR (3):
2018-09-26T13:44:55+02:00 ERR (3):
2018-09-26T13:55:06+02:00 ERR (3):
2018-09-26T13:55:40+02:00 ERR (3):
2018-09-26T13:55:43+02:00 ERR (3):
2018-09-26T13:55:46+02:00 ERR (3):
2018-09-26T13:55:49+02:00 ERR (3):
2018-09-26T14:00:03+02:00 ERR (3):
2018-09-26T14:01:02+02:00 ERR (3):
2018-09-26T14:58:31+02:00 ERR (3):
2018-09-26T14:59:27+02:00 ERR (3):
2018-09-26T15:08:13+02:00 ERR (3):
2018-09-26T15:16:58+02:00 ERR (3):
2018-09-26T15:17:10+02:00 ERR (3):
2018-09-26T15:17:50+02:00 ERR (3):
2018-09-26T15:18:15+02:00 ERR (3):
2018-09-26T15:18:39+02:00 ERR (3):
2018-09-26T18:01:15+02:00 ERR (3):
2018-09-26T18:06:35+02:00 ERR (3):
2018-09-26T18:09:03+02:00 ERR (3):
2018-09-27T11:48:18+02:00 ERR (3):
2018-09-27T11:49:03+02:00 ERR (3):
2018-09-27T11:49:24+02:00 ERR (3):
2018-09-27T11:55:27+02:00 ERR (3):
2018-09-27T11:56:27+02:00 ERR (3):
2018-09-27T12:01:44+02:00 ERR (3):
2018-09-27T12:20:36+02:00 ERR (3):
2018-09-27T12:21:38+02:00 ERR (3):
2018-09-27T12:29:51+02:00 ERR (3):
2018-09-27T12:30:53+02:00 ERR (3):
2018-09-27T12:31:24+02:00 ERR (3):
2018-09-27T14:39:29+02:00 ERR (3):
2018-09-27T15:31:29+02:00 ERR (3):
2018-09-27T15:49:52+02:00 ERR (3):
2018-09-27T18:35:38+02:00 ERR (3):
2018-09-27T18:40:03+02:00 ERR (3):
2018-09-27T18:41:27+02:00 ERR (3):
2018-09-27T21:28:04+02:00 ERR (3):
2018-09-27T21:31:29+02:00 ERR (3):
2018-09-27T21:35:52+02:00 ERR (3):
2018-09-27T21:38:53+02:00 ERR (3):
2018-09-27T22:03:57+02:00 ERR (3):
2018-09-27T22:04:27+02:00 ERR (3):
2018-09-27T22:05:07+02:00 ERR (3):

58
log/log.log Executable file → Normal file
View File

@ -1,45 +1,13 @@
2018-09-25T13:32:08+02:00 ERR (3):
2018-09-26T12:47:13+02:00 ERR (3):
2018-09-26T12:49:14+02:00 ERR (3):
2018-09-26T12:52:31+02:00 ERR (3):
2018-09-26T12:56:16+02:00 ERR (3):
2018-09-26T13:21:28+02:00 ERR (3):
2018-09-26T13:23:06+02:00 ERR (3):
2018-09-26T13:25:37+02:00 ERR (3):
2018-09-26T13:30:09+02:00 ERR (3):
2018-09-26T13:31:23+02:00 ERR (3):
2018-09-26T13:31:25+02:00 ERR (3):
2018-09-26T13:41:58+02:00 ERR (3):
2018-09-26T13:43:07+02:00 ERR (3):
2018-09-26T13:44:29+02:00 ERR (3):
2018-09-26T13:44:50+02:00 ERR (3):
2018-09-26T13:44:55+02:00 ERR (3):
2018-09-26T13:55:06+02:00 ERR (3):
2018-09-26T13:55:40+02:00 ERR (3):
2018-09-26T13:55:43+02:00 ERR (3):
2018-09-26T13:55:46+02:00 ERR (3):
2018-09-26T13:55:49+02:00 ERR (3):
2018-09-26T14:00:03+02:00 ERR (3):
2018-09-26T14:01:02+02:00 ERR (3):
2018-09-26T14:58:31+02:00 ERR (3):
2018-09-26T14:59:27+02:00 ERR (3):
2018-09-26T15:08:13+02:00 ERR (3):
2018-09-26T15:16:58+02:00 ERR (3):
2018-09-26T15:17:10+02:00 ERR (3):
2018-09-26T15:17:50+02:00 ERR (3):
2018-09-26T15:18:15+02:00 ERR (3):
2018-09-26T15:18:39+02:00 ERR (3):
2018-09-26T18:01:15+02:00 ERR (3):
2018-09-26T18:06:35+02:00 ERR (3):
2018-09-26T18:09:03+02:00 ERR (3):
2018-09-27T11:48:18+02:00 ERR (3):
2018-09-27T11:49:03+02:00 ERR (3):
2018-09-27T11:49:24+02:00 ERR (3):
2018-09-27T11:55:27+02:00 ERR (3):
2018-09-27T11:56:27+02:00 ERR (3):
2018-09-27T12:01:44+02:00 ERR (3):
2018-09-27T12:20:36+02:00 ERR (3):
2018-09-27T12:21:38+02:00 ERR (3):
2018-09-27T12:29:51+02:00 ERR (3):
2018-09-27T12:30:53+02:00 ERR (3):
2018-09-27T12:31:24+02:00 ERR (3):
2018-09-27T14:39:29+02:00 ERR (3):
2018-09-27T15:31:29+02:00 ERR (3):
2018-09-27T15:49:52+02:00 ERR (3):
2018-09-27T18:35:38+02:00 ERR (3):
2018-09-27T18:40:03+02:00 ERR (3):
2018-09-27T18:41:27+02:00 ERR (3):
2018-09-27T21:28:04+02:00 ERR (3):
2018-09-27T21:31:29+02:00 ERR (3):
2018-09-27T21:35:52+02:00 ERR (3):
2018-09-27T21:38:53+02:00 ERR (3):
2018-09-27T22:03:57+02:00 ERR (3):
2018-09-27T22:04:27+02:00 ERR (3):
2018-09-27T22:05:07+02:00 ERR (3):

0
log/php_error.log Executable file → Normal file
View File

0
log/php_exceptions.log Executable file → Normal file
View File

View File

@ -1,3 +1,24 @@
USE silas_wordRotatorTest;
DROP TABLE IF EXISTS Cronjob;
DROP TABLE IF EXISTS ChangeEmailCode;
DROP TABLE IF EXISTS RequestNewPasswordCode;
DROP TABLE IF EXISTS RegistrationCode;
DROP TABLE IF EXISTS UserCode;
DROP TABLE IF EXISTS RoleUser;
DROP TABLE IF EXISTS RoleAccess;
DROP TABLE IF EXISTS RoleChildren;
DROP TABLE IF EXISTS Role;
DROP TABLE IF EXISTS UserSetting;
DROP TABLE IF EXISTS UserAccess;
DROP TABLE IF EXISTS User;
DROP TABLE IF EXISTS Rating;
DROP TABLE IF EXISTS Level;
DROP TABLE IF EXISTS AuthToken;
DROP TABLE IF EXISTS Word;
DROP TABLE IF EXISTS Code;
DROP TABLE IF EXISTS Access;
CREATE TABLE Cronjob (id INT AUTO_INCREMENT NOT NULL, intervalInMinutes INT NOT NULL, lastRun DATETIME NOT NULL, className LONGTEXT NOT NULL, lastSuccess DATETIME NOT NULL, errorMessage LONGTEXT NOT NULL, active TINYINT(1) NOT NULL, version INT DEFAULT 1 NOT NULL, discr VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE Code (id INT AUTO_INCREMENT NOT NULL, code VARCHAR(255) NOT NULL, creationDate DATETIME NOT NULL, isCacheable TINYINT(1) NOT NULL, version INT DEFAULT 1 NOT NULL, discriminator VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_817996E977153098 (code), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE UserCode (id INT NOT NULL, userId INT DEFAULT NULL, INDEX IDX_E2BA727E64B64DCC (userId), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
@ -59,4 +80,6 @@ INSERT INTO `Level` (`id`, `words`, `positions`, `renderer`, `lastUpdated`, `lan
(24, '["BETONUNG","ANBETUNG","ALLERGIE","BAUMHAUS"]', '[0,3,1,1,3,1,2,0,0,0]', 120, '2018-07-14 17:01:18', 1, 0, 120),
(62, '["FEHLPROGNOSE","GEISTESKRAFT","ARBEITSPAUSE","BEREITSCHAFT","MOSAIKARBEIT","INFRAROTFILM"]', '[0,3,0,1,0,3,2,3,1,2,3,1,2,2,0,2,3,0,2,1,1]', 140, '2018-07-14 17:01:18', 1, 0, 140),
(260, '["SCHREIBTISCH","URHEBERRECHT","PFLANZENKOST","OPERNKONZERT"]', '[1,3,2,1,3,0,1,2,3,0,2,0,1,0,0]', 160, '2018-07-14 17:01:18', 1, 0, 160),
(67,'["AHNUNG","AUSBAU"]','[0,0,1]',20,'2018-10-10 00:00:00',1,0,1);
(67,'["AHNUNG","AUSBAU"]','[0,0,1]',20,'2018-10-10 00:00:00',1,0,1),
(341,'["NACHLASS","BUSLINIE","REITBAHN","LAUFGANG","KASCHMIR","BADETUCH"]','[1,3,0,2,3,0,1,0,0,0,3,1,0,0]',100,'2018-04-15 12:22:11',1,0,61)
;

View File

@ -1,674 +0,0 @@
/**
* Foundation for Sites by ZURB
* Version 6.4.3
* foundation.zurb.com
* Licensed under MIT Open Source
*/
.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;
}
#action-bar #responsive-menu .top-bar-right {
position: relative;
text-align: right;
width: 100%;
}
#action-bar .top-bar-right {
width: auto;
}
#action-bar .top-bar-right .menu.action-bar a img + span {
display: none;
}
#action-bar .top-bar-right .menu.action-bar .action {
position: relative;
z-index: 9000;
}
#action-bar .top-bar-right .menu.action-bar .action.is-dropdown-submenu-parent {
z-index: 9001;
}
#action-bar .top-bar-right .menu.action-bar .action.hidden {
display: none;
}
@media screen and (max-width: 24.9375em) {
#action-bar .top-bar-right .menu.action-bar .action.smedium {
display: none;
}
}
@media screen and (max-width: 39.9375em) {
#action-bar .top-bar-right .menu.action-bar .action li {
display: table-cell;
}
#action-bar .top-bar-right .menu.action-bar .action.medium {
display: none;
}
}
@media screen and (max-width: 63.9375em) {
#action-bar .top-bar-right .menu.action-bar .action.large {
display: none;
}
}
#action-bar .top-bar-right .menu.action-bar .action.never {
display: none;
}
#action-bar .top-bar-right .menu.action-bar.hidden {
display: inline-block;
position: absolute;
z-index: 9000;
border: 1px solid #cacaca;
padding: 0.2rem;
transform: translateX(-100%);
text-align: left;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action.hidden {
display: none;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent {
z-index: 9001;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent ul.is-dropdown-submenu {
top: auto;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent ul.is-dropdown-submenu > li.action, #action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent ul.is-dropdown-submenu > .close-listener {
z-index: 9001;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent > 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;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action a {
white-space: nowrap;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action a img {
display: none;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action a img + span {
display: inherit;
}
@media print, screen and (min-width: 40em) {
#action-bar .top-bar-right .menu.action-bar.hidden .action.medium {
display: none;
}
}
@media print, screen and (min-width: 25em) {
#action-bar .top-bar-right .menu.action-bar.hidden .action.smedium {
display: none;
}
}
@media print, screen and (min-width: 64em) {
#action-bar .top-bar-right .menu.action-bar.hidden .action.large {
display: none;
}
}
@media screen and (max-width: 24.9375em) {
#action-bar .top-bar-right .menu.action-bar.hidden .action.smedium {
display: block;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action.smedium.hidden {
display: none;
}
}
@media screen and (max-width: 39.9375em) {
#action-bar .top-bar-right .menu.action-bar.hidden .action.medium {
display: block;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action.medium.hidden {
display: none;
}
}
@media screen and (max-width: 63.9375em) {
#action-bar .top-bar-right .menu.action-bar.hidden .action.large {
display: block;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action.large.hidden {
display: none;
}
}
#action-bar .top-bar-right .menu.action-bar.hidden .action.never {
display: block;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action.never.hidden {
display: none;
}
#action-bar .top-bar-right .menu.action-bar.hidden .action.always {
display: none;
}
#action-bar .top-bar-right .menu .action {
z-index: 100;
}
@media screen and (max-width: 39.9375em) {
#action-bar .top-bar-right .menu .action a {
width: 100%;
}
}
@media screen and (max-width: 39.9375em) {
#action-bar .top-bar-right .menu .action a {
padding-left: 0.68rem;
}
}
@media screen and (max-width: 24.9375em) {
#action-bar .top-bar-right .menu .action a {
padding-left: 0.236rem;
}
}
@media screen and (max-width: 39.9375em) {
#action-bar .top-bar-right .menu .action:not(.is-dropdown-submenu-parent) a {
padding-right: 0.68rem;
}
}
@media screen and (max-width: 24.9375em) {
#action-bar .top-bar-right .menu .action:not(.is-dropdown-submenu-parent) a {
padding-right: 0.236rem;
}
}
#action-bar .top-bar-right .menu .action.img a {
padding-top: 0;
}
#action-bar .top-bar-right .menu .action.img a img {
vertical-align: inherit;
max-height: 1.4rem;
}
#action-bar .top-bar-right .menu > li > ul.is-dropdown-submenu {
min-width: 0;
}
#action-bar .top-bar-right .menu > li > ul.is-dropdown-submenu .action {
display: inherit;
}
#action-bar .top-bar-right .menu > li.opens-right > ul.is-dropdown-submenu {
right: auto;
left: auto;
}
#action-bar .top-bar-right .menu > li.opens-right > ul.is-dropdown-submenu a {
text-align: left;
}
.dropdown.menu > li.is-dropdown-submenu-parent > a:after {
border-color: #ffffff transparent transparent;
}
form {
position: relative;
}
.sending .sending-loader {
position: absolute;
background-color: rgba(0, 0, 0, 0.06);
display: block;
pointer-events: all;
width: 100%;
height: 100%;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 10;
border-radius: 2px;
}
.sending .sending-loader .loader {
position: absolute;
}
.sending-loader {
display: none;
}
input.notEmpty:invalid {
background-color: lightcoral;
}
label {
position: relative;
}
label [type=text], label [type=password], label [type=date], label [type=datetime], label [type=datetime-local], label [type=month], label [type=week], label [type=email], label [type=number], label [type=search], label [type=tel], label [type=time], label [type=url], label [type=color], label textarea, label input[type=text], label input:not([type]) {
display: block;
width: 100%;
height: 2.4375rem;
margin: 0 0 1rem;
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-bottom: 15px;
}
label [type=text]:focus, label [type=password]:focus, label [type=date]:focus, label [type=datetime]:focus, label [type=datetime-local]:focus, label [type=month]:focus, label [type=week]:focus, label [type=email]:focus, label [type=number]:focus, label [type=search]:focus, label [type=tel]:focus, label [type=time]:focus, label [type=url]:focus, label [type=color]:focus, label textarea:focus, label input[type=text]:focus, label input:not([type]):focus {
border: none;
box-shadow: none !important;
border-bottom: solid black;
}
label [type=text]:focus ~ span, label [type=text].notEmpty:not(:focus) ~ span, label [type=password]:focus ~ span, label [type=password].notEmpty:not(:focus) ~ span, label [type=date]:focus ~ span, label [type=date].notEmpty:not(:focus) ~ span, label [type=datetime]:focus ~ span, label [type=datetime].notEmpty:not(:focus) ~ span, label [type=datetime-local]:focus ~ span, label [type=datetime-local].notEmpty:not(:focus) ~ span, label [type=month]:focus ~ span, label [type=month].notEmpty:not(:focus) ~ span, label [type=week]:focus ~ span, label [type=week].notEmpty:not(:focus) ~ span, label [type=email]:focus ~ span, label [type=email].notEmpty:not(:focus) ~ span, label [type=number]:focus ~ span, label [type=number].notEmpty:not(:focus) ~ span, label [type=search]:focus ~ span, label [type=search].notEmpty:not(:focus) ~ span, label [type=tel]:focus ~ span, label [type=tel].notEmpty:not(:focus) ~ span, label [type=time]:focus ~ span, label [type=time].notEmpty:not(:focus) ~ span, label [type=url]:focus ~ span, label [type=url].notEmpty:not(:focus) ~ span, label [type=color]:focus ~ span, label [type=color].notEmpty:not(:focus) ~ span, label textarea:focus ~ span, label textarea.notEmpty:not(:focus) ~ span, label input[type=text]:focus ~ span, label input[type=text].notEmpty:not(:focus) ~ span, label input:not([type]):focus ~ span, label input:not([type]).notEmpty:not(:focus) ~ span {
top: -11px;
left: 0;
bottom: 0;
font-size: 11px;
opacity: 1;
color: black;
}
label [type=text] ~ span, label [type=password] ~ span, label [type=date] ~ span, label [type=datetime] ~ span, label [type=datetime-local] ~ span, label [type=month] ~ span, label [type=week] ~ span, label [type=email] ~ span, label [type=number] ~ span, label [type=search] ~ span, label [type=tel] ~ span, label [type=time] ~ span, label [type=url] ~ span, label [type=color] ~ span, label textarea ~ span, label input[type=text] ~ span, label input:not([type]) ~ span {
position: absolute;
pointer-events: none;
left: 10px;
bottom: 10px;
top: 7px;
transition: 0.2s ease all;
color: #626262;
}
.listjs {
position: relative;
}
.listjs label {
display: inline-block;
}
.listjs label input {
margin-bottom: 0;
}
.listjs table {
border-collapse: collapse;
}
.listjs table thead tr th, .listjs table tfoot tr th {
text-align: left;
}
.listjs table thead tr th.sort, .listjs table tfoot tr th.sort {
cursor: pointer;
}
.listjs table tbody.list tr:first-child td {
border-top: solid 1px #696969;
}
.listjs table tbody.list tr:last-child td {
border-bottom: solid 1px #696969;
}
.listjs table tbody.list tr td {
border-top: solid 1px #c8c8c8;
padding: 0.3rem;
}
.listjs ul.pagination {
float: right;
display: inline-block;
margin: 0;
}
.listjs ul.pagination li {
display: inline-block;
padding-left: 5px;
padding-right: 5px;
text-decoration: underline;
}
.listjs ul.pagination li.active, .listjs ul.pagination li.disabled {
text-decoration: none;
}
/**
* Foundation for Sites by ZURB
* Version 6.4.3
* foundation.zurb.com
* Licensed under MIT Open Source
*/
*, :after, :before {
box-sizing: inherit;
}
html {
min-height: 100%;
width: 100%;
height: 100%;
font-size: 18px;
letter-spacing: 1px;
}
.max-height {
height: 100%;
min-height: 100%;
}
body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-weight: 400;
line-height: 1.5;
display: flex;
flex-direction: column;
background: #fefefe;
color: #0a0a0a;
}
footer {
border-top: #d8d8d8 solid 1px;
text-align: center;
}
.top-bar .top-bar-title strong {
vertical-align: middle;
display: inline-block;
/*margin-left: 8px;*/
}
nav.top-bar {
color: #FFF;
font-size: 20px;
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 2px 9px 1px rgba(0, 0, 0, 0.12), 0 4px 2px -2px rgba(0, 0, 0, 0.2);
padding: 0.6rem;
display: block;
}
button.button, a.button {
border-radius: 2px;
}
.fill-me {
display: flex;
flex-direction: column;
}
.fill-me.vertical {
flex-direction: row;
}
.fill-me .grow {
flex: 1;
}
.flex-center {
flex-direction: column;
justify-content: center;
display: flex;
align-items: center;
}
.flex-center > * {
max-height: 100%;
}
.menu a, .dropdown.menu a {
padding: 0.4rem 0.5rem;
}
svg path {
fill: currentColor;
}
div.mainContainer {
position: relative;
max-height: 100%;
max-width: 100%;
overflow: auto;
flex: 1;
margin: 0.5rem;
}
div.mainContainer > .row, div.mainContainer #main-content, div.mainContainer #site-content {
position: absolute;
width: 100%;
height: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.inline-block {
display: inline-block;
}
.right {
float: right;
}
#logo-img {
max-height: 2.2rem;
}
a {
text-decoration: none;
cursor: pointer;
color: inherit;
}
a.hidden-link {
text-decoration: none;
color: inherit;
}
label {
cursor: pointer;
}
.align-right {
text-align: right;
}
.view-panel {
display: none;
}
.loader {
left: 50%;
top: 50%;
position: fixed;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
text-align: center;
}
.loader.inline {
left: initial;
top: initial;
position: initial;
-webkit-transform: initial;
transform: initial;
text-align: center;
display: inline;
}
.loader.small #spinner {
transform: scale(0.5);
}
.loader #spinner {
box-sizing: border-box;
stroke: #b71c1a;
stroke-width: 3px;
transform-origin: 50%;
animation: line 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite, rotate 1.6s linear infinite;
}
@keyframes rotate {
from {
transform: rotate(0);
}
to {
transform: rotate(450deg);
}
}
@keyframes line {
0% {
stroke-dasharray: 2, 85.964;
transform: rotate(0);
}
50% {
stroke-dasharray: 65.973, 21.9911;
stroke-dashoffset: 0;
}
100% {
stroke-dasharray: 2, 85.964;
stroke-dashoffset: -65.973;
transform: rotate(90deg);
}
}
#print-content {
display: none;
}
.action-button {
max-height: 1.7rem;
margin-left: 0.4rem;
margin-right: 0.4rem;
}
.action-button:hover {
background: #e8e8e8;
}
.vcenter-container {
width: 100%;
height: 100%;
display: table;
}
.vcenter-container .vcenter {
vertical-align: middle;
display: table-cell;
flex-direction: column;
justify-content: center;
}
.max-width {
width: 100%;
}
input, button {
letter-spacing: 1px !important;
}
.no-padding {
padding: 0;
border: 0;
}
.center {
text-align: center;
}
@media print {
nav, .mainContainer, footer, #styles {
display: none !important;
}
#print-content {
display: block !important;
}
}
.overflow-y-auto {
overflow-y: auto !important;
}
.row.no-after:after {
content: initial;
}
.margin-bottom {
margin-bottom: 1rem;
}
@media print, screen and (min-width: 25em) {
.margin-bottom {
margin-bottom: 2rem;
}
}
@media print, screen and (min-width: 40em) {
.margin-bottom {
margin-bottom: 3rem;
}
}
@media print, screen and (min-width: 64em) {
.margin-bottom {
margin-bottom: 4rem;
}
}
@media screen and (min-width: 75em) {
.margin-bottom {
margin-bottom: 5rem;
}
}
.font-small {
font-size: 0.7em;
}
.border-bottom {
border-bottom: 1px solid #cacaca;
}
.border-right {
border-right: 1px solid #cacaca;
}
.border-left {
border-left: 1px solid #cacaca;
}
img.logo {
vertical-align: inherit;
display: inline-block;
height: auto;
max-width: 1.1rem;
margin-right: 2px;
}
.align-center {
text-align: center;
}
hr.separator {
margin: 1rem 0;
}
.button-line {
display: flex;
}
.button-line .button {
flex: 1;
margin-left: 1px;
margin-right: 1px;
padding: 0.5rem 0.77rem;
}
@media screen and (max-width: 24.9375em) {
.small-small {
font-size: small;
}
}
select {
border: 0;
padding: 0.3rem 0.3rem;
}
.share-icon {
max-width: 1.5rem;
margin: 0.1rem;
}
.hidden {
display: none;
}
.no-transition {
transition: none !important;
}
img.action-image {
max-height: 1.4rem;
cursor: pointer;
}
img.back-button {
max-height: 0.6rem;
margin-right: 0.2rem;
cursor: pointer;
vertical-align: inherit;
}
.no-margin-bottom {
margin-bottom: 0;
}

View File

@ -1,40 +0,0 @@
div.flashMessage {
font-size: 0.8rem;
border-radius: 25px;
letter-spacing: 0;
z-index: 1001;
max-width: 100%;
display: inline-block;
position: relative;
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.28);
border: 1px solid #626262;
background-color: #6b6b6b;
padding: .3em .6em;
text-align: center;
color: white; }
div.flashMessage:hover {
opacity: .4;
cursor: pointer; }
div.flashMessage:before, div.flashMessage:after {
display: block;
content: ""; }
span.flashMessage {
float: right;
cursor: pointer; }
div.default {
background-color: #1a9cc8; }
#flashMessageContainer {
text-align: center;
position: absolute; }
#flashMessageContainer, #flashMessageContainerAbsoulte {
height: 0 !important;
width: 100%;
overflow: visible !important; }
#flashMessageContainerAbsoulte {
margin: 5px 0;
position: relative; }

File diff suppressed because it is too large Load Diff

View File

@ -1,71 +0,0 @@
.background {
position: fixed;
z-index: 1000000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: black;
/* Fallback color */
background-color: rgba(0, 0, 0, 0.56); }
.background .modal {
position: relative;
top: 50%;
margin: auto;
width: 80%;
background-color: #fefefe;
transform: translateY(-50%);
padding: 0.5rem;
display: flex;
flex-direction: column;
max-height: 80%;
max-width: 1024px; }
@media screen and (max-width: 63.9375em) {
.background .modal.small-margin {
width: 90%; } }
@media screen and (max-width: 24.9375em) {
.background .modal.small-margin {
width: 95%; } }
.background .modal.max-small {
max-width: 0; }
.background .modal.max-smedium {
max-width: 400px; }
.background .modal.max-medium {
max-width: 640px; }
.background .modal.max-large {
max-width: 1024px; }
.background .modal.max-xlarge {
max-width: 1200px; }
.background .modal.max-xxlarge {
max-width: 1440px; }
.background .modal .title {
font-weight: bold;
padding-bottom: 0.5rem; }
.background .modal .content-container {
overflow-y: auto;
max-height: 100%; }
.background .modal .content-container .loader {
position: static;
transform: none; }
.background .modal .close {
text-align: right;
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
line-height: 1; }
.background .modal .close:hover, .background .modal .close:focus {
color: black;
text-decoration: none;
cursor: pointer; }
.background .modal .modal-button-container {
padding-top: 0.5rem; }
.background .modal .modal-button-container .button {
margin-left: 0.2rem;
margin-bottom: 0 !important;
padding: 0.6em 0.8em; }
@media screen and (max-width: 24.9375em) {
.background .modal .modal-button-container .button {
margin-left: 0.1rem;
padding: 0.3em 0.5em; } }

View File

@ -1,59 +0,0 @@
/**
* Foundation for Sites by ZURB
* Version 6.4.3
* foundation.zurb.com
* Licensed under MIT Open Source
*/
.settings-container {
border: 1px solid black;
border-radius: 2px;
padding: 0.3rem;
}
@media print, screen and (min-width: 40em) {
.settings-container #settings-fragments-container {
border-left: 1px solid #cacaca;
}
}
.settings-container #settings-fragments-container #settings-fragments > * {
display: none;
}
.settings-container #settings-fragments-container #settings-fragments > *.active {
display: block;
}
.switch {
position: relative;
display: inline-block;
}
.switch input {
display: none;
}
.switch input:checked + .slider:before {
transform: translateX(1.5rem);
}
.switch .slider {
display: inline-block;
position: relative;
cursor: pointer;
width: 3rem;
height: 1.5rem;
border-radius: 1.5rem;
background-color: #ccc;
transition: 0.4s;
}
.switch .slider:before {
position: absolute;
content: "";
height: 1.1rem;
width: 1.1rem;
left: 0.2rem;
bottom: 0.2rem;
background-color: white;
transition: 0.4s;
border-radius: 50%;
}
.switch img {
width: 1.4rem;
display: inline;
vertical-align: initial;
}

View File

@ -1,431 +0,0 @@
.zf-green {
color: #68b604;
}
.column:last-child:not(:first-child), .columns:last-child:not(:first-child) {
float: left;
}
input[type=checkBox].form-control {
height: 24px;
height: 1.5rem;
width: 100%;
}
[type=submit] {
display: block;
box-sizing: border-box;
width: 100%;
height: 39px;
height: 2.4375rem;
padding: 8px;
padding: 0.5rem;
border: 1px solid #cacaca;
margin: 0 0 16px;
margin: 0 0 1rem;
font-family: inherit;
font-size: 16px;
font-size: 1rem;
color: #0a0a0a;
background-color: #fefefe;
box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);
border-radius: 0;
transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
-webkit-appearance: none;
-moz-appearance: none;
}
form ul li {
color: red;
font-size: 12.8px;
font-size: 0.8rem;
}
.button-dropdown:after {
border-color: #000 transparent transparent;
border-width: 0.4em;
border-style: solid;
content: "";
position: absolute;
top: 0.4em;
display: block;
height: 0;
width: 0;
right: 1em;
}
.button-dropdown {
position: relative;
display: block;
padding-right: 2em;
}
.button-dropdown.open:after {
border-color: transparent transparent #000;
top: 0;
}
a.ui-datepicker-next, a.ui-datepicker-prev {
height: 100% !important;
}
div.container a.navbar-brand > img {
display: inline;
margin-right: 4px;
}
ul.menu.plain li.active a {
background-color: #ededed;
color: #000;
}
ul.menu.plain li a {
color: #000;
}
ul.menu.plain li a:hover {
color: #525252;
}
ul.submenu {
border-top: 1px solid #bcbcbc;
border-bottom: 1px solid #bcbcbc;
margin-left: 10px;
}
#cookie-compliance {
width: 100%;
margin: 0 0;
padding: 0.3rem 0;
}
#cookie-compliance #close-cookie-msg {
float: right;
margin-bottom: 0;
margin-right: 3px;
padding: 0.4rem 0.8rem;
}
.menu-container .button {
text-align: center;
width: 100%;
}
.height-5 {
height: 5%;
}
.max-height-5 {
max-height: 5%;
}
.width-5 {
width: 5%;
}
.max-width-5 {
max-width: 5%;
}
.height-10 {
height: 10%;
}
.max-height-10 {
max-height: 10%;
}
.width-10 {
width: 10%;
}
.max-width-10 {
max-width: 10%;
}
.height-15 {
height: 15%;
}
.max-height-15 {
max-height: 15%;
}
.width-15 {
width: 15%;
}
.max-width-15 {
max-width: 15%;
}
.height-20 {
height: 20%;
}
.max-height-20 {
max-height: 20%;
}
.width-20 {
width: 20%;
}
.max-width-20 {
max-width: 20%;
}
.height-25 {
height: 25%;
}
.max-height-25 {
max-height: 25%;
}
.width-25 {
width: 25%;
}
.max-width-25 {
max-width: 25%;
}
.height-30 {
height: 30%;
}
.max-height-30 {
max-height: 30%;
}
.width-30 {
width: 30%;
}
.max-width-30 {
max-width: 30%;
}
.height-35 {
height: 35%;
}
.max-height-35 {
max-height: 35%;
}
.width-35 {
width: 35%;
}
.max-width-35 {
max-width: 35%;
}
.height-40 {
height: 40%;
}
.max-height-40 {
max-height: 40%;
}
.width-40 {
width: 40%;
}
.max-width-40 {
max-width: 40%;
}
.height-45 {
height: 45%;
}
.max-height-45 {
max-height: 45%;
}
.width-45 {
width: 45%;
}
.max-width-45 {
max-width: 45%;
}
.height-50 {
height: 50%;
}
.max-height-50 {
max-height: 50%;
}
.width-50 {
width: 50%;
}
.max-width-50 {
max-width: 50%;
}
.height-55 {
height: 55%;
}
.max-height-55 {
max-height: 55%;
}
.width-55 {
width: 55%;
}
.max-width-55 {
max-width: 55%;
}
.height-60 {
height: 60%;
}
.max-height-60 {
max-height: 60%;
}
.width-60 {
width: 60%;
}
.max-width-60 {
max-width: 60%;
}
.height-65 {
height: 65%;
}
.max-height-65 {
max-height: 65%;
}
.width-65 {
width: 65%;
}
.max-width-65 {
max-width: 65%;
}
.height-70 {
height: 70%;
}
.max-height-70 {
max-height: 70%;
}
.width-70 {
width: 70%;
}
.max-width-70 {
max-width: 70%;
}
.height-75 {
height: 75%;
}
.max-height-75 {
max-height: 75%;
}
.width-75 {
width: 75%;
}
.max-width-75 {
max-width: 75%;
}
.height-80 {
height: 80%;
}
.max-height-80 {
max-height: 80%;
}
.width-80 {
width: 80%;
}
.max-width-80 {
max-width: 80%;
}
.height-85 {
height: 85%;
}
.max-height-85 {
max-height: 85%;
}
.width-85 {
width: 85%;
}
.max-width-85 {
max-width: 85%;
}
.height-90 {
height: 90%;
}
.max-height-90 {
max-height: 90%;
}
.width-90 {
width: 90%;
}
.max-width-90 {
max-width: 90%;
}
.height-95 {
height: 95%;
}
.max-height-95 {
max-height: 95%;
}
.width-95 {
width: 95%;
}
.max-width-95 {
max-width: 95%;
}
.height-100 {
height: 100%;
}
.max-height-100 {
max-height: 100%;
}
.width-100 {
width: 100%;
}
.max-width-100 {
max-width: 100%;
}

View File

@ -1,234 +0,0 @@
* {
transition: 0.25s ease-out, color 0.25s ease-out;
}
body #cookie-compliance {
background-color: #870015;
color: white;
}
body #cookie-compliance a.link {
color: #ff3d00;
border-bottom-color: #ff3d00;
}
body #cookie-compliance a.link:hover {
color: #ff3d00;
border-bottom-color: #ff3d00;
}
body a.link {
text-decoration: none;
color: #ff3d00;
border-bottom: none;
}
body a.link:hover {
color: #ff3d00;
border-bottom-color: #ff3d00;
}
body .loader #spinner {
stroke: #b71c1a;
}
body nav.top-bar {
color: white;
background: red;
}
body .top-bar ul {
background: red !important;
}
body .top-bar ul a {
color: white;
}
body button.button, body a.button {
background-color: red;
}
body button.button.disabled, body button.button.disabled:hover, body button.button.disabled:focus, body button.button:hover, body a.button.disabled, body a.button.disabled:hover, body a.button.disabled:focus, body a.button:hover {
background-color: red;
}
body .switch input:checked + .slider {
background-color: red;
}
body .switch input:focus + .slider {
box-shadow: 0 0 1px red;
}
body.blue #cookie-compliance {
background-color: #1a3062;
color: white;
}
body.blue #cookie-compliance a.link {
color: #546cfe;
border-bottom-color: #546cfe;
}
body.blue #cookie-compliance a.link:hover {
color: #546cfe;
border-bottom-color: #546cfe;
}
body.blue a.link {
text-decoration: none;
color: #546cfe;
border-bottom: none;
}
body.blue a.link:hover {
color: #546cfe;
border-bottom-color: #546cfe;
}
body.blue .loader #spinner {
stroke: #673AB7;
}
body.blue nav.top-bar {
color: white;
background: #2c58ae;
}
body.blue .top-bar ul {
background: #2c58ae !important;
}
body.blue .top-bar ul a {
color: white;
}
body.blue button.button, body.blue a.button {
background-color: #2c58ae;
}
body.blue button.button.disabled, body.blue button.button.disabled:hover, body.blue button.button.disabled:focus, body.blue button.button:hover, body.blue a.button.disabled, body.blue a.button.disabled:hover, body.blue a.button.disabled:focus, body.blue a.button:hover {
background-color: #2c58ae;
}
body.blue .switch input:checked + .slider {
background-color: #2c58ae;
}
body.blue .switch input:focus + .slider {
box-shadow: 0 0 1px #2c58ae;
}
body.green #cookie-compliance {
background-color: #003613;
color: white;
}
body.green #cookie-compliance a.link {
color: #009829;
border-bottom-color: #009829;
}
body.green #cookie-compliance a.link:hover {
color: #009829;
border-bottom-color: #009829;
}
body.green a.link {
text-decoration: none;
color: #009829;
border-bottom: none;
}
body.green a.link:hover {
color: #009829;
border-bottom-color: #009829;
}
body.green .loader #spinner {
stroke: green;
}
body.green nav.top-bar {
color: white;
background: green;
}
body.green .top-bar ul {
background: green !important;
}
body.green .top-bar ul a {
color: white;
}
body.green button.button, body.green a.button {
background-color: green;
}
body.green button.button.disabled, body.green button.button.disabled:hover, body.green button.button.disabled:focus, body.green button.button:hover, body.green a.button.disabled, body.green a.button.disabled:hover, body.green a.button.disabled:focus, body.green a.button:hover {
background-color: green;
}
body.green .switch input:checked + .slider {
background-color: green;
}
body.green .switch input:focus + .slider {
box-shadow: 0 0 1px green;
}
body.pink #cookie-compliance {
background-color: #70374a;
color: white;
}
body.pink #cookie-compliance a.link {
color: #fe64af;
border-bottom-color: #fe64af;
}
body.pink #cookie-compliance a.link:hover {
color: #fe64af;
border-bottom-color: #fe64af;
}
body.pink a.link {
text-decoration: none;
color: #fe64af;
border-bottom: none;
}
body.pink a.link:hover {
color: #fe64af;
border-bottom-color: #fe64af;
}
body.pink .loader #spinner {
stroke: #ff69b4;
}
body.pink nav.top-bar {
color: white;
background: #ff69b4;
}
body.pink .top-bar ul {
background: #ff69b4 !important;
}
body.pink .top-bar ul a {
color: white;
}
body.pink button.button, body.pink a.button {
background-color: #ff69b4;
}
body.pink button.button.disabled, body.pink button.button.disabled:hover, body.pink button.button.disabled:focus, body.pink button.button:hover, body.pink a.button.disabled, body.pink a.button.disabled:hover, body.pink a.button.disabled:focus, body.pink a.button:hover {
background-color: #ff69b4;
}
body.pink .switch input:checked + .slider {
background-color: #ff69b4;
}
body.pink .switch input:focus + .slider {
box-shadow: 0 0 1px #ff69b4;
}
body.black #cookie-compliance {
background-color: #353535;
color: white;
}
body.black #cookie-compliance a.link {
color: white;
border-bottom-color: white;
}
body.black #cookie-compliance a.link:hover {
color: #cacaca;
border-bottom-color: #cacaca;
}
body.black a.link {
text-decoration: none;
color: black;
border-bottom: 1px solid #000000;
}
body.black a.link:hover {
color: #4e4e4e;
border-bottom-color: #4e4e4e;
}
body.black .loader #spinner {
stroke: black;
}
body.black nav.top-bar {
color: white;
background: black;
}
body.black .top-bar ul {
background: black !important;
}
body.black .top-bar ul a {
color: white;
}
body.black button.button, body.black a.button {
background-color: black;
}
body.black button.button.disabled, body.black button.button.disabled:hover, body.black button.button.disabled:focus, body.black button.button:hover, body.black a.button.disabled, body.black a.button.disabled:hover, body.black a.button.disabled:focus, body.black a.button:hover {
background-color: black;
}
body.black .switch input:checked + .slider {
background-color: black;
}
body.black .switch input:focus + .slider {
box-shadow: 0 0 1px black;
}

1
public/css/foundation.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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-triangle-template class="segment segment-triangle"><div class=child-container></div></div><div class="max-height fill-me"><div class="text-right max-width"><button class="button show-while-playing" id=help-button data-translation=help></button></div><div class="height-20 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><div class="height-20 show-when-won center flex-center fill-me"><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>
<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-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 data-translation=help></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"><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

@ -31,14 +31,7 @@
<title>WordRotator</title>
<!-- Le styles -->
<link href="core/css/foundation.css" media="screen,print" rel="stylesheet" type="text/css">
<link href="core/css/framework.css" media="screen,print" rel="stylesheet" type="text/css">
<link href="core/css/core.css" media="screen,print" rel="stylesheet" type="text/css">
<link href="core/css/style.css" media="screen,print" rel="stylesheet" type="text/css">
<link href="core/css/flashMessenger.css" media="screen,print" rel="stylesheet" type="text/css">
<link href="core/css/theme.css" media="screen,print" rel="stylesheet" type="text/css">
<link href="core/css/settingsSite.css" media="screen,print" rel="stylesheet" type="text/css">
<link href="pwaAssets/css/pwaAssets.css" media="screen,print" rel="stylesheet" type="text/css">
<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>

View File

@ -3097,7 +3097,7 @@ class Theme
}
}
function applyPolyfills(){
function applyPolyfills() {
if (!String.prototype.format) {
String.prototype["format"] = function (args) {
return this.replace(/{(\d+)}/g, function (match, number) {
@ -3190,6 +3190,7 @@ function applyPolyfills(){
elem.removeEventListener("transitioncancel", transCancelledLis);
elem.style.opacity = null;
elem.style.transition = null;
console.log("transEnd");
resolve(true, e);
};
@ -3198,16 +3199,26 @@ function applyPolyfills(){
elem.removeEventListener("transitioncancel", transCancelledLis);
elem.style.opacity = null;
elem.style.transition = null;
console.log("transCancelled");
resolve(false, e);
};
elem.addEventListener("transitionend", transEndLis);
elem.addEventListener("transitioncancel", transCancelledLis);
});
//Nach Seitenneuzeichnen, damit chrome das immer macht (und FF auch)
requestAnimationFrame(function () {
console.log(getComputedStyle(elem).getPropertyValue("opacity"));
if (getComputedStyle(elem).getPropertyValue("opacity") === "1"){
resolve(false);
}
//Fallback
setTimeout(() => {
resolve(false);
}, time*1000);
//Nach Seitenneuzeichnen, damit chrome das immer macht (und FF auch)
requestAnimationFrame(function () {
elem.style.opacity = 1;
requestAnimationFrame(function () {
elem.style.opacity = 1;
});
});
});
return animPromise;
@ -5896,6 +5907,7 @@ class LevelSite extends WordRotatorBaseSite {
if (nextLevelJson === null) {
this.startSite(EndSite);
this.finish();
return;
}
const level = LevelHelper.inflateLevel(nextLevelJson, this.templateContainer);
@ -5977,9 +5989,14 @@ class LevelSite extends WordRotatorBaseSite {
}).then(() => {
return Promise.all([new Promise((r) => {
setTimeout(() => {
r(continueButton.fadeIn());
console.log("fadeIn");
r(continueButton.fadeIn().then(() => {
console.log("fade in ended!");
}));
}, 500);
}), audioOptions.loadedPromise.catch(e => {
}), audioOptions.loadedPromise.then(() => {
console.log("audio loaded");
}).catch(e => {
console.error(e);
})]);
});
@ -5992,7 +6009,7 @@ class LevelSite extends WordRotatorBaseSite {
this.coinPromise = this.coinPromise.then(() => {
return new Promise(r => {
let timeout = 350;
console.log("coinPromise - won", this.wonParams);
if (!this.wonParams.aborted) {
coinElem.fadeIn(timeout / 1000);
soundManager.play(SoundManager.CHANNELS.SOUND);
@ -6003,17 +6020,19 @@ class LevelSite extends WordRotatorBaseSite {
this.coinAction.redraw();
}
}, timeout / 2);
setTimeout(r, timeout);
}
else {
r();
}
//Always do the next promise for garbage collection
setTimeout(r, timeout);
})
});
}
this.coinPromise = this.coinPromise.catch((e) => {console.error(e);});
this.coinPromise = this.coinPromise.catch((e) => {
console.error(e);
});
this.wonTextScaler();
this.continueButtonScaler();
@ -6086,6 +6105,8 @@ class LevelSite extends WordRotatorBaseSite {
this._siteContent.classList.remove("step-2");
localStorage.removeItem("tutorial-step");
this.coinPromise = this.coinPromise.then(() => {
console.log("coinPromise - tutorial", this.wonParams);
FlashMessenger.addMessage("extra-coins-after-first-level");
localStorage.setItem("coins", parseInt(Helper.nonNull(localStorage.getItem("coins"), "0")) + 50);
this.coinAction.setTitle(Helper.nonNull(localStorage.getItem("coins"), "0"));
@ -6103,18 +6124,18 @@ class LevelSite extends WordRotatorBaseSite {
else if (this.level.id === LevelSite.TUTORIAL.SECOND_LEVEL) {
let currentStep = Helper.nonNull(localStorage.getItem("tutorial-step"), "3");
let scaleHelper = new ScaleHelper();
this._siteContent.classList.add("tutorial");
this._siteContent.classList.add("step-" + currentStep);
this.levelScaler();
switch (currentStep) {
case "3": {
let scaleHelper = new ScaleHelper();
this._siteContent.classList.add("tutorial");
this._siteContent.classList.add("step-" + currentStep);
this.levelScaler();
let eventListener = () => {
this._siteContent.classList.remove("tutorial");
this._siteContent.classList.remove("step-2");
localStorage.removeItem("tutorial-step");
this._siteContent.classList.remove("step-3");
localStorage.setItem("tutorial-step", "4");
this.findBy("#help-button").removeEventListener("click", eventListener);
};
this.findBy("#help-button").addEventListener("click", eventListener);
@ -6125,12 +6146,47 @@ class LevelSite extends WordRotatorBaseSite {
}
}
}
else if (this.level.id === LevelSite.TUTORIAL.BIG_SEGMENT_LEVEL) {
let currentStep = Helper.nonNull(localStorage.getItem("tutorial-step"), "4");
switch (currentStep) {
case "4": {
let scaleHelper = new ScaleHelper();
this._siteContent.classList.add("tutorial");
this._siteContent.classList.add("step-" + currentStep);
this.levelScaler();
let rotatableSegments = this.level.getRotatableSegments();
let firstSegment = rotatableSegments[0];
let pointer = this.findBy("#tutorial-pointer");
pointer.remove();
firstSegment.element.appendChild(pointer);
this.level.setSegmentClickedListener((segment) => {
if (firstSegment === segment) {
this._siteContent.classList.remove("tutorial");
this._siteContent.classList.remove("step-4");
localStorage.setItem("tutorial-step", "5");
}
});
let textElem = this.findBy(".tutorial-text .step-4");
scaleHelper.scaleToFull(textElem, textElem.parentElement, null, true, null, 2);
break;
}
}
}
}
}
LevelSite.TUTORIAL = {
FIRST_LEVEL: 67,
SECOND_LEVEL: 15,
BIG_SEGMENT_LEVEL: 341
};
class MainMenuLevel extends FourWordsLevel{

File diff suppressed because one or more lines are too long

View File

@ -1,24 +0,0 @@
.tab-header-container .tab-header {
display: inline-block;
background-color: #eeeeee;
border: 1px solid #b0b0b0;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
padding: 0 5px; }
.tab-header-container .tab-header.active {
border-bottom: 0;
background-color: #FFF; }
.rotated {
transform-origin: bottom center;
height: 50%;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0; }
.no-transition {
transition: none !important; }
.no-transition * {
transition: none !important; }

View File

@ -4085,7 +4085,7 @@ class DBTranslator extends Translator {
}
}
function applyPolyfills(){
function applyPolyfills() {
if (!String.prototype.format) {
String.prototype["format"] = function (args) {
return this.replace(/{(\d+)}/g, function (match, number) {
@ -4178,6 +4178,7 @@ function applyPolyfills(){
elem.removeEventListener("transitioncancel", transCancelledLis);
elem.style.opacity = null;
elem.style.transition = null;
console.log("transEnd");
resolve(true, e);
};
@ -4186,16 +4187,26 @@ function applyPolyfills(){
elem.removeEventListener("transitioncancel", transCancelledLis);
elem.style.opacity = null;
elem.style.transition = null;
console.log("transCancelled");
resolve(false, e);
};
elem.addEventListener("transitionend", transEndLis);
elem.addEventListener("transitioncancel", transCancelledLis);
});
//Nach Seitenneuzeichnen, damit chrome das immer macht (und FF auch)
requestAnimationFrame(function () {
console.log(getComputedStyle(elem).getPropertyValue("opacity"));
if (getComputedStyle(elem).getPropertyValue("opacity") === "1"){
resolve(false);
}
//Fallback
setTimeout(() => {
resolve(false);
}, time*1000);
//Nach Seitenneuzeichnen, damit chrome das immer macht (und FF auch)
requestAnimationFrame(function () {
elem.style.opacity = 1;
requestAnimationFrame(function () {
elem.style.opacity = 1;
});
});
});
return animPromise;

View File

@ -12,15 +12,18 @@
<div id='segment-triangle-template' class='segment segment-triangle'>
<div class='child-container'></div>
</div>
<div id = 'tutorial-pointer'></div>
<!-- Site Content -->
<div class='max-height fill-me'>
<div class="text-right max-width">
<button class="button show-while-playing" id='help-button' data-translation="help"></button>
</div>
<div class = 'height-20 tutorial-text center flex-center hidden'>
<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'>
<div class = 'grow max-width'>

View File

@ -152,6 +152,7 @@ export class LevelSite extends WordRotatorBaseSite {
if (nextLevelJson === null) {
this.startSite(EndSite);
this.finish();
return;
}
const level = LevelHelper.inflateLevel(nextLevelJson, this.templateContainer);
@ -233,9 +234,14 @@ export class LevelSite extends WordRotatorBaseSite {
}).then(() => {
return Promise.all([new Promise((r) => {
setTimeout(() => {
r(continueButton.fadeIn());
console.log("fadeIn");
r(continueButton.fadeIn().then(() => {
console.log("fade in ended!")
}));
}, 500)
}), audioOptions.loadedPromise.catch(e => {
}), audioOptions.loadedPromise.then(() => {
console.log("audio loaded")
}).catch(e => {
console.error(e)
})]);
});
@ -248,7 +254,7 @@ export class LevelSite extends WordRotatorBaseSite {
this.coinPromise = this.coinPromise.then(() => {
return new Promise(r => {
let timeout = 350;
console.log("coinPromise - won", this.wonParams);
if (!this.wonParams.aborted) {
coinElem.fadeIn(timeout / 1000);
soundManager.play(SoundManager.CHANNELS.SOUND);
@ -259,17 +265,19 @@ export class LevelSite extends WordRotatorBaseSite {
this.coinAction.redraw();
}
}, timeout / 2);
setTimeout(r, timeout);
}
else {
r();
}
//Always do the next promise for garbage collection
setTimeout(r, timeout);
})
});
}
this.coinPromise = this.coinPromise.catch((e) => {console.error(e)});
this.coinPromise = this.coinPromise.catch((e) => {
console.error(e)
});
this.wonTextScaler();
this.continueButtonScaler();
@ -342,6 +350,8 @@ export class LevelSite extends WordRotatorBaseSite {
this._siteContent.classList.remove("step-2");
localStorage.removeItem("tutorial-step");
this.coinPromise = this.coinPromise.then(() => {
console.log("coinPromise - tutorial", this.wonParams);
FlashMessenger.addMessage("extra-coins-after-first-level");
localStorage.setItem("coins", parseInt(Helper.nonNull(localStorage.getItem("coins"), "0")) + 50);
this.coinAction.setTitle(Helper.nonNull(localStorage.getItem("coins"), "0"));
@ -359,18 +369,18 @@ export class LevelSite extends WordRotatorBaseSite {
else if (this.level.id === LevelSite.TUTORIAL.SECOND_LEVEL) {
let currentStep = Helper.nonNull(localStorage.getItem("tutorial-step"), "3");
let scaleHelper = new ScaleHelper();
this._siteContent.classList.add("tutorial");
this._siteContent.classList.add("step-" + currentStep);
this.levelScaler();
switch (currentStep) {
case "3": {
let scaleHelper = new ScaleHelper();
this._siteContent.classList.add("tutorial");
this._siteContent.classList.add("step-" + currentStep);
this.levelScaler();
let eventListener = () => {
this._siteContent.classList.remove("tutorial");
this._siteContent.classList.remove("step-2");
localStorage.removeItem("tutorial-step");
this._siteContent.classList.remove("step-3");
localStorage.setItem("tutorial-step", "4");
this.findBy("#help-button").removeEventListener("click", eventListener);
};
this.findBy("#help-button").addEventListener("click", eventListener);
@ -381,10 +391,45 @@ export class LevelSite extends WordRotatorBaseSite {
}
}
}
else if (this.level.id === LevelSite.TUTORIAL.BIG_SEGMENT_LEVEL) {
let currentStep = Helper.nonNull(localStorage.getItem("tutorial-step"), "4");
switch (currentStep) {
case "4": {
let scaleHelper = new ScaleHelper();
this._siteContent.classList.add("tutorial");
this._siteContent.classList.add("step-" + currentStep);
this.levelScaler();
let rotatableSegments = this.level.getRotatableSegments();
let firstSegment = rotatableSegments[0];
let pointer = this.findBy("#tutorial-pointer");
pointer.remove();
firstSegment.element.appendChild(pointer);
this.level.setSegmentClickedListener((segment) => {
if (firstSegment === segment) {
this._siteContent.classList.remove("tutorial");
this._siteContent.classList.remove("step-4");
localStorage.setItem("tutorial-step", "5");
}
});
let textElem = this.findBy(".tutorial-text .step-4");
scaleHelper.scaleToFull(textElem, textElem.parentElement, null, true, null, 2);
break;
}
}
}
}
}
LevelSite.TUTORIAL = {
FIRST_LEVEL: 67,
SECOND_LEVEL: 15,
BIG_SEGMENT_LEVEL: 341
};

View File

@ -13,5 +13,6 @@
"tutorial-step-1": "Klicke auf ein Feld, um dieses rotieren zu lassen!",
"tutorial-step-2": "Um zu gewinnen, drehe die Segmente so, dass du zwei Wörter lesen kannst.",
"tutorial-step-3": "Durch die Hilfe kannst du ein Segment lösen lassen. Die Hilfe kostet aber 25 Münzen. Probiere jetzt die Hilfe aus.",
"tutorial-step-4": "Große Segmente drehst du, indem du diese ziehst.",
"extra-coins-after-first-level":"Für das erste Level gibt es 50 extra Münzen!"
}

View File

@ -1,208 +0,0 @@
@import "../../node_modules/foundation-sites/scss/foundation";
#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 {
&.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;
}
}
@include breakpoint(smedium down) {
&.medium {
display: block;
}
}
@include breakpoint(medium down) {
&.large {
display: block;
}
}
&.never {
display: block;
}
&.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.4rem;
}
}
}
> 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

@ -1,621 +0,0 @@
// 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:0px,
smedium: 400px,
medium: 640px,
large: 1024px,
xlarge: 1200px,
xxlarge: 1440px,
);
$print-breakpoint: large;
$breakpoint-classes: (small 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

@ -1,4 +1 @@
@import "foundationSettings";
$hoverColor: #f2f2f2;
$hoverColorDark: #e8e8e8;
@import "defaultSettings";

View File

@ -1,3 +1,12 @@
@keyframes tutorialPointer {
0%{
top: 75%;
}
100%{
top: 25%;
}
}
.tutorial-blanket {
display: none;
position: fixed;
@ -18,6 +27,10 @@
color: white;
font-size: 1.5rem;
display: flex;
transition: none !important;
* {
transition: none !important;
}
}
&.step-1 {
@ -60,15 +73,48 @@
overflow: visible;
margin-right: 10px;
margin-top: 10px;
box-shadow: 0 0 10px 5px #fff;
//&:after {
// content: "";
// position: absolute;
// top: 0;
// left: 0;
// bottom: 0;
// right: 0;
//}
box-shadow: 0 0 10px 5px #fff;
}
}
&.step-4 {
.tutorial-text .step-4 {
display: initial;
z-index: 9900 !important;
position: relative;
}
#level {
.segment-row {
position: inherit;
> .child-container {
> .segment-triangle:first-child {
position: inherit;
> .child-container {
> .segment-parent:first-child, > .segment-parent:first-child.rotating {
z-index: 9900 !important;
#tutorial-pointer{
width: 0.6em;
height: 0.6em;
//background: red;
border-radius: 50%;
left: 25%;
right: 50%;
position: absolute;
top: 75%;
bottom: 50%;
z-index: 1;
transform: translate(-50%, -50%);
animation: tutorialPointer 2s infinite;
pointer-events: none;
}
}
}
}
}
}
}
}
}

View File

@ -0,0 +1,17 @@
@mixin addThemeDefinition($theme) {
#tutorial-pointer{
background: #{map-get($theme, themeColor)};
}
}
body {
@each $theme, $values in $themes {
@if (#{map-get($values, class)} == '') {
@include addThemeDefinition($values)
} @else {
&.#{map-get($values, class)} {
@include addThemeDefinition($values)
}
}
}
}

67
src/scss/foundation.scss vendored Executable 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,4 +1,6 @@
@import "imports";
@import "tutorial";
@import "wordrotatorTheme";
//ActionBar
nav.top-bar.title-bar {

View File

@ -75,12 +75,14 @@ const SEGMENT = {
TWENTYONE: 20
};
test.only('Play', async t => {
test('Play', async t => {
let levelNumber = 1;
await t
//Main Menu
.click(Selector('#play-button'))
//firstTutorial
//firstTutorial
.expect(Selector('.tutorial-text .step-1').visible).eql(true)
.expect(Selector('.tutorial-text .step-2').visible).eql(false)
.click(Selector('.segment-parent').nth(SEGMENT.THREE))
@ -90,11 +92,12 @@ test.only('Play', async t => {
.expect(Selector('.tutorial-text .step-2').visible).eql(true)
.click(Selector('.segment-parent').nth(SEGMENT.THREE))
.expect(Selector('#continue-button').visible).eql(true)
.wait(3500)
.click(Selector('#continue-button'))
// .wait(3500)
.click(Selector('#continue-button'));
//first Level
.expect(Selector('.segment.segment-parent.rotate-90').nth(0).getStyleProperty('transform')).eql("matrix(0, 1, -1, 0, 0, 0)")
levelNumber++;
//first Level
await t.expect(Selector('.segment.segment-parent.rotate-90').nth(0).getStyleProperty('transform')).eql("matrix(0, 1, -1, 0, 0, 0)")
.expect(Selector('.segment.segment-parent.rotate-90').nth(1).getStyleProperty('transform')).eql("matrix(0, 1, -1, 0, 0, 0)")
.expect(Selector('.segment.segment-parent.rotate-270').getStyleProperty('transform')).eql("matrix(0, -1, 1, 0, 0, 0)")
.expect(Selector('#won-text').visible).eql(false)
@ -113,10 +116,12 @@ test.only('Play', async t => {
.expect(Selector('#won-text').visible).eql(true)
.expect(Selector('#continue-button').visible).eql(true)
.click(Selector('#continue-button'))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel*2+extraCoins-helpCost))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * levelNumber + extraCoins - helpCost));
//TWOLevel
.expect(Selector('.segment.segment-parent.rotate-270').nth(0).textContent).eql("BOAL")
levelNumber++;
//TWOLevel
await t.expect(Selector('.segment.segment-parent.rotate-270').nth(0).textContent).eql("BOAL")
.expect(Selector('.segment.segment-parent.rotate-180').textContent).eql("DEAR")
.expect(Selector('.segment.segment-parent.rotate-360').textContent).eql("NSMR")
.expect(Selector('.segment.segment-parent.rotate-270').nth(1).textContent).eql("EEUF")
@ -137,10 +142,11 @@ test.only('Play', async t => {
.expect(Selector('#won-text').visible).eql(true)
.expect(Selector('#continue-button').visible).eql(true)
.click(Selector('#continue-button'))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * 3+extraCoins-helpCost))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * levelNumber + extraCoins - helpCost));
//THREE Level
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).textContent).eql("ZEHO")
levelNumber++;
//THREE Level
await t.expect(Selector('.segment-parent').nth(SEGMENT.ONE).textContent).eql("ZEHO")
.expect(Selector('.segment-parent').nth(SEGMENT.TWO).textContent).eql("ITCH")
.expect(Selector('.segment-parent').nth(SEGMENT.THREE).textContent).eql("STSA")
.expect(Selector('.segment-parent').nth(SEGMENT.FOUR).textContent).eql("RAIS")
@ -154,9 +160,31 @@ test.only('Play', async t => {
.click(Selector('.segment-parent').nth(SEGMENT.FOUR))
.click(Selector('.segment-parent').nth(SEGMENT.FIVE))
.click(Selector('#continue-button'))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * 4+extraCoins-helpCost))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * levelNumber + extraCoins - helpCost));
//4. Level
levelNumber++;
// .click(Selector())
await t.drag(Selector('.segment-parent').nth(SEGMENT.ONE), -dragDimen, 4, {
offsetX: dragDimen + 50,
offsetY: 17
})
.click(Selector('.segment-parent').nth(SEGMENT.TWELVE))
.click(Selector('.segment-parent').nth(SEGMENT.FOUR))
.click(Selector('.segment-parent').nth(SEGMENT.SEVEN))
.click(Selector('.segment-parent').nth(SEGMENT.FIVE))
.click(Selector('.segment-parent').nth(SEGMENT.TWO))
.click(Selector('.segment-parent').nth(SEGMENT.TWELVE))
.click(Selector('.segment-parent').nth(SEGMENT.FOUR))
.click(Selector('.segment-parent').nth(SEGMENT.SEVEN))
.click(Selector('.segment-parent').nth(SEGMENT.ELEVEN))
.click(Selector('.segment-parent').nth(SEGMENT.TWELVE))
.click(Selector('.segment-parent').nth(SEGMENT.SEVEN))
.click(Selector('#continue-button'));
levelNumber++;
//4. Level
await t
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).textContent).eql("FERÜINCKPHREYSSI")
.expect(Selector('.segment-parent').nth(SEGMENT.TWO).textContent).eql("FERÜ")
.expect(Selector('.segment-parent').nth(SEGMENT.THREE).textContent).eql("INCK")
@ -209,13 +237,13 @@ test.only('Play', async t => {
.click(Selector('.segment-parent').nth(SEGMENT.SIX))
.expect(Selector('#continue-button').visible).eql(true)
.expect(Selector('#won-text').visible).eql(true)
.wait(1000)
.debug()
.click(Selector('#continue-button'))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * 5+extraCoins-helpCost))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * levelNumber + extraCoins - helpCost));
levelNumber++;
//5. Level
.expect(Selector('#level-number').textContent).eql("6")
await t.expect(Selector('#level-number').textContent).eql(""+levelNumber)
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).textContent).eql("BEANTOBEALBALEUM")
.expect(Selector('.segment-parent').nth(SEGMENT.SIX).textContent).eql("NUTUNGNGRGHAIEUS")
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).getStyleProperty('transform')).eql("matrix(1, 0, 0, 1, 0, 0)")
@ -246,11 +274,11 @@ test.only('Play', async t => {
.expect(Selector('#won-text').visible).eql(true)
.expect(Selector('#continue-button').visible).eql(true)
.click(Selector('#continue-button'))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * 6+extraCoins-helpCost))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * levelNumber + extraCoins - helpCost));
levelNumber++;
//Level 6
.expect(Selector('#level-number').textContent).eql("7")
await t.expect(Selector('#level-number').textContent).eql(""+levelNumber)
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).textContent).eql("FEGEHLISARBEBERE")
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).getStyleProperty('transform')).eql("matrix(1, 0, 0, 1, 0, 0)")
.expect(Selector('.segment-parent').nth(SEGMENT.TEN).getStyleProperty('transform')).eql("matrix(-1, 0, 0, -1, 0, 0)")
@ -298,11 +326,11 @@ test.only('Play', async t => {
.expect(Selector('#continue-button').visible).eql(true)
.expect(Selector('#won-text').visible).eql(true)
.click(Selector('#continue-button'))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * 7+extraCoins-helpCost))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * levelNumber + extraCoins - helpCost));
levelNumber++;
//Level 7
.expect(Selector('.segment-parent').nth(SEGMENT.SIX).getStyleProperty('transform')).eql("matrix(1, 0, 0, 1, 0, 0)")
await t.expect(Selector('.segment-parent').nth(SEGMENT.SIX).getStyleProperty('transform')).eql("matrix(1, 0, 0, 1, 0, 0)")
.expect(Selector('.segment-row > .child-container').childElementCount).eql(3)
.drag(Selector('.segment-parent').nth(SEGMENT.ONE), 4, dragDimen, {
@ -316,15 +344,10 @@ test.only('Play', async t => {
offsetX: dragDimen,
offsetY: 57
})
// .drag(Selector('.segment-parent').nth(SEGMENT.ONE), 4, dragDimen, {
// offsetX: 50,
// offsetY: 73
// })
.click(Selector('.segment-parent').nth(SEGMENT.THREE))
.click(Selector('.segment-parent').nth(SEGMENT.EIGHT))
.click(Selector('.segment-parent').nth(SEGMENT.SEVEN))
.click(Selector('.segment-parent').nth(SEGMENT.FOUR))
// .click(Selector('.segment-parent').nth(SEGMENT.THIRTEEN))
.click(Selector('.segment-parent').nth(SEGMENT.FIVE))
.click(Selector('.segment-parent').nth(SEGMENT.FOUR))
.click(Selector('.segment-parent').nth(SEGMENT.SEVEN))
@ -336,14 +359,9 @@ test.only('Play', async t => {
offsetX: dragDimen,
offsetY: 57
})
// .drag(Selector('.segment-parent').nth(SEGMENT.ONE), 4, dragDimen, {
// offsetX: 50,
// offsetY: 73
// })
// .click(Selector('.segment-parent').nth(SEGMENT.THIRTEEN))
.click(Selector('#help-button'))
.wait(5000)
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * 8 - helpCost+extraCoins-helpCost))
.expect(Selector('.coin-counter').innerText).eql("" + (coinsPerLevel * levelNumber - helpCost + extraCoins - helpCost))
.expect(Selector('#won-text').visible).eql(true)
.expect(Selector('#continue-button').visible).eql(true)
@ -351,32 +369,30 @@ test.only('Play', async t => {
.expect(Selector('#site-content').childElementCount).eql(1);
});
test('LoadLastLevel', async t => {
// await t.debug();
await t.click(Selector('#play-button'))
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).hasClass('locked')).ok()
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).getStyleProperty('transform')).eql("matrix(1, 0, 0, 1, 0, 0)")
.expect(Selector('.segment-parent').nth(SEGMENT.TWO).getStyleProperty('transform')).eql("matrix(1, 0, 0, 1, 0, 0)")
.expect(Selector('.segment-parent').nth(SEGMENT.THREE).getStyleProperty('transform')).eql("matrix(0, -1, 1, 0, 0, 0)")
// .debug()
}).before(async t => {
await testLocalStorageSet("currentLevel", "{\"id\":15,\"rotations\":[0,0,270],\"locks\":[false,true,true]}");
});
test('LevelRotation', async t => {
test.only('LevelRotation', async t => {
await t
.click(Selector('.segment-parent').nth(SEGMENT.THREE))
.click(Selector('.segment-parent').nth(SEGMENT.THREE))
.click(Selector('.segment-parent').nth(SEGMENT.THREE))
.wait(4000)
.wait(3750)
.expect(Selector('.segment-parent').nth(SEGMENT.THREE).getStyleProperty('transform')).eql("matrix(0, -1, 1, 0, 0, 0)")
.expect(Selector('.segment-parent').nth(SEGMENT.FOUR).getStyleProperty('transform')).eql("matrix(0, 1, -1, 0, 0, 0)")
.click(Selector('.segment-parent').nth(SEGMENT.THREE))
.click(Selector('.segment-parent').nth(SEGMENT.FOUR))
.click(Selector('.segment-parent').nth(SEGMENT.FOUR))
.click(Selector('.segment-parent').nth(SEGMENT.FOUR))
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).textContent).eql("ARCH")
.expect(Selector('.segment-parent').nth(SEGMENT.TWO).textContent).eql("CHAR")
.expect(Selector('.segment-parent').nth(SEGMENT.THREE).textContent).eql("IVME");
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).textContent).eql("AHAU")
.expect(Selector('.segment-parent').nth(SEGMENT.TWO).textContent).eql("NUSB")
.expect(Selector('.segment-parent').nth(SEGMENT.THREE).textContent).eql("NGAU");
await goBack();
await t
.click(Selector('.segment-parent').nth(SEGMENT.THREE))
@ -389,9 +405,9 @@ test('LevelRotation', async t => {
.click(Selector('.segment-parent').nth(SEGMENT.FOUR))
.click(Selector('.segment-parent').nth(SEGMENT.FOUR))
.click(Selector('.segment-parent').nth(SEGMENT.FOUR))
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).textContent).eql("ARCH")
.expect(Selector('.segment-parent').nth(SEGMENT.TWO).textContent).eql("CHAR")
.expect(Selector('.segment-parent').nth(SEGMENT.THREE).textContent).eql("IVME");
.expect(Selector('.segment-parent').nth(SEGMENT.ONE).textContent).eql("AHAU")
.expect(Selector('.segment-parent').nth(SEGMENT.TWO).textContent).eql("NUSB")
.expect(Selector('.segment-parent').nth(SEGMENT.THREE).textContent).eql("NGAU");
}).before(async t => {
await replaceRandom([0.9, 0.5]);