v0.1
This commit is contained in:
commit
e52aacbf28
24 changed files with 2546 additions and 0 deletions
644
style.scss
Normal file
644
style.scss
Normal file
|
@ -0,0 +1,644 @@
|
|||
$mobileBreakpoint: 576px;
|
||||
$mediumBreakpoint: 800px;
|
||||
|
||||
:root {
|
||||
--color-gray-50: hsl(60, 9%, 98%);
|
||||
--color-gray-100: hsl(60, 5%, 96%);
|
||||
--color-gray-200: hsl(20, 6%, 90%);
|
||||
--color-gray-300: hsl(24, 6%, 83%);
|
||||
--color-gray-400: hsl(24, 5%, 64%);
|
||||
--color-gray-500: hsl(25, 5%, 45%);
|
||||
--color-gray-600: hsl(33, 5%, 32%);
|
||||
--color-gray-700: hsl(30, 6%, 25%);
|
||||
--color-gray-800: hsl(12, 6%, 15%);
|
||||
--color-gray-900: hsl(24, 10%, 10%);
|
||||
--color-gray-950: hsl(20, 14%, 4%);
|
||||
|
||||
|
||||
--bg: var(--color-gray-50);
|
||||
--text: var(--color-gray-950);
|
||||
--text-secondary: var(--color-gray-700);
|
||||
--nav-bg: hsl(210, 60%, 50%);
|
||||
--nav-bg-hover: hsl(210, 60%, 30%);
|
||||
--nav-bg-visited: hsl(250, 60%, 50%);
|
||||
--nav-text-visited: hsl(250, 60%, 93%);
|
||||
--nav-text: hsl(210, 60%, 93%);
|
||||
--link: hsl(210, 60%, 30%);
|
||||
--link-hover: hsl(210, 60%, 10%);
|
||||
--link-visited: hsl(250, 60%, 30%);
|
||||
--station-bg: var(--color-gray-50);
|
||||
--station-bg-hover: var(--color-gray-400);
|
||||
--station-border: var(--color-gray-400);
|
||||
--station-border-hover: var(--color-gray-600);
|
||||
--elevator-bg: var(--color-gray-100);
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
--bg: var(--color-gray-950);
|
||||
--text: var(--color-gray-50);
|
||||
--text-secondary: var(--color-gray-400);
|
||||
--nav-bg: hsl(210, 60%, 30%);
|
||||
--nav-bg-hover: hsl(210, 60%, 10%);
|
||||
--nav-bg-visited: hsl(250, 60%, 30%);
|
||||
--link: hsl(210, 60%, 60%);
|
||||
--link-hover: hsl(210, 60%, 60%);
|
||||
--link-visited: hsl(250, 60%, 70%);
|
||||
--station-bg: var(--color-gray-950);
|
||||
--station-bg-hover: var(--color-gray-600);
|
||||
--station-border: var(--color-gray-600);
|
||||
--station-border-hover: var(--color-gray-400);
|
||||
--elevator-bg: var(--color-gray-900);
|
||||
}
|
||||
|
||||
--elevator-list-gap: 3rem;
|
||||
--item-radius: 1.5rem;
|
||||
--btn-radius: 0.8rem;
|
||||
--type-icon-size: 3.2rem;
|
||||
--space-s: 0.25rem;
|
||||
--space-m: 0.5rem;
|
||||
--space-l: 1rem;
|
||||
--space-xl: 2rem;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.text-red {
|
||||
color: #e32d2d;
|
||||
}
|
||||
|
||||
.text-orange {
|
||||
color: #cc6300;
|
||||
}
|
||||
|
||||
.text-green {
|
||||
color: #19942e;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: system-ui, ui-sans-serif, sans-serif;
|
||||
font-size: 1.2rem;
|
||||
|
||||
// colors
|
||||
background-color: var(--bg);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link);
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
color: var(--link-hover);
|
||||
}
|
||||
|
||||
&:visited {
|
||||
color: var(--link-visited);
|
||||
}
|
||||
}
|
||||
|
||||
nav {
|
||||
ul {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
gap: var(--space-m);
|
||||
|
||||
li {
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: var(--nav-text);
|
||||
text-decoration: none;
|
||||
|
||||
background-color: var(--nav-bg);
|
||||
padding: var(--space-m) var(--space-l);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
background-color: var(--nav-bg-hover);
|
||||
}
|
||||
|
||||
&:visited {
|
||||
color: var(--nav-text-visited);
|
||||
background-color: var(--nav-bg-visited);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
margin: 4em auto;
|
||||
max-width: 960px;
|
||||
}
|
||||
|
||||
button, input {
|
||||
background-color: var(--station-bg);
|
||||
color: var(--text);
|
||||
padding: var(--space-m) var(--space-l);
|
||||
border-radius: var(--item-radius);
|
||||
border: solid 2px var(--station-border);
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-m);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--station-bg-hover);
|
||||
border-color: var(--station-border-hover);
|
||||
}
|
||||
}
|
||||
|
||||
div.filters {
|
||||
display: flex;
|
||||
gap: var(--space-m);
|
||||
justify-items: stretch;
|
||||
|
||||
button, input {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
ul#stationList {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-m);
|
||||
|
||||
> li.station {
|
||||
background-color: var(--station-bg);
|
||||
border-radius: var(--item-radius);
|
||||
border: solid 0.2rem var(--station-border);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
padding: var(--space-m);
|
||||
|
||||
> div.stationSummary {
|
||||
display: flex;
|
||||
gap: var(--space-m);
|
||||
|
||||
div.typeList {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
|
||||
div.stationTitle {
|
||||
align-self: stretch;
|
||||
flex-grow: 1;
|
||||
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
> h3 {
|
||||
font-size: 1.5rem;
|
||||
line-height: var(--type-icon-size);
|
||||
margin: 0;
|
||||
|
||||
width: 100%;
|
||||
|
||||
@media screen and (min-width: $mobileBreakpoint) {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
> div.elevator-preview {
|
||||
flex-shrink: 0;
|
||||
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: start;
|
||||
width: 100%;
|
||||
|
||||
@media screen and (min-width: $mobileBreakpoint) {
|
||||
max-width: calc(2rem * 5);
|
||||
justify-content: end;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> details {
|
||||
width: 100%;
|
||||
|
||||
summary {
|
||||
list-style: none;
|
||||
border: solid 2px var(--station-border);
|
||||
display: inline-flex;
|
||||
padding: var(--space-m) var(--space-l);
|
||||
border-radius: var(--btn-radius);
|
||||
cursor: pointer;
|
||||
margin-left: calc(var(--space-m) + var(--type-icon-size));
|
||||
|
||||
&:hover {
|
||||
background-color: var(--station-bg-hover);
|
||||
border-color: var(--station-border-hover);
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
pointer-events: auto;
|
||||
content: "";
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
transition: margin 150ms ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
&[open] summary {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
> ul {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--elevator-list-gap);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
z-index: 20;
|
||||
|
||||
> li.elevator {
|
||||
display: flex;
|
||||
align-items: start;
|
||||
flex-wrap: nowrap;
|
||||
padding: var(--space-m);
|
||||
gap: var(--space-m);
|
||||
position: relative;
|
||||
|
||||
margin: 0 1rem 1rem;
|
||||
@media screen and (min-width: $mobileBreakpoint) {
|
||||
margin: 0 3rem 1rem;
|
||||
}
|
||||
|
||||
// elevator icon
|
||||
> span {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
// divider between elevators
|
||||
&:not(:first-child):before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: calc(var(--elevator-list-gap) / -2);
|
||||
height: 2px;
|
||||
width: 100%;
|
||||
background: var(--station-border);
|
||||
}
|
||||
|
||||
> div.elevatorData {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
flex-direction: column;
|
||||
gap: var(--space-l);
|
||||
align-items: start;
|
||||
|
||||
grid-template-columns: 1fr;
|
||||
@media screen and (min-width: $mediumBreakpoint) {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
.elevatorInfo {
|
||||
font-weight: bold;
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.lineList {
|
||||
display: flex;
|
||||
gap: var(--space-m);
|
||||
align-items: center;
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.osm {
|
||||
grid-column: 1 / -1;
|
||||
color: var(--text-secondary);
|
||||
|
||||
dl {
|
||||
div {
|
||||
dt {
|
||||
min-width: 18ch;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ol.levelList {
|
||||
--dot-size: 0.8rem;
|
||||
--line-width: 0.3rem;
|
||||
--left-space: 1.4rem;
|
||||
|
||||
list-style: none;
|
||||
padding-left: var(--left-space);
|
||||
|
||||
> li {
|
||||
position: relative;
|
||||
//font-size: 1.8rem;
|
||||
line-height: 1.8em;
|
||||
|
||||
&:before {
|
||||
background-color: currentColor;
|
||||
width: var(--line-width);
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: calc(var(--left-space) * -1 + var(--dot-size) / 2 - var(--line-width) / 2);
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
&:before {
|
||||
top: 0.5lh;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
&:before {
|
||||
bottom: calc(100% - 0.5lh);
|
||||
}
|
||||
}
|
||||
|
||||
&:after {
|
||||
background-color: currentColor;
|
||||
width: var(--dot-size);
|
||||
height: var(--dot-size);
|
||||
border-radius: 100%;
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: calc(0.5lh - (var(--dot-size) / 2));
|
||||
left: calc(var(--left-space) * -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dl {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
gap: 0.2rem;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
dt {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
gap: var(--space-m);
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
min-width: 15ch;
|
||||
|
||||
@media (max-width: $mobileBreakpoint) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
dd {
|
||||
flex-shrink: 0;
|
||||
margin-left: 3rem;
|
||||
|
||||
@media screen and (min-width: $mobileBreakpoint) {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
span.lineChip, span.typeChip {
|
||||
font-weight: bold;
|
||||
font-size: 0.8em;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
&[data-type="U"] {
|
||||
background-color: #006ab3;
|
||||
color: #ffffff;
|
||||
|
||||
&[data-line="U1"] {
|
||||
background-color: #006ab3;
|
||||
}
|
||||
|
||||
&[data-line="U2"] {
|
||||
background-color: #e2001a;
|
||||
}
|
||||
|
||||
&[data-line="U3"] {
|
||||
background-color: #ffdd00;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
&[data-line="U4"] {
|
||||
background-color: #0098a1;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-type="S"] {
|
||||
background-color: #1a962b;
|
||||
color: #ffffff;
|
||||
|
||||
&[data-line="S1"] {
|
||||
background-color: #1a962b;
|
||||
}
|
||||
|
||||
&[data-line="S2"] {
|
||||
background-color: #b51143;
|
||||
}
|
||||
|
||||
&[data-line="S3"] {
|
||||
background-color: #622181;
|
||||
}
|
||||
|
||||
&[data-line="S4"] {
|
||||
background-color: #be148e;
|
||||
}
|
||||
|
||||
&[data-line="S5"] {
|
||||
background-color: #0089bb;
|
||||
}
|
||||
|
||||
&[data-line="S6"] {
|
||||
background-color: #d3da00;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-type="A"] {
|
||||
background-color: #f39100;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
&[data-type="R"] {
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
border: solid 2px #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
span.lineChip {
|
||||
padding: 0.3em 0.6em;
|
||||
min-width: 4ch;
|
||||
|
||||
&[data-type="U"] {
|
||||
padding: 0.3em 0.1em;
|
||||
}
|
||||
|
||||
&[data-type="S"] {
|
||||
border-radius: 2em;
|
||||
min-width: 6ch;
|
||||
}
|
||||
|
||||
&[data-type="A"] {
|
||||
padding: 0.3em 0.1em;
|
||||
border-radius: 2em;
|
||||
}
|
||||
}
|
||||
|
||||
.typeList {
|
||||
width: var(--type-icon-size);
|
||||
height: var(--type-icon-size);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.2rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
span.typeChip {
|
||||
|
||||
--chip-size: 1.5;
|
||||
|
||||
&:only-child {
|
||||
--chip-size: 3;
|
||||
}
|
||||
|
||||
width: calc(1rem * var(--chip-size));
|
||||
min-width: calc(1rem * var(--chip-size));
|
||||
height: calc(1rem * var(--chip-size));
|
||||
font-size: calc(0.5rem * var(--chip-size));
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&[data-type="U"],
|
||||
&[data-type="A"],
|
||||
&[data-type="R"],
|
||||
&[data-type="S"] {
|
||||
border-radius: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
span[data-icon] {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
mask-size: contain;
|
||||
mask-position: center;
|
||||
mask-repeat: no-repeat;
|
||||
background-color: currentColor;
|
||||
flex-shrink: 0;
|
||||
|
||||
&.size-s {
|
||||
font-size: 1rem
|
||||
}
|
||||
|
||||
&.size-m {
|
||||
font-size: 1.5rem
|
||||
}
|
||||
|
||||
&.size-l {
|
||||
font-size: 2rem
|
||||
}
|
||||
|
||||
&.size-xl {
|
||||
font-size: 3rem
|
||||
}
|
||||
|
||||
&[data-icon="location"] {
|
||||
mask-image: url(/md_icons/location.svg);
|
||||
}
|
||||
|
||||
&[data-icon="elevator"] {
|
||||
mask-image: url(/md_icons/elevator.svg);
|
||||
}
|
||||
|
||||
&[data-icon="elevator-slash"] {
|
||||
mask-image: url(/md_icons/elevator-slash.svg);
|
||||
}
|
||||
|
||||
&[data-icon="fit-width"] {
|
||||
mask-image: url(/md_icons/fit_width.svg);
|
||||
}
|
||||
|
||||
&[data-icon="width"] {
|
||||
mask-image: url(/md_icons/width.svg);
|
||||
}
|
||||
|
||||
&[data-icon="length"] {
|
||||
mask-image: url(/md_icons/height.svg);
|
||||
}
|
||||
|
||||
&[data-icon="braille"] {
|
||||
mask-image: url(/md_icons/braille.svg);
|
||||
}
|
||||
|
||||
&[data-icon="speaker"] {
|
||||
mask-image: url(/md_icons/speaker.svg);
|
||||
}
|
||||
|
||||
&[data-icon="wheelchair"] {
|
||||
mask-image: url(/md_icons/wheelchair.svg);
|
||||
}
|
||||
|
||||
&[data-icon="bicycle"] {
|
||||
mask-image: url(/md_icons/bicycle.svg);
|
||||
}
|
||||
|
||||
&[data-icon="info"] {
|
||||
mask-image: url(/md_icons/info.svg);
|
||||
}
|
||||
|
||||
&[data-icon="up-down"] {
|
||||
mask-image: url(/md_icons/up-down.svg);
|
||||
}
|
||||
|
||||
&[data-icon="location-searching"] {
|
||||
mask-image: url(/md_icons/location-searching.svg);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue