From ec418a6ebebc839c9a30e8a3cb15092d189efd34 Mon Sep 17 00:00:00 2001
From: Conrad Zelck <git@simpel.cc>
Date: Thu, 14 Apr 2022 19:46:32 +0200
Subject: [PATCH] faet: introduce global head/header

Signed-off-by: Conrad Zelck <git@simpel.cc>
---
 index.html => index.php | 15 ++-------------
 localSettingsHeader.php |  6 ++++++
 2 files changed, 8 insertions(+), 13 deletions(-)
 rename index.html => index.php (63%)
 create mode 100644 localSettingsHeader.php

diff --git a/index.html b/index.php
similarity index 63%
rename from index.html
rename to index.php
index 9fcd6c1..0670801 100644
--- a/index.html
+++ b/index.php
@@ -2,24 +2,13 @@
 <html dir="ltr" lang="en-US">
 
 <head>
-  <meta charset="UTF-8" />
-  <meta name="viewport" content="height=device-height,width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,minimal-ui" />
-  <meta name="apple-mobile-web-app-capable" content="yes" />
-  <meta name="apple-mobile-web-app-status-bar-style" content="translucent black" />
-  <meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no" />
+  <?php include dirname($_SERVER['DOCUMENT_ROOT']) . "/simpel.cc/php/head.php"; ?>
   <link rel="stylesheet" href="style.css">
-  <title>Sort Lines</title>
 </head>
 
 <body onKeyDown="keys(event,'d')" onKeyUp="keys(event,'u')">
   <header>
-    <nav>
-      <a id="logo" class="cursordefault" href="/"><img src="../Simpel.png" alt="simpel icon" height="48" width="48" title="simpel.cc" aria-label="go to simpel dot c c"></a>
-      <h1>Sort Lines</h1>
-      <a id="github" href="https://github.com/SimpelMe/sort-lines" target="_blank" rel="noopener noreferrer" title="watch source code" aria-label="go to source code at github dot com">
-        <img id="github-cat" src="../github.svg" alt="github logo">
-      </a>
-    </nav>
+    <?php include dirname($_SERVER['DOCUMENT_ROOT']) . "/simpel.cc/php/header.php"; ?>
   </header>
   <main>
     <noscript>
diff --git a/localSettingsHeader.php b/localSettingsHeader.php
new file mode 100644
index 0000000..222ba5a
--- /dev/null
+++ b/localSettingsHeader.php
@@ -0,0 +1,6 @@
+<?php
+  define("SITE_TITLE", "Sort Lines");
+  define("SITE_COPYRIGHT_CONTENT", "MIT 2021 Simpel");
+  define("SITE_H1", "Sort Lines");
+  define("SITE_GITHUB", "https://github.com/SimpelMe/sort-lines");
+?>
-- 
GitLab