Handled suggestions -pullrequestreview-749376540
This commit is contained in:
parent
9dad49738c
commit
fdbbaee175
1
dist/sql_config_example.php
vendored
1
dist/sql_config_example.php
vendored
@ -3,3 +3,4 @@ $dbDsn = 'sqlite:'.__DIR__.DIRECTORY_SEPARATOR.'pvv.sqlite';
|
|||||||
$dbUser = null;
|
$dbUser = null;
|
||||||
$dbPass = null;
|
$dbPass = null;
|
||||||
|
|
||||||
|
$doorSensorSecret = "OGJiZTdjZDctMmFkNy00ZjZjLTk3OGItOTA3NzU3ZDM2Yjlm";
|
@ -18,8 +18,8 @@ class Door{
|
|||||||
$doorEvents = [];
|
$doorEvents = [];
|
||||||
foreach($statement->fetchAll() as $row){
|
foreach($statement->fetchAll() as $row){
|
||||||
$doorEvents[] = [
|
$doorEvents[] = [
|
||||||
'time' => $row['time'],
|
'time' => (int)$row['time'],
|
||||||
'open' => $row['open']
|
'open' => (bool)$row['open']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,6 +153,16 @@ nav #usermenu li:first-child:hover {
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#doorIndicator {
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 8px 8px;
|
||||||
|
margin: 4px 4px;
|
||||||
|
}
|
||||||
|
#doorIndicator > p > abbr[title] { text-decoration: none; border-bottom: none; cursor: inherit; }
|
||||||
|
.doorIndicator_OPEN { border: 2px solid green; }
|
||||||
|
.doorIndicator_CLOSED { border: 2px dotted red; }
|
||||||
|
.doorStateMobileOnly { display: none; }
|
||||||
|
|
||||||
@media(max-width: 800px){
|
@media(max-width: 800px){
|
||||||
nav #menu, nav #menu li.active, nav #menu_toggle, nav #login {
|
nav #menu, nav #menu li.active, nav #menu_toggle, nav #login {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -226,6 +236,9 @@ nav #usermenu li:first-child:hover {
|
|||||||
margin-left: 1em !important;
|
margin-left: 1em !important;
|
||||||
margin-right: 1em !important;
|
margin-right: 1em !important;
|
||||||
}
|
}
|
||||||
|
.doorStateMobileOnly {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@ -347,11 +360,3 @@ textarea.boxinput {
|
|||||||
resize: vertical;
|
resize: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
#doorIndicator {
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 8px 8px;
|
|
||||||
margin: 4px 4px;
|
|
||||||
}
|
|
||||||
#doorIndicator > p { display: inline; }
|
|
||||||
.doorIndicator_OPEN { border: 2px solid green; }
|
|
||||||
.doorIndicator_CLOSED { border: 2px dotted red; }
|
|
@ -70,8 +70,8 @@ if (date("Y-m-d") == date("Y-m-d", $doorEntry->time)) { $doorTime = date("H:i",
|
|||||||
<a class="btn focus" href="paamelding/"><li>Bli medlem!</li></a>
|
<a class="btn focus" href="paamelding/"><li>Bli medlem!</li></a>
|
||||||
<a class="btn" href="https://use.mazemap.com/#config=ntnu&v=1&zlevel=2¢er=10.406281,63.417093&zoom=19.5&campuses=ntnu&campusid=1&sharepoitype=poi&sharepoi=38159&utm_medium=longurl">Veibeskrivelse</li></a>
|
<a class="btn" href="https://use.mazemap.com/#config=ntnu&v=1&zlevel=2¢er=10.406281,63.417093&zoom=19.5&campuses=ntnu&campusid=1&sharepoitype=poi&sharepoi=38159&utm_medium=longurl">Veibeskrivelse</li></a>
|
||||||
<div id="doorIndicator" class="<?php echo($isDoorOpen ? "doorIndicator_OPEN" : "doorIndicator_CLOSED"); ?>">
|
<div id="doorIndicator" class="<?php echo($isDoorOpen ? "doorIndicator_OPEN" : "doorIndicator_CLOSED"); ?>">
|
||||||
<p class="doorStateText">Døren er <b><?php echo($isDoorOpen ? "" : "ikke") ?> åpen</b>.</p>
|
<p class="doorStateText"><abbr title="Oppdatert <?php echo($doorTime) ?>">Døren er <b><?php echo($isDoorOpen ? "" : "ikke") ?> åpen</b>.</abbr></p>
|
||||||
<p class="doorStateTime">(Oppdatert <?php echo($doorTime) ?>)</p>
|
<p class="doorStateTime doorStateMobileOnly">(Oppdatert <?php echo($doorTime) ?>)</p>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user