1. vlozenie obsahu, :)

Co-authored-by: Bruno Rybársky <bruno@brn.systems>
This commit is contained in:
MATUS 2024-06-05 19:14:38 +02:00
parent 85da055b95
commit 761862d36e
21 changed files with 8398 additions and 0 deletions

BIN
assets/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

4
assets/pico.min.css vendored Normal file

File diff suppressed because one or more lines are too long

0
assets/script.js Normal file

68
assets/style.css Normal file

@ -0,0 +1,68 @@
body, html {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
min-height: 100vh;
}
header.menu {
background-color: #333;
}
header.menu nav ul {
display: flex;
list-style: none;
margin: 0;
padding: 0;
justify-content: center;
}
header.menu nav ul li {
position: relative;
}
header.menu nav ul li a {
display: block;
padding: 14px 20px;
text-decoration: none;
color: white;
}
header.menu nav ul li:hover > a {
background-color: #575757;
}
header.menu nav ul li .submenu {
display: none;
position: absolute;
background-color: #333;
top: 100%;
left: 0;
flex-direction: column;
}
header.menu nav ul li:hover .submenu {
display: flex;
}
header.menu nav ul li .submenu li a {
padding: 10px;
}
.content {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
padding: 20px;
}
footer {
background-color: #333;
color: white;
text-align: center;
padding: 10px 0;
}

37
index.php Normal file

@ -0,0 +1,37 @@
<?php
$skeleton = file_get_contents('templates/skeleton.html');
$menu_obsah = file_get_contents('templates/header.html');
$out = str_replace('__TEMPLATE_HEADER__', $menu_obsah, $skeleton);
$footer_obsah = file_get_contents('templates/footer.html');
$out = str_replace('__TEMPLATE_FOOTER__', $footer_obsah, $out);
$nazov_stranky = basename($_SERVER['QUERY_STRING']);
if (empty($nazov_stranky)){
$nazov_stranky = 'index';
}
$cesta_k_stranke = "stranky/$nazov_stranky.html";
if (!file_exists($cesta_k_stranke)) {
$cesta_k_stranke = "templates/404.html";
}
$stranka_obsah = file_get_contents($cesta_k_stranke);
$out = str_replace('__TEMPLATE_STRANKA__', $stranka_obsah, $out);
$cesta_k_skriptu = "scripty/$nazov_stranky.js";
$script_obsah = "<script src=\"$cesta_k_skriptu\"></script>";
if (!file_exists($cesta_k_skriptu)){
$script_obsah = '';
}
$out = str_replace('__TEMPLATE_SCRIPT__', $script_obsah, $out);
$cesta_k_stylu = "styly/$nazov_stranky.css";
$style_obsah = "<link rel=\"stylesheet\" href=\"$cesta_k_stylu\">";
if (!file_exists($cesta_k_stylu)){
$style_obsah = '';
}
$out = str_replace('__TEMPLATE_STYLE__', $style_obsah, $out);
echo $out;
?>

4
stranky/index.html Normal file

@ -0,0 +1,4 @@
<section>
<h1>Výkup Železa</h1>
<h2>Tvoj oblúbený kovošrot.</h2>
</section>

1
stranky/kontakt.html Normal file

@ -0,0 +1 @@
<h1>tel.: +421 832 323 445, email: kovo@srot.sk</h1>

1
stranky/onas.html Normal file

@ -0,0 +1 @@
<h1>Náš cieľ je odstrániť z vaších domácností nepotrebné alebo pokazené elektrospotrbiče, a všetko iné</h1>

1
stranky/pok.html Normal file

@ -0,0 +1 @@
<h1>Pokročilá služba sa skladá z prevziatia kovošrotu aj nadrozmenrých hmotností</h1>

1
stranky/pro.html Normal file

@ -0,0 +1 @@
<h1>Pokročilá služba obsahuje všetko čo zákazník si požiada</h1>

1
stranky/zak.html Normal file

@ -0,0 +1 @@
<h1>Základná služba sa skladá z prevziatia kovošrotu od zákazníka</h1>

1
templates/404.html Normal file

@ -0,0 +1 @@
<h1>zlý request</h1>

1
templates/footer.html Normal file

@ -0,0 +1 @@
<p>Kontaktuje nás: Email: example@example.com | Tel.: +123 456 7890 | Adresa: 123 železná ulica, Komárno</p>

15
templates/header.html Normal file

@ -0,0 +1,15 @@
<nav>
<ul>
<li><a href="/index">Domovská stránka</a></li>
<li><a href="/onas">O nás</a></li>
<li><a href="/kontakt">Kontakt</a></li>
<li class="dropdown">
<p>Služby</p>
<ul class="submenu">
<li><a href="/zak">Základná služba</a></li>
<li><a href="/pok">Pokročilá služba</a></li>
<li><a href="/pro">Profesionálna služba</a></li>
</ul>
</li>
</ul>
</nav>

32
templates/skeleton.html Normal file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="sk" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="keywords" content="iron, recycling, metal, environment">
<meta name="description" content="Vykup Zeleza - Your trusted partner in iron recycling.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="/assets/pico.min.css" />
<link rel="stylesheet" href="/assets/fonts/remixicon/remixicon.css" />
<link rel="stylesheet" href="/assets/style.css" />
<link rel="icon" href="/assets/favicon.png" type="image/png">
<script src="/assets/script.js"></script>
<title>Výkup železa</title>
__TEMPLATE_SCRIPT__
__TEMPLATE_STYLE__
</head>
<body>
<header>
__TEMPLATE_HEADER__
</header>
<main>
__TEMPLATE_STRANKA__
</main>
<footer>
__TEMPLATE_FOOTER__
</footer>
</body>
</html>