Add colors to events and day-numbers in calendar
This commit is contained in:
parent
550161bba2
commit
4ca408b8fe
|
@ -35,7 +35,7 @@ figure.calendar {
|
||||||
min-height: 4.8em;
|
min-height: 4.8em;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
color: #444;
|
color: #444;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar ul li.header {
|
.calendar ul li.header {
|
||||||
|
@ -65,8 +65,26 @@ figure.calendar {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.calendar ul li .day{
|
||||||
.calendar ul li section::before {
|
display: inline-block;
|
||||||
content: "\26AB ";
|
width: 1.5em;
|
||||||
color: #038;
|
height: 1.5em;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1.5em;
|
||||||
|
background: #038;
|
||||||
|
color: white;
|
||||||
|
border-radius: 0.75em;
|
||||||
|
margin-bottom: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendar ul li section {
|
||||||
|
line-height: 1.5em;
|
||||||
|
background: #038;
|
||||||
|
color: white;
|
||||||
|
border-radius: 0.75em;
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.calendar ul li section + section {
|
||||||
|
margin-top: 0.1em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,13 +69,13 @@ $days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year));
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (sizeof($events)!=0) { ?>
|
<?php if (sizeof($events)!=0) { ?>
|
||||||
<a href="../aktiviteter/?<?="year=$year&month=$month&day=$day"?>"><div>
|
<a href="../aktiviteter/?<?="year=$year&month=$month&day=$day"?>"><div>
|
||||||
<span class="noselect"><?= $day ?>.</span>
|
<span class="noselect day"><?= $day ?>.</span>
|
||||||
<?php foreach($events as $event) { ?>
|
<?php foreach($events as $event) { ?>
|
||||||
<section><?=$event->getName()?></section>
|
<section style="background: <?=$event->getColor()?>"><?=$event->getName()?></section>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div></a>
|
</div></a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<span class="noselect"><?= $day ?>.</span>
|
<span class="noselect day"><?= $day ?>.</span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue