Merge pull request #123 from dunn/scss

extract inlined css into conditional classes
This commit is contained in:
Nick 2020-06-08 10:59:28 -04:00 committed by GitHub
commit 17ce730d65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 31 deletions

View File

@ -15,9 +15,7 @@
<body class="scrollbar">
<img id="remote" src="/static/img/remote.png" onclick="flipRemote();" />
<div id="devKeys"></div>
<div class="root">
{{template "body" .}}
</div>
{{template "body" .}}
</body>
</html>
</html>

View File

@ -56,12 +56,13 @@ input[type=text] {
font-weight: bold;
}
.root {
max-width: var(--var-max-width);
max-height: var(--var-max-height);
height: var(--var-max-height);
width: var(--var-max-width);
margin: 0px 1vw;
.grid-root {
display: grid;
height: var(--var-max-height);
margin: 0px 1vw;
max-height: var(--var-max-height);
max-width: var(--var-max-width);
width: var(--var-max-width);
}
.pretty-button {
@ -200,7 +201,7 @@ input[type=text] {
height: 100%;
width: 100%;
position: absolute;
background-color: rgb(0, 0, 0, 0.75);
background-color: rgba(0, 0, 0, 0.75);
z-index: 3;
text-align: center;
vertical-align: middle;
@ -400,3 +401,21 @@ input[type=text] {
z-index: 99;
color: var(--var-contrast-color);
}
/* ------------------- */
/* CONDITIONAL CLASSES */
/* ------------------- */
/* ------------- */
/* COMBINED MODE */
/* ------------- */
.combined {
grid-template-columns: 5fr 1fr;
}
/* --------------- */
/* VIDEO ONLY MODE */
/* --------------- */
.video-only #videoElement {
height: 99vh;
}

View File

@ -29,4 +29,4 @@
</dl>
{{end}}
</div>
{{end}}
{{end}}

View File

@ -6,35 +6,26 @@
<script>
maxMessageCount = {{.MessageHistoryCount }}
</script>
<style>
.root {
display: grid;
}
</style>
{{end}}
{{if .Video}}
<script type="application/javascript" src="/static/js/flv.min.js"></script>
<script type="application/javascript" src="/static/js/video.js"></script>
{{if not .Chat}}
<style>
#videoElement {
height: 99vh;
}
</style>
{{end}}
{{end}}
{{if and .Video .Chat}}
<style>
.root {
grid-template-columns: 5fr 1fr;
}
</style>
{{end}}
{{/* end define header */}}
{{end}}
{{define "body"}}
{{ if and .Chat .Video }}
<div class="grid-root combined">
{{ else if .Video }}
<div class="grid-root video-only">
{{ else }}
<div class="grid-root">
{{ end }}
{{if .Video}}
<div id="videoWrapper">
<div id="videoOverlay">