Skip to content

Commit 6ec0429

Browse files
committed
* Adjust hours layout
* Use full day for text
1 parent bc1544a commit 6ec0429

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

public/class-wplibcalhours-public.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ private function setDays($num_days, $data): array
197197
$date->add(new \DateInterval("P${i}D"));
198198
$key = $date->format('Y-m-d');
199199

200-
$day = array('date' => $date);
200+
$day = ['date' => $date];
201201
$day['text'] = (array_key_exists($key, $data)) ? $data[$key] : __('n/a', 'wplibcalhours');
202202
$day['is_today'] = $key === $today->format('Y-m-d');
203203
$days[] = $day;

public/css/wplibcalhours-public.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@
2121
/* UNC additions */
2222
.hours-list-view {
2323
display: grid;
24+
grid-template-columns: 160px auto;
2425
grid-auto-flow: column;
25-
grid-template-columns: 1fr 1fr;
2626
grid-template-rows: repeat(4, 1fr);
27+
list-style-type: none;
2728
margin-top: 0 !important;
2829
padding-left: 5px !important;
30+
text-align: left;
2931
}
3032

3133
.hours-list-view-stacked {
@@ -34,9 +36,7 @@
3436
}
3537

3638
.hours-list-view li {
37-
display: inline-flex;
38-
justify-content: flex-start;
39-
width: 195px;
39+
padding-bottom: 5px;
4040
}
4141
.hours-day {
4242
font-weight: bold;
@@ -72,6 +72,10 @@
7272
text-align: left;
7373
}
7474

75+
.hours-more {
76+
margin-top: 25px;
77+
}
78+
7579
.hours-more button {
7680
border-radius: 5px;
7781
padding: 8px 10px;

public/partials/grid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class="hours-list-view <?php echo $this->setClassList($stacked) ?>">
3838
$day = $chunked_week[$i];
3939
$today = $day['is_today'];
4040
$date = $day['date'];
41-
$day_text = ($today) ? 'Today' : $date->format('D'); ?>
41+
$day_text = ($today) ? 'Today' : $date->format('l'); ?>
4242

4343
<li <?php echo $this->setToday($today) ?>>
4444
<?php if ($week_number > 0): ?>

0 commit comments

Comments
 (0)