-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
147 lines (120 loc) · 2.7 KB
/
style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
:root {
--font-family-text: "Source Sans Pro", sans-serif;
--font-family-numbers: "Source Sans Pro", sans-serif; /* TODO */
--rainbow-saturation: 80%;
--rainbow-lightness: 60%;
--border-color: #aeaaaa;
--border: 0.25mm solid var(--border-color); /* actual thickness will be double since there are two adjacent borders between elements */
--day-width: 8mm;
--day-height: 75mm;
--month-title-height: 12mm;
}
@page {
size: 297mm 210mm;
padding: 0;
margin: 10mm;
}
body {
font-family: var(--font-family-text);
}
#calendar {
margin-left: var(--day-width); /* for glue flaps */
}
.number {
font-family: var(--font-family-numbers);
}
.month {
display: table;
position: relative;
background-image: linear-gradient(
to right,
hsl(var(--start-hue), var(--rainbow-saturation), var(--rainbow-lightness)),
hsl(var(--end-hue), var(--rainbow-saturation), var(--rainbow-lightness))
);
page-break-inside: avoid;
margin-top: 5mm;
}
.month > .title {
text-align: center;
color: white;
height: var(--month-title-height);
line-height: var(--month-title-height);
font-size: calc(var(--month-title-height) * 0.6);
position: relative;
}
.month > .title > .year {
font-family: var(--font-family-numbers);
position: absolute;
left: 5mm;
}
.days {
--number-of-days: 30;
border: var(--border);
height: var(--day-height);
text-align: center;
display: grid;
grid-template-columns: repeat(var(--number-of-days), var(--day-width));
grid-template-rows: var(--day-width) max-content auto;
grid-auto-flow: column;
grid-column-gap: 0px;
grid-row-gap: 0px;
}
.day {
border: var(--border);
background-color: white;
}
.day.weekday-0 {
margin-right: 1mm;
border-right: none;
}
.day.weekday-1 {
border-left: none;
}
.day.number {
font-size: calc(var(--day-width) * 0.6);
line-height: var(--day-width);
}
.day.title {
padding: 1ex 0;
}
.day.title span {
writing-mode: vertical-lr;
transform: rotate(180deg);
}
/* glue flaps */
.month:not(:first-child)::before {
content: "hier kleben / glue here";
writing-mode: vertical-lr;
text-align: center;
line-height: var(--day-width);
color: var(--border-color);
display: block;
position: absolute;
top: 0;
bottom: 0;
margin: auto 0;
left: calc(-1 * var(--day-width));
--border-width: 0.5mm;
border: var(--border-width) solid var(--border-color);
height: calc(100% - 2 * var(--border-width));
width: var(--day-width);
transform: perspective(10px) rotateY(-1deg);
transform-origin: right;
z-index: -1;
}
@media print {
.noprint {
display: none;
}
}
.links {
position: absolute;
top: 0;
right: 0;
font-size: 80%;
margin: 1em;
}
.links,
.links a {
color: var(--border-color);
}