add an observer mode (?observer=1 query param)

This commit is contained in:
Tomáš Mládek 2018-10-18 12:48:01 +02:00
parent eecec447f7
commit 745491b7fe
2 changed files with 14 additions and 2 deletions

View file

@ -8,9 +8,9 @@
<link rel="stylesheet" href="main.css">
</head>
<body>
<body <?= empty($_REQUEST['observer']) ? '' : 'class="observer"' ?>>
<?php if (!isset($_COOKIE['outchat_name'])) { ?>
<?php if (!isset($_COOKIE['outchat_name']) && empty($_REQUEST['observer'])) { ?>
<div class="modal">
<form action="" method="post" class="modal__form">
<input type="text" name="name" placeholder="name" minLength="3" maxLength="20" class="modal__form-input">

View file

@ -158,4 +158,16 @@ body {
.message {
margin-bottom: 25px;
}
}
.observer .chat {
padding: 30px;
}
.observer .form {
visibility: hidden;
}
.observer .message:last-child {
margin-bottom: 0;
}