Separate Song component from queue styling to use for general case
This commit is contained in:
parent
340129a859
commit
00f4b2e28f
@ -3,9 +3,9 @@ use leptos::*;
|
|||||||
#[component]
|
#[component]
|
||||||
pub fn Song(song_image_path: String, song_title: String, song_artist: String) -> impl IntoView {
|
pub fn Song(song_image_path: String, song_title: String, song_artist: String) -> impl IntoView {
|
||||||
view!{
|
view!{
|
||||||
<div class="queue-song">
|
<div class="song">
|
||||||
<img src={song_image_path} alt={song_title.clone()} />
|
<img src={song_image_path} alt={song_title.clone()} />
|
||||||
<div class="queue-song-info">
|
<div class="song-info">
|
||||||
<h3>{song_title}</h3>
|
<h3>{song_title}</h3>
|
||||||
<p>{song_artist}</p>
|
<p>{song_artist}</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
height: calc(100% - 78.9px); /* Adjust height to fit the queue */
|
height: calc(100% - 87px); /* Adjust height to fit the queue */
|
||||||
background-color: #424242; /* Queue background color */
|
background-color: #424242; /* Queue background color */
|
||||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||||
overflow-y: auto; /* Add scroll bar when queue is too long */
|
overflow-y: auto; /* Add scroll bar when queue is too long */
|
||||||
|
margin: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
|
||||||
.queue-header {
|
.queue-header {
|
||||||
background-color: #333; /* Header background color */
|
background-color: #333; /* Header background color */
|
||||||
@ -30,31 +32,6 @@
|
|||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
|
|
||||||
.queue-song {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 10px;
|
|
||||||
border-bottom: 1px solid #ccc; /* Separator line color */
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 50px; /* Adjust maximum width for images */
|
|
||||||
margin-right: 10px; /* Add spacing between image and text */
|
|
||||||
border-radius: 5px; /* Add border radius to image */
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-song-info {
|
|
||||||
h3 {
|
|
||||||
margin: 0; /* Remove default margin for heading */
|
|
||||||
color: #fff; /* Adjust text color for song */
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0; /* Remove default margin for paragraph */
|
|
||||||
color: #aaa; /* Adjust text color for artist */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
button {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
|
22
style/song.scss
Normal file
22
style/song.scss
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
.song {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 50px; /* Adjust maximum width for images */
|
||||||
|
margin-right: 10px; /* Add spacing between image and text */
|
||||||
|
border-radius: 5px; /* Add border radius to image */
|
||||||
|
}
|
||||||
|
|
||||||
|
.song-info {
|
||||||
|
h3 {
|
||||||
|
margin: 0;
|
||||||
|
color: #fff; /* Adjust text color for song */
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
color: #aaa; /* Adjust text color for artist */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user