From 27cfeed687de8f67f1b15d764981be614510d310 Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Fri, 22 Jan 2021 01:19:18 +0100 Subject: [PATCH] feat: Improving the support of the format list. --- themes/default/public/dist/css/index.css | 2 +- .../public/dist/css/index.css | 100 ++++++++++++++---- .../public/dist/img/audio_muted.svg | 18 ++++ .../new_look_default/public/dist/index.html | 6 +- .../public/src/view/format_selector.js | 59 ++++++++--- 5 files changed, 145 insertions(+), 40 deletions(-) create mode 100644 themes/new_look_default/public/dist/img/audio_muted.svg diff --git a/themes/default/public/dist/css/index.css b/themes/default/public/dist/css/index.css index 87c0190..d36581e 100644 --- a/themes/default/public/dist/css/index.css +++ b/themes/default/public/dist/css/index.css @@ -44,7 +44,7 @@ a:hover,a:focus { border: 1px solid black; } -#close-and-reset-video-container:hover,#close-and-reset-video-container:focus { +#close-and-reset-video-container:hover:#close-and-reset-video-container:focus { background: black; color: white; } diff --git a/themes/new_look_default/public/dist/css/index.css b/themes/new_look_default/public/dist/css/index.css index 2ddd890..40ef2fe 100644 --- a/themes/new_look_default/public/dist/css/index.css +++ b/themes/new_look_default/public/dist/css/index.css @@ -74,15 +74,6 @@ body { display: flex; } -#poping-notice { - position: absolute; - display: none; - padding: 3rem; - border-radius: 0.3rem; - background-color: #374151; - color: white; -} - #poping-notice-content a { text-decoration: none; color: #10b981; @@ -110,17 +101,29 @@ body { background-color: #059; } -#modal-video-container { - position: absolute; - display: none; +.modal { + position: absolute; + display: none; + color: white; +} - height: 100vh; - width: 100%; +#poping-notice { + padding: 3rem; + border-radius: 0.3rem; + background-color: #374151; + color: white; + overflow-y: scroll; + width: 94%; +} - flex-flow: column; - align-items: center; +#modal-video-container,#modal-format-selector { + height: 100%; + width: 100%; - background-color: #111827; + flex-flow: column; + align-items: center; + + background-color: #111827; } .video-container-bar { @@ -192,24 +195,23 @@ body { align-items: center; } -#modal-loading, -#modal-format-selector { - display: none; +#modal-loading { + display: none; } -#poping-notice.active, -#modal-video-container.active { +.modal { --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + overflow-y: scroll; } #poping-notice.active { display: block; } -#modal-video-container.active { +.modal.active { display: flex; } @@ -245,6 +247,58 @@ body { justify-content: center; } +.format-list > div { + display: grid; + grid-column-gap: 10px; + grid-row-gap: 10px; + grid-template-areas: "a"; + grid-auto-columns: 99%; + margin: 1rem; +} + +.format-list > div > a { + border: 1px solid black; + display: flex; + align-items: center; + justify-content: center; + font-size: 1.5rem; + padding-right: 5%; + padding-left: 5%; + text-decoration: none; + border-radius: 0.5rem; + background-color: #059669; + overflow-wrap: anywhere; +} + +.format-list > div > a:focus,.format-list > div > a:hover { + background-color: #059; +} + +.format-list > div > a:after { + padding-bottom: 100%; + display: block; + content: ""; +} + +.scale { + height: 1em; + width; 1em; +} + +@media (min-width: 600px) { + .format-list > div { + grid-template-areas: "a a"; + grid-auto-columns: 49.75%; + } +} + +@media (min-width: 805px) { + .format-list > div { + grid-template-areas: "a a a"; + grid-auto-columns: 33%; + } +} + @media (min-width: 812px) { #poping-notice { width: 40%; diff --git a/themes/new_look_default/public/dist/img/audio_muted.svg b/themes/new_look_default/public/dist/img/audio_muted.svg new file mode 100644 index 0000000..119d23f --- /dev/null +++ b/themes/new_look_default/public/dist/img/audio_muted.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/themes/new_look_default/public/dist/index.html b/themes/new_look_default/public/dist/index.html index 1c8cd43..70834ed 100644 --- a/themes/new_look_default/public/dist/index.html +++ b/themes/new_look_default/public/dist/index.html @@ -20,7 +20,7 @@ -