Start on dynamic square layout
This commit is contained in:
parent
3d6cbbbda2
commit
9a0fdc202a
@ -1,4 +1,67 @@
|
||||
/* basic layout */
|
||||
@import url("https://free.bboxtype.com/embedfonts/?family=FiraSans:300,600");
|
||||
body {
|
||||
background: red;
|
||||
font-size: 1vw;
|
||||
/* transition: background 1s ease; */ }
|
||||
body .layout-content-and-preview {
|
||||
display: grid;
|
||||
grid-template-rows: 100vw auto;
|
||||
grid-template-columns: auto;
|
||||
grid-template-areas: "content" "preview";
|
||||
min-height: 100vh;
|
||||
max-height: 100vh;
|
||||
min-width: 100vw;
|
||||
max-width: 100vw;
|
||||
overflow: auto; }
|
||||
body .layout-content-and-preview .layout-content {
|
||||
background: white;
|
||||
grid-area: content; }
|
||||
body .layout-content-and-preview .layout-preview {
|
||||
grid-area: preview;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
/* padding: 4vw; */ }
|
||||
body .layout-content-and-preview .layout-preview img {
|
||||
opacity: .5;
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
box-shadow: 0.2em 0.2em 0.5em 0 rgba(0, 0, 0, 0.3); }
|
||||
|
||||
/*
|
||||
@media screen and (min-aspect-ratio: 1/2) {
|
||||
$base-unit: 0.5vh;
|
||||
body {
|
||||
background: orange;
|
||||
.layout-content-and-preview {
|
||||
grid-template-rows: 50vh auto;
|
||||
grid-template-columns: auto 50vh auto;
|
||||
grid-template-areas:
|
||||
" . content . "
|
||||
"preview preview preview";
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
@media screen and (min-aspect-ratio: 1 / 1) {
|
||||
body {
|
||||
background: yellow; }
|
||||
body .layout-content-and-preview {
|
||||
grid-template-rows: auto 50vw auto;
|
||||
grid-template-columns: 50vw auto;
|
||||
grid-template-areas: " . preview" "content preview" " . preview"; } }
|
||||
|
||||
@media screen and (min-aspect-ratio: 2 / 1) {
|
||||
body {
|
||||
background: lime; }
|
||||
body .layout-content-and-preview {
|
||||
grid-template-rows: 100vh;
|
||||
grid-template-columns: 100vh auto;
|
||||
grid-template-areas: "content preview"; } }
|
||||
|
||||
@font-face {
|
||||
font-family: 'Fira Code';
|
||||
src: url("../../lib/font/fira-code/FiraCode-Regular.otf");
|
||||
@ -12,12 +75,7 @@
|
||||
body {
|
||||
font-family: 'Fira Sans';
|
||||
margin: 0;
|
||||
line-height: 1.2em;
|
||||
font-size: 1.7vw; }
|
||||
|
||||
@media screen and (screen-orientation: landscape) {
|
||||
body {
|
||||
font-size: 3.5vh; } }
|
||||
line-height: 1.2em; }
|
||||
|
||||
section {
|
||||
min-height: 100vh;
|
||||
|
||||
@ -1,7 +1,89 @@
|
||||
// @import "../template/mixins";
|
||||
// @import "../template/settings";
|
||||
// $heading2Size: 101px;
|
||||
// @import "../template/theme";
|
||||
/* basic layout */
|
||||
|
||||
$base-unit: 1vw;
|
||||
body {
|
||||
background: red;
|
||||
font-size: $base-unit;
|
||||
|
||||
|
||||
/* transition: background 1s ease; */
|
||||
.layout-content-and-preview {
|
||||
display: grid;
|
||||
grid-template-rows: 100vw auto;
|
||||
grid-template-columns: auto;
|
||||
grid-template-areas:
|
||||
"content"
|
||||
"preview";
|
||||
min-height: 100vh;
|
||||
max-height: 100vh;
|
||||
min-width: 100vw;
|
||||
max-width: 100vw;
|
||||
overflow: auto;
|
||||
.layout-content {
|
||||
background: white;
|
||||
grid-area: content;
|
||||
}
|
||||
.layout-preview {
|
||||
grid-area: preview;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
/* padding: 4vw; */
|
||||
img {
|
||||
opacity: .5;
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
box-shadow: .2em .2em .5em 0 rgba(0, 0, 0, .3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
@media screen and (min-aspect-ratio: 1/2) {
|
||||
$base-unit: 0.5vh;
|
||||
body {
|
||||
background: orange;
|
||||
.layout-content-and-preview {
|
||||
grid-template-rows: 50vh auto;
|
||||
grid-template-columns: auto 50vh auto;
|
||||
grid-template-areas:
|
||||
" . content . "
|
||||
"preview preview preview";
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
@media screen and (min-aspect-ratio: 1/1) {
|
||||
$base-unit: 0.5vw;
|
||||
body {
|
||||
background: yellow;
|
||||
.layout-content-and-preview {
|
||||
grid-template-rows: auto 50vw auto;
|
||||
grid-template-columns: 50vw auto;
|
||||
grid-template-areas:
|
||||
" . preview"
|
||||
"content preview"
|
||||
" . preview";
|
||||
}
|
||||
}
|
||||
}
|
||||
@media screen and (min-aspect-ratio: 2/1) {
|
||||
$base-unit: 1vh;
|
||||
body {
|
||||
background: lime;
|
||||
.layout-content-and-preview {
|
||||
grid-template-rows: 100vh;
|
||||
grid-template-columns: 100vh auto;
|
||||
grid-template-areas:
|
||||
"content preview";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@import url('https://free.bboxtype.com/embedfonts/?family=FiraSans:300,600');
|
||||
@font-face {
|
||||
@ -20,12 +102,12 @@ body {
|
||||
font-family: 'Fira Sans';
|
||||
margin: 0;
|
||||
line-height: 1.2em;
|
||||
font-size: 1.7vw;
|
||||
// font-size: 1.7vw;
|
||||
}
|
||||
|
||||
@media screen and (screen-orientation: landscape) {
|
||||
body {
|
||||
font-size: 3.5vh;
|
||||
// font-size: 3.5vh;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,12 +12,11 @@ Ein größeres LaTeX-Projekt anlegen und dabei ...
|
||||
|
||||
---
|
||||
|
||||
<div class="layout layout-side-by-side">
|
||||
<div class="layout layout-content-and-preview">
|
||||
|
||||
<div class="layout-content">
|
||||
|
||||
<h2 class="layout-title">Hauptdatei 👑</h2>
|
||||
|
||||
<div class="layout-content-left">
|
||||
|
||||
<ul>
|
||||
<li>enthält Grundgerüst, Titelei, etc. </li>
|
||||
<li>bindet einzelne Kapitel ein mit
|
||||
@ -42,7 +41,7 @@ Ein größeres LaTeX-Projekt anlegen und dabei ...
|
||||
|
||||
</div>
|
||||
|
||||
<div class="layout-content-right">
|
||||
<div class="layout-preview">
|
||||

|
||||
</div>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user