forked from potsda.mn/mobilizon
new layout for calendar icon, show weekday
Co-authored-by: unkonkret <unkonkret@systemli.org>
(cherry picked from commit 74457ba861
)
This commit is contained in:
parent
f514ddd726
commit
bb4c85f603
|
@ -19,6 +19,7 @@
|
||||||
>
|
>
|
||||||
<div class="datetime-container-header" />
|
<div class="datetime-container-header" />
|
||||||
<div class="datetime-container-content">
|
<div class="datetime-container-content">
|
||||||
|
<time :datetime="dateObj.toISOString()" class="wkday">{{ wkday }}</time>
|
||||||
<time :datetime="dateObj.toISOString()" class="day">{{ day }}</time>
|
<time :datetime="dateObj.toISOString()" class="day">{{ day }}</time>
|
||||||
<time :datetime="dateObj.toISOString()" class="month">{{ month }}</time>
|
<time :datetime="dateObj.toISOString()" class="month">{{ month }}</time>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,6 +40,10 @@ export default class DateCalendarIcon extends Vue {
|
||||||
return new Date(this.$props.date);
|
return new Date(this.$props.date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get wkday(): string {
|
||||||
|
return this.dateObj.toLocaleString(undefined, { weekday: "short" });
|
||||||
|
}
|
||||||
|
|
||||||
get month(): string {
|
get month(): string {
|
||||||
return this.dateObj.toLocaleString(undefined, { month: "short" });
|
return this.dateObj.toLocaleString(undefined, { month: "short" });
|
||||||
}
|
}
|
||||||
|
@ -62,17 +67,17 @@ div.datetime-container {
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
width: calc(40px * var(--small));
|
width: calc(55px * var(--small));
|
||||||
box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
|
||||||
height: calc(40px * var(--small));
|
height: calc(55px * var(--small));
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
.datetime-container-header {
|
.datetime-container-header {
|
||||||
height: calc(10px * var(--small));
|
height: calc(12px * var(--small));
|
||||||
background: #f3425f;
|
background: #f3425f;
|
||||||
}
|
}
|
||||||
.datetime-container-content {
|
.datetime-container-content {
|
||||||
height: calc(30px * var(--small));
|
height: calc(43px * var(--small));
|
||||||
}
|
}
|
||||||
|
|
||||||
time {
|
time {
|
||||||
|
@ -80,6 +85,13 @@ div.datetime-container {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: $violet-3;
|
color: $violet-3;
|
||||||
|
|
||||||
|
&.wkday {
|
||||||
|
padding: 2px 0;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 12px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
&.month {
|
&.month {
|
||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
Loading…
Reference in a new issue