reorganize js files

This commit is contained in:
Ginger Wong
2020-08-23 19:06:58 -07:00
parent 786b4c04fa
commit 4b28ed8f25
20 changed files with 316 additions and 594 deletions

172
webroot/styles/app.css Normal file
View File

@@ -0,0 +1,172 @@
/*
Spefici styles for app layout
*/
/* variables */
:root {
--header-height: 3.5em;
--right-col-width: 24em;
--video-container-height: 55vh;
--header-bg-color: rgba(20,0,40,1);
--user-image-width: 10em;
}
html {
font-size: 14px;
}
a:hover {
text-decoration: underline;
}
::-webkit-scrollbar {
width: 0px;
background: transparent;
}
.visually-hidden {
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
white-space: nowrap; /* added line */
}
header {
height: var(--header-height);
background-color: var(--header-bg-color);
}
#logo-container {
background-size: 1.35em;
}
#chat-toggle {
min-width: 3rem;
}
#user-info-change {
display: none;
}
#stream-info span {
font-size: .70rem;
}
/* ************************************************ */
#video-container {
height: calc(var(--video-container-height));
margin-top: var(--header-height);
background-size: 30%;
}
#video-container #video {
transition: opacity .5s;
opacity: 0;
pointer-events: none;
}
.online #video {
opacity: 1;
pointer-events: auto;
}
/* *********** overrides when chat is off ***************************** */
.no-chat footer {
justify-content: center;
}
.no-chat #chat-toggle {
opacity: .75;
}
/* *********** overrides when chat is on ***************************** */
.chat #video-container,
.chat #stream-info,
.chat #user-content {
width: calc(100% - var(--right-col-width));
}
/* ************************************************8 */
@media screen and (max-width: 860px) {
:root {
--right-col-width: 20em;
--user-image-width: 6em;
}
#chat-container {
width: var(--right-col-width);
}
}
/* single col layout */
@media screen and (max-width: 640px ) {
:root {
--right-col-width: 0;
--video-container-height: 40vh;
}
#logo-container {
display: none;
}
header h1 {
max-width: 58%;
}
#user-options-container {
max-width: 41%;
}
#chat-container {
width: 100%;
position: static;
/* min-height: calc(100vh - var(--header-height)); */
height: calc(100vh - var(--header-height) - var(--video-container-height) - 3vh)
}
#messages-container {
min-height: unset;
}
#user-content {
width: 100%;
}
#stream-info {
width: 100%;
}
#video-container {
width: 100%;
}
.chat #video-container {
width: 100%;
}
.chat #user-content {
display: none;
}
.chat footer {
display: none;
}
}
@media screen and (max-height: 860px ) {
:root {
--video-container-height: 40vh;
}
.user-content {
flex-direction: column;
}
}

55
webroot/styles/video.css Normal file
View File

@@ -0,0 +1,55 @@
video.video-js {
width: 100%;
height: 100%;
display: block;
min-height: 100%
}
.vjs-airplay .vjs-icon-placeholder::before {
content: url("../img/airplay.png");
}
/* position: relative;
width: 100%;
height: calc((9 / 16) * 100vw);
max-height: calc(100vh - 169px);
min-height: 480px;
background: #000; */
/*
YOUTUBE
style="--ytd-watch-flexy-scrollbar-width: 15px; --ytd-watch-flexy-panel-max-height: 460px; --ytd-watch-flexy-chat-max-height: 460px;"
--ytd-watch-flexy-scrollbar-width: 15px;
--ytd-watch-flexy-panel-max-height: 460px;
--ytd-watch-flexy-chat-max-height: 460px;
--ytd-watch-flexy-width-ratio: 16;
--ytd-watch-flexy-height-ratio: 9;
--ytd-watch-flexy-space-below-player: 136px;
--ytd-watch-flexy-non-player-height: calc(var(--ytd-watch-flexy-masthead-height) + var(--ytd-margin-6x) + var(--ytd-watch-flexy-space-below-player));
--ytd-watch-flexy-non-player-width: calc(var(--ytd-watch-flexy-sidebar-width) + (3 * var(--ytd-margin-6x)));
--ytd-watch-flexy-min-player-height: 240px;
--ytd-watch-flexy-min-player-width: calc(var(--ytd-watch-flexy-min-player-height) * (var(--ytd-watch-flexy-width-ratio) / var(--ytd-watch-flexy-height-ratio)));
--ytd-watch-flexy-max-player-height: calc(100vh -
(var(--ytd-watch-flexy-masthead-height) + var(--ytd-margin-6x) + var(--ytd-watch-flexy-space-below-player)));
--ytd-watch-flexy-max-player-width:
calc((100vh - (var(--ytd-watch-flexy-masthead-height) + var(--ytd-margin-6x) + var(--ytd-watch-flexy-space-below-player))) *
(var(--ytd-watch-flexy-width-ratio) / var(--ytd-watch-flexy-height-ratio)));
--ytd-watch-flexy-sidebar-width: 402px;
--ytd-watch-flexy-sidebar-min-width: 300px;
--ytd-watch-flexy-masthead-height: 56px;
min-width: 0;
*/