Add base of site
This commit is contained in:
parent
7c3197785d
commit
3eee76642f
4 changed files with 44 additions and 10 deletions
34
index.php
34
index.php
|
|
@ -1,4 +1,20 @@
|
|||
<?php require_once("header.php"); ?>
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Hello fellow human! Feel free to update this page however you want.
|
||||
* At the moment, the code lives at https://code.techinc.nl/Thijs/techinc.nl
|
||||
*
|
||||
* As this site supports multiple display languages, if you update any text,
|
||||
* make sure you update the language strings in both
|
||||
* - language/nl.php
|
||||
* - language/en.php
|
||||
*
|
||||
* Thank you for keeping the website accessible for people that
|
||||
* are not fluent in either English or Dutch!
|
||||
*
|
||||
*/
|
||||
|
||||
require_once("header.php"); ?>
|
||||
<html lang="<?= $lang->languageCode ?>">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
|
@ -11,8 +27,20 @@
|
|||
<meta name="apple-mobile-web-app-title" content="TechInc" />
|
||||
<link rel="manifest" href="/icons/site.webmanifest" />
|
||||
<!-- Metadata -->
|
||||
<meta name="description" content="TechInc is a hackerspace in Amsterdam." />
|
||||
<meta name="description" content="<?= $lang->get('SHORT_DESCRIPTION_HEAD') ?>" />
|
||||
<title>Technologia Incognita</title>
|
||||
</head>
|
||||
<body></body>
|
||||
<body>
|
||||
<header>
|
||||
<!-- Logo and space state -->
|
||||
<img src="/icons/favicon.svg" width="100px" alt="<?= $lang->get("LOGO_ALT_TEXT") ?>" />
|
||||
|
||||
<!-- Title and short introduction -->
|
||||
<h1>Technologia Incognita</h1>
|
||||
<?= $lang->get('SHORT_DESCRIPTION_BODY') ?>
|
||||
|
||||
</header>
|
||||
<main></main>
|
||||
<footer></footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@ require_once("language.php");
|
|||
class English extends Language {
|
||||
public function __construct() {
|
||||
parent::__construct("en");
|
||||
$this->keys = array("Test" => "Test EN");
|
||||
$this->keys = array(
|
||||
"SHORT_DESCRIPTION_HEAD" => "TechInc is a hackerspace in Amsterdam.",
|
||||
"SHORT_DESCRIPTION_BODY" => 'TechInc is a <a href="https://en.wikipedia.org/wiki/Hackerspace">hackerspace</a> in Amsterdam.',
|
||||
"LOGO_ALT_TEXT" => "Stylized boat's wheel. The handles and spokes have different colors, as if it is decorated with RGB LEDs. At the axle of the wheel is an abstract electronic circuit board."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class Language {
|
|||
}
|
||||
|
||||
public function get($key) {
|
||||
return $this->keys[$key];
|
||||
return array_key_exists($key, $this->keys) ? $this->keys[$key] : $key;
|
||||
}
|
||||
|
||||
public static function getPreferredLanguage() {
|
||||
|
|
@ -29,12 +29,10 @@ class Language {
|
|||
|
||||
switch ($preferredLanguage) {
|
||||
case "nl":
|
||||
require_once("nl.php");
|
||||
return new Dutch();
|
||||
return require_once("nl.php");
|
||||
case "en":
|
||||
default:
|
||||
require_once("en.php");
|
||||
return new English();
|
||||
return require_once("en.php");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@ require_once("language.php");
|
|||
class Dutch extends Language {
|
||||
public function __construct() {
|
||||
parent::__construct("nl");
|
||||
$this->keys = array("Test" => "Test NL");
|
||||
$this->keys = array(
|
||||
"SHORT_DESCRIPTION_HEAD" => "TechInc is een hackerspace in Amsterdam.",
|
||||
"SHORT_DESCRIPTION_BODY" => 'TechInc is een <a href="https://nl.wikipedia.org/wiki/Hackerspace">hackerspace</a> in Amsterdam.',
|
||||
"LOGO_ALT_TEXT" => "Gestileerd stuurwiel van een boot. De handgrepen en spaken hebben verschillende kleuren, alsof het is versierd met RGB LED's. Op de as van het wiel zit een abstracte elektronische printplaat."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue