167 lines
5.4 KiB
CSS
167 lines
5.4 KiB
CSS
@charset "UTF-8";
|
|
/* tame reveal.js */
|
|
@import url("https://free.bboxtype.com/embedfonts/?family=FiraSans:300,600");
|
|
section {
|
|
min-height: 100vh;
|
|
width: 100vw;
|
|
padding: 0 !important; }
|
|
|
|
/* config */
|
|
:root {
|
|
--secondary: #c8ceda; }
|
|
|
|
/* basic layout */
|
|
:root {
|
|
--square: 100vw; }
|
|
@media screen and (min-aspect-ratio: 1 / 1) {
|
|
:root {
|
|
--square: 50vw; } }
|
|
@media screen and (min-aspect-ratio: 2 / 1) {
|
|
:root {
|
|
--square: 100vh; } }
|
|
|
|
body {
|
|
font-size: calc(0.035 * var(--square));
|
|
background: black; }
|
|
body .layout-content-and-preview,
|
|
body .layout-content-only {
|
|
display: grid;
|
|
min-height: 100vh;
|
|
max-height: 100vh;
|
|
min-width: 100vw;
|
|
max-width: 100vw;
|
|
overflow: auto; }
|
|
body .layout-content-and-preview {
|
|
grid-template-rows: var(--square) auto;
|
|
grid-template-columns: auto;
|
|
grid-template-areas: "content" "preview"; }
|
|
@media screen and (min-aspect-ratio: 1 / 1) {
|
|
body .layout-content-and-preview {
|
|
grid-template-rows: auto var(--square) auto;
|
|
grid-template-columns: var(--square) auto;
|
|
grid-template-areas: " . preview" "content preview" " . preview"; } }
|
|
@media screen and (min-aspect-ratio: 2 / 1) {
|
|
body .layout-content-and-preview {
|
|
grid-template-rows: var(--square);
|
|
grid-template-columns: var(--square) auto;
|
|
grid-template-areas: "content preview"; } }
|
|
body .layout-content-only {
|
|
grid-template-rows: var(--square) auto;
|
|
grid-template-columns: var(--square);
|
|
grid-template-areas: "content" " . "; }
|
|
@media screen and (min-aspect-ratio: 1 / 1) {
|
|
body .layout-content-only {
|
|
grid-template-rows: auto var(--square) auto;
|
|
grid-template-columns: auto var(--square) auto;
|
|
grid-template-areas: ". . ." ". content ." ". . ."; } }
|
|
body .layout-content {
|
|
background: white;
|
|
grid-area: content;
|
|
position: relative; }
|
|
body .layout-preview {
|
|
grid-area: preview;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--secondary); }
|
|
body .layout-preview img {
|
|
width: auto;
|
|
height: auto;
|
|
max-width: 90%;
|
|
max-height: 90%;
|
|
box-shadow: 0.2em 0.2em 0.5em 0 rgba(0, 0, 0, 0.3); }
|
|
|
|
/* content layout */
|
|
@font-face {
|
|
font-family: 'Fira Code';
|
|
src: url("../../lib/font/fira-code/FiraCode-Regular.otf");
|
|
font-weight: 400; }
|
|
|
|
@font-face {
|
|
font-family: 'Fira Code';
|
|
src: url("../../lib/font/fira-code/FiraCode-Bold.otf");
|
|
font-weight: 700; }
|
|
|
|
body {
|
|
font-family: 'Fira Sans';
|
|
margin: 0;
|
|
line-height: 1.2em; }
|
|
|
|
.layout-content-and-preview,
|
|
.layout-content-only {
|
|
--margin: 0.1; }
|
|
.layout-content-and-preview .layout-content,
|
|
.layout-content-only .layout-content {
|
|
overflow: auto;
|
|
padding: calc(var(--margin) * var(--square)); }
|
|
.layout-content-and-preview .layout-content *:first-child,
|
|
.layout-content-only .layout-content *:first-child {
|
|
margin-top: 0; }
|
|
.layout-content-and-preview .layout-content .layout-title,
|
|
.layout-content-only .layout-content .layout-title {
|
|
padding: calc(0.3 * var(--margin) * var(--square)) 0;
|
|
line-height: 1.15em; }
|
|
.layout-content-and-preview .layout-content .layout-title h2,
|
|
.layout-content-only .layout-content .layout-title h2 {
|
|
margin: 0; }
|
|
.layout-content-and-preview .layout-content ul,
|
|
.layout-content-only .layout-content ul {
|
|
list-style-type: none;
|
|
padding-left: 0;
|
|
position: relative; }
|
|
.layout-content-and-preview .layout-content ul li::before,
|
|
.layout-content-only .layout-content ul li::before {
|
|
content: '▪';
|
|
color: var(--secondary);
|
|
position: absolute;
|
|
left: calc(-0.33 * var(--margin) * var(--square)); }
|
|
.layout-content-and-preview .layout-content ul ul,
|
|
.layout-content-only .layout-content ul ul {
|
|
margin-left: calc(0.33 * var(--margin) * var(--square)); }
|
|
.layout-content-and-preview .layout-content pre,
|
|
.layout-content-only .layout-content pre {
|
|
margin-left: calc(-1 * var(--margin) * var(--square));
|
|
padding-left: calc(var(--margin) * var(--square));
|
|
line-height: 1.2em;
|
|
position: relative;
|
|
overflow: hidden; }
|
|
.layout-content-and-preview .layout-content pre::before,
|
|
.layout-content-only .layout-content pre::before {
|
|
content: attr(data-sourcefile);
|
|
position: absolute;
|
|
text-align: right;
|
|
color: var(--secondary);
|
|
top: .85em;
|
|
width: 100%;
|
|
left: calc(-1 * var(--square) + 1.2 * var(--margin) * var(--square));
|
|
transform-origin: top right;
|
|
transform: rotate(-90deg); }
|
|
.layout-content-and-preview .layout-content code,
|
|
.layout-content-only .layout-content code {
|
|
font-size: 0.9em;
|
|
font-family: 'Fira Code'; }
|
|
.layout-content-and-preview .layout-content code.hljs,
|
|
.layout-content-only .layout-content code.hljs {
|
|
padding: .3em 0; }
|
|
|
|
.layout.layout-chapter-heading {
|
|
height: 100vh;
|
|
width: 100vw;
|
|
position: relative; }
|
|
.layout.layout-chapter-heading .layout-title {
|
|
position: absolute;
|
|
left: 2vw;
|
|
width: calc(100vw - 4vw);
|
|
text-align: center;
|
|
bottom: calc(38.2% - .5em); }
|
|
|
|
h1 {
|
|
position: absolute;
|
|
font-size: 300%;
|
|
bottom: 0;
|
|
left: 0;
|
|
line-height: 115%;
|
|
vertical-align: bottom;
|
|
max-width: var(--square);
|
|
padding: 0 calc(var(--margin) * var(--square)) 0.5em; }
|