This commit is contained in:
Filip Rojek 2023-03-04 23:46:16 +01:00
parent 50f196849b
commit 9dea0661d6
6 changed files with 32 additions and 11 deletions

11
v4/components/header.php Normal file
View File

@ -0,0 +1,11 @@
<section class="nav">
<div class="logo">
<p>logo</p>
</div>
<div class="links">
<a href="/home">Úvod</a>
<a href="/projects">Projekty</a>
<a href="/contact">Kontakt</a>
</div>
</section>

View File

@ -6,7 +6,7 @@
.nav { .nav {
display: flex; display: flex;
background: red;
} }

View File

@ -14,14 +14,14 @@ error_reporting(-1);
date_default_timezone_set('Europe/Prague'); date_default_timezone_set('Europe/Prague');
// site info // site info
$keywords = ""; $keywords = "Filip Rojek, rojek, vyvojar, developer, backend vyvojar, nodejs vyvojar, php vyvojar, web vyvojar, programator, linux administrator";
$description = ""; $description = "";
$locale = "cs_CZ"; $locale = "cs_CZ";
$title = ""; $title = "Filip Rojek | Developer";
$site_name = ""; $site_name = "Filip Rojek | Developer";
$author = "Fofrweb | https://fofrweb.com"; $author = "Fofrweb | https://fofrweb.com";
$email = "webmaster(@)fofrweb.com"; $email = "webmaster(@)fofrweb.com";
$canonical = "https://"; $canonical = "https://www.filiprojek.cz/";
?> ?>
<!doctype html> <!doctype html>
@ -57,13 +57,17 @@ $canonical = "https://";
<title><?= $title ?></title> <title><?= $title ?></title>
<link rel="canonical" href="<?= $canonical ?>" /> <link rel="canonical" href="<?= $canonical ?>" />
<link rel="stylesheet" href="/css/style.css">
</head> </head>
<body> <body>
<?php <?php
require_once("./components/header.php");
if(isset($_GET['page'])) { if(isset($_GET['page'])) {
$file = $_GET['page']; $file = $_GET['page'];
$file2 = dirname($_SERVER['SCRIPT_FILENAME']) . "/pages/$file/$file.php"; $file2 = dirname($_SERVER['SCRIPT_FILENAME']) . "/pages/$file/$file.php";
echo $file2; echo $file;
if(file_exists($file2)) { if(file_exists($file2)) {
if(substr_count($file, "../") > 0) { if(substr_count($file, "../") > 0) {

View File

@ -1,2 +1,3 @@
<h3>Home</h3> <section>
<a href="/?page=test">test</p> <p>lorem</p>
</section>

View File

@ -0,0 +1,8 @@
<h3>Projekty</h3>
<a href="/?page=home">home</a>
<section>
<div>
</div>
</section>

View File

@ -1,3 +0,0 @@
<h3>Test</h3>
<a href="/?page=home">home</a>