mirror of
https://github.com/seigler/janus
synced 2025-07-26 17:26:10 +00:00
139 lines
2.3 KiB
CSS
139 lines
2.3 KiB
CSS
/* Basics */
|
|
|
|
*, *:before, *:after {
|
|
box-sizing: inherit;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
:root {
|
|
box-sizing: border-box;
|
|
line-height: 1.5;
|
|
font-family: sans-serif;
|
|
font-size: calc(2vw + 2em);
|
|
}
|
|
|
|
li {
|
|
list-style: none;
|
|
}
|
|
|
|
code {
|
|
font-family: Consolas, monaco, monospace;
|
|
border: 2px dashed currentcolor;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.5rem;
|
|
}
|
|
h2 {
|
|
font-size: 1rem;
|
|
}
|
|
h1, h2 {
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* Layout */
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 0;
|
|
margin: 0;
|
|
background-color: black;
|
|
color: white;
|
|
overflow: hidden;
|
|
}
|
|
|
|
main {
|
|
margin-top: 0;
|
|
perspective: 100vmin;
|
|
transform-style: preserve-3d;
|
|
height: 100vh;
|
|
}
|
|
|
|
/* Components */
|
|
section {
|
|
position: absolute;
|
|
z-index: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 1em;
|
|
overflow: hidden;
|
|
text-align: center;
|
|
background-color: black;
|
|
transition: transform ease 0.5s, opacity ease 0.5s, visibility step-end 0.5s;
|
|
transform-origin: 50% 50%;
|
|
}
|
|
|
|
[janus-timeline='past'] {
|
|
transition: transform ease-in 0.5s, opacity ease-in 0.5s, visibility step-end 0.5s;
|
|
}
|
|
|
|
[janus-timeline='present'] {
|
|
transition: transform ease-out 0.5s, opacity ease-out 0.5s, visibility step-start 0.5s;
|
|
}
|
|
|
|
@media not print {
|
|
[janus-timeline='future'] {
|
|
visibility: hidden;
|
|
}
|
|
}
|
|
|
|
body.show-notes section [janus-timeline='future'] {
|
|
visibility: visible;
|
|
opacity: 0.25;
|
|
}
|
|
|
|
body.show-notes section[janus-timeline='future'] [janus-timeline='future'] {
|
|
opacity: 1;
|
|
}
|
|
|
|
section[janus-timeline='past'] {
|
|
transform: translate3d(0, 0, 0) scale(5);
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
pointer-events: none;
|
|
z-index: 2;
|
|
}
|
|
|
|
section[janus-timeline='present'] {
|
|
transform: none;
|
|
opacity: 1;
|
|
}
|
|
|
|
section[janus-timeline='future'] {
|
|
transform: translate3d(0, -5vmin, 0) scale(0.8);
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
pointer-events: none;
|
|
}
|
|
|
|
img.cover {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
height: 100%;
|
|
width: 100%;
|
|
object-fit: cover;
|
|
z-index: -1;
|
|
}
|
|
|
|
body.show-notes section {
|
|
transition: none;
|
|
}
|
|
|
|
body.show-notes section[janus-timeline='present'] + section[janus-timeline='future'] {
|
|
transform: scale(0.25);
|
|
transform-origin: bottom right;
|
|
top: auto;
|
|
left: auto;
|
|
bottom: 0.4rem;
|
|
right: 0.4rem;
|
|
opacity: 0.75;
|
|
visibility: visible;
|
|
outline: 0.2rem solid white;
|
|
z-index: 3;
|
|
}
|