Das Aussehen der Ampel etwas professioneller gestaltet.
This commit is contained in:
parent
0726fa79f3
commit
066fe35e8e
2 changed files with 44 additions and 4 deletions
28
style.css
Normal file → Executable file
28
style.css
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
||||||
.ample {
|
/*.ample {
|
||||||
display: block;
|
display: block;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
@ -15,4 +15,30 @@
|
||||||
.not-available {
|
.not-available {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
color: white;
|
color: white;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
div.hackerspace-room-state {
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.hackerspace-room-state h3 {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
div.hackerspace-room-state .icon {
|
||||||
|
display: inline;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.hackerspace-room-state .text {
|
||||||
|
display: inline;
|
||||||
|
margin-left: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.hackerspace-room-state hr {
|
||||||
|
margin-top: 0.3rem;
|
||||||
|
margin-bottom: 0.3rem;
|
||||||
}
|
}
|
20
syntax.php
Normal file → Executable file
20
syntax.php
Normal file → Executable file
|
@ -67,14 +67,28 @@ class syntax_plugin_whoisinyourhackspace extends DokuWiki_Syntax_Plugin {
|
||||||
|
|
||||||
$api = json_decode($file);
|
$api = json_decode($file);
|
||||||
|
|
||||||
|
$content = '';
|
||||||
|
$content .= '<div class="hackerspace-room-state">';
|
||||||
|
$content .= '<h3>Raumstatus</h3>';
|
||||||
|
|
||||||
|
//$content .= '<dl><dt>Status</dt>';
|
||||||
if ($api->state->open) {
|
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 {
|
} 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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue