commit 9dfebb9fbb0f1f91549dc9304924aa3649c377cd Author: snowflake Date: Thu May 11 16:58:37 2023 +0200 In it to win it diff --git a/README.md b/README.md new file mode 100644 index 0000000..af01b7d --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# pRojeKt Multimediální aplikace + +## TO DO list: + +**Pheeeewww** + + + +## Done: + +- ~~Vytvořit js funkci, která se zavolá při kliknutí na okénko, tato funkce otevře video přes celou obrazovku a po dohrání videa zavolá další funkci~~ +- ~~Vytvořit container pro video, které bude defaultně hidden a zobrazí se změnou v výše zmíněným javascriptem~~ +- ~~Vytvořit container pro otázku, která přijde po videu, event handler pro dohrání videa~~ +- ~~js na loadění otázek do containeru, otázky jsou uloženy v json souboru~~ +- ~~js funkce na validaci odpovědi - správná opdověd bude vždy první v databázi, zamíchá se pouze pořadí otázek.~~ +- ~~implementace progressbaru~~ +- ~~dostylovat progress bar~~ +- ~~Přidání Ikon jednotlivých lekcí~~ +- ~~Přidání Otázek~~ +- ~~Znemožnit přístup k otázkám, poté co jsou správně zobrazeny~~ +- ~~Nastavení Odezvy za správnou odpověď~~ +- ~~Nastavení designu via CSS~~ +~~**Přidání Videí** ***Cant Stress this enough I guess***~~ + +### Co nehoří: + +- ~~Přidání Zvukových efektů *Snad stihnu*~~ + +- ~~js na změnu titulního obrázku na Ikonu, přes kterou bylo naposledy přejeto myší.~~ + +## O co jde? + +Námětem je hypermediální aplikace s šachovými tipy, triky a teorií, tedy zajímavé matovací vzorce, vazby, vidlice nebo přetížení a koncovky. + +Nechci se zabývat pravidly aj. základy. Je to míněno pro pokročilé a formát by měl být 12x 20-45 sekundové video. + +Po okénko se otočí téma, zatmí obrazovka a spustí video, po videu přijde a)b)c)d) otázka možná s obrázkem nebo bez, která při správné odpovědi odemkne další okénko. diff --git a/components/cinemaContainer.php b/components/cinemaContainer.php new file mode 100644 index 0000000..3fcd86e --- /dev/null +++ b/components/cinemaContainer.php @@ -0,0 +1,43 @@ + + + \ No newline at end of file diff --git a/components/footer.php b/components/footer.php new file mode 100644 index 0000000..a78bb2b --- /dev/null +++ b/components/footer.php @@ -0,0 +1,4 @@ + +

Igor Vujovič

+

UK PedF KITTV, Praha

+ \ No newline at end of file diff --git a/components/grid.php b/components/grid.php new file mode 100644 index 0000000..cb8545f --- /dev/null +++ b/components/grid.php @@ -0,0 +1,73 @@ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

[ CHESS APP v7.0 ]_

+

Vyberte úroveň:

+

>_

+

                

