Initial import.

This commit is contained in:
Pachira 2020-06-10 16:03:13 +00:00
commit 2f71fa5e62
88 changed files with 6460 additions and 0 deletions

1
.gitattributes vendored Normal file
View file

@ -0,0 +1 @@
* text=auto

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
/.debug
/public/ss
/uploads
/config.php

46
cron.php Normal file
View file

@ -0,0 +1,46 @@
<?php
namespace YTKNS;
if(!defined('YTKNS_SEM_NAME'))
define('YTKNS_SEM_NAME', 'b');
if(!defined('YTKNS_SFM_PATH'))
define('YTKNS_SFM_PATH', sys_get_temp_dir() . DIRECTORY_SEPARATOR . '{04884071-d334-4388-947a-4fd8c4d4f4ea}');
if(!is_file(YTKNS_SFM_PATH))
touch(YTKNS_SFM_PATH);
$ftok = ftok(YTKNS_SFM_PATH, YTKNS_SEM_NAME);
$semaphore = sem_get($ftok, 1);
if(!sem_acquire($semaphore))
die('Failed to acquire semaphore.' . PHP_EOL);
require_once __DIR__ . '/startup.php';
// Destroy old sessions
UserSession::purge();
// Resynchronise use counts
Upload::resync(EFFECT_UPLOADS);
// Destroy orphaned uploads
Upload::purgeOrphans();
// Get task queue
$taskQueue = ZoneTask::queue();
// Plow through tasks
// TODO: make task functions modular
while($task = array_shift($taskQueue)) {
if(!isset($zoneInfo) || $zoneInfo->getId() !== $task->getZoneId())
$zoneInfo = $task->getZone();
switch($task->getName()) {
case 'screenshot':
$zoneInfo->takeScreenshot();
break;
}
$task->delete();
}
sem_release($semaphore);

BIN
public/assets/accept.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

BIN
public/assets/add.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

BIN
public/assets/arrow_up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

BIN
public/assets/bomb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

BIN
public/assets/cancel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

BIN
public/assets/delete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

BIN
public/assets/drive_add.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

554
public/assets/editor.css Normal file
View file

