🔀 merge pull request 'v1.0.1' (#11) from dev into main

Reviewed-on: #11
This commit is contained in:
DrMaxNix 2024-06-07 11:55:17 +02:00
commit ddb343b255
6 changed files with 74 additions and 18 deletions

View File

@ -1,2 +1,10 @@
# www.thi-hub.de
A simple hub for relevant THI student links
### Use as Embed
The quicklink buttons can be embedded into external tools like this:
```html
<iframe style="width: 100%; min-height: 300px;" src="http://thi-hub.de/en/embed" scrolling="no"></iframe>
```

View File

@ -1,6 +1,6 @@
<?php
// VERSION //
static::$version = "1.0.0";
static::$version = "1.0.1";
// DEPENDENCIES //
@ -21,7 +21,12 @@
// pages
static::$route["thi-hub.de"] = [
["path" => "", "target" => "page/start"],
["path" => ":lang", "target" => "page/start"],
// start
["path" => "", "target" => "page/start"],
["path" => ":lang", "target" => "page/start"],
// embed
["path" => "embed", "target" => "page/embed"],
["path" => ":lang/embed", "target" => "page/embed"],
];
?>

27
page/embed/index.php Normal file
View File

@ -0,0 +1,27 @@
<?php
declare(strict_types = 1);
namespace Kimendisch\Thi_Hub;
use Flake\Page;
// AUTOSELECT LANGUAGE //
require("./page/lang_autoselect.php");
// PAGE INIT //
require("./page/page_base.php");
Page::title(Data::$dict->get("title"));
Page::description(Data::$dict->get("description"));
Page::robots(index: false, follow: false);
?>
<div class="page-container sparse">
<div class="page">
<?php require("./page/section_quicklinks.php"); ?>
</div>
</div>

View File

@ -0,0 +1,24 @@
<?php
declare(strict_types = 1);
namespace Kimendisch\Thi_Hub;
?>
<div class="section quicklinks">
<div class="content">
<div class="button-list">
<?php foreach(Data::$dict->get("quicklink_list") as $one_quicklink){ ?>
<a href="<?= $one_quicklink["url"] ?>" target="_blank" class="button big <?= $one_quicklink["color"] ?>">
<span class="icon big ti ti-<?= $one_quicklink["icon"] ?>"></span>
<div class="text">
<span><?= $one_quicklink["name"] ?></span>
<span class="gray-dark"><?= $one_quicklink["extra"] ?></span>
</div>
</a>
<?php } ?>
</div>
</div>
</div>

View File

@ -23,21 +23,7 @@
<div class="page-container">
<div class="page">
<div class="section quicklinks">
<div class="content">
<div class="button-list">
<?php foreach(Data::$dict->get("quicklink_list") as $one_quicklink){ ?>
<a href="<?= $one_quicklink["url"] ?>" target="_blank" class="button big <?= $one_quicklink["color"] ?>">
<span class="icon big ti ti-<?= $one_quicklink["icon"] ?>"></span>
<div class="text">
<span><?= $one_quicklink["name"] ?></span>
<span class="gray-dark"><?= $one_quicklink["extra"] ?></span>
</div>
</a>
<?php } ?>
</div>
</div>
</div>
<?php require("./page/section_quicklinks.php"); ?>
<div class="section about">
<div class="header">

View File

@ -145,6 +145,9 @@ button:focus {
align-items: center;
justify-content: flex-start;
}
.page-container.sparse {
justify-content: center;
}
.page {
max-width: 60vw;
@ -156,6 +159,9 @@ button:focus {
text-align: center;
}
.page-container.sparse .page {
padding: 2rem;
}
@media only screen and (max-width: 1600px) {
.page {
max-width: 75vw;