Layout: Replace local playlists link with home link in header and use flexbox to make it work on smaller window sizes
This commit is contained in:
parent
1ce500b8a2
commit
7f3ca7ee49
@ -4,6 +4,9 @@ h1, h2, h3, h4, h5, h6, div, button{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
address{
|
||||||
|
font-style:normal;
|
||||||
|
}
|
||||||
|
|
||||||
body{
|
body{
|
||||||
margin:0;
|
margin:0;
|
||||||
@ -14,76 +17,90 @@ body{
|
|||||||
background-color:#cccccc;
|
background-color:#cccccc;
|
||||||
|
|
||||||
min-height:100vh;
|
min-height:100vh;
|
||||||
|
|
||||||
display:grid;
|
|
||||||
grid-template-rows: 50px 1fr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header{
|
header{
|
||||||
background-color:#333333;
|
background-color:#333333;
|
||||||
|
height: 50px;
|
||||||
|
|
||||||
grid-row: 1;
|
display: flex;
|
||||||
|
|
||||||
display:grid;
|
|
||||||
grid-template-columns: minmax(0px, 3fr) 640px 40px 500px minmax(0px,2fr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main{
|
#home-link{
|
||||||
grid-row: 2;
|
align-self: center;
|
||||||
}
|
margin-left:10px;
|
||||||
|
color: #ffffff;
|
||||||
address{
|
|
||||||
font-style:normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#site-search{
|
|
||||||
grid-column: 2;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr auto auto;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#site-search .search-box{
|
|
||||||
align-self:center;
|
|
||||||
height:25px;
|
|
||||||
border:0;
|
|
||||||
|
|
||||||
grid-column: 1;
|
|
||||||
}
|
}
|
||||||
#site-search .search-button{
|
|
||||||
grid-column: 2;
|
|
||||||
align-self:center;
|
|
||||||
height:25px;
|
|
||||||
|
|
||||||
border-style:solid;
|
|
||||||
border-width:1px;
|
#site-search{
|
||||||
|
max-width: 600px;
|
||||||
|
margin-left:10px;
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
#site-search .dropdown{
|
|
||||||
margin-left:5px;
|
#site-search .search-box{
|
||||||
grid-column: 3;
|
align-self:center;
|
||||||
align-self:center;
|
height:25px;
|
||||||
height:25px;
|
border:0;
|
||||||
}
|
|
||||||
#site-search .dropdown button{
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
#site-search .search-button{
|
||||||
align-self:center;
|
align-self:center;
|
||||||
height:25px;
|
height:25px;
|
||||||
|
|
||||||
border-style:solid;
|
border-style:solid;
|
||||||
border-width:1px;
|
border-width:1px;
|
||||||
}
|
}
|
||||||
#site-search .css-sucks{
|
#site-search .dropdown{
|
||||||
width:0px;
|
margin-left:5px;
|
||||||
height:0px;
|
align-self:center;
|
||||||
|
height:25px;
|
||||||
}
|
}
|
||||||
#site-search .dropdown-content{
|
#site-search .dropdown button{
|
||||||
grid-template-columns: auto auto;
|
align-self:center;
|
||||||
white-space: nowrap;
|
height:25px;
|
||||||
|
|
||||||
|
border-style:solid;
|
||||||
|
border-width:1px;
|
||||||
}
|
}
|
||||||
#site-search .dropdown-content h3{
|
#site-search .css-sucks{
|
||||||
grid-column:1 / span 2;
|
width:0px;
|
||||||
|
height:0px;
|
||||||
|
}
|
||||||
|
#site-search .dropdown-content{
|
||||||
|
grid-template-columns: auto auto;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
#site-search .dropdown-content h3{
|
||||||
|
grid-column:1 / span 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#playlist-edit{
|
||||||
|
margin-left: 10px;
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
#local-playlists{
|
||||||
|
margin-right:5px;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
#playlist-name-selection{
|
||||||
|
}
|
||||||
|
#playlist-add-button{
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
#item-selection-reset{
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
main{
|
||||||
|
grid-row: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.dropdown{
|
.dropdown{
|
||||||
z-index:1;
|
z-index:1;
|
||||||
@ -98,50 +115,6 @@ address{
|
|||||||
display:inline-grid;
|
display:inline-grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#header-right{
|
|
||||||
grid-column:4;
|
|
||||||
|
|
||||||
display:grid;
|
|
||||||
grid-template-columns:auto auto auto 1fr;
|
|
||||||
grid-template-rows: 1fr;
|
|
||||||
width: 540px;
|
|
||||||
}
|
|
||||||
#playlist-edit{
|
|
||||||
display:contents;
|
|
||||||
}
|
|
||||||
#local-playlists{
|
|
||||||
grid-column: 1;
|
|
||||||
grid-row:1;
|
|
||||||
align-self: center;
|
|
||||||
margin-right:5px;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
#playlist-name-selection{
|
|
||||||
grid-column:2;
|
|
||||||
grid-row:1;
|
|
||||||
justify-self:start;
|
|
||||||
align-self: center;
|
|
||||||
}
|
|
||||||
#playlist-add-button{
|
|
||||||
grid-column:3;
|
|
||||||
grid-row:1;
|
|
||||||
align-self: center;
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
#item-selection-reset{
|
|
||||||
grid-column:4;
|
|
||||||
grid-row:1;
|
|
||||||
align-self: center;
|
|
||||||
justify-self:start;
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.item-list{
|
.item-list{
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-auto-rows: 138px;
|
grid-auto-rows: 138px;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
|
<a href="/youtube.com" id="home-link">Home</a>
|
||||||
<form id="site-search" action="/youtube.com/search">
|
<form id="site-search" action="/youtube.com/search">
|
||||||
<input type="search" name="query" class="search-box" value="{{ search_box_value }}">
|
<input type="search" name="query" class="search-box" value="{{ search_box_value }}">
|
||||||
<button type="submit" value="Search" class="search-button">Search</button>
|
<button type="submit" value="Search" class="search-button">Search</button>
|
||||||
@ -91,19 +92,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div id="header-right">
|
<form id="playlist-edit" action="/youtube.com/edit_playlist" method="post" target="_self">
|
||||||
<form id="playlist-edit" action="/youtube.com/edit_playlist" method="post" target="_self">
|
<input name="playlist_name" id="playlist-name-selection" list="playlist-options" type="text">
|
||||||
<input name="playlist_name" id="playlist-name-selection" list="playlist-options" type="text">
|
<datalist id="playlist-options">
|
||||||
<datalist id="playlist-options">
|
{% for playlist_name in header_playlist_names %}
|
||||||
{% for playlist_name in header_playlist_names %}
|
<option value="{{ playlist_name }}">{{ playlist_name }}</option>
|
||||||
<option value="{{ playlist_name }}">{{ playlist_name }}</option>
|
{% endfor %}
|
||||||
{% endfor %}
|
</datalist>
|
||||||
</datalist>
|
<button type="submit" id="playlist-add-button" name="action" value="add">Add to playlist</button>
|
||||||
<button type="submit" id="playlist-add-button" name="action" value="add">Add to playlist</button>
|
<button type="reset" id="item-selection-reset">Clear selection</button>
|
||||||
<button type="reset" id="item-selection-reset">Clear selection</button>
|
</form>
|
||||||
</form>
|
|
||||||
<a href="/youtube.com/playlists" id="local-playlists">Local playlists</a>
|
|
||||||
</div>
|
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
{% block main %}
|
{% block main %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user