Finished calendar.js (for now)
This commit is contained in:
parent
812ff6e855
commit
df8eb6c8cb
|
@ -6737,11 +6737,11 @@ main {
|
|||
color: #99A4AE;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
padding: 12px 3px;
|
||||
padding: 6px 3px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
width: 40px;
|
||||
height: 38px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
@media (min-width: 360px) {
|
||||
|
@ -6765,7 +6765,7 @@ main {
|
|||
@media (min-width: 360px) {
|
||||
.calendar-table__body .calendar-table__col {
|
||||
width: 46px;
|
||||
height: 48px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@ const moment = require("moment");
|
|||
|
||||
function generateCalendar(weekOffset = 0) {
|
||||
const week = (moment().week() + weekOffset);
|
||||
|
||||
document.getElementById("title").innerText = week;
|
||||
|
||||
let weekDays = Array.apply(null, Array(7)).map((value, index) => {
|
||||
return moment(index, "e").locale("da").startOf("week").weekday(index).format("ddd");
|
||||
});
|
||||
|
|
|
@ -285,11 +285,11 @@ $primary-color: $blue;
|
|||
color: $gray;
|
||||
font-size: $sm-font-size;
|
||||
font-weight: $font-weight--bold;
|
||||
padding: 12px 3px;
|
||||
padding: 6px 3px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
width: 40px;
|
||||
height: 38px;
|
||||
height: 18px;
|
||||
|
||||
@include mq(360) {
|
||||
width: 46px;
|
||||
|
@ -309,7 +309,7 @@ $primary-color: $blue;
|
|||
|
||||
@include mq(360) {
|
||||
width: 46px;
|
||||
height: 48px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
@include mq(410) {
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
<div class="col w-100 mt-auto">
|
||||
<div class="calendar-container">
|
||||
<div class="calendar-container__header">
|
||||
<button id="week-previous" class="calendar-container__btn calendar-container__btn--left" title="Previous">
|
||||
<button id="week-previous" class="calendar-container__btn fas fa-arrow-left" title="Previous">
|
||||
<i class="icon ion-ios-arrow-back"></i>
|
||||
</button>
|
||||
<h2 id="month" class="calendar-container__title">{Måned} {År}</h2>
|
||||
<button id="week-next" class="calendar-container__btn calendar-container__btn--right" title="Next">
|
||||
<h2 id="title" class="calendar-container__title">{Måned} {År}</h2>
|
||||
<button id="week-next" class="calendar-container__btn fas fa-arrow-right" title="Next">
|
||||
<i class="icon ion-ios-arrow-forward"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue