Initial commit: Backup der Webseiten
- zoesch.de - blitzkiste.net - gruene-hassberge (norbert.zoesch.de) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
8
zoesch.de/php/classes/Page_Data.class.php
Normal file
8
zoesch.de/php/classes/Page_Data.class.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
class Page_Data
|
||||
{
|
||||
public $title = '';
|
||||
public $content = '';
|
||||
public $css = '';
|
||||
public $embeddedStyle = '';
|
||||
}
|
||||
15
zoesch.de/php/css/layout.css
Normal file
15
zoesch.de/php/css/layout.css
Normal file
@@ -0,0 +1,15 @@
|
||||
nav {
|
||||
background-color: #CCCCDE;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
nav a {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
color: #000;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
nav a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
31
zoesch.de/php/index.php
Normal file
31
zoesch.de/php/index.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
// show errors
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
include_once 'classes/Page_Data.class.php';
|
||||
$pageData = new Page_Data();
|
||||
$pageData->title = 'Thomas Blom Hansen: Portfolio site';
|
||||
$pageData->content = include_once 'views/navigation.php';
|
||||
$pageData->css = "<link href='css/layout.css' rel='stylesheet' />";
|
||||
$navigationIsClicked = isset($_GET['page']);
|
||||
if ($navigationIsClicked) {
|
||||
$fileToLoad = $_GET['page'];
|
||||
} else {
|
||||
$fileToLoad = 'skills';
|
||||
}
|
||||
$pageData->content .= include_once "views/$fileToLoad.php";
|
||||
|
||||
//new code below: dynamic style added below
|
||||
$pageData->embeddedStyle = "
|
||||
<style>
|
||||
nav a[href *= '?page=$fileToLoad']{
|
||||
padding:3px;
|
||||
background-color:white;
|
||||
border-top-left-radius:3px;
|
||||
border-top-right-radius:3px;
|
||||
}
|
||||
</style>";
|
||||
|
||||
$page = include_once 'templates/page.php';
|
||||
echo $page;
|
||||
14
zoesch.de/php/templates/page.php
Normal file
14
zoesch.de/php/templates/page.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return "<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>$pageData->title</title>
|
||||
<meta http-equiv='Content-Type' content='text/html;charset=utf-8' />
|
||||
$pageData->css
|
||||
$pageData->embeddedStyle
|
||||
</head>
|
||||
<body>
|
||||
$pageData->content
|
||||
</body>
|
||||
</html>";
|
||||
7
zoesch.de/php/views/navigation.php
Normal file
7
zoesch.de/php/views/navigation.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
return "
|
||||
<nav>
|
||||
<a href='index.php?page=skills'>My skills and background</a>
|
||||
<a href='index.php?page=projects'>Some projects</a>
|
||||
</nav>
|
||||
";
|
||||
5
zoesch.de/php/views/projects.php
Normal file
5
zoesch.de/php/views/projects.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
return "<h1>Projects I have worked on</h1>
|
||||
<ul>
|
||||
<li>Ahem, this will soon be updated</li>
|
||||
</ul>";
|
||||
4
zoesch.de/php/views/skills.php
Normal file
4
zoesch.de/php/views/skills.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return "<h1>Skills and educational background</h1>
|
||||
<p>Read all about my skills and my formal training</p>
|
||||
";
|
||||
Reference in New Issue
Block a user