adds hard-coded calendar without data as placeholder

This commit is contained in:
James Tomasino 2020-09-26 19:29:30 +00:00
parent 76c878d65a
commit 8729aecc37
4 changed files with 648 additions and 0 deletions

118
css/calendar.css Normal file
View File

@ -0,0 +1,118 @@
.calendar-wrapper {
display: block;
max-height: 500px;
overflow-y: scroll;
}
.calendar {
font-family: sans-serif;
width: 100%;
border-spacing: 0;
border-collapse: separate;
table-layout: fixed;
margin-bottom: 50px;
}
.calendar thead tr th {
background: #626E7E;
color: #d1d5db;
padding: 0.5em;
overflow: hidden;
}
.calendar thead tr th:first-child {
border-radius: 3px 0 0 0;
}
.calendar thead tr th:last-child {
border-radius: 0 3px 0 0;
}
.calendar thead tr th .day {
display: block;
font-size: 1.2em;
border-radius: 50%;
width: 30px;
height: 30px;
margin: 0 auto 5px;
padding: 5px;
line-height: 1.8;
}
.calendar thead tr th .day.active {
background: #d1d5db;
color: #626E7E;
}
.calendar thead tr th .short {
display: none;
}
.calendar thead tr th i {
vertical-align: middle;
font-size: 2em;
}
.calendar tbody tr {
background: #d1d5db;
}
.calendar tbody tr:nth-child(odd) {
background: #c8cdd4;
}
.calendar tbody tr:nth-child(2n+0) td {
border-bottom: 1px solid #626E7E;
}
.calendar tbody tr td {
text-align: center;
vertical-align: middle;
border-left: 1px solid #626E7E;
position: relative;
height: 32px;
cursor: pointer;
}
.calendar tbody tr td:last-child {
border-right: 1px solid #626E7E;
}
.calendar tbody tr td.hour {
font-size: 2em;
padding: 0;
color: #626E7E;
background: #fff;
border-bottom: 1px solid #626E7E;
border-collapse: separate;
min-width: 100px;
cursor: default;
}
.calendar tbody tr td.hour span {
display: block;
}
@media (max-width: 60em) {
.calendar thead tr th .long {
display: none;
}
.calendar thead tr th .short {
display: block;
}
.calendar tbody tr td.hour span {
transform: rotate(270deg);
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
}
}
@media (max-width: 27em) {
.calendar thead tr th {
font-size: 65%;
}
.calendar thead tr th .day {
display: block;
font-size: 1.2em;
border-radius: 50%;
width: 20px;
height: 20px;
margin: 0 auto 5px;
padding: 5px;
}
.calendar thead tr th .day.active {
background: #d1d5db;
color: #626E7E;
}
.calendar tbody tr td.hour {
font-size: 1.7em;
}
.calendar tbody tr td.hour span {
transform: translateY(16px) rotate(270deg);
-webkit-transform: translateY(16px) rotate(270deg);
-moz-transform: translateY(16px) rotate(270deg);
}
}

View File

@ -8,6 +8,7 @@
</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/hacker.css">
<link rel="stylesheet" href="/css/calendar.css">
<link rel="icon" type="image/png" href="https://tilderadio.org/logos/tilderadio-green.png"><?=isset($additional_head)?PHP_EOL." ".$additional_head.PHP_EOL:""?>
</head>

525
schedule/calendar.php Normal file
View File

@ -0,0 +1,525 @@
<section class="calendar-wrapper">
<table class="calendar">
<thead>
<tr>
<th></th>
<th>
<span class="day">1</span>
<span class="long">Monday</span>
<span class="short">Mon</span>
</th>
<th>
<span class="day">2</span>
<span class="long">Tuesday</span>
<span class="short">Tue</span>
</th>
<th>
<span class="day">3</span>
<span class="long">Wendsday</span>
<span class="short">We</span>
</th>
<th>
<span class="day">4</span>
<span class="long">Thursday</span>
<span class="short">Thur</span>
</th>
<th>
<span class="day">5</span>
<span class="long">Friday</span>
<span class="short">Fri</span>
</th>
<th>
<span class="day">6</span>
<span class="long">Saturday</span>
<span class="short">Sat</span>
</th>
<th>
<span class="day">7</span>
<span class="long">Sunday</span>
<span class="short">Sun</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="hour" rowspan="2"><span>00:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>01:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>02:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>03:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>04:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>05:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>06:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>07:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>08:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>09:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>10:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>11:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>12:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>13:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>14:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>15:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>16:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>17:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>18:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>19:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>20:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>21:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>22:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="hour" rowspan="2"><span>23:00</span></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</section>

View File

@ -9,6 +9,10 @@ include 'schedule.php';
<p>all times in UTC. current time is <span id="utcdate"><?=formatdate("now")?></span>.</p>
<p>this schedule is also available in <a href="https://icalendar.org/validator.html?url=https://tilderadio.org/schedule/ics.php">iCalendar format</a>. point your calendar client at <code>https://tilderadio.org/schedule/ics.php</code>.</p>
<?php
include 'calendar.php';
?>
<table class="table table-striped">
<thead>
<tr>