diff --git a/dist/sql_config_example.php b/dist/sql_config_example.php index 99c13c9..af802f3 100644 --- a/dist/sql_config_example.php +++ b/dist/sql_config_example.php @@ -3,3 +3,4 @@ $dbDsn = 'sqlite:'.__DIR__.DIRECTORY_SEPARATOR.'pvv.sqlite'; $dbUser = null; $dbPass = null; +$doorSensorSecret = "OGJiZTdjZDctMmFkNy00ZjZjLTk3OGItOTA3NzU3ZDM2Yjlm"; \ No newline at end of file diff --git a/src/pvv/side/door.php b/src/pvv/side/door.php index 791a0b1..2a868ee 100644 --- a/src/pvv/side/door.php +++ b/src/pvv/side/door.php @@ -18,8 +18,8 @@ class Door{ $doorEvents = []; foreach($statement->fetchAll() as $row){ $doorEvents[] = [ - 'time' => $row['time'], - 'open' => $row['open'] + 'time' => (int)$row['time'], + 'open' => (bool)$row['open'] ]; } diff --git a/www/css/style.css b/www/css/style.css index 06e02db..33f2541 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -153,6 +153,16 @@ nav #usermenu li:first-child:hover { 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){ nav #menu, nav #menu li.active, nav #menu_toggle, nav #login { position: absolute; @@ -226,6 +236,9 @@ nav #usermenu li:first-child:hover { margin-left: 1em !important; margin-right: 1em !important; } + .doorStateMobileOnly { + display: inline; + } } body { @@ -347,11 +360,3 @@ textarea.boxinput { 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; } \ No newline at end of file diff --git a/www/index.php b/www/index.php index 505a7ec..4822a2b 100644 --- a/www/index.php +++ b/www/index.php @@ -70,8 +70,8 @@ if (date("Y-m-d") == date("Y-m-d", $doorEntry->time)) { $doorTime = date("H:i",
  • Bli medlem!
  • Veibeskrivelse
    "> -

    Døren er åpen.

    -

    (Oppdatert )

    +

    Døren er åpen.

    +

    (Oppdatert )