first
This commit is contained in:
21
public_html/parts/header.php
Normal file
21
public_html/parts/header.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
$req = $_SERVER['REQUEST_URI'];
|
||||
?>
|
||||
<html lang="pl">
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="/~<<USER>>/style.css">
|
||||
<?php
|
||||
if (str_contains($req, "/blog/")) {
|
||||
echo '<title>~<<USER>> Blog | tylda.org</title>';
|
||||
} else {
|
||||
echo '<title>~<<USER>> | tylda.org</title>';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-content">
|
||||
<header id="menu">
|
||||
<a href="/~<<USER>>/">~<<USER>></a>
|
||||
<a <?php if ($req == "/~<<USER>>/" || $req == "~/<<USER>>/index.php") { echo 'class="active"'; } ?>href="/~<<USER>>/">strona główna</a>
|
||||
<a <?php if (str_starts_with($req, "/~<<USER>>/blog/")) { echo 'class="active"'; } ?>href="/~<<USER>>/blog/">blog</a>
|
||||
</header>
|
||||
Reference in New Issue
Block a user