Tiny calendar screen

main
Bob Mottram 2021-11-18 21:52:17 +00:00
parent f0eea4951b
commit f525da056f
1 changed files with 42 additions and 19 deletions

View File

@ -1,7 +1,7 @@
:root { :root {
--main-bg-color: #282c37; --main-bg-color: #e6ebf0;
--calendar-bg-color: #eee; --calendar-bg-color: #e6ebf0;
--lines-color: black; --lines-color: darkblue;
--day-number: black; --day-number: black;
--day-number2: #282c37; --day-number2: #282c37;
--time-color: black; --time-color: black;
@ -9,47 +9,50 @@
--event-color: #282c37; --event-color: #282c37;
--event-public-color: #282c37; --event-public-color: #282c37;
--today-foreground: white; --today-foreground: white;
--today-circle: red; --today-circle: #03a494;
--event-background: orange; --event-background: lightgrey;
--event-background-private: #ddd; --event-background-private: grey;
--event-foreground:white; --event-foreground: white;
--title-text: #282c37; --title-text: white;
--title-background: #ccc; --title-background: #2b5c6d;
--focus-color: white; --focus-color: grey;
--calendar-horizontal-padding: 0; --calendar-horizontal-padding: 0;
--calendar-cell-size: 1.5vw; --calendar-cell-size: 1.5vw;
--calendar-cell-size-mobile: 1.5vw; --calendar-cell-size-mobile: 1.5vw;
--calendar-cell-size-tiny: 1.5vw;
--font-size-calendar: 20px; --font-size-calendar: 20px;
--font-size-calendar-mobile: 30px; --font-size-calendar-mobile: 30px;
--font-size-calendar-tiny: 15px;
--font-size-calendar-header: 3rem; --font-size-calendar-header: 3rem;
--font-size-calendar-day: 1rem; --font-size-calendar-day: 1rem;
--font-size-calendar-cell: 2rem; --font-size-calendar-cell: 2rem;
--font-size-calendar-cell-mobile: 4rem; --font-size-calendar-cell-mobile: 4rem;
--font-size-calendar-cell-tiny: 2rem;
--calendar-header-font: 'Montserrat'; --calendar-header-font: 'Montserrat';
--calendar-header-font-style: italic; --calendar-header-font-style: italic;
--main-link-color-hover: #bbb; --main-link-color-hover: blue;
--rendering: normal; --rendering: normal;
} }
@font-face { @font-face {
font-family: 'Bedstead'; font-family: 'NimbusSanL';
font-style: italic; font-style: italic;
font-weight: normal; font-weight: normal;
font-display: block; font-display: block;
src: url('./fonts/bedstead.otf') format('opentype'); src: url('./fonts/NimbusSanL-italic.otf') format('opentype');
} }
@font-face { @font-face {
font-family: 'Bedstead'; font-family: 'NimbusSanL';
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-display: block; font-display: block;
src: url('./fonts/bedstead.otf') format('opentype'); src: url('./fonts/NimbusSanL.otf') format('opentype');
} }
body { body {
background-color: var(--main-bg-color); background-color: var(--main-bg-color);
color: var(--day-number2); color: var(--day-number2);
font-family: 'Montserrat'; font-family: 'NimbusSanL';
font-weight: 700; font-weight: 700;
image-rendering: var(--rendering); image-rendering: var(--rendering);
} }
@ -122,7 +125,7 @@ a:focus {
background-color: var(--title-background); background-color: var(--title-background);
color: var(--title-text); color: var(--title-text);
display: inline-block; display: inline-block;
font-family: var(--calendar-header-font); font-family: var(--calendar-header-font);
font-size: var(--font-size-calendar-header); font-size: var(--font-size-calendar-header);
font-weight: 400; font-weight: 400;
letter-spacing: 0.1em; letter-spacing: 0.1em;
@ -251,7 +254,7 @@ tr:nth-child(even) > .calendar__day__cell:nth-child(even) {
padding: var(--calendar-cell-size) 0 var(--calendar-cell-size); padding: var(--calendar-cell-size) 0 var(--calendar-cell-size);
} }
body { body {
font-size: var(--font-size-calendar); font-size: var(--font-size-calendar);
} }
} }
@ -271,6 +274,26 @@ tr:nth-child(even) > .calendar__day__cell:nth-child(even) {
padding: var(--calendar-cell-size-mobile) 0 var(--calendar-cell-size-mobile); padding: var(--calendar-cell-size-mobile) 0 var(--calendar-cell-size-mobile);
} }
body { body {
font-size: var(--font-size-calendar-mobile); font-size: var(--font-size-calendar-mobile);
}
}
@media screen and (max-width: 480px) {
.calendar {
table-display: fixed;
margin: 0 0;
width: 100%;
padding: 0 var(--calendar-horizontal-padding);
}
.calendar__day__cell {
font-size: var(--font-size-calendar-cell-tiny);
position: relative;
}
.calendar__day__header,
.calendar__day__cell {
padding: var(--calendar-cell-size-tiny) 0 var(--calendar-cell-size-tiny);
}
body {
font-size: var(--font-size-calendar-tiny);
} }
} }