Add .htaccess for directory index and HTTPS redirection; update index.php layout and style
This commit is contained in:
parent
6dd4b67b84
commit
03182d513f
10
.htaccess
Normal file
10
.htaccess
Normal file
@ -0,0 +1,10 @@
|
||||
DirectoryIndex index.php index.html
|
||||
|
||||
Options -Indexes
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
</IfModule>
|
||||
|
||||
109
index.php
109
index.php
@ -1,46 +1,91 @@
|
||||
<?php
|
||||
// Fehleranzeige nur für Demo-Zwecke aktivieren
|
||||
ini_set('display_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
// Beispiel: einfache Formularverarbeitung
|
||||
$name = "";
|
||||
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
$name = htmlspecialchars($_POST["name"] ?? "");
|
||||
}
|
||||
$projects = [
|
||||
"privat" => [
|
||||
[
|
||||
"title" => "Gitea",
|
||||
"description" => "Mein privates Git-Repository – Quellcode, Projekte & mehr.",
|
||||
"url" => "/git",
|
||||
"icon" => "fab fa-git-alt",
|
||||
"color" => "#f97316"
|
||||
],
|
||||
[
|
||||
"title" => "Nextcloud",
|
||||
"description" => "Meine persönliche Cloud – Dateien, Kalender & Kontakte.",
|
||||
"url" => "/nextcloud",
|
||||
"icon" => "fas fa-cloud",
|
||||
"color" => "#0082c9"
|
||||
],
|
||||
],
|
||||
"schule" => [
|
||||
[
|
||||
"title" => "Geizkragen.store",
|
||||
"description" => "Schulprojekt – Ein Online-Shop für Schnäppchenjäger.",
|
||||
"url" => "https://geizkragen.store",
|
||||
"icon" => "fas fa-store",
|
||||
"color" => "#22c55e",
|
||||
"external" => true
|
||||
],
|
||||
],
|
||||
];
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>PHP 123 Fabian 123 Demo</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; margin: 40px; }
|
||||
.box { padding: 20px; border: 1px solid #ccc; border-radius: 8px; }
|
||||
</style>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Fabian Schieder</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="box">
|
||||
<h1>Test 123✅</h1>
|
||||
<div class="background-blur"></div>
|
||||
|
||||
<p><strong>Serverzeit:</strong> <?= date("d.m.Y H:i:s") ?></p>
|
||||
<p><strong>PHP-Version:</strong> <?= phpversion() ?></p>
|
||||
<p><strong>Client-IP:</strong> <?= $_SERVER["REMOTE_ADDR"] ?></p>
|
||||
<header>
|
||||
<div class="avatar">FS</div>
|
||||
<h1>Fabian Schieder</h1>
|
||||
<p class="tagline">Entwickler · Schüler · Macher</p>
|
||||
</header>
|
||||
|
||||
<hr>
|
||||
<main>
|
||||
<?php foreach ($projects as $category => $items): ?>
|
||||
<section>
|
||||
<h2 class="category-title">
|
||||
<?php if ($category === "privat"): ?>
|
||||
<i class="fas fa-lock"></i> Privat
|
||||
<?php elseif ($category === "schule"): ?>
|
||||
<i class="fas fa-graduation-cap"></i> Schule
|
||||
<?php endif; ?>
|
||||
</h2>
|
||||
<div class="cards">
|
||||
<?php foreach ($items as $project): ?>
|
||||
<a
|
||||
href="<?= htmlspecialchars($project['url']) ?>"
|
||||
class="card"
|
||||
<?= !empty($project['external']) ? 'target="_blank" rel="noopener noreferrer"' : '' ?>
|
||||
style="--accent: <?= htmlspecialchars($project['color']) ?>;"
|
||||
>
|
||||
<div class="card-icon">
|
||||
<i class="<?= htmlspecialchars($project['icon']) ?>"></i>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h3><?= htmlspecialchars($project['title']) ?></h3>
|
||||
<p><?= htmlspecialchars($project['description']) ?></p>
|
||||
</div>
|
||||
<div class="card-arrow">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php endforeach; ?>
|
||||
</main>
|
||||
|
||||
<h2>Formular-Test</h2>
|
||||
<form method="post">
|
||||
<input type="text" name="name" placeholder="Dein Name">
|
||||
<button type="submit">Absenden</button>
|
||||
</form>
|
||||
|
||||
<?php if ($name): ?>
|
||||
<p>Hallo <strong><?= $name ?></strong> 👋</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<footer>
|
||||
<p>© <?= date('Y') ?> Fabian Schieder — Alle Rechte vorbehalten.</p>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
|
||||
236
style.css
Normal file
236
style.css
Normal file
@ -0,0 +1,236 @@
|
||||
/* ===== RESET & BASE ===== */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
:root {
|
||||
--bg: #0f0f13;
|
||||
--surface: #1a1a24;
|
||||
--surface-hover: #22222f;
|
||||
--border: rgba(255, 255, 255, 0.07);
|
||||
--text: #e8e8f0;
|
||||
--text-muted: #8888a8;
|
||||
--radius: 16px;
|
||||
--transition: 0.25s ease;
|
||||
}
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 2rem 1rem 4rem;
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* ===== BACKGROUND GLOW ===== */
|
||||
.background-blur {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
background:
|
||||
radial-gradient(ellipse 60% 40% at 20% 10%, rgba(99, 102, 241, 0.15), transparent),
|
||||
radial-gradient(ellipse 50% 40% at 80% 80%, rgba(14, 165, 233, 0.10), transparent);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* ===== HEADER ===== */
|
||||
header {
|
||||
text-align: center;
|
||||
margin-bottom: 3.5rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(135deg, #6366f1, #0ea5e9);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 700;
|
||||
margin: 0 auto 1.2rem;
|
||||
letter-spacing: 1px;
|
||||
box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(1.8rem, 4vw, 2.8rem);
|
||||
font-weight: 700;
|
||||
background: linear-gradient(90deg, #e8e8f0 30%, #8888a8);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
letter-spacing: -0.5px;
|
||||
}
|
||||
|
||||
.tagline {
|
||||
color: var(--text-muted);
|
||||
margin-top: 0.5rem;
|
||||
font-size: 1rem;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
/* ===== MAIN CONTENT ===== */
|
||||
main {
|
||||
width: 100%;
|
||||
max-width: 680px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2.5rem;
|
||||
}
|
||||
|
||||
/* ===== CATEGORY SECTION ===== */
|
||||
section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.category-title {
|
||||
font-size: 0.78rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1.5px;
|
||||
color: var(--text-muted);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.cards {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
/* ===== CARD ===== */
|
||||
.card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.1rem;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 1.1rem 1.3rem;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
transition: background var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: var(--radius);
|
||||
opacity: 0;
|
||||
transition: opacity var(--transition);
|
||||
background: linear-gradient(135deg, var(--accent, #6366f1) 0%, transparent 60%);
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
background: var(--surface-hover);
|
||||
border-color: rgba(255, 255, 255, 0.14);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.card:hover::before {
|
||||
opacity: 0.07;
|
||||
}
|
||||
|
||||
.card:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
/* ===== CARD ICON ===== */
|
||||
.card-icon {
|
||||
flex-shrink: 0;
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
border-radius: 12px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.25rem;
|
||||
color: var(--accent, #6366f1);
|
||||
transition: background var(--transition);
|
||||
}
|
||||
|
||||
.card:hover .card-icon {
|
||||
background: rgba(255, 255, 255, 0.09);
|
||||
}
|
||||
|
||||
/* ===== CARD BODY ===== */
|
||||
.card-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.card-body h3 {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
margin-bottom: 0.25rem;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.card-body p {
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* ===== CARD ARROW ===== */
|
||||
.card-arrow {
|
||||
flex-shrink: 0;
|
||||
color: var(--text-muted);
|
||||
font-size: 0.85rem;
|
||||
transition: transform var(--transition), color var(--transition);
|
||||
}
|
||||
|
||||
.card:hover .card-arrow {
|
||||
transform: translateX(4px);
|
||||
color: var(--accent, #6366f1);
|
||||
}
|
||||
|
||||
/* ===== FOOTER ===== */
|
||||
footer {
|
||||
margin-top: auto;
|
||||
padding-top: 3rem;
|
||||
color: var(--text-muted);
|
||||
font-size: 0.8rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ===== RESPONSIVE ===== */
|
||||
@media (max-width: 480px) {
|
||||
body {
|
||||
padding: 1.5rem 0.75rem 3rem;
|
||||
}
|
||||
|
||||
.card-body p {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user