Das Aussehen der Ampel etwas professioneller gestaltet.

This commit is contained in:
Tim Schumacher 2014-06-30 23:00:01 +02:00
parent 0726fa79f3
commit 066fe35e8e
2 changed files with 44 additions and 4 deletions

20
syntax.php Normal file → Executable file
View file

@ -67,14 +67,28 @@ class syntax_plugin_whoisinyourhackspace extends DokuWiki_Syntax_Plugin {
$api = json_decode($file);
$content = '';
$content .= '<div class="hackerspace-room-state">';
$content .= '<h3>Raumstatus</h3>';
//$content .= '<dl><dt>Status</dt>';
if ($api->state->open) {
$renderer->doc .= sprintf('<p class="ample available">%s ist besetzt :).</p>',$api->space);
//$content .= '<dd>Offen</dd>';
$content .= "<img class=\"icon\" src=\"{$api->state->icon->open}\" alt=\"{$api->space} ist besetzt.\" title=\"{$api->space} ist besetzt.\" />";
$content .= "<p class=\"text\">{$api->space} ist besetzt.</p>";
//$renderer->doc .= sprintf('<p class="ample available">%s ist besetzt :).</p>',$api->space);
} else {
$renderer->doc .= sprintf('<p class="ample not-available">%s ist nicht besetzt :(.</p>',$api->space);
//$renderer->doc .= sprintf('<p class="ample not-available">%s ist nicht besetzt :(.</p>',$api->space);
$content .= "<img class=\"icon\" src=\"{$api->state->icon->closed}\" alt=\"{$api->space} ist geschlossen.\" title=\"{$api->space} ist geschlossen.\" />";
$content .= "<p class=\"text\">{$api->space} ist geschlossen.</p>";
}
$renderer->doc .= sprintf('<p><a href="http://spacestatus.bastinat0r.de/#%s">MOAH!</a></p>',strtolower($api->space));
$content .= '<hr />';
$content .= sprintf('<p><a href="http://spacestatus.bastinat0r.de/#%s">Raum-Öffnungs-Statistiken</a></p>',strtolower($api->space));
$content .= '</div>';
$renderer->doc .= $content;
return true;
}
}