This commit is contained in:
www-data 2022-04-27 20:22:46 +02:00
commit 92ca25b578
3 changed files with 29 additions and 14 deletions

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1088 1256v240q0 16-12 28t-28 12h-240q-16 0-28-12t-12-28v-240q0-16 12-28t28-12h240q16 0 28 12t12 28zm316-600q0 54-15.5 101t-35 76.5-55 59.5-57.5 43.5-61 35.5q-41 23-68.5 65t-27.5 67q0 17-12 32.5t-28 15.5h-240q-15 0-25.5-18.5t-10.5-37.5v-45q0-83 65-156.5t143-108.5q59-27 84-56t25-76q0-42-46.5-74t-107.5-32q-65 0-108 29-35 25-107 115-13 16-31 16-12 0-25-8l-164-125q-13-10-15.5-25t5.5-28q160-266 464-266 80 0 161 31t146 83 106 127.5 41 158.5z"/></svg>

After

Width:  |  Height:  |  Size: 587 B

View file

@ -38,15 +38,17 @@
<div id="headline" class="flex-box row"> <div id="headline" class="flex-box row">
<div id="header-left" class="flex-box row center"> <div id="header-left" class="flex-box row center">
<div id="status-icon" class="icon tooltip"> <div id="status-icon" class="icon tooltip">
<span class="tooltiptext">Befinden sich Leute im Raum?</span>
<?php <?php
include_once '../src/getContent.php';
try { try {
include_once '../src/getContent.php'; echo getKrautButton($status);
getKrautButton($status); } catch(Throwable $th) {
} catch(Exception $ex) { echo '<span class="tooltiptext">
error_log("$ex", 0); Fehler beim Parsen des Raumstatus</span>
<img alt="Raumstatus Icon - Fehler beim Parsen"
class="icon-img" src="./images/icons/question.svg"/>';
} }
?> ?>
</div> </div>
<div id="banner-div" class="flex-box column"> <div id="banner-div" class="flex-box column">
<a id="banner" href="#" <a id="banner" href="#"
@ -164,7 +166,12 @@
<h3>Termine</h3> <h3>Termine</h3>
<?php <?php
require_once '../src/getEvents.php'; require_once '../src/getEvents.php';
printEventList(); try {
printEventList();
} catch (Throwable $th) {
echo '<p>Sorry ... keine Termine verfügbar</p>';
error_log($th->getMessage(), 0);
}
?> ?>
</div> </div>
@ -198,7 +205,7 @@
<h4 class="aside">Twitter</h4> <h4 class="aside">Twitter</h4>
<ul class="aside"> <ul class="aside">
<li> <li>
<a <a rel="me"
href="https://twitter.com/hackspacejena">twitter.com/hackspacejena</a> href="https://twitter.com/hackspacejena">twitter.com/hackspacejena</a>
</li> </li>
</ul> </ul>
@ -207,7 +214,7 @@
<h4 class="aside">Mastodon</h4> <h4 class="aside">Mastodon</h4>
<ul class="aside"> <ul class="aside">
<li> <li>
<a <a rel="me"
href="https://chaos.social/@krautspace">chaos.social/@krautspace</a> href="https://chaos.social/@krautspace">chaos.social/@krautspace</a>
</li> </li>
</ul> </ul>

View file

@ -40,13 +40,19 @@ function getStatus(): bool
catch (Error $e) { return false; } catch (Error $e) { return false; }
} }
function getKrautButton(bool $status) /**
* @return string
*/
function getKrautButton(bool $status): string
{ {
if ($status) { if ($status) {
echo '<img alt="Raumstatus Icon - Raum ist geöffnet" return '<span class="tooltiptext">Der Space ist geöffnet</span>
class="icon-img" src="./images/icons/users.svg">'; <img alt="Raumstatus Icon - Raum ist geöffnet"
class="icon-img" src="./images/icons/users.svg">';
} else { } else {
echo '<img alt="Raumstatus Icon - Raum ist geschlossen" return '<span class="tooltiptext">Der Space ist geschlossen</span>
class="icon-img" src="./images/icons/user-times.svg">'; <img alt="Raumstatus Icon - Raum ist geschlossen"
class="icon-img" src="./images/icons/user-times.svg">';
} }
} }