+
+ title picture +
+ +
+
+
+ + diff --git a/components/questionContainer.php b/components/questionContainer.php new file mode 100644 index 0000000..ac97a71 --- /dev/null +++ b/components/questionContainer.php @@ -0,0 +1,80 @@ + + + diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..b57be12 --- /dev/null +++ b/css/style.css @@ -0,0 +1,710 @@ +/* Font */ +@font-face { + font-family: Rubic; + src: url(../resources/fonts/Rubik/static/Rubik-Regular.ttf); +} + +/* Proměnné */ + +:root { + --glow-color: hsl(186, 100%, 69%); + --termLength: 17em; +} + +/* Základ*/ + +*{ + font-family: Rubic; + padding: 0; + margin: 0; + box-sizing: border-box; + line-height: 0; +} + +body{ + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + background-color: black; +} + +section{ + min-height: 100vh; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +h1{ + font-size: 1rem; + line-height: normal; + inline-size: fit-content; + width: 60vw; +} + +video{ + width: 60vw; +} + +/* Grid Template */ + +.grid { + display: grid; + padding: 3rem; + grid-gap: 2em; + + grid-template-columns: repeat(2, 1fr); + grid-template-areas: "t t" + "d2 d9" + "d11 d6" + "d1 d7" + "d10 d4" + "d12 d3" + "d8 d5"; +} + +/* Hidden items */ + +[hidden]{ /*Pro zobrazeni hidden věcí (Containery na Vido a Otázky), zakomentovat*/ + display:none !important; +} + +#cinemaContainer, #questionContainer { + position: fixed; + display: flex; + justify-content: center; + align-items: center; + width: 100vw; + height: 100vh; + z-index: 1; + top: 0; + left: 0; + background: rgba(17, 17, 17, 0.85); + z-index: 999; + text-align: center; + overflow: scroll; +} + +#questionContainer { + display: grid; + gap: 1em; +} + +#cinemaContainer #cinemaBox { + max-width: 100%; + border-radius: .45rem; +} + +.button{ + color: var(--glow-color); + + text-align: center; + vertical-align: middle; + cursor: pointer; + font-size: 25px; + border-radius: .45rem; + + border: 1px solid transparent; + + -moz-transition:all .4s ease; + -o-transition:all .4s ease; + -webkit-transition:all .4s ease; + transition:all .4s ease; + + display: flex; + justify-content: center; + align-items: center; + padding: 0.5em; + +} + +.button:hover { + border: 1px solid var(--glow-color); + background-color: black; +} + + +#close { + right: 10px; + top: 10px; + width: 50px; + height: 50px; + position: fixed; + bottom: 10px; +} + + +#skip { + width: 5em; + + right: 10px; + bottom: 10px; + + position: fixed; +} + +.button img{ + width: 100%; + filter: invert(100%); +} + +#questionLine { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + color: var(--glow-color); + border: 1px solid var(--glow-color); + background-color: black; + border-radius: 0.5em; + padding: 1em; + line-height: 1rem; + gap: 2em; +} + +#questionLine img{ + width: 30vw; +} + +#answerBar { + display: grid; + gap: 2em; + width: 100%; +} + +#answerBar .button{ + border: 1px solid var(--glow-color); + background-color: black; + line-height: 2rem; +} + +#answerBar .button:hover{ + background-color: orange; + color: black; +} + +#answerBar .validateRed { + color: white; + background-color: red; + &:after { + font-family:'FontAwesome'; + content:" \f00d"; + } +} + +#answerBar .validateRed:hover { + color:white; + background-color: red; +} + +#answerBar .validateGreen { + color: white; + background-color: green; + &:after { + font-family:'FontAwesome'; + content:" \f00c"; + } +} + +#answerBar .validateGreen:hover { + color:white; + background-color: green; +} + +/* individual grid items */ + +#title { + grid-area: t; + + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + + border-radius: 0.45em; +} + +#box-0 { + grid-area: d1; + background: url("../resources/img/topicIcons/lesson1.svg") no-repeat center; +} + +#box-0:hover{ + background: url("../resources/img/topicIcons/lesson1black.svg") no-repeat center; +} + +#box-1 { + grid-area: d2; + background: url("../resources/img/topicIcons/lesson2.svg") no-repeat center; +} + +#box-1:hover{ + background: url("../resources/img/topicIcons/lesson2black.svg") no-repeat center; +} + +#box-2 { + grid-area: d3; + background: url("../resources/img/topicIcons/lesson3.svg") no-repeat center; +} + +#box-2:hover{ + background: url("../resources/img/topicIcons/lesson3black.svg") no-repeat center; +} + +#box-3 { + grid-area: d4; + background: url("../resources/img/topicIcons/lesson4.svg") no-repeat center; +} + +#box-3:hover{ + background: url("../resources/img/topicIcons/lesson4black.svg") no-repeat center; +} + +#box-4 { + grid-area: d5; + background: url("../resources/img/topicIcons/lesson5.svg") no-repeat center; +} + +#box-4:hover{ + background: url("../resources/img/topicIcons/lesson5black.svg") no-repeat center; +} + +#box-5 { + grid-area: d6; + background: url("../resources/img/topicIcons/lesson6.svg") no-repeat center; +} + +#box-5:hover{ + background: url("../resources/img/topicIcons/lesson6black.svg") no-repeat center; +} + +#box-6 { + grid-area: d7; + background: url("../resources/img/topicIcons/lesson7.svg") no-repeat center; +} + +#box-6:hover{ + background: url("../resources/img/topicIcons/lesson7black.svg") no-repeat center; +} + +#box-7 { + grid-area: d8; + background: url("../resources/img/topicIcons/lesson8.svg") no-repeat center; +} + +#box-7:hover{ + background: url("../resources/img/topicIcons/lesson8black.svg") no-repeat center; +} + +#box-8 { + grid-area: d9; + background: url("../resources/img/topicIcons/lesson9.svg") no-repeat center; +} + +#box-8:hover{ + background: url("../resources/img/topicIcons/lesson9black.svg") no-repeat center; +} + +#box-9 { + grid-area: d10; + background: url("../resources/img/topicIcons/lesson10.svg") no-repeat center; +} + +#box-9:hover{ + background: url("../resources/img/topicIcons/lesson10black.svg") no-repeat center; +} + +#box-10 { + grid-area: d11; + background: url("../resources/img/topicIcons/lesson11.svg") no-repeat center; +} + +#box-10:hover{ + background: url("../resources/img/topicIcons/lesson11black.svg") no-repeat center; +} + +#box-11 { + grid-area: d12; + background: url("../resources/img/topicIcons/lesson12.svg") no-repeat center; +} + +#box-11:hover{ + background: url("../resources/img/topicIcons/lesson12black.svg") no-repeat center; +} + +/* Terminal-like Screen */ + +.fakeScreen { + border-radius: 0.45rem; +} + +#title img{ + width: 28vw; +} + +.fakeScreen p { + line-height: 2rem; + position: relative; + text-align: left; + font-size: 1rem; + font-family: monospace; + white-space: nowrap; + overflow: hidden; + width: 0; +} + +span { + color: var(--glow-color); + font-weight: bold; +} + +.line1 { + color: #9CD9F0; + -webkit-animation: type 1 0.25s steps(20, end) forwards; + -moz-animation: type 1s 0.25s steps(20, end) forwards; + -o-animation: type 1s 0.25s steps(20, end) forwards; + animation: type 1s 0.25s steps(20, end) forwards; +} + +.cursor1 { + -webkit-animation: blink 1s 1.25s 1 forwards; + -moz-animation: blink 1s 1.25s 1 forwards; + -o-animation: blink 1s 1.25s 1 forwards; + animation: blink 1s 1.25s 1 forwards; +} + +.line2 { + color: #CDEE69; + -webkit-animation: type 1s 2.25s steps(20, end) forwards; + -moz-animation: type 1s 2.25s steps(20, end) forwards; + -o-animation: type 1s 2.25s steps(20, end) forwards; + animation: type 1s 2.25s steps(20, end) forwards; +} + +.cursor2 { + -webkit-animation: blink 1s 3.25s 2 forwards; + -moz-animation: blink 1s 3.25s 2 forwards; + -o-animation: blink 1s 3.25s 2 forwards; + animation: blink 1s 3.25s 2 forwards; +} + +.line3 { + color: var(--glow-color); + -webkit-animation: type 1s 3.5s steps(20, end) forwards; + -moz-animation: type 1s 3.5s steps(20, end) forwards; + -o-animation: type 1s 3.5s steps(20, end) forwards; + animation: type 1s 3.5s steps(20, end) forwards; +} + +.cursor3 { + -webkit-animation: blink 1s 4.5s infinite; + -moz-animation: blink 1s 4.5s infinite; + -o-animation: blink 1s 4.5s infinite; + animation: blink 1s 4.5s infinite; +} + +@-webkit-keyframes blink { + 0% { + opacity: 0; + } + 40% { + opacity: 0; + } + 50% { + opacity: 1; + } + 90% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@-moz-keyframes blink { + 0% { + opacity: 0; + } + 40% { + opacity: 0; + } + 50% { + opacity: 1; + } + 90% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@-o-keyframes blink { + 0% { + opacity: 0; + } + 40% { + opacity: 0; + } + 50% { + opacity: 1; + } + 90% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@keyframes blink { + 0% { + opacity: 0; + } + 40% { + opacity: 0; + } + 50% { + opacity: 1; + } + 90% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@-webkit-keyframes type { + to { + width: var(--termLength); + } +} + +@-moz-keyframes type { + to { + width: var(--termLength); + } +} + +@-o-keyframes type { + to { + width: var(--termLength); + } +} + +@keyframes type { + to { + width: var(--termLength); + } +} + +#progress{ + display: flex; + width: 100%; +} + +progress{ + position: relative; + width: 100%; + background-color: var(--glow-color); + border-radius: 0.45rem; +} + +/*Glowing box*/ + +.box { + position: relative; + color: var(--glow-color); + cursor: pointer; + border: 0.15em solid var(--glow-color); + border-radius: 0.45em; + background: none; + min-height: 3rem; + + -webkit-box-shadow: inset 0px 0px 0.5em 0px var(--glow-color), + 0px 0px 0.5em 0px var(--glow-color); + -moz-box-shadow: inset 0px 0px 0.5em 0px var(--glow-color), + 0px 0px 0.5em 0px var(--glow-color); + box-shadow: inset 0px 0px 0.5em 0px var(--glow-color), + 0px 0px 0.5em 0px var(--glow-color); + animation: border-flicker 2s linear infinite; +} + +.box::before { + content: ""; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + opacity: 0.7; + filter: blur(1em); + transform: translateY(100%) rotateX(90deg) scale(1); + background: var(--glow-color); + pointer-events: none; +} + +.box::after { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + opacity: 0; + z-index: -1; + background-color: var(--glow-color); + box-shadow: 0 0 2em 0.2em var(--glow-color); + transition: opacity 100ms linear; +} + +.box:hover { + animation: none; +} + +.box:hover:before { + filter: blur(1.5em); + opacity: 1; +} + +.box:hover:after { + opacity: 1; +} + +@keyframes faulty-flicker { + 0% { + opacity: 0.1; + } + 2% { + opacity: 0.1; + } + 4% { + opacity: 0.5; + } + 19% { + opacity: 0.5; + } + 21% { + opacity: 0.1; + } + 23% { + opacity: 1; + } + 80% { + opacity: 0.5; + } + 83% { + opacity: 0.4; + } + + 87% { + opacity: 1; + } +} + +@keyframes border-flicker { + 0% { + opacity: 0.1; + } + 2% { + opacity: 1; + } + 4% { + opacity: 0.1; + } + + 8% { + opacity: 1; + } + 70% { + opacity: 0.7; + } + 100% { + opacity: 1; + } +} + + +/* Footer Animation -more-like-abomination- */ +footer { + position: relative; + width: 100vw; + margin-top: auto; + background: linear-gradient(0deg, #000, #272727); + display: flex; + align-items: center; + flex-direction: column; + align-self: flex-end; + color: var(--glow-color); +} + +footer:before, footer:after { + content: ''; + position: absolute; + top: -2px; + background: linear-gradient(45deg, #fb0094, #0000ff, #00ff00,#ffff00, #ff0000, #fb0094, + #0000ff, #00ff00,#ffff00, #ff0000); + background-size: 400%; + width: calc(100%); + height: calc(100% + 2px); + z-index: -1; + animation: steam 20s linear infinite; +} + +@keyframes steam { + 0% { + background-position: 0 0; + } + 50% { + background-position: 400% 0; + } + 100% { + background-position: 0 0; + } +} + +footer:after { + filter: blur(1rem); +} + +footer p{ + color: var(--glow-color); + line-height: 2em; +} + +#cheatLine{ + line-height: 0; +} + +/* Responzivita */ +/* media query */ +@media only screen and (min-width: 500px) { + + .grid { + grid-template-columns: repeat(4, 1fr); + grid-auto-rows: 1fr; + grid-template-areas: "t t d2 d7" + "t t d1 d12" + "d8 d11 d6 d9" + "d5 d10 d3 d4"; + } + + #answerBar { + grid-template-columns: repeat(2, 1fr); + } + + #title img{ + width: 14vw; + } + + .fakeScreen p { + font-size: 1.5rem; + } + + h1{ + font-size: 1.5rem; + } +} \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..612aef2 --- /dev/null +++ b/index.php @@ -0,0 +1,30 @@ + + + + + + + + + Chess App + + + + +
+ +
+ + + + diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..cec8659 --- /dev/null +++ b/js/main.js @@ -0,0 +1,105 @@ +function cinemaMode(videoId){ + let source = document.querySelector("source") + source.setAttribute("src", "resources/video/lq" + videoId + ".webm") + video.load() + video.play() + + cinema.removeAttribute("hidden") +} + +function loadQuestion(questionId){ + questionFiller(questionId) + shuffleChildren(answers) +} + +function questionMode(){ + if(window.answerFlag == 0){ + question.removeAttribute("hidden") + } +} + +function exit(){ + question.setAttribute("hidden", "") + cinema.setAttribute("hidden", "") + video.pause() +} + +const exitBoxes = document.querySelectorAll("#close") +exitBoxes.forEach(x => { + x.addEventListener("click", (e) => { + exit() + }) +}) + + +function shuffleChildren(parent){ + var children = parent.children; + var frag = document.createDocumentFragment(); + var randomChild; + + while (children.length) { + randomChild = children[Math.floor(Math.random() * children.length)] + frag.appendChild(randomChild); + } + + parent.appendChild(frag); +} + +function pushScore() { + document.querySelector("progress").value = score + if(score == document.querySelector("progress").max) { + // vyhral jsi, zde udelej co chces + // Chci se stát obecně lepším člověkem ;) + //alert("Dobrá práce člověče, figurkama umíš tahat na výbornou jako správnej flamendr, ale co na to češi?Stala se z vás ikona této aplikace!") + boxes.forEach( + (boxRemove) => { + boxRemove.remove(); + } + ) + document.querySelector(".grid").style.display = "flex" + document.querySelector("#title").style.width = "100" + document.documentElement.style.setProperty('--termLength', 60 + "vw"); + document.querySelector("audio").remove(); + fakeScreen.replaceChild(fakeScreen.children[0],fakeScreen.children[0]) + fakeScreen.replaceChild(fakeScreen.children[1],fakeScreen.children[1]) + fakeScreen.replaceChild(fakeScreen.children[2],fakeScreen.children[2]) + fakeScreen.children[0].innerHTML="[ RUN ENDED ]_" + fakeScreen.children[1].innerHTML="Gratuluji!" + fakeScreen.children[2].innerHTML=">Bye_" + fakeScreen.children[3].innerHTML="" + } +} + +function audioplayer(){ + playlist = ["intro","cyber","minute","supremers","violence"] + music = document.querySelector("audio"); + music.play() + music.onended = function(e){ + if(i < 4){ + i += 1 + } + else{ + i=0 + } + music.innerHTML="" + music.play() + } +} + +const bodyForAudio = document.querySelector("body"); + +function onetime(node, type, callback) { + + // create event + node.addEventListener(type, function(e) { + // remove event + e.target.removeEventListener(e.type, arguments.callee); + // call handler + return callback(e); + }); + +} + +onetime(bodyForAudio, "click", audioplayer) + + diff --git a/pages/errors/404.php b/pages/errors/404.php new file mode 100644 index 0000000..e69de29 diff --git a/resources/audio/cyber.webm b/resources/audio/cyber.webm new file mode 100644 index 0000000..ef329af Binary files /dev/null and b/resources/audio/cyber.webm differ diff --git a/resources/audio/intro.webm b/resources/audio/intro.webm new file mode 100644 index 0000000..defac5c Binary files /dev/null and b/resources/audio/intro.webm differ diff --git a/resources/audio/minute.webm b/resources/audio/minute.webm new file mode 100644 index 0000000..3997211 Binary files /dev/null and b/resources/audio/minute.webm differ diff --git a/resources/audio/outro.webm b/resources/audio/outro.webm new file mode 100644 index 0000000..cfdac91 Binary files /dev/null and b/resources/audio/outro.webm differ diff --git a/resources/audio/supremers.webm b/resources/audio/supremers.webm new file mode 100644 index 0000000..fdaea63 Binary files /dev/null and b/resources/audio/supremers.webm differ diff --git a/resources/audio/violence.webm b/resources/audio/violence.webm new file mode 100644 index 0000000..d309fe1 Binary files /dev/null and b/resources/audio/violence.webm differ diff --git a/resources/fonts/Rubik/OFL.txt b/resources/fonts/Rubik/OFL.txt new file mode 100644 index 0000000..cdb3773 --- /dev/null +++ b/resources/fonts/Rubik/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2015 The Rubik Project Authors (https://github.com/googlefonts/rubik) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/resources/fonts/Rubik/README.txt b/resources/fonts/Rubik/README.txt new file mode 100644 index 0000000..c5792a2 --- /dev/null +++ b/resources/fonts/Rubik/README.txt @@ -0,0 +1,77 @@ +Rubik Variable Font +=================== + +This download contains Rubik as both variable fonts and static fonts. + +Rubik is a variable font with this axis: + wght + +This means all the styles are contained in these files: + Rubik-VariableFont_wght.ttf + Rubik-Italic-VariableFont_wght.ttf + +If your app fully supports variable fonts, you can now pick intermediate styles +that aren’t available as static fonts. Not all apps support variable fonts, and +in those cases you can use the static font files for Rubik: + static/Rubik-Light.ttf + static/Rubik-Regular.ttf + static/Rubik-Medium.ttf + static/Rubik-SemiBold.ttf + static/Rubik-Bold.ttf + static/Rubik-ExtraBold.ttf + static/Rubik-Black.ttf + static/Rubik-LightItalic.ttf + static/Rubik-Italic.ttf + static/Rubik-MediumItalic.ttf + static/Rubik-SemiBoldItalic.ttf + static/Rubik-BoldItalic.ttf + static/Rubik-ExtraBoldItalic.ttf + static/Rubik-BlackItalic.ttf + +Get started +----------- + +1. Install the font files you want to use + +2. Use your app's font picker to view the font family and all the +available styles + +Learn more about variable fonts +------------------------------- + + https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts + https://variablefonts.typenetwork.com + https://medium.com/variable-fonts + +In desktop apps + + https://theblog.adobe.com/can-variable-fonts-illustrator-cc + https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts + +Online + + https://developers.google.com/fonts/docs/getting_started + https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide + https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts + +Installing fonts + + MacOS: https://support.apple.com/en-us/HT201749 + Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux + Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows + +Android Apps + + https://developers.google.com/fonts/docs/android + https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts + +License +------- +Please read the full license text (OFL.txt) to understand the permissions, +restrictions and requirements for usage, redistribution, and modification. + +You can use them in your products & projects – print or digital, +commercial or otherwise. + +This isn't legal advice, please consider consulting a lawyer and see the full +license for all details. diff --git a/resources/fonts/Rubik/Rubik-Italic-VariableFont_wght.ttf b/resources/fonts/Rubik/Rubik-Italic-VariableFont_wght.ttf new file mode 100644 index 0000000..b072413 Binary files /dev/null and b/resources/fonts/Rubik/Rubik-Italic-VariableFont_wght.ttf differ diff --git a/resources/fonts/Rubik/Rubik-VariableFont_wght.ttf b/resources/fonts/Rubik/Rubik-VariableFont_wght.ttf new file mode 100644 index 0000000..ee31e7f Binary files /dev/null and b/resources/fonts/Rubik/Rubik-VariableFont_wght.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-Black.ttf b/resources/fonts/Rubik/static/Rubik-Black.ttf new file mode 100644 index 0000000..4544103 Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-Black.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-BlackItalic.ttf b/resources/fonts/Rubik/static/Rubik-BlackItalic.ttf new file mode 100644 index 0000000..e768a5d Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-BlackItalic.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-Bold.ttf b/resources/fonts/Rubik/static/Rubik-Bold.ttf new file mode 100644 index 0000000..09c447d Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-Bold.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-BoldItalic.ttf b/resources/fonts/Rubik/static/Rubik-BoldItalic.ttf new file mode 100644 index 0000000..4902870 Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-BoldItalic.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-ExtraBold.ttf b/resources/fonts/Rubik/static/Rubik-ExtraBold.ttf new file mode 100644 index 0000000..5a81746 Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-ExtraBold.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-ExtraBoldItalic.ttf b/resources/fonts/Rubik/static/Rubik-ExtraBoldItalic.ttf new file mode 100644 index 0000000..3d4a031 Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-ExtraBoldItalic.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-Italic.ttf b/resources/fonts/Rubik/static/Rubik-Italic.ttf new file mode 100644 index 0000000..ec36c0e Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-Italic.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-Light.ttf b/resources/fonts/Rubik/static/Rubik-Light.ttf new file mode 100644 index 0000000..3c3443d Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-Light.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-LightItalic.ttf b/resources/fonts/Rubik/static/Rubik-LightItalic.ttf new file mode 100644 index 0000000..eff76bb Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-LightItalic.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-Medium.ttf b/resources/fonts/Rubik/static/Rubik-Medium.ttf new file mode 100644 index 0000000..be42fad Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-Medium.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-MediumItalic.ttf b/resources/fonts/Rubik/static/Rubik-MediumItalic.ttf new file mode 100644 index 0000000..90939bc Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-MediumItalic.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-Regular.ttf b/resources/fonts/Rubik/static/Rubik-Regular.ttf new file mode 100644 index 0000000..2a01688 Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-Regular.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-SemiBold.ttf b/resources/fonts/Rubik/static/Rubik-SemiBold.ttf new file mode 100644 index 0000000..46d51e1 Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-SemiBold.ttf differ diff --git a/resources/fonts/Rubik/static/Rubik-SemiBoldItalic.ttf b/resources/fonts/Rubik/static/Rubik-SemiBoldItalic.ttf new file mode 100644 index 0000000..fc3571a Binary files /dev/null and b/resources/fonts/Rubik/static/Rubik-SemiBoldItalic.ttf differ diff --git a/resources/img/crown.png b/resources/img/crown.png new file mode 100644 index 0000000..7d98977 Binary files /dev/null and b/resources/img/crown.png differ diff --git a/resources/img/fast-forward.png b/resources/img/fast-forward.png new file mode 100644 index 0000000..1d8c2ce Binary files /dev/null and b/resources/img/fast-forward.png differ diff --git a/resources/img/favicon.ico b/resources/img/favicon.ico new file mode 100644 index 0000000..4ef5675 Binary files /dev/null and b/resources/img/favicon.ico differ diff --git a/resources/img/placeholder.png b/resources/img/placeholder.png new file mode 100644 index 0000000..fb5a977 Binary files /dev/null and b/resources/img/placeholder.png differ diff --git a/resources/img/questions/0.png b/resources/img/questions/0.png new file mode 100644 index 0000000..486ab2a Binary files /dev/null and b/resources/img/questions/0.png differ diff --git a/resources/img/questions/1.png b/resources/img/questions/1.png new file mode 100644 index 0000000..cd87f97 Binary files /dev/null and b/resources/img/questions/1.png differ diff --git a/resources/img/questions/10.png b/resources/img/questions/10.png new file mode 100644 index 0000000..e693c72 Binary files /dev/null and b/resources/img/questions/10.png differ diff --git a/resources/img/questions/11.png b/resources/img/questions/11.png new file mode 100644 index 0000000..5a1fe17 Binary files /dev/null and b/resources/img/questions/11.png differ diff --git a/resources/img/questions/2.png b/resources/img/questions/2.png new file mode 100644 index 0000000..31c9f30 Binary files /dev/null and b/resources/img/questions/2.png differ diff --git a/resources/img/questions/3.png b/resources/img/questions/3.png new file mode 100644 index 0000000..be347ba Binary files /dev/null and b/resources/img/questions/3.png differ diff --git a/resources/img/questions/4.png b/resources/img/questions/4.png new file mode 100644 index 0000000..9e418a4 Binary files /dev/null and b/resources/img/questions/4.png differ diff --git a/resources/img/questions/5.png b/resources/img/questions/5.png new file mode 100644 index 0000000..5d204b2 Binary files /dev/null and b/resources/img/questions/5.png differ diff --git a/resources/img/questions/6.png b/resources/img/questions/6.png new file mode 100644 index 0000000..2550115 Binary files /dev/null and b/resources/img/questions/6.png differ diff --git a/resources/img/questions/7.png b/resources/img/questions/7.png new file mode 100644 index 0000000..166aaed Binary files /dev/null and b/resources/img/questions/7.png differ diff --git a/resources/img/questions/8.png b/resources/img/questions/8.png new file mode 100644 index 0000000..42b6f22 Binary files /dev/null and b/resources/img/questions/8.png differ diff --git a/resources/img/questions/9.png b/resources/img/questions/9.png new file mode 100644 index 0000000..3deed07 Binary files /dev/null and b/resources/img/questions/9.png differ diff --git a/resources/img/topicIcons/King.svg b/resources/img/topicIcons/King.svg new file mode 100644 index 0000000..7157f07 --- /dev/null +++ b/resources/img/topicIcons/King.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson1.svg b/resources/img/topicIcons/lesson1.svg new file mode 100644 index 0000000..b26f7fc --- /dev/null +++ b/resources/img/topicIcons/lesson1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson10.svg b/resources/img/topicIcons/lesson10.svg new file mode 100644 index 0000000..0d901df --- /dev/null +++ b/resources/img/topicIcons/lesson10.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson10black.svg b/resources/img/topicIcons/lesson10black.svg new file mode 100644 index 0000000..c64c0b5 --- /dev/null +++ b/resources/img/topicIcons/lesson10black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson11.svg b/resources/img/topicIcons/lesson11.svg new file mode 100644 index 0000000..6565271 --- /dev/null +++ b/resources/img/topicIcons/lesson11.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson11black.svg b/resources/img/topicIcons/lesson11black.svg new file mode 100644 index 0000000..714be18 --- /dev/null +++ b/resources/img/topicIcons/lesson11black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson12.svg b/resources/img/topicIcons/lesson12.svg new file mode 100644 index 0000000..cfcec5f --- /dev/null +++ b/resources/img/topicIcons/lesson12.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson12black.svg b/resources/img/topicIcons/lesson12black.svg new file mode 100644 index 0000000..a54b6d2 --- /dev/null +++ b/resources/img/topicIcons/lesson12black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson1black.svg b/resources/img/topicIcons/lesson1black.svg new file mode 100644 index 0000000..26bbd88 --- /dev/null +++ b/resources/img/topicIcons/lesson1black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson2.svg b/resources/img/topicIcons/lesson2.svg new file mode 100644 index 0000000..35e7bec --- /dev/null +++ b/resources/img/topicIcons/lesson2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson2black.svg b/resources/img/topicIcons/lesson2black.svg new file mode 100644 index 0000000..1da97a4 --- /dev/null +++ b/resources/img/topicIcons/lesson2black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson3.svg b/resources/img/topicIcons/lesson3.svg new file mode 100644 index 0000000..5494351 --- /dev/null +++ b/resources/img/topicIcons/lesson3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson3black.svg b/resources/img/topicIcons/lesson3black.svg new file mode 100644 index 0000000..a523b59 --- /dev/null +++ b/resources/img/topicIcons/lesson3black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson4.svg b/resources/img/topicIcons/lesson4.svg new file mode 100644 index 0000000..7c6ab47 --- /dev/null +++ b/resources/img/topicIcons/lesson4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson4black.svg b/resources/img/topicIcons/lesson4black.svg new file mode 100644 index 0000000..d86ae36 --- /dev/null +++ b/resources/img/topicIcons/lesson4black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson5.svg b/resources/img/topicIcons/lesson5.svg new file mode 100644 index 0000000..3e5c8ed --- /dev/null +++ b/resources/img/topicIcons/lesson5.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson5black.svg b/resources/img/topicIcons/lesson5black.svg new file mode 100644 index 0000000..6169871 --- /dev/null +++ b/resources/img/topicIcons/lesson5black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson6.svg b/resources/img/topicIcons/lesson6.svg new file mode 100644 index 0000000..0e5c89a --- /dev/null +++ b/resources/img/topicIcons/lesson6.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson6black.svg b/resources/img/topicIcons/lesson6black.svg new file mode 100644 index 0000000..77a5f2b --- /dev/null +++ b/resources/img/topicIcons/lesson6black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson7.svg b/resources/img/topicIcons/lesson7.svg new file mode 100644 index 0000000..baa82b6 --- /dev/null +++ b/resources/img/topicIcons/lesson7.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson7black.svg b/resources/img/topicIcons/lesson7black.svg new file mode 100644 index 0000000..d241233 --- /dev/null +++ b/resources/img/topicIcons/lesson7black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson8.svg b/resources/img/topicIcons/lesson8.svg new file mode 100644 index 0000000..2dd6dc5 --- /dev/null +++ b/resources/img/topicIcons/lesson8.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson8black.svg b/resources/img/topicIcons/lesson8black.svg new file mode 100644 index 0000000..a78132c --- /dev/null +++ b/resources/img/topicIcons/lesson8black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson9.svg b/resources/img/topicIcons/lesson9.svg new file mode 100644 index 0000000..336ac16 --- /dev/null +++ b/resources/img/topicIcons/lesson9.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/topicIcons/lesson9black.svg b/resources/img/topicIcons/lesson9black.svg new file mode 100644 index 0000000..bfb8c76 --- /dev/null +++ b/resources/img/topicIcons/lesson9black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/img/x.png b/resources/img/x.png new file mode 100644 index 0000000..0329f79 Binary files /dev/null and b/resources/img/x.png differ diff --git a/resources/questions.json b/resources/questions.json new file mode 100644 index 0000000..a8ca2cb --- /dev/null +++ b/resources/questions.json @@ -0,0 +1,123 @@ +[ + { + "_comment": "Vidlice", + "title" : "Vidlici na obrázku se říká:", + "options" : [ + "Centrální Vidlice", + "Alapinův gambit", + "Rubensteinova past", + "En passant" + ] + }, + { + "_comment": "Přišpendlení", + "title" : "Nejlepší tah na této šachovnici, který povede k matu v následujícím tahu je: ", + "options" : [ + "Dxg6+", + "SxF6", + "SxC6", + "SxF7+" + ] + }, + { + "_comment": "Špíz", + "title" : "V této pozici, ze hry Garry Kasparov proti Stefano Tatai 1986.11.29, to byl právě Garry Kasparov využil špízování, aby hru rozhodl a donutil soupeře rezignovat. Která z těchto sérií tahů to byla?", + "options" : [ + "Dg7+, Kxd6, Df8+", + "Je4, Sf5, Df7+", + "Dxg6, Kxd6, Dxf6+", + "Jxc4, Da2+, Kg3" + ] + }, + { + "_comment": "Přetížení", + "title" : "Která z figurek bílého hráče je přetížena?", + "options" : [ + "Jezdec", + "Věž", + "Královna", + "Pěšec" + ] + }, + { + "_comment": "Mezi-tah", + "title" : "V této pozici, by leckdo bez rozmyslu vyměnil střelce za věž, na šachovnici je však mnohem lepší mezi-tah, který?", + "options" : [ + "Db5", + "Vxc5", + "Dd2", + "Vd2" + ] + }, + { + "_comment": "Danajský dar", + "title" : "Danajský dar často vyžaduje vysokou přesnost při dalším postupu, najděte nejlepší tah na této šachovnici, který povede k matu do pár tahů: ", + "options" : [ + "Dh5", + "Jg5", + "Sd3", + "f4" + ] + }, + { + "_comment": "Přitažlivost", + "title" : "Který tah z naší figurky udělá neodolatelnou a tím odstartuje cestu k Matu ve 3 tazích?", + "options" : [ + "Vxg7+", + "Vxf7", + "Dh7+", + "SxF7+" + ] + }, + { + "_comment": "Povýšení ?", + "title" : "Na kterou figurku je ne nejlepší povýšit pěšce v příštím tahu?", + "options" : [ + "Jezdec", + "Královna", + "Věž", + "Střelec" + ] + }, + { + "_comment": "Cesta vpřed", + "title" : "Jediný tah, který zaručeně vede k výhře je:", + "options" : [ + "Kd4", + "Kf5", + "Kd3", + "Kf4" + ] + }, + { + "_comment": "Věžová koncovka", + "title" : "Pozice na obrázku se obecně považuje za:", + "options" : [ + "Remízu", + "Výhru Bílého", + "Výhru Černého", + "Velice otevřenou" + ] + }, + { + "_comment": "Dobývání", + "title" : "Humorný Šach Mat, z této pozice po vynucené sekvenci tahů Rh1+ 2.Kxh1 Rh8+ 3.Kg1 Rh1+ 4.Kxh1 Qh8+ 5.Kg1 Qh2# nazýváme:", + "options" : [ + "Damiánův mat", + "Bodenův mat", + "Mat Pillsburyho", + "Anderssenův" + ] + }, + { + "_comment": "Věž je někdy málo", + "title" : "V pozici Saavedry se NEsetkáme s kterým z následujících konceptů?", + "options" : [ + "Mezitah", + "Povýšení na figurku s nižsí hodnotou než dáma", + "Vazba", + "Špíz angl. [Skewer];" + ] + } +] + diff --git a/resources/video/lq0.webm b/resources/video/lq0.webm new file mode 100644 index 0000000..788abb9 Binary files /dev/null and b/resources/video/lq0.webm differ diff --git a/resources/video/lq1.webm b/resources/video/lq1.webm new file mode 100644 index 0000000..ee6b305 Binary files /dev/null and b/resources/video/lq1.webm differ diff --git a/resources/video/lq10.webm b/resources/video/lq10.webm new file mode 100644 index 0000000..9ffcaea Binary files /dev/null and b/resources/video/lq10.webm differ diff --git a/resources/video/lq11.webm b/resources/video/lq11.webm new file mode 100644 index 0000000..2462ce3 Binary files /dev/null and b/resources/video/lq11.webm differ diff --git a/resources/video/lq2.webm b/resources/video/lq2.webm new file mode 100644 index 0000000..e159e0c Binary files /dev/null and b/resources/video/lq2.webm differ diff --git a/resources/video/lq3.webm b/resources/video/lq3.webm new file mode 100644 index 0000000..b595db0 Binary files /dev/null and b/resources/video/lq3.webm differ diff --git a/resources/video/lq4.webm b/resources/video/lq4.webm new file mode 100644 index 0000000..d4cb6b6 Binary files /dev/null and b/resources/video/lq4.webm differ diff --git a/resources/video/lq5.webm b/resources/video/lq5.webm new file mode 100644 index 0000000..8e2675a Binary files /dev/null and b/resources/video/lq5.webm differ diff --git a/resources/video/lq6.webm b/resources/video/lq6.webm new file mode 100644 index 0000000..7078244 Binary files /dev/null and b/resources/video/lq6.webm differ diff --git a/resources/video/lq7.webm b/resources/video/lq7.webm new file mode 100644 index 0000000..1fce882 Binary files /dev/null and b/resources/video/lq7.webm differ diff --git a/resources/video/lq8.webm b/resources/video/lq8.webm new file mode 100644 index 0000000..66bcab9 Binary files /dev/null and b/resources/video/lq8.webm differ diff --git a/resources/video/lq9.webm b/resources/video/lq9.webm new file mode 100644 index 0000000..5ebf236 Binary files /dev/null and b/resources/video/lq9.webm differ diff --git a/resources/video/placeHolder0.webm b/resources/video/placeHolder0.webm new file mode 100755 index 0000000..34edc3f Binary files /dev/null and b/resources/video/placeHolder0.webm differ diff --git a/route.php b/route.php new file mode 100644 index 0000000..6af099a --- /dev/null +++ b/route.php @@ -0,0 +1,32 @@ +returned = true; + return; + } + } + } + } + + function __destruct() { + if($_SERVER['REQUEST_METHOD'] == 'GET') { + if(!$this->returned){ + $url = explode("/", $_SERVER['REQUEST_URI']); + $url = $url[count($url)-1]; + + if (file_exists("./pages/$url/$url.php")) { + require_once("./pages/$url/$url.php"); + } else { + require_once("./pages/errors/404.php"); + } + } + } + } +} \ No newline at end of file