fork from github/youtube-local
This commit is contained in:
495
youtube/templates/shared.css
Normal file
495
youtube/templates/shared.css
Normal file
@@ -0,0 +1,495 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, div, button{
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
address{
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
html{
|
||||
font-family: {{ font_family }};
|
||||
--interface-border-color: var(--text-color);
|
||||
}
|
||||
|
||||
body{
|
||||
margin:0;
|
||||
padding: 0;
|
||||
color:var(--text-color);
|
||||
|
||||
|
||||
background-color:var(--background-color);
|
||||
|
||||
min-height:100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
header{
|
||||
background-color:#333333;
|
||||
min-height: 50px;
|
||||
padding: 0px 5px;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
#site-search{
|
||||
max-width: 670px;
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr auto auto auto;
|
||||
grid-template-rows: 50px 0fr;
|
||||
grid-template-areas: "home search-bar search-button filter-button playlist"
|
||||
". . . dropdown .";
|
||||
grid-column-gap: 10px;
|
||||
align-items: center;
|
||||
flex-grow: 1;
|
||||
position: relative;
|
||||
}
|
||||
#home-link{
|
||||
align-self: center;
|
||||
color: #ffffff;
|
||||
grid-area: home;
|
||||
}
|
||||
#site-search .search-box{
|
||||
align-self:center;
|
||||
height:25px;
|
||||
border:0;
|
||||
grid-area: search-bar;
|
||||
flex-grow: 1;
|
||||
}
|
||||
#site-search .search-button{
|
||||
align-self:center;
|
||||
height:25px;
|
||||
grid-area: search-button;
|
||||
}
|
||||
|
||||
#site-search .filter-dropdown-toggle-button{
|
||||
align-self:center;
|
||||
height:25px;
|
||||
grid-area: filter-button;
|
||||
}
|
||||
#site-search .playlist-form-toggle-button{
|
||||
height:25px;
|
||||
grid-area: playlist;
|
||||
display: none;
|
||||
}
|
||||
#site-search .filter-dropdown-content{
|
||||
position: absolute;
|
||||
grid-area: dropdown;
|
||||
display: grid;
|
||||
grid-template-columns: auto auto;
|
||||
white-space: nowrap;
|
||||
background-color: var(--interface-color);
|
||||
padding: 0px 10px 10px 10px;
|
||||
border-width: 0px 1px 1px 1px;
|
||||
border-style: solid;
|
||||
border-color: var(--interface-border-color);
|
||||
top: 0px;
|
||||
z-index:1;
|
||||
}
|
||||
#filter-dropdown-toggle-cbox:not(:checked) + .filter-dropdown-content{
|
||||
display: none;
|
||||
}
|
||||
#site-search .filter-dropdown-content h3{
|
||||
grid-column:1 / span 2;
|
||||
}
|
||||
|
||||
#playlist-edit{
|
||||
align-self: center;
|
||||
}
|
||||
#local-playlists{
|
||||
margin-right:5px;
|
||||
color: #ffffff;
|
||||
}
|
||||
#playlist-name-selection{
|
||||
height:25px;
|
||||
border: 0px;
|
||||
}
|
||||
#playlist-add-button{
|
||||
height:25px;
|
||||
}
|
||||
#item-selection-reset{
|
||||
height:25px;
|
||||
}
|
||||
|
||||
main{
|
||||
flex-grow: 1;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
#message-box{
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
border-style: outset;
|
||||
padding: 20px;
|
||||
background-color: var(--interface-color);
|
||||
opacity: 0;
|
||||
transition-property: opacity;
|
||||
transition-duration: 0.3s;
|
||||
}
|
||||
|
||||
.button{
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
background-color: #f0f0f0;
|
||||
color: black;
|
||||
border: 1px solid #919191;
|
||||
border-radius: 5px;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center; /* center text */
|
||||
font-size: 0.85rem;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.button:hover{
|
||||
background-color: #DCDCDC
|
||||
}
|
||||
.button:active{
|
||||
background: #e9e9e9;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
text-shadow: none;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
|
||||
}
|
||||
|
||||
.item-list{
|
||||
display: grid;
|
||||
grid-row-gap: 10px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.item-grid{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.item-grid > .playlist-item-box{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.item-grid > * {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.item-grid .horizontal-item-box .item{
|
||||
width:370px;
|
||||
}
|
||||
.item-grid .vertical-item-box .item{
|
||||
}
|
||||
|
||||
.item-box{
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
/* prevent overflow due to long titles with no spaces:
|
||||
https://stackoverflow.com/a/43312314 */
|
||||
min-width: 0;
|
||||
}
|
||||
.vertical-item-box{
|
||||
}
|
||||
.horizontal-item-box{
|
||||
}
|
||||
.item{
|
||||
background-color:var(--interface-color);
|
||||
text-decoration:none;
|
||||
font-size: 0.8125rem;
|
||||
color: #767676;
|
||||
}
|
||||
|
||||
.horizontal-item-box .item {
|
||||
flex-grow: 1;
|
||||
display: grid;
|
||||
align-content: start;
|
||||
grid-template-columns: auto 1fr;
|
||||
/* prevent overflow due to long titles with no spaces:
|
||||
https://stackoverflow.com/a/43312314 */
|
||||
min-width: 0;
|
||||
}
|
||||
.vertical-item-box .item{
|
||||
width: 168px;
|
||||
}
|
||||
.thumbnail-box{
|
||||
font-size: 0px; /* prevent newlines and blank space from creating gaps */
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
.horizontal-item-box .thumbnail-box{
|
||||
margin-right: 4px;
|
||||
}
|
||||
.no-description .thumbnail-box{
|
||||
width: 168px;
|
||||
height:94px;
|
||||
}
|
||||
.has-description .thumbnail-box{
|
||||
width: 246px;
|
||||
height:138px;
|
||||
}
|
||||
.video-item .thumbnail-info{
|
||||
position: absolute;
|
||||
bottom: 2px;
|
||||
right: 2px;
|
||||
opacity: .8;
|
||||
color: #ffffff;
|
||||
font-size: 0.8125rem;
|
||||
background-color: #000000;
|
||||
}
|
||||
.playlist-item .thumbnail-info{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
text-align:center;
|
||||
white-space: pre-line;
|
||||
opacity: .8;
|
||||
color: #cfcfcf;
|
||||
font-size: 0.8125rem;
|
||||
background-color: #000000;
|
||||
}
|
||||
.playlist-item .thumbnail-info span{ /* trick to vertically center the text */
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.thumbnail-img{ /* center it */
|
||||
margin: auto;
|
||||
display: block;
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
.horizontal-item-box .thumbnail-img{
|
||||
height: 100%;
|
||||
}
|
||||
.item-metadata{
|
||||
overflow: hidden;
|
||||
}
|
||||
.item .title{
|
||||
min-width: 0;
|
||||
line-height:1.25em;
|
||||
max-height:3.75em;
|
||||
overflow-y: hidden;
|
||||
overflow-wrap: break-word;
|
||||
|
||||
color: var(--text-color);
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
text-decoration:initial;
|
||||
}
|
||||
|
||||
.stats{
|
||||
list-style: none;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
.horizontal-stats{
|
||||
max-height:2.4em;
|
||||
overflow:hidden;
|
||||
}
|
||||
.horizontal-stats > li{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.horizontal-stats > li::after{
|
||||
content: " | ";
|
||||
}
|
||||
.horizontal-stats > li:last-child::after{
|
||||
content: "";
|
||||
}
|
||||
|
||||
.vertical-stats{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.stats address{
|
||||
display: inline;
|
||||
}
|
||||
.vertical-stats li{
|
||||
max-height: 1.3em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.item-checkbox{
|
||||
justify-self:start;
|
||||
align-self:center;
|
||||
height:30px;
|
||||
width:30px;
|
||||
min-width:30px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
|
||||
.page-button-row{
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-self:center;
|
||||
justify-content: center;
|
||||
}
|
||||
.page-button-row .page-button{
|
||||
margin-top: 10px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
.next-previous-button-row{
|
||||
margin: 10px 0px;
|
||||
display: flex;
|
||||
justify-self:center;
|
||||
justify-content: center;
|
||||
height: 40px;
|
||||
}
|
||||
.page-button{
|
||||
background-color: var(--interface-color);
|
||||
border-style: outset;
|
||||
border-width: 2px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
}
|
||||
.next-page:nth-child(2){ /* only if there's also a previous page button */
|
||||
margin-left: 10px;
|
||||
}
|
||||
.sort-button{
|
||||
background-color: var(--interface-color);
|
||||
padding: 2px;
|
||||
justify-self: start;
|
||||
}
|
||||
|
||||
/* error page stuff */
|
||||
h1{
|
||||
font-size: 2rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
#error-box, #error-message{
|
||||
background-color: var(--interface-color);
|
||||
width: 80%;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
padding: 5px;
|
||||
}
|
||||
#error-message{
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
#error-box > div, #error-box > p, #error-box > h1{
|
||||
white-space: pre-wrap;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.code-box{
|
||||
white-space: pre-wrap;
|
||||
padding: 5px;
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
border-radius:5px;
|
||||
}
|
||||
|
||||
@media (max-width:950px){
|
||||
#site-search{
|
||||
grid-template-areas: "home search-bar search-button filter-button playlist"
|
||||
". dropdown dropdown dropdown .";
|
||||
}
|
||||
#site-search .filter-dropdown-content{
|
||||
justify-self: end;
|
||||
}
|
||||
}
|
||||
@media (max-width:920px){
|
||||
header{
|
||||
flex-direction:column;
|
||||
}
|
||||
#site-search{
|
||||
margin-bottom: 5px;
|
||||
width: 100%;
|
||||
align-self: center;
|
||||
}
|
||||
#playlist-edit > *{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#playlist-form-toggle-cbox:not(:checked) + #playlist-edit{
|
||||
display: none;
|
||||
}
|
||||
#site-search .playlist-form-toggle-button{
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* convert big items (has-description) to vertical format. e.g. search results */
|
||||
@media (max-width:600px){
|
||||
.has-description.horizontal-item-box .item {
|
||||
flex-grow: unset;
|
||||
display: block;
|
||||
width: 246px;
|
||||
}
|
||||
.has-description.horizontal-item-box .thumbnail-box{
|
||||
margin-right: 0px;
|
||||
}
|
||||
.has-description.horizontal-item-box .thumbnail-img{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.has-description .horizontal-stats{
|
||||
max-height: unset;
|
||||
overflow:hidden;
|
||||
}
|
||||
.has-description .horizontal-stats > li{
|
||||
display: initial;
|
||||
}
|
||||
|
||||
.has-description .horizontal-stats > li::after{
|
||||
content: "";
|
||||
}
|
||||
|
||||
.has-description .horizontal-stats{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.has-description .horizontal-stats li{
|
||||
max-height: 1.3em;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width:500px){
|
||||
#site-search{
|
||||
grid-template-columns: 0fr auto auto auto;
|
||||
grid-template-rows: 40px 40px 0fr;
|
||||
grid-template-areas: "home search-bar search-bar search-bar"
|
||||
". search-button filter-button playlist"
|
||||
". dropdown dropdown dropdown";
|
||||
}
|
||||
#site-search .filter-dropdown-content{
|
||||
justify-self: center;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:400px) {
|
||||
.horizontal-item-box.no-description .thumbnail-box{
|
||||
width: 120px;
|
||||
}
|
||||
.horizontal-item-box.no-description .thumbnail-img{
|
||||
object-fit: scale-down;
|
||||
object-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 300px){
|
||||
#site-search{
|
||||
grid-template-columns: auto auto auto;
|
||||
grid-template-areas: "home search-bar search-bar"
|
||||
"search-button filter-button playlist"
|
||||
"dropdown dropdown dropdown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user