Přidán interaktivní příběh Butcher
This commit is contained in:
parent
efd292e779
commit
4e4de106b0
13
.idea/.gitignore
vendored
Normal file
13
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/projectSettingsUpdater.xml
|
||||
/contentModel.xml
|
||||
/modules.xml
|
||||
/.idea.blog.iml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
8
.idea/indexLayout.xml
Normal file
8
.idea/indexLayout.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
71
butcher/assets/css/style.css
Normal file
71
butcher/assets/css/style.css
Normal file
@ -0,0 +1,71 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
background-image: url(../../img/8f5ae70811c317d0e861fde6cd3a9646.jpg);
|
||||
background-size: cover;
|
||||
margin: 0;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-family: "Roboto", sans-serif;
|
||||
}
|
||||
|
||||
.game-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.game {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
p {
|
||||
color: azure;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: azure;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button {
|
||||
color: black;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin: 10px;
|
||||
border-radius: 7px;
|
||||
margin-top: 400px;
|
||||
}
|
||||
.footer-wrapper {
|
||||
padding: 45px;
|
||||
}
|
||||
|
||||
.footer-text {
|
||||
text-align: center;
|
||||
}
|
||||
.footer-contact {
|
||||
/* color: var(--link-two);
|
||||
*/
|
||||
text-decoration: underline;
|
||||
font-weight: 700;
|
||||
}
|
||||
.footer-text-p {
|
||||
padding-top: 20px;
|
||||
text-align: center;
|
||||
/* color: var(--word-white);
|
||||
*/
|
||||
font-weight: 700;
|
||||
}
|
BIN
butcher/img/083456674.jpg
Normal file
BIN
butcher/img/083456674.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
BIN
butcher/img/8f5ae70811c317d0e861fde6cd3a9646.jpg
Normal file
BIN
butcher/img/8f5ae70811c317d0e861fde6cd3a9646.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 159 KiB |
112
butcher/index.php
Normal file
112
butcher/index.php
Normal file
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if (!isset($_SESSION['step'])) {
|
||||
$_SESSION['step'] = 1;
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if (isset($_POST['choice'])) {
|
||||
$_SESSION['step'] = $_POST['choice'];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['restart'])) {
|
||||
session_destroy();
|
||||
header('Location: ' . $_SERVER['PHP_SELF']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$step = $_SESSION['step'];
|
||||
$story = '';
|
||||
$choices = [];
|
||||
|
||||
switch ($step) {
|
||||
case 1:
|
||||
$story = 'Ocitl jsem se před barem, mám pěkný vokno a je my blbě. Asi jsem se někde porval. Vlastně si uvědomuji že ani nevím kdo jsem. Aspoň mohu vstát, protože začíná pršet a já musím jít.';
|
||||
$choices = [
|
||||
['text' => 'Cesta', 'value' => 2]
|
||||
];
|
||||
break;
|
||||
case 2:
|
||||
$story = 'Jsi na ulici a začíná pršet. Vidíš nadzemku a bar. Kam půjdeš?';
|
||||
$choices = [
|
||||
['text' => 'Nadzemka', 'value' => 3],
|
||||
['text' => 'Bar', 'value' => 4]
|
||||
];
|
||||
break;
|
||||
case 3:
|
||||
$story = 'Jsi na nástupišti. Vidíš město, zachmuřené město. Vedle stojí tajemný týpek. Dáš se sním do řeči nebo počkáš na vlak?';
|
||||
$choices = [
|
||||
['text' => 'Prohodím pár slov', 'value' => 5],
|
||||
['text' => 'Počkám', 'value' => 6]
|
||||
];
|
||||
break;
|
||||
case 4:
|
||||
$story = 'Jsi ve dveřích baru. Ve vnitř je prázdno a jen barman . Chceš jít dál?';
|
||||
$choices = [
|
||||
['text' => 'Ano', 'value' => 7],
|
||||
['text' => 'Ne', 'value' => 8]
|
||||
];
|
||||
// break;
|
||||
// case 4:
|
||||
// $story = "Dorazil jsi do města, čeká tě tu sexy princezna. Konec hry.";
|
||||
// break;
|
||||
// case 5:
|
||||
// $story = "Tak si sedni a přemýšlej. Konec hry.";
|
||||
// break;
|
||||
// case 6:
|
||||
// $story = "Sežrala tě jeskyní příšera. Konec hry.";
|
||||
// break;
|
||||
// case 7:
|
||||
// $story = "Vrátil jsi se zpět do lesa a dokonce života v něm budeš bloudit v kruhu. Konec hry.";
|
||||
// break;
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="cs">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="./assets/css/style.css">
|
||||
|
||||
<title>Butcher</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="game-wrapper">
|
||||
<div class="game">
|
||||
<h1>Butcher</h1>
|
||||
<p><?php echo $story; ?></p>
|
||||
<?php if (!empty($choices)): ?>
|
||||
<form method="post" action="" >
|
||||
<?php foreach ($choices as $choice): ?>
|
||||
<button type="submit" name="choice" value="<?php echo $choice['value']; ?>"><?php echo $choice['text']; ?></button>
|
||||
<?php endforeach; ?>
|
||||
</form>
|
||||
|
||||
<?php else: ?>
|
||||
<p>Hra skončila. Začni znovu <a href="?restart=1">tady</a>.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="footer-wrapper">
|
||||
<div class="footer-text">
|
||||
<!-- <a class="footer-contact" href="#">Contact</a>-->
|
||||
<div class="footer-text-div">
|
||||
<p class="footer-text-p">Příběh je pravidelně aktualizováný.</p>
|
||||
<p class="footer-text-p">Hra je přístupná 18let.</p>
|
||||
<p class="footer-text-p">
|
||||
© 2024 - Lukáš Kaňka. All Rights Reserved.
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -12,8 +12,8 @@
|
||||
></script>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="description" content="Osobní Blog Lukáše Kaňky">
|
||||
<meta name="keywords" content="Linux, ArchLinux, EndeavourOS,Open Source, OSCloud">
|
||||
<meta name="author" content="Archos & Kankys">
|
||||
<meta name="keywords" content="Linux, ArchLinux, EndeavourOS, Open Source, OSCloud">
|
||||
<meta name="author" content="Kankys">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="img/600px-Arch-linux-logo-691350772.png">
|
||||
<title>Lukáš Kaňka</title>
|
||||
@ -56,6 +56,7 @@
|
||||
testingu a SQL v Acamaru, další kurz byl web developer u společnosti Engeto. Pracoval jsem na pozici testera ve společnosti Uniprog a nyní pracuji ve společnosti Kyndryl na projektu České Spořitelny pro platformu SMART.
|
||||
</p>
|
||||
<p>Nyní navíc nabízím IT služby, pro více informací<a class="linkservices" href="services/" target="_blank"> klikněte sem</a>.</p>
|
||||
<p>Má ropozitáře na mé projekty najdete pod tímto <a href="https://git.archoslinux.cz/kankys" target="_blank">odkazem</a></p>
|
||||
|
||||
</div>
|
||||
<div class="about-img"><img class="about-img content-container"
|
||||
|
@ -10,6 +10,9 @@
|
||||
src="https://kit.fontawesome.com/0a43c6cd1f.js"
|
||||
></script>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="description" content="IT služby Lukáše Kaňky">
|
||||
<meta name="keywords" content="Linux, ArchLinux, EndeavourOS, Open Source, OSCloud">
|
||||
<meta name="author" content="Lukáš Kaňka">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="img/600px-Arch-linux-logo-691350772.png">
|
||||
<title>Lukáš Kaňka - IT služby</title>
|
||||
|
18
testPHP/PTB/PROGRAMING_02/assets/CSS/style.css
Normal file
18
testPHP/PTB/PROGRAMING_02/assets/CSS/style.css
Normal file
@ -0,0 +1,18 @@
|
||||
.columns-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.columns-container .column-left {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.columns-container .column-right {
|
||||
width: 65%;
|
||||
}
|
||||
|
||||
.login-form,
|
||||
.register-form {
|
||||
display: none;
|
||||
}
|
0
testPHP/PTB/PROGRAMING_02/assets/js/script.js
Normal file
0
testPHP/PTB/PROGRAMING_02/assets/js/script.js
Normal file
BIN
testPHP/PTB/PROGRAMING_02/img/images.png
Normal file
BIN
testPHP/PTB/PROGRAMING_02/img/images.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
91
testPHP/PTB/PROGRAMING_02/index.php
Normal file
91
testPHP/PTB/PROGRAMING_02/index.php
Normal file
@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="cs">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous"> <!-- import BS 4.6 lepší podpora pro jQuery, ale může se používat pět -->
|
||||
<link rel="stylesheet" href="./assets/CSS/style.css">
|
||||
<title>PHP 1O1</title>
|
||||
</head>
|
||||
<body>
|
||||
<section id="leading">
|
||||
<div class="columns-container">
|
||||
<div class="column-left">
|
||||
<div class="forms-container">
|
||||
<h2>Login or Registr</h2>
|
||||
<div class="login-wrapper ">
|
||||
<button class="btn btn-primary login-btn">
|
||||
Login
|
||||
</button>
|
||||
<form class="login-form">
|
||||
<div class="form-group">
|
||||
<label for="login-username">Username:</label>
|
||||
<input type="text" class="form-control" id="login-username">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="login-password">Password:</label>
|
||||
<input type="password" class="form-control" id="login-password">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- REGISTR_WRAPPER -->
|
||||
<div class="register-wrapper">
|
||||
<button class="btn btn-primary register-btn">
|
||||
Registr
|
||||
</button>
|
||||
<form class="register-form">
|
||||
<div class="form-group">
|
||||
<label for="register-username">Email:</label>
|
||||
<input type="text" class="form-control" id="login-username">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="register-username">Username:</label>
|
||||
<input type="text" class="form-control" id="login-username">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="register-password">Password:</label>
|
||||
<input type="password" class="form-control" id="login-password">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="waves-container">
|
||||
<div class="wawe-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="52 128.405 350 319.6">
|
||||
<path d="M 52 150 c 101 -88 239 130 350 0|0 298 | -350 0" fill="#F3A095"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="wave-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="52 128.405 350 319.6">
|
||||
<path d="M 52 150 c 101 -88 239 130 350 0|0 298 | -350 0" fill="#EC7564"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="wave-3">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="52 128.405 350 319.6">
|
||||
<path d="M 52 150 c 101 -88 239 130 350 0|0 298 | -350 0" fill="EF5742"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column-right">
|
||||
<div class="container">
|
||||
<div class="logo-wrapper">
|
||||
<img src="./img/images.png" alt="PHP 1O1">
|
||||
</div>
|
||||
<h1>Become a web developer</h1>
|
||||
<h3>From begginer to intermediate programmer in one course</h3>
|
||||
<button class="btn btn-primary btn-showmore">What can i learn?</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- import boostrab funkcí do projecktu -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
|
||||
<script src="./assets/js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
49
testPHP/W3S/index.php
Normal file
49
testPHP/W3S/index.php
Normal file
@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
echo 'My first PHP script!';
|
||||
echo '</br>';
|
||||
echo phpversion();
|
||||
echo '</br>';
|
||||
$txt = 'PHP';
|
||||
echo "I love $txt!";
|
||||
echo '</br>';
|
||||
echo 'I love ' . $txt . '!';
|
||||
$x = 5;
|
||||
$y = 4;
|
||||
echo '</br>';
|
||||
echo $x + $y;
|
||||
echo '</br>';
|
||||
var_dump($x);
|
||||
echo '</br>';
|
||||
|
||||
var_dump('John');
|
||||
echo '</br>';
|
||||
var_dump(3.14);
|
||||
echo '</br>';
|
||||
var_dump(true);
|
||||
echo '</br>';
|
||||
var_dump([2, 3, 56]);
|
||||
echo '</br>';
|
||||
var_dump(null);
|
||||
echo '</br>';
|
||||
|
||||
/* Všechny tři proměnné získají hodnotu "Ovoce": */
|
||||
$q = $w = $e = 'Ovoce';
|
||||
|
||||
echo '</br>';
|
||||
function myTest() {
|
||||
$xx = 5; // local scope
|
||||
echo"<p>Variable x inside function is: $xx</p>;
|
||||
}
|
||||
myTest();
|
||||
|
||||
echo '</br>';
|
||||
echo"<p>Variable x outside is: $x</p>";
|
||||
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user