diff options
| author | ilotterytea <iltsu@alright.party> | 2025-12-06 16:03:44 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-12-06 16:03:44 +0500 |
| commit | 880776528c0acf361ee06b8a5ec6c4071c329d7f (patch) | |
| tree | c28600a0d369860ac1f0849b1fac7c04723ec4b1 | |
initial commit
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | index.php | 22 | ||||
| -rw-r--r-- | lib/config.php | 9 | ||||
| -rw-r--r-- | lib/partials.php | 16 | ||||
| -rw-r--r-- | static/style.css | 33 |
5 files changed, 83 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bc34b08 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +config.ini +*.db +.DS_STORE
\ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..974c929 --- /dev/null +++ b/index.php @@ -0,0 +1,22 @@ +<?php +include_once $_SERVER['DOCUMENT_ROOT'] . '/lib/partials.php'; +include_once $_SERVER['DOCUMENT_ROOT'] . '/lib/config.php'; +?> +<!DOCTYPE html> +<html> + +<head> + <title><?= INSTANCE_NAME ?></title> + <link rel="stylesheet" href="static/style.css"> + <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> +</head> + +<body> + <?php render_header(); ?> + <main> + <marquee>!!! Under construction !!!</marquee> + <p><a href="/emotes.php">Looking for TinyEmotes instance?</a></p> + </main> +</body> + +</html>
\ No newline at end of file diff --git a/lib/config.php b/lib/config.php new file mode 100644 index 0000000..6481767 --- /dev/null +++ b/lib/config.php @@ -0,0 +1,9 @@ +<?php +$config = []; + +$file_path = "{$_SERVER['DOCUMENT_ROOT']}/config.ini"; +if (file_exists($file_path)) { + $config = parse_ini_file($file_path, true); +} + +define('INSTANCE_NAME', $config['instance']['name'] ?? $_SERVER['HTTP_HOST']);
\ No newline at end of file diff --git a/lib/partials.php b/lib/partials.php new file mode 100644 index 0000000..493b469 --- /dev/null +++ b/lib/partials.php @@ -0,0 +1,16 @@ +<?php +include_once $_SERVER['DOCUMENT_ROOT'] . '/lib/config.php'; + +function render_header() +{ + echo '' ?> + <header> + <div class="banner"> + <h1><?= INSTANCE_NAME ?></h1> + </div> + <div class="links"> + <a href="/">Home</a> + </div> + </header> + <?php ; +}
\ No newline at end of file diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..6ec0668 --- /dev/null +++ b/static/style.css @@ -0,0 +1,33 @@ +* { + margin: 0; + padding: 0; +} + +body { + width: 50em; + margin: 0 auto; + font-family: 'Times New Roman', Times, serif; +} + +header { + border: 1px solid black; + margin: 8px 0; + display: flex; + flex-direction: column; +} + +header .banner { + background-color: seagreen; + min-height: 10vh; + display: flex; + align-items: end; + justify-content: end; +} + +header .links { + padding: 4px; + border-top: 1px solid black; + display: flex; + flex-direction: row; + justify-content: space-around; +}
\ No newline at end of file |
