HTML/CSS: Fix playlist buttons' responsiveness

This commit is contained in:
Samantaz Fox 2023-04-24 19:44:15 +02:00
parent 0de478c34f
commit 0b13efae67
No known key found for this signature in database
GPG key ID: F42821059186176E
3 changed files with 63 additions and 31 deletions

View file

@ -1,3 +1,7 @@
/*
* Common attributes
*/
html,
body {
font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen,
@ -11,6 +15,16 @@ body {
min-height: 100vh;
}
.h-box {
padding-left: 1em;
padding-right: 1em;
}
.v-box {
padding-top: 1em;
padding-bottom: 1em;
}
.deleted {
background-color: rgb(255, 0, 0, 0.5);
}
@ -20,6 +34,32 @@ body {
margin-bottom: 20px;
}
.title {
margin: 0.5em 0 1em 0;
}
/* A flex container */
.flexible {
display: flex;
align-items: center;
}
.flex-left {
flex: 1 1 auto;
flex-flow: row wrap;
justify-content: flex-start;
}
.flex-right {
flex: 2 0 auto;
flex-flow: row nowrap;
justify-content: flex-end;
}
/*
* Channel page
*/
.channel-profile > * {
font-size: 1.17em;
font-weight: bold;
@ -90,16 +130,6 @@ body a.channel-owner {
}
}
.h-box {
padding-left: 1em;
padding-right: 1em;
}
.v-box {
padding-top: 1em;
padding-bottom: 1em;
}
div {
overflow-wrap: break-word;
word-wrap: break-word;
@ -144,9 +174,15 @@ body a.pure-button-primary,
margin: 0;
}
/* Has to be combined with flex-left/right */
.button-container {
flex-flow: wrap;
gap: 0.5em 0.75em;
}
/*
* Thumbnails
* Video thumbnails
*/
div.thumbnail {
@ -280,6 +316,11 @@ input[type="search"]::-webkit-search-cancel-button {
margin-right: 1em;
}
/*
* Responsive rules
*/
@media only screen and (max-aspect-ratio: 16/9) {
.player-dimensions.vjs-fluid {
padding-top: 46.86% !important;
@ -328,10 +369,6 @@ input[type="search"]::-webkit-search-cancel-button {
.video-card-row { margin: 15px 0; }
.flexible { display: flex; }
.flex-left { flex: 1 1 100%; flex-wrap: wrap; }
.flex-right { flex: 1 0 auto; flex-wrap: nowrap; }
p.channel-name { margin: 0; }
p.video-data { margin: 0; font-weight: bold; font-size: 80%; }
@ -659,12 +696,7 @@ label[for="music-desc-expansion"]:hover {
}
/* Bidi (bidirectional text) support */
h1,
h2,
h3,
h4,
h5,
p,
h1, h2, h3, h4, h5, p,
#descriptionWrapper,
#description-box,
#music-description-box {

View file

@ -1,4 +1,4 @@
<div class="flex-right">
<div class="flex-right flexible">
<div class="icon-buttons">
<a title="<%=translate(locale, "videoinfo_watch_on_youTube")%>" href="https://www.youtube.com/watch<%=endpoint_params%>">
<i class="icon ion-logo-youtube"></i>

View file

@ -6,30 +6,30 @@
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/playlist/<%= plid %>" />
<% end %>
<div class="pure-g h-box">
<div class="pure-u-1-2">
<div class="pure-g h-box flexible title">
<div class="pure-u-1-3 flex-left flexible">
<h3><%= title %></h3>
</div>
<div class="pure-u-1-2 user-field">
<div class="pure-u-2-3 flex-right flexible button-container">
<%- if playlist.is_a?(InvidiousPlaylist) && playlist.author == user.try &.email -%>
<div class="pure-u-1-3">
<div class="pure-u">
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/add_playlist_items?list=<%= plid %>">
<i class="icon ion-md-add"></i>&nbsp;<%= translate(locale, "playlist_button_add_items") %>
</a>
</div>
<div class="pure-u-1-3">
<div class="pure-u">
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/edit_playlist?list=<%= plid %>">
<i class="icon ion-md-create"></i>&nbsp;<%= translate(locale, "generic_button_edit") %>
</a>
</div>
<div class="pure-u-1-3">
<div class="pure-u">
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/delete_playlist?list=<%= plid %>">
<i class="icon ion-md-trash"></i>&nbsp;<%= translate(locale, "generic_button_delete") %>
</a>
</div>
<%- else -%>
<div class="pure-u-1-3">
<div class="pure-u">
<%- if IV::Database::Playlists.exists?(playlist.id) -%>
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/subscribe_playlist?list=<%= plid %>">
<i class="icon ion-md-add"></i>&nbsp;<%= translate(locale, "Subscribe") %>
@ -42,7 +42,7 @@
</div>
<%- end -%>
<div class="pure-u-1-3">
<div class="pure-u">
<a class="pure-button pure-button-secondary low-profile" dir="auto" href="/feed/playlist/<%= plid %>">
<i class="icon ion-logo-rss"></i>&nbsp;<%= translate(locale, "generic_button_rss") %>
</a>