@ -0,0 +1,554 @@
.ye {
display: flex;
min-height: 500px;
border-bottom: 1px solid #ddd;
margin: -1px;
}
.ye-sidebar {
flex: 0 0 auto;
min-width: 250px;
display: flex;
flex-direction: column;
}
.ye-sidebar-buttons {
flex: 0 0 auto;
display: flex;
background-color: #eee;
border-bottom: 1px solid #ddd;
justify-content: flex-start;
align-items: center;
height: 28px;
}
.ye-sidebar-buttons-separator {
width: 1px;
height: 22px;
margin: 1px;
background-color: #ddd;
}
.ye-sidebar-buttons-button {
margin: 1px;
width: 24px;
height: 24px;
cursor: pointer;
background-size: 16px 16px;
background-repeat: no-repeat;
background-position: center center;
background-image: url('page_white.png');
}
.ye-sidebar-buttons-button:hover,
.ye-sidebar-buttons-button:focus {
border: 1px solid #7ca1cd;
background-color: #deecfd;
}
.ye-sidebar-buttons-button:active {
background-color: #f1f7fe;
}
.ye-sidebar-buttons-button--save { background-image: url('accept.png'); }
.ye-sidebar-buttons-button--cancel { background-image: url('cancel.png'); }
.ye-sidebar-buttons-button--add { background-image: url('add.png'); }
.ye-sidebar-buttons-button--preview { background-image: url('page_white_magnify.png'); }
.ye-sidebar-buttons-button--edit { background-image: url('page_white_edit.png'); }
.ye-sidebar-buttons-button--live { background-image: url('page_white_link.png'); }
.ye-sidebar-buttons-button--reset { background-image: url('arrow_refresh.png'); }
.ye-sidebar-effects {
flex: 1 1 auto;
}
.ye-sidebar-effects-empty {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.ye-sidebar-effects-effect {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #ddd;
padding: 5px;
}
.ye-sidebar-effects-effect-name {
padding: 0 5px;
}
.ye-sidebar-effects-effect-actions {
flex: 0 0 auto;
display: flex;
justify-content: flex-end;
align-items: center;
}
.ye-sidebar-effects-effect-actions-action {
margin: 1px;
width: 20px;
height: 20px;
cursor: pointer;
background-size: 16px 16px;
background-repeat: no-repeat;
background-position: center center;
background-image: url('page_white.png');
}
.ye-sidebar-effects-effect-actions-action--edit { background-image: url('pencil.png'); }
.ye-sidebar-effects-effect-actions-action--delete { background-image: url('delete.png'); }
.ye-main {
flex: 1 1 auto;
border-left: 1px solid #ddd;
display: flex;
flex-direction: column;
}
.ye-main-title {
flex: 0 0 auto;
border-left: 1px solid #ddd;
display: flex;
flex-direction: column;
justify-content: center;
background-color: #eee;
border-bottom: 1px solid #ddd;
height: 28px;
font-size: 1.2em;
padding: 0 6px;
}
.ye-main-container {
flex: 1 1 auto;
display: flex;
flex-direction: column;
align-items: stretch;
}
.ye-main-welcome {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.ye-main-effect-delete-confirm {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.ye-main-effect-delete-confirm-text {
font-size: 1.2em;
line-height: 1.5em;
}
.ye-main-effect-delete-confirm-actions {
display: flex;
margin: 5px;
}
.ye-main-effect-delete-confirm-actions-action {
cursor: pointer;
margin: 0 5px;
padding: 5px 10px;
font-size: 1.1em;
border-radius: 5px;
min-width: 100px;
text-align: center;
color: #fff;
transition: background-color .1s;
}
.ye-main-effect-delete-confirm-actions-action--accept { background-color: #28a745; }
.ye-main-effect-delete-confirm-actions-action--accept:hover,
.ye-main-effect-delete-confirm-actions-action--accept:focus { background-color: #218838; }
.ye-main-effect-delete-confirm-actions-action--accept:active { background-color: #1e7e34; }
.ye-main-effect-delete-confirm-actions-action--deny { background-color: #dc3545; }
.ye-main-effect-delete-confirm-actions-action--deny:hover,
.ye-main-effect-delete-confirm-actions-action--deny:focus { background-color: #c82333; }
.ye-main-effect-delete-confirm-actions-action--deny:active { background-color: #bc2130; }
.ye-main-details {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
max-width: 400px;
margin: 0 auto;
}
.ye-main-details-fields {
width: 100%;
}
.ye-main-details-fields-field {
display: flex;
margin: 5px 0;
}
.ye-main-details-fields-field-name {
min-width: 100px;
}
.ye-main-details-fields-field-wrap {
border: 1px solid #000;
min-width: 300px;
height: 22px;
display: flex;
padding: 0 2px;
background-color: #eee;
color: #444;
}
.ye-main-details-fields-field-input {
border-width: 0;
flex-grow: 1;
font: 12px/20px Tahoma, Geneva, 'Dejavu Sans', Arial, Helvetica, sans-serif;
background-color: #eee;
color: #000;
}
.ye-main-details-fields-field--readonly .ye-main-details-fields-field-wrap,
.ye-main-details-fields-field--readonly .ye-main-details-fields-field-input {
color: #666;
}
.ye-applet-effects-list {
display: flex;
flex-direction: column;
}
.ye-applet-effects-list-item {
display: flex;
justify-content: space-between;
padding: 5px;
border-bottom: 1px solid #ddd;
}
.ye-applet-effects-list-item--used {
opacity: .5;
}
.ye-applet-effects-list-item-name {
padding: 1px 5px;
}
.ye-applet-effects-list-item-actions {
flex: 0 0 auto;
display: flex;
justify-content: flex-end;
align-items: center;
}
.ye-applet-effects-list-item-actions-action {
margin: 1px;
width: 20px;
height: 20px;
cursor: pointer;
background-size: 16px 16px;
background-repeat: no-repeat;
background-position: center center;
background-image: url('page_white.png');
}
.ye-applet-effects-list-item-actions-action--add { background-image: url('add.png'); }
.ye-applet-uploads {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.ye-applet-uploads-progress {
width: 100%;
height: 100%;
flex: 1 1 auto;
display: flex;
justify-content: center;
align-items: center;
padding: 10px;
}
.ye-applet-uploads-progress-bar {
height: 24px;
width: 100%;
flex: 0 0 auto;
}
.ye-applet-uploads-cancel {
margin: 5px;
margin-top: 0;
font-size: 1.2em;
padding: 5px;
cursor: pointer;
}
.ye-applet-uploads-dropzone {
flex: 1 1 auto;
min-height: 200px;
padding: 5px;
cursor: pointer;
}
.ye-applet-uploads-dropzone-inner {
width: 100%;
height: 100%;
background-color: #ccc;
background-image: radial-gradient(circle at center, #eee, #bbb);
border: 5px dashed #888;
border-radius: 5px;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.5em;
line-height: 1.5em;
transition: border-color .2s;
}
.ye-applet-uploads-dropzone--active .ye-applet-uploads-dropzone-inner {
border-color: #444;
}
.ye-applet-uploads-hidden {
display: none;
}
.ye-applet-editor {
}
.ye-applet-editor--fill {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.ye-applet-editor-empty {
font-size: 1.2em;
line-height: 1.5em;
}
.ye-applet-editor-properties {
display: flex;
flex-direction: column;
}
.ye-applet-editor-properties-property {
display: flex;
flex-direction: column;
border-bottom: 1px solid #ddd;
}
.ye-applet-editor-properties-property-title {
font-size: 1.1em;
line-height: 1.5em;
padding: 2px 5px;
}
.ye-applet-editor-properties-property-wrap {
display: flex;
flex: 1 1 auto;
justify-content: space-between;
}
.ye-applet-editor-properties-property-none {
font-size: .9em;
padding: 2px 10px;
}
.ye-applet-editor-properties-property-reset {
flex: 0 0 auto;
width: 20px;
height: 20px;
margin: 4px;
background-image: url('bomb.png');
background-size: 16px 16px;
background-position: center center;
background-repeat: no-repeat;
cursor: pointer;
}
.ye-applet-editor-properties-property-bool {
display: block;
width: 100%;
}
.ye-applet-editor-properties-property-bool-toggle {
margin: 7px;
}
.ye-applet-editor-properties-property-int {
display: block;
width: 100%;
}
.ye-applet-editor-properties-property-int-input {
margin: 2px 5px;
padding: 2px;
border: 1px solid #aaa;
}
.ye-applet-editor-properties-property-int-input:focus {
border-color: #f78f2e;
}
.ye-applet-editor-properties-property-upload {
display: flex;
align-items: center;
}
.ye-applet-editor-properties-property-upload-id {
font-size: .9em;
padding: 2px 10px;
}
.ye-applet-editor-properties-property-upload-select {
flex: 0 0 auto;
width: 20px;
height: 20px;
margin: 4px;
background-image: url('drive_add.png');
background-size: 16px 16px;
background-position: center center;
background-repeat: no-repeat;
cursor: pointer;
}
.ye-applet-editor-properties-property-select {
display: block;
width: 100%;
}
.ye-applet-editor-properties-property-select-input {
margin: 5px;
padding: 2px;
border: 1px solid #aaa;
}
.ye-applet-editor-properties-property-select-input:focus {
border-color: #f78f2e;
}
.ye-applet-editor-properties-property-colour {
display: block;
width: 100%;
}
.ye-applet-editor-properties-property-colour-input {
margin: 5px;
padding: 2px;
border: 1px solid #aaa;
}
.ye-applet-editor-properties-property-colour-input:focus {
border-color: #f78f2e;
}
.ye-applet-editor-properties-property-string {
display: flex;
width: 100%;
}
.ye-applet-editor-properties-property-string-input {
margin: 5px;
padding: 2px;
border: 1px solid #aaa;
flex: 1 1 auto;
}
.ye-applet-editor-properties-property-string-input:focus {
border-color: #f78f2e;
}
.ye-applet-editor-properties-property-gradient {
flex-grow: 1;
}
.ye-applet-editor-properties-property-gradient-preview {
margin: 0 5px;
height: 50px;
border: 1px solid #aaa;
}
.ye-applet-editor-properties-property-gradient-direction {
display: flex;
align-items: center;
}
.ye-applet-editor-properties-property-gradient-direction-circle {
margin: 6px;
width: 34px;
height: 34px;
border-radius: 100%;
border: 1px solid #8c8c8c;
padding: 1px;
background: #fefefe linear-gradient(0deg, #fdfdfd, #d9d9d9);
box-shadow: inset 0 0 0 1px #fff;
}
.ye-applet-editor-properties-property-gradient-direction-circle:active {
border-color: #f78f2e;
}
.ye-applet-editor-properties-property-gradient-direction-circle-value {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: flex-start;
pointer-events: none;
}
.ye-applet-editor-properties-property-gradient-direction-circle-indicator {
background: #999;
width: 2px;
height: 50%;
border-radius: 1px;
pointer-events: none;
}
.ye-applet-editor-properties-property-gradient-direction-input {
margin: 5px;
margin-left: 0;
padding: 2px;
border: 1px solid #aaa;
width: 60px;
}
.ye-applet-editor-properties-property-gradient-direction-input:focus {
border-color: #f78f2e;
}
.ye-applet-editor-properties-property-gradient-points-add {
margin: 1px;
margin-left: auto;
border: 1px solid #707070;
border-radius: 2px;
background: linear-gradient(180deg, #fcfcfc 0%, #ebebeb 50%, #dbdbdb 50%) #ebebeb;
cursor: pointer;
padding: 0 5px;
font: 12px/20px Tahoma, Geneva, 'Dejavu Sans', Arial, Helvetica, sans-serif;
display: flex;
align-items: center;
color: #000;
text-decoration: none;
transition: border-color .2s;
}
.ye-applet-editor-properties-property-gradient-points-add:hover,
.ye-applet-editor-properties-property-gradient-points-add:focus {
border-color: #f78f2e;
}
.ye-applet-editor-properties-property-gradient-points-add:active {
background: linear-gradient(0deg, #fcfcfc 0%, #ebebeb 50%, #dbdbdb 50%) #ebebeb;
}
.ye-applet-editor-properties-property-gradient-points-add-icon {
width: 16px;
height: 16px;
background-image: url('add.png');
background-size: 16px 16px;
background-position: center center;
background-repeat: no-repeat;
margin-right: 4px;
}
.ye-applet-editor-properties-property-gradient-points {
display: flex;
flex-direction: column;
max-height: 400px;
overflow: auto;
}
.ye-applet-editor-properties-property-gradient-points-point {
display: flex;
align-items: center;
}
.ye-applet-editor-properties-property-gradient-points-point-actions {
flex: 0 0 auto;
display: flex;
justify-content: flex-end;
align-items: center;
}
.ye-applet-editor-properties-property-gradient-points-point-actions-action {
margin: 1px;
width: 20px;
height: 20px;
cursor: pointer;
background-size: 16px 16px;
background-repeat: no-repeat;
background-position: center center;
background-image: url('page_white.png');
}
.ye-applet-editor-properties-property-gradient-points-point-actions-action--delete { background-image: url('delete.png'); }
.ye-applet-editor-properties-property-gradient-points-point-colour {
margin: 2px 5px;
display: block;
overflow: hidden;
width: 41px;
height: 21px;
border: 1px solid #aaa;
box-shadow: inset 0 0 0 1px #fff;
}
.ye-applet-editor-properties-property-gradient-points-point-colour:active,
.ye-applet-editor-properties-property-gradient-points-point-colour:focus-within {
border-color: #f78f2e;
}
.ye-applet-editor-properties-property-gradient-points-point-colour-value {
position: relative;
top: -500px;
}
.ye-applet-editor-properties-property-gradient-points-point-offset-range {
flex: 1 1 auto;
}
.ye-applet-editor-properties-property-gradient-points-point-offset-numeric {
margin: 5px;
padding: 2px;
border: 1px solid #aaa;
width: 60px;
}
.ye-applet-editor-properties-property-gradient-points-point-offset-numeric:focus {
border-color: #f78f2e;
}

1081
public/assets/editor.js Normal file

File diff suppressed because it is too large Load diff

BIN
public/assets/link.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

BIN
public/assets/pencil.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

68
public/assets/shared.css Normal file
View file

@ -0,0 +1,68 @@
* {
position: relative;
box-sizing: border-box;
outline-style: none !important;
}
@keyframes SharedAnimation_Spin360 {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
html,
body,
#container {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
.NewCreatePageEffect_Main {
font-family: sans-serif;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.ZoomText {
font-family: sans-serif;
position: absolute;
left: 0;
top: 0;
width: 810px;
z-index: 10;
text-align: center;
}
.ZoomText_Child {
position: absolute;
width: 810px;
}
.BackgroundImage {
position: absolute;
width: 100%;
height: 100%;
z-index: 0;
}
.BackgroundImage.Cover {
width: 10000px;
height: 10000px;
top: -5000px;
left: -5000px;
}
.ForegroundImage {
position: absolute;
overflow: hidden;
width: 100%;
height: 100%;
z-index: 100;
display: flex;
justify-content: center;
align-items: center;
}

64
public/assets/shared.js Normal file
View file

@ -0,0 +1,64 @@
var _paq = window._paq || [];
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['enableHeartBeatTimer']);
(function() {
_paq.push(['setTrackerUrl', '//uiharu.railgun.sh/mtm']);
_paq.push(['setSiteId', 'zlwmGOjMBk5J']);
var g = document.createElement('script');
g.type = 'text/javascript'; g.async = true;
g.defer = true; g.src = '//uiharu.railgun.sh/mtm.js';
document.head.appendChild(g);
})();
function synchroniseBackgroundWithAudio(bgi, target) {
var cnt = document.getElementById(target || 'BackgroundImage') || document.getElementById('container'),
bga = document.getElementById('BackgroundAudio'),
rdy = false,
bgs = [];
if(!cnt)
return;
var computed = getComputedStyle(cnt);
if(computed.backgroundImage && target !== 'ForegroundImage')
bgs = computed.backgroundImage.split(',');
if(!bga) {
bgs.splice(0, 0, 'url(' + bgi + ')');
cnt.style.backgroundImage = bgs.join(',');
return;
}
var onReady = function(url) {
bgs.splice(0, 0, 'url(' + url + ')');
cnt.style.backgroundImage = bgs.join(',');
bga.play();
};
bga.addEventListener('canplay', function() {
rdy = true;
});
bga.pause();
bga.currentTime = 0;
var xhr = new XMLHttpRequest;
xhr.responseType = 'blob';
xhr.onreadystatechange = function() {
if(xhr.readyState !== 4)
return;
bgi = URL.createObjectURL(xhr.response);
if(rdy)
onReady(bgi);
else
bga.addEventListener('canplay', function() {
onReady(bgi);
});
};
xhr.open('GET', bgi);
xhr.send();
}

BIN
public/assets/spinner.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

574
public/assets/style.css Normal file
View file

@ -0,0 +1,574 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
position: relative;
outline-style: none !important;
}
html, body {
width: 100%;
height: 100%;
}
body {
font: 12px/20px Tahoma, Geneva, 'Dejavu Sans', Arial, Helvetica, sans-serif;
background-color: #f8f8f8;
}
.hidden,
[hidden] {
display: none !important;
visibility: hidden !important;
}
.error {
background: #922;
color: #fff;
font-size: 1.2em;
line-height: 1.5em;
padding: 5px 10px;
border-radius: 5px;
background-image: linear-gradient(0deg, #922, #f22);
text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
box-shadow: 0 1px 2px #000;
}
.noscript {
margin: 5px;
}
.wrapper {
max-width: 1000px;
margin: 0 auto;
background-color: #fff;
box-shadow: 0 1px 4px #000;
}
@media(min-width: 1000px) {
body { padding-top: 1px; }
.wrapper { margin: 3px auto 10px; }
}
.footer {
font-size: 10px;
padding: 0 5px;
text-align: right;
color: #888;
}
.footer a {
color: inherit;
text-decoration: none;
}
.footer a:hover,
.footer a:focus,
.footer a:active {
color: #222;
text-decoration: underline;
}
.header {}
.header-title {
padding-top: 10%;
background: url('ytkns.png') center / cover;
display: block;
}
.header-usermenu {
border: 1px solid #000;
background: linear-gradient(180deg, #545454 0%, #1a1a1a 50%, #000 50%) #545454;
}
.header-navigation {
border: 1px solid #000;
background: linear-gradient(180deg, #5a5a5a 0%, #272727 50%, #111 50%) #5a5a5a;
font-size: 1.4em;
line-height: 1.5em;
}
.header-navigation-item,
.header-usermenu-item {
color: #fff;
text-decoration: none;
padding: 2px 10px;
display: inline-block;
transition: background-color .1s;
}
.header-navigation-item:hover,
.header-navigation-item:active,
.header-usermenu-item:hover,
.header-usermenu-item:active {
background-color: rgba(255, 255, 255, .1);
}
.header-navigation-item:active,
.header-usermenu-item:active {
background-color: rgba(0, 0, 0, .5);
}
.content {
display: block;
padding: 1px;
}
.information {
margin: 5px;
display: block;
border: 1px solid #000;
padding: 2px 5px;
border-radius: 5px;
}
.information-title {
border: 1px solid #000;
border-radius: 10px;
padding: 0 8px;
}
.page-title {
padding: 8px 5px;
}
.page-subtitle {
padding: 2px 5px;
}
.page-paragraph {
margin: 1px 5px;
}
.zone-creation-form {
margin: 10px auto;
max-width: 400px;
width: 100%;
}
.zone-creation-input {
display: flex;
margin: 5px 0;
}
.zone-creation-label {
min-width: 100px;
}
.zone-creation-wrap {
border: 1px solid #000;
min-width: 300px;
height: 22px;
display: flex;
padding: 0 2px;
background-color: #eee;
color: #444;
}
.zone-creation-value {
border-width: 0;
flex-grow: 1;
font: 12px/20px Tahoma, Geneva, 'Dejavu Sans', Arial, Helvetica, sans-serif;
background-color: #eee;
color: #000;
}
.zone-creation-actions {
text-align: center;
}
.zone-creation-action {
border: 1px solid #707070;
border-radius: 2px;
background: linear-gradient(180deg, #fcfcfc 0%, #ebebeb 50%, #dbdbdb 50%) #ebebeb;
cursor: pointer;
padding: 2px 10px;
margin: 1px;
font: 20px/25px Tahoma, Geneva, 'Dejavu Sans', Arial, Helvetica, sans-serif;
display: inline-block;
color: #000;
text-decoration: none;
transition: border-color .2s;
}
.zone-creation-action:hover,
.zone-creation-action:focus {
border-color: #3c7fb1;
}
.zone-creation-action:active {
background: linear-gradient(0deg, #fcfcfc 0%, #ebebeb 50%, #dbdbdb 50%) #ebebeb;
}
.zone-creation-paragraph {
text-align: center;
padding: 5px 10px;
font-size: 1.2em;
line-height: 1.5em;
}
.loading-editor {
max-width: 400px;
margin: 10px auto;
display: flex;
justify-content: center;
align-items: center;
}
.loading-editor-image {
width: 32px;
height: 32px;
background-image: url('spinner.gif');
flex: 0 0 auto;
}
.loading-editor-text {
font-size: 1.5em;
line-height: 1.5em;
padding: 0 10px;
}
.auth {
display: flex;
flex-direction: column;
max-width: 300px;
width: 100%;
margin: 0 auto;
}
.auth-field {
margin: 5px 0;
}
.auth-field-label {
font-size: 1.2em;
line-height: 1.5em;
padding: 2px 5px;
}
.auth-field-value {
display: flex;
}
.auth-field-value-input {
width: 100%;
padding: 2px;
border: 1px solid #aaa;
}
.auth-field-value-input:focus {
border-color: #f78f2e;
}
.auth-option {
font-size: .9em;
line-height: 1.5em;
padding: 5px 0;
display: flex;
justify-content: center;
align-items: center;
}
.auth-option-input {
margin: 0 5px;
}
.auth-buttons {
display: flex;
justify-content: center;
align-items: center;
margin: 5px 0;
}
.auth-fid .auth-buttons {
flex-direction: column;
}
.auth-buttons-button {
padding: 2px 5px;
min-width: 75px;
cursor: pointer;
}
.auth-fid .auth-buttons-button {
width: 100%;
border: 1px solid #707070;
border-radius: 2px;
background-image: linear-gradient(180deg, #fcfcfc 0%, #ebebeb 50%, #dbdbdb 50%);
background-color: #ebebeb;
cursor: pointer;
padding: 2px 10px;
margin: 1px;
font: 12px/20px Tahoma, Geneva, 'Dejavu Sans', Arial, Helvetica, sans-serif;
display: inline-block;
color: #000;
text-decoration: none;
transition: border-color .2s;
}
.auth-fid .auth-buttons-button:hover,
.auth-fid .auth-buttons-button:focus {
border-color: #3c7fb1;
}
.auth-fid .auth-buttons-button:active {
background-image: linear-gradient(0deg, #fcfcfc 0%, #ebebeb 50%, #dbdbdb 50%);
}
.auth-fid .auth-buttons-button-fid {
font-size: 16px;
line-height: 30px;
background-image: linear-gradient(180deg, #9475b2 0%, #9475b2 50%, #8559a5 50%);
color: #fff;
}
.auth-fid .auth-buttons-button-fid:hover,
.auth-fid .auth-buttons-button-fid:focus {
border-color: #9475b2;
}
.auth-fid .auth-buttons-button-fid:active {
background-image: linear-gradient(0deg, #9475b2 0%, #9475b2 50%, #8559a5 50%);
}
.invites {}
.invites .error {
margin: 5px;
}
.invites-create {
display: flex;
justify-content: center;
margin: 5px;
}
.invites-create-button {
padding: 2px 10px;
min-width: 75px;
cursor: pointer;
font-size: 1.2em;
line-height: 1.5em;
}
.invites-list {
display: flex;
flex-direction: column;
max-width: 900px;
width: 100%;
margin: 10px auto;
}
.invites-list-item {
display: flex;
margin-top: 1px;
padding-bottom: 1px;
flex-wrap: wrap;
}
.invites-list-item:not(:last-child) {
border-bottom: 1px solid #000;
}
.invites-list-item:nth-child(even) {
background-color: #f0f0f0;
}
.invites-list-item-created,
.invites-list-item-used,
.invites-list-item-user {
max-width: 200px;
width: 100%;
}
.invites-list-item-token {
max-width: 300px;
width: 100%;
}
.invites-list-item-token code {
display: block;
color: #000;
background: #000;
font-size: 1.1em;
text-align: center;
border-radius: 10px;
padding: 0 10px;
cursor: pointer;
transition: background .5s;
}
.invites-list-item-token code:hover,
.invites-list-item-token code:focus {
color: #fff;
}
.invites-list-item-token code:active {
background: #fff;
transition: background .1s;
}
.nozone {
text-align: center;
}
.nozone h1 {
margin: 20px;
}
.nozone p {
font-size: 1.2em;
margin: 10px;
}
.nozone a {
color: #000;
transition: text-shadow .2s, color .2s;
}
.nozone a:hover,
.nozone a:focus {
text-decoration: none;
color: #22f;
text-shadow: 0 0 10px #22f;
}
.nozone a:active {
color: #f22;
text-shadow: 0 0 10px #f22;
}
.my-zones-list {
display: flex;
flex-direction: column;
}
.my-zones-list-item {
display: flex;
align-items: center;
padding: 5px;
margin: 0 5px;
background-color: #fff;
}
.my-zones-list-item:not(:first-child) {
border-top: 1px solid #000;
}
.my-zones-list-item-info {
display: flex;
flex-direction: column;
flex: 1 1 auto;
word-wrap: normal;
word-break: break-word;
}
.my-zones-list-item-info-name {
font-size: 1.4em;
line-height: 1.5em;
}
.my-zones-list-item-info-name a {
color: #000;
text-decoration: none;
}
.my-zones-list-item-info-name a:hover,
.my-zones-list-item-info-name a:focus,
.my-zones-list-item-info-name a:active {
text-decoration: underline;
}
.my-zones-list-item-info-title {
margin-right: 5px;
}
.my-zones-list-item-actions {
display: flex;
flex: 0 0 auto;
}
.my-zones-list-item-actions-action {
margin: 1px;
width: 24px;
height: 24px;
cursor: pointer;
border-radius: 100%;
background-size: 16px 16px;
background-repeat: no-repeat;
background-position: center center;
background-image: url('page_white.png');
background-color: #fff;
transition: background-color .2s;
}
.my-zones-list-item-actions-action:hover,
.my-zones-list-item-actions-action:focus {
background-color: #eee;
}
.my-zones-list-item-actions-action:active {
background-color: #ddd;
}
.my-zones-list-item-actions-action--view { background-image: url('link.png'); }
.my-zones-list-item-actions-action--edit { background-image: url('pencil.png'); }
.my-zones-list-item-actions-action--delete { background-image: url('bin_closed.png'); background-position: 2px center; }
.pagination {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.pagination-page {
flex: 0 0 auto;
min-width: 24px;
height: 24px;
display: flex;
justify-content: center;
align-items: center;
color: #000;
text-decoration: none;
}
.pagination-page:not(:first-child) {
border-left: 1px solid #000;
}
.pagination-page-current {
font-weight: 700;
}
.zones-sorts {
display: flex;
align-items: center;
margin: 2px 5px;
}
.zones-sorts-sort {
display: inline-flex;
align-items: center;
padding: 2px 5px;
color: #000;
text-decoration: none;
}
.zones-sorts-sort:hover,
.zones-sorts-sort:focus {
text-decoration: underline;
}
.zones-sorts-sort img {
margin-left: 4px;
}
.zones-list {
display: flex;
justify-content: center;
align-items: flex-start;
flex-wrap: wrap;
}
.zones-list-item {
display: flex;
align-items: center;
flex-direction: column;
width: 240px;
margin: 4px;
color: #000;
text-decoration: none;
box-shadow: 0 1px 3px #888;
background-color: #fff;
}
.zones-list-item a {
color: #000;
text-decoration: none;
}
.zones-list-item a:hover,
.zones-list-item a:focus {
text-decoration: underline;
}
.zones-list-item-screenshot {
border: 1px solid #000;
display: block;
margin-top: 18px;
}
.zones-list-item-screenshot-image {
width: 200px;
height: 150px;
display: inline-block;
vertical-align: middle;
}
.zones-list-item-info {
margin: 10px 5px;
text-align: center;
word-wrap: normal;
word-break: break-word;
}
.zones-list-item-info-name {
font-size: 1.4em;
line-height: 1.2em;
margin: 2px 0;
}
.zones-list-item-info-title {
font-size: 1.1em;
line-height: 1.2em;
margin: 2px 0;
}
.zones-list-item-info-actions {
display: flex;
justify-content: center;
align-items: center;
flex: 0 0 auto;
margin: 2px;
}
.zones-list-item-info-actions-action {
margin: 1px;
width: 24px;
height: 24px;
cursor: pointer;
border-radius: 100%;
background-size: 16px 16px;
background-repeat: no-repeat;
background-position: center center;
background-image: url('page_white.png');
background-color: #fff;
transition: background-color .2s;
}
.zones-list-item-info-actions-action:hover,
.zones-list-item-info-actions-action:focus {
background-color: #eee;
}
.zones-list-item-info-actions-action:active {
background-color: #ddd;
}
.zones-list-item-info-actions-action--view { background-image: url('link.png'); }
.zones-list-item-info-actions-action--edit { background-image: url('pencil.png'); }
.zones-list-item-info-actions-action--delete { background-image: url('bin_closed.png'); background-position: 2px center; }

BIN
public/assets/ytkns.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

1071
public/index.php Normal file

File diff suppressed because it is too large Load diff

27
src/Colour.php Normal file
View file

@ -0,0 +1,27 @@
<?php
namespace YTKNS;
final class Colour {
private int $raw = 0;
public function __construct(int $raw = 0) {
$this->setRaw($raw);
}
public static function create($value): ?Colour {
$colour = is_int($value) ? $value : (is_string($value) && ctype_digit($value) ? (int)$value : -1);
return $colour < 0 || $colour > 0xFFFFFF ? null : new static($colour);
}
public function getRaw(): int {
return $this->raw;
}
public function setRaw(int $raw): self {
$this->raw = $raw & 0xFFFFFF;
return $this;
}
public function getHex(): string {
return str_pad(dechex($this->raw), 6, '0', STR_PAD_LEFT);
}
}

56
src/Config.php Normal file
View file

@ -0,0 +1,56 @@
<?php
namespace YTKNS;
final class Config {
public const TYPE_ANY = '';
public const TYPE_STR = 'string';
public const TYPE_INT = 'integer';
public const TYPE_BOOL = 'boolean';
public const TYPE_ARR = 'array';
public const DEFAULTS = [
self::TYPE_ANY => null,
self::TYPE_STR => '',
self::TYPE_INT => 0,