added hyperlinks to all menus
This commit is contained in:
@@ -402,4 +402,17 @@
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* Prevent anchor links from appearing all blue */
|
||||
a {
|
||||
color: inherit; /* Inherit color from the parent */
|
||||
text-decoration: none; /* Remove default underline */
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:focus {
|
||||
color: #1db954; /* Change to a themed green on hover/focus */
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@@ -352,4 +352,17 @@
|
||||
gap: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Prevent anchor links from appearing all blue */
|
||||
a {
|
||||
color: inherit; /* Inherit color from the parent */
|
||||
text-decoration: none; /* Remove default underline */
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:focus {
|
||||
color: #1db954; /* Change to a themed green on hover/focus */
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@@ -1,389 +1,412 @@
|
||||
/* CONFIGURATION PAGE STYLES */
|
||||
/* Base styles */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #121212;
|
||||
color: #ffffff;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* Config Container */
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
/* Modern dark gradient background */
|
||||
background: linear-gradient(135deg, #121212, #1e1e1e);
|
||||
color: #ffffff;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* Config Container */
|
||||
.config-container {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem 1.5rem;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.config-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
padding-bottom: 1.5rem;
|
||||
border-bottom: 1px solid #2a2a2a;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
/* Modern Back Button */
|
||||
.back-button {
|
||||
background: #1db954;
|
||||
color: #ffffff;
|
||||
padding: 0.8rem 1.5rem;
|
||||
border-radius: 25px;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: background 0.3s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.back-button:hover {
|
||||
background: #1ed760;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* Queue Icon in Header */
|
||||
#queueIcon {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
#queueIcon img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
filter: invert(1);
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
#queueIcon:hover img {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* Account Configuration Section */
|
||||
.account-config {
|
||||
background: #181818;
|
||||
padding: 1.5rem;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 2rem;
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.account-config:hover {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.config-item {
|
||||
margin-bottom: 1.5rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.config-item label {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
color: #b3b3b3;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
/* Enhanced Dropdown Styling */
|
||||
#spotifyAccountSelect,
|
||||
#deezerAccountSelect,
|
||||
#spotifyQualitySelect,
|
||||
#deezerQualitySelect {
|
||||
background: #2a2a2a;
|
||||
color: #ffffff;
|
||||
border: 1px solid #404040;
|
||||
border-radius: 8px;
|
||||
padding: 0.8rem 2.5rem 0.8rem 1rem;
|
||||
width: 100%;
|
||||
font-size: 0.95rem;
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 1rem center;
|
||||
background-size: 12px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
#spotifyAccountSelect:focus,
|
||||
#deezerAccountSelect:focus,
|
||||
#spotifyQualitySelect:focus,
|
||||
#deezerQualitySelect:focus {
|
||||
outline: none;
|
||||
border-color: #1db954;
|
||||
box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.2);
|
||||
}
|
||||
|
||||
#spotifyAccountSelect option,
|
||||
#deezerAccountSelect option,
|
||||
#spotifyQualitySelect option,
|
||||
#deezerQualitySelect option {
|
||||
background: #181818;
|
||||
color: #ffffff;
|
||||
padding: 0.8rem;
|
||||
}
|
||||
|
||||
#spotifyAccountSelect option:hover,
|
||||
#deezerAccountSelect option:hover,
|
||||
#spotifyQualitySelect option:hover,
|
||||
#deezerQualitySelect option:hover {
|
||||
background: #1db954;
|
||||
}
|
||||
|
||||
/* Improved Toggle Switches */
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
margin-left: 1rem;
|
||||
vertical-align: middle;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #666;
|
||||
transition: 0.4s;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: #ffffff;
|
||||
transition: 0.4s;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: #1db954;
|
||||
}
|
||||
|
||||
input:checked + .slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
/* Service Tabs */
|
||||
.service-tabs {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.tab-button {
|
||||
padding: 0.8rem 1.5rem;
|
||||
border: none;
|
||||
border-radius: 25px;
|
||||
background: #2a2a2a;
|
||||
color: #ffffff;
|
||||
cursor: pointer;
|
||||
font-size: 0.95rem;
|
||||
transition: background 0.3s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.tab-button.active {
|
||||
background: #1db954;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* Credentials List */
|
||||
.credentials-list {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.credential-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem;
|
||||
background: #2a2a2a;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 0.75rem;
|
||||
transition: background 0.3s ease;
|
||||
}
|
||||
|
||||
.credential-item:hover {
|
||||
background: #3a3a3a;
|
||||
}
|
||||
|
||||
.credential-actions button {
|
||||
margin-left: 0.5rem;
|
||||
padding: 0.4rem 0.8rem;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 0.9rem;
|
||||
transition: opacity 0.3s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.edit-btn {
|
||||
background: #1db954;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
background: #ff5555;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.credential-actions button:hover {
|
||||
opacity: 0.9;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
/* Credentials Form */
|
||||
.credentials-form {
|
||||
background: #181818;
|
||||
padding: 1.5rem;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.credentials-form:hover {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
#serviceFields {
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 1.2rem;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
color: #b3b3b3;
|
||||
}
|
||||
|
||||
.form-group input {
|
||||
width: 100%;
|
||||
padding: 0.8rem;
|
||||
background: #2a2a2a;
|
||||
border: 1px solid #404040;
|
||||
border-radius: 8px;
|
||||
color: #ffffff;
|
||||
transition: border-color 0.3s ease;
|
||||
}
|
||||
|
||||
.form-group input:focus {
|
||||
outline: none;
|
||||
border-color: #1db954;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
background: #1db954;
|
||||
color: #ffffff;
|
||||
padding: 0.8rem 1.5rem;
|
||||
border: none;
|
||||
border-radius: 25px;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
transition: background 0.3s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.save-btn:hover {
|
||||
background: #1ed760;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* Error Messages */
|
||||
#configError {
|
||||
color: #ff5555;
|
||||
margin-top: 1rem;
|
||||
text-align: center;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* MOBILE RESPONSIVENESS */
|
||||
@media (max-width: 768px) {
|
||||
.config-container {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem 1.5rem;
|
||||
padding: 1.5rem 1rem;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.config-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
padding-bottom: 1.5rem;
|
||||
border-bottom: 1px solid #2a2a2a;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
/* Increase touch target sizes for buttons and selects */
|
||||
.back-button {
|
||||
background: #1DB954;
|
||||
color: white;
|
||||
padding: 0.8rem 1.5rem;
|
||||
border-radius: 25px;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: background 0.3s ease;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 0.8rem;
|
||||
}
|
||||
|
||||
.back-button:hover {
|
||||
background: #1ed760;
|
||||
}
|
||||
|
||||
/* Queue Icon in Header */
|
||||
#queueIcon {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
#queueIcon img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
filter: invert(1);
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
||||
#queueIcon:hover img {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* Account Configuration Section */
|
||||
.account-config {
|
||||
background: #181818;
|
||||
padding: 1.5rem;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.config-item {
|
||||
margin-bottom: 1.5rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.config-item label {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
color: #b3b3b3;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
/* Enhanced Dropdown Styling */
|
||||
#spotifyAccountSelect,
|
||||
#deezerAccountSelect,
|
||||
#spotifyQualitySelect,
|
||||
#deezerQualitySelect {
|
||||
background: #2a2a2a;
|
||||
color: white;
|
||||
border: 1px solid #404040;
|
||||
border-radius: 8px;
|
||||
padding: 0.8rem 2.5rem 0.8rem 1rem;
|
||||
width: 100%;
|
||||
font-size: 0.95rem;
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 1rem center;
|
||||
background-size: 12px;
|
||||
transition: all 0.3s ease;
|
||||
padding: 0.8rem 2rem 0.8rem 1rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
#spotifyAccountSelect:focus,
|
||||
#deezerAccountSelect:focus,
|
||||
#spotifyQualitySelect:focus,
|
||||
#deezerQualitySelect:focus {
|
||||
outline: none;
|
||||
border-color: #1DB954;
|
||||
box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.2);
|
||||
}
|
||||
|
||||
#spotifyAccountSelect option,
|
||||
#deezerAccountSelect option,
|
||||
#spotifyQualitySelect option,
|
||||
#deezerQualitySelect option {
|
||||
background: #181818;
|
||||
color: white;
|
||||
padding: 0.8rem;
|
||||
}
|
||||
|
||||
#spotifyAccountSelect option:hover,
|
||||
#deezerAccountSelect option:hover,
|
||||
#spotifyQualitySelect option:hover,
|
||||
#deezerQualitySelect option:hover {
|
||||
background: #1DB954;
|
||||
}
|
||||
|
||||
/* Improved Toggle Switches */
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
margin-left: 1rem;
|
||||
vertical-align: middle;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #666;
|
||||
transition: 0.4s;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: white;
|
||||
transition: 0.4s;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: #1DB954;
|
||||
}
|
||||
|
||||
input:checked + .slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
/* Service Tabs */
|
||||
.service-tabs {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.tab-button {
|
||||
padding: 0.8rem 1.5rem;
|
||||
border: none;
|
||||
border-radius: 25px;
|
||||
background: #2a2a2a;
|
||||
color: #ffffff;
|
||||
cursor: pointer;
|
||||
font-size: 0.95rem;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.tab-button.active {
|
||||
background: #1DB954;
|
||||
}
|
||||
|
||||
/* Credentials List */
|
||||
.credentials-list {
|
||||
margin-bottom: 2rem;
|
||||
flex: 1 1 auto;
|
||||
text-align: center;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.credential-item {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.credential-actions {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
/* Adjust toggle switch size for better touch support */
|
||||
.switch {
|
||||
width: 50px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.config-container {
|
||||
padding: 1rem;
|
||||
background: #2a2a2a;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.credential-actions button {
|
||||
margin-left: 0.5rem;
|
||||
padding: 0.4rem 0.8rem;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 0.9rem;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.edit-btn {
|
||||
background: #1DB954;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
background: #ff5555;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.credential-actions button:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/* Credentials Form */
|
||||
.account-config,
|
||||
.credentials-form {
|
||||
background: #181818;
|
||||
padding: 1.5rem;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
#serviceFields {
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 1.2rem;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
color: #b3b3b3;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.form-group input {
|
||||
width: 100%;
|
||||
padding: 0.8rem;
|
||||
background: #2a2a2a;
|
||||
border: 1px solid #404040;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
transition: border-color 0.3s ease;
|
||||
padding: 0.7rem;
|
||||
}
|
||||
|
||||
.form-group input:focus {
|
||||
outline: none;
|
||||
border-color: #1DB954;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
background: #1DB954;
|
||||
color: white;
|
||||
padding: 0.8rem 1.5rem;
|
||||
border: none;
|
||||
border-radius: 25px;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
transition: background 0.3s ease;
|
||||
}
|
||||
|
||||
.save-btn:hover {
|
||||
background: #1ed760;
|
||||
}
|
||||
|
||||
/* Error Messages */
|
||||
#configError {
|
||||
color: #ff5555;
|
||||
margin-top: 1rem;
|
||||
text-align: center;
|
||||
.save-btn,
|
||||
.back-button {
|
||||
padding: 0.7rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* MOBILE RESPONSIVENESS */
|
||||
@media (max-width: 768px) {
|
||||
.config-container {
|
||||
padding: 1.5rem 1rem;
|
||||
}
|
||||
|
||||
.config-header {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
/* Increase touch target sizes for buttons and selects */
|
||||
.back-button {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 0.8rem;
|
||||
}
|
||||
|
||||
#spotifyAccountSelect,
|
||||
#deezerAccountSelect,
|
||||
#spotifyQualitySelect,
|
||||
#deezerQualitySelect {
|
||||
padding: 0.8rem 2rem 0.8rem 1rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.service-tabs {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.tab-button {
|
||||
flex: 1 1 auto;
|
||||
text-align: center;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.credential-item {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.credential-actions {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
/* Adjust toggle switch size for better touch support */
|
||||
.switch {
|
||||
width: 50px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
}
|
||||
/* Reduce dropdown padding for very small screens */
|
||||
#spotifyAccountSelect,
|
||||
#deezerAccountSelect,
|
||||
#spotifyQualitySelect,
|
||||
#deezerQualitySelect {
|
||||
padding: 0.7rem 1.8rem 0.7rem 0.8rem;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.config-container {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.account-config,
|
||||
.credentials-form {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.form-group input {
|
||||
padding: 0.7rem;
|
||||
}
|
||||
|
||||
.save-btn,
|
||||
.back-button {
|
||||
padding: 0.7rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* Reduce dropdown padding for very small screens */
|
||||
#spotifyAccountSelect,
|
||||
#deezerAccountSelect,
|
||||
#spotifyQualitySelect,
|
||||
#deezerQualitySelect {
|
||||
padding: 0.7rem 1.8rem 0.7rem 0.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -331,3 +331,15 @@ body {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
/* Prevent anchor links from appearing all blue */
|
||||
a {
|
||||
color: inherit; /* Inherit color from the parent */
|
||||
text-decoration: none; /* Remove default underline */
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:focus {
|
||||
color: #1db954; /* Change to a themed green on hover/focus */
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@@ -196,4 +196,17 @@
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Prevent anchor links from appearing all blue */
|
||||
a {
|
||||
color: inherit; /* Inherit color from the parent */
|
||||
text-decoration: none; /* Remove default underline */
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:focus {
|
||||
color: #1db954; /* Change to a themed green on hover/focus */
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@@ -32,15 +32,22 @@ function renderAlbum(album) {
|
||||
document.getElementById('loading').classList.add('hidden');
|
||||
document.getElementById('error').classList.add('hidden');
|
||||
|
||||
// Album header info
|
||||
document.getElementById('album-name').textContent = album.name;
|
||||
document.getElementById('album-artist').textContent =
|
||||
`By ${album.artists.map(artist => artist.name).join(', ')}`;
|
||||
|
||||
const baseUrl = window.location.origin;
|
||||
|
||||
// Album header info with embedded links
|
||||
|
||||
// Album name becomes a link to the album page.
|
||||
document.getElementById('album-name').innerHTML =
|
||||
`<a href="${baseUrl}/album/${album.id}">${album.name}</a>`;
|
||||
|
||||
// Album artists become links to their artist pages.
|
||||
document.getElementById('album-artist').innerHTML =
|
||||
`By ${album.artists.map(artist => `<a href="${baseUrl}/artist/${artist.id}">${artist.name}</a>`).join(', ')}`;
|
||||
|
||||
const releaseYear = new Date(album.release_date).getFullYear();
|
||||
document.getElementById('album-stats').textContent =
|
||||
`${releaseYear} • ${album.total_tracks} songs • ${album.label}`;
|
||||
|
||||
|
||||
document.getElementById('album-copyright').textContent =
|
||||
album.copyrights.map(c => c.text).join(' • ');
|
||||
|
||||
@@ -97,8 +104,12 @@ function renderAlbum(album) {
|
||||
trackElement.innerHTML = `
|
||||
<div class="track-number">${index + 1}</div>
|
||||
<div class="track-info">
|
||||
<div class="track-name">${track.name}</div>
|
||||
<div class="track-artist">${track.artists.map(a => a.name).join(', ')}</div>
|
||||
<div class="track-name">
|
||||
<a href="${baseUrl}/track/${track.id}">${track.name}</a>
|
||||
</div>
|
||||
<div class="track-artist">
|
||||
${track.artists.map(a => `<a href="${baseUrl}/artist/${a.id}">${a.name}</a>`).join(', ')}
|
||||
</div>
|
||||
</div>
|
||||
<div class="track-duration">${msToTime(track.duration_ms)}</div>
|
||||
<button class="download-btn download-btn--circle"
|
||||
@@ -134,22 +145,22 @@ function showError(message) {
|
||||
}
|
||||
|
||||
function attachDownloadListeners() {
|
||||
document.querySelectorAll('.download-btn').forEach((btn) => {
|
||||
if (btn.id === 'downloadAlbumBtn') return;
|
||||
btn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
const url = e.currentTarget.dataset.url;
|
||||
const type = e.currentTarget.dataset.type;
|
||||
const name = e.currentTarget.dataset.name || extractName(url);
|
||||
const albumType = e.currentTarget.dataset.albumType;
|
||||
|
||||
// Remove the button after click
|
||||
e.currentTarget.remove();
|
||||
|
||||
// Start the download for this track.
|
||||
startDownload(url, type, { name }, albumType);
|
||||
});
|
||||
document.querySelectorAll('.download-btn').forEach((btn) => {
|
||||
if (btn.id === 'downloadAlbumBtn') return;
|
||||
btn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
const url = e.currentTarget.dataset.url;
|
||||
const type = e.currentTarget.dataset.type;
|
||||
const name = e.currentTarget.dataset.name || extractName(url);
|
||||
const albumType = e.currentTarget.dataset.albumType;
|
||||
|
||||
// Remove the button after click
|
||||
e.currentTarget.remove();
|
||||
|
||||
// Start the download for this track.
|
||||
startDownload(url, type, { name }, albumType);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function startDownload(url, type, item, albumType) {
|
||||
@@ -198,4 +209,4 @@ async function startDownload(url, type, item, albumType) {
|
||||
} catch (error) {
|
||||
showError('Download failed: ' + error.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
if (!response.ok) throw new Error('Network response was not ok');
|
||||
return response.json();
|
||||
})
|
||||
.then(data => renderArtist(data))
|
||||
.then(data => renderArtist(data, artistId)) // Pass artistId along
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
showError('Failed to load artist info.');
|
||||
@@ -44,8 +44,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
* "total": 5,
|
||||
* "items": [ { album object }, { album object }, ... ]
|
||||
* }
|
||||
*
|
||||
* @param {Object} artistData - the artist data from the API.
|
||||
* @param {string} artistId - the artist id from the URL.
|
||||
*/
|
||||
function renderArtist(artistData) {
|
||||
function renderArtist(artistData, artistId) {
|
||||
// Hide loading and error messages
|
||||
document.getElementById('loading').classList.add('hidden');
|
||||
document.getElementById('error').classList.add('hidden');
|
||||
@@ -54,7 +57,10 @@ function renderArtist(artistData) {
|
||||
const firstAlbum = artistData.items[0];
|
||||
const artistName = firstAlbum?.artists[0]?.name || 'Unknown Artist';
|
||||
const artistImage = firstAlbum?.images[0]?.url || 'placeholder.jpg';
|
||||
document.getElementById('artist-name').textContent = artistName;
|
||||
|
||||
// --- Embed the artist name in a link ---
|
||||
document.getElementById('artist-name').innerHTML =
|
||||
`<a href="/artist/${artistId}" class="artist-link">${artistName}</a>`;
|
||||
document.getElementById('artist-stats').textContent = `${artistData.total} albums`;
|
||||
document.getElementById('artist-image').src = artistImage;
|
||||
|
||||
@@ -144,11 +150,18 @@ function renderArtist(artistData) {
|
||||
albums.forEach((album, index) => {
|
||||
const albumElement = document.createElement('div');
|
||||
albumElement.className = 'track'; // reusing the same CSS classes as in the playlist view
|
||||
|
||||
// --- Embed links for the album ---
|
||||
// Wrap the album image and album name in an <a> that points to /album/{album.id}
|
||||
albumElement.innerHTML = `
|
||||
<div class="track-number">${index + 1}</div>
|
||||
<img class="track-image" src="${album.images[1]?.url || album.images[0]?.url || 'placeholder.jpg'}" alt="Album cover" style="width: 64px; height: 64px; border-radius: 4px; margin-right: 1rem;">
|
||||
<a href="/album/${album.id}" class="album-link">
|
||||
<img class="track-image" src="${album.images[1]?.url || album.images[0]?.url || 'placeholder.jpg'}"
|
||||
alt="Album cover"
|
||||
style="width: 64px; height: 64px; border-radius: 4px; margin-right: 1rem;">
|
||||
</a>
|
||||
<div class="track-info">
|
||||
<div class="track-name">${album.name}</div>
|
||||
<a href="/album/${album.id}" class="track-name">${album.name}</a>
|
||||
<div class="track-artist"></div>
|
||||
</div>
|
||||
<div class="track-album">${album.release_date}</div>
|
||||
|
||||
@@ -103,15 +103,27 @@ function renderPlaylist(playlist) {
|
||||
|
||||
playlist.tracks.items.forEach((item, index) => {
|
||||
const track = item.track;
|
||||
// Create links for track, artist, and album using their IDs.
|
||||
// Ensure that track.id, track.artists[0].id, and track.album.id are available.
|
||||
const trackLink = `/track/${track.id}`;
|
||||
const artistLink = `/artist/${track.artists[0].id}`;
|
||||
const albumLink = `/album/${track.album.id}`;
|
||||
|
||||
const trackElement = document.createElement('div');
|
||||
trackElement.className = 'track';
|
||||
trackElement.innerHTML = `
|
||||
<div class="track-number">${index + 1}</div>
|
||||
<div class="track-info">
|
||||
<div class="track-name">${track.name}</div>
|
||||
<div class="track-artist">${track.artists[0].name}</div>
|
||||
<div class="track-name">
|
||||
<a href="${trackLink}" title="View track details">${track.name}</a>
|
||||
</div>
|
||||
<div class="track-artist">
|
||||
<a href="${artistLink}" title="View artist details">${track.artists[0].name}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="track-album">
|
||||
<a href="${albumLink}" title="View album details">${track.album.name}</a>
|
||||
</div>
|
||||
<div class="track-album">${track.album.name}</div>
|
||||
<div class="track-duration">${msToTime(track.duration_ms)}</div>
|
||||
<button class="download-btn download-btn--circle"
|
||||
data-url="${track.external_urls.spotify}"
|
||||
|
||||
@@ -50,14 +50,23 @@ function renderTrack(track) {
|
||||
document.getElementById('loading').classList.add('hidden');
|
||||
document.getElementById('error').classList.add('hidden');
|
||||
|
||||
// Update header info
|
||||
document.getElementById('track-name').textContent = track.name;
|
||||
// Display the first artist’s name (or join multiple if needed)
|
||||
document.getElementById('track-artist').textContent = `By ${track.artists.map(a => a.name).join(', ')}`;
|
||||
// Display album name and type
|
||||
document.getElementById('track-album').textContent = `Album: ${track.album.name} (${track.album.album_type})`;
|
||||
// Update header info with embedded links
|
||||
|
||||
// Track name: linking to its own page (for consistency)
|
||||
document.getElementById('track-name').innerHTML = `<a href="/track/${track.id}" title="View track details">${track.name}</a>`;
|
||||
|
||||
// Artist names: wrap each artist in a link to the artist page
|
||||
document.getElementById('track-artist').innerHTML = `By ${track.artists
|
||||
.map(a => `<a href="/artist/${a.id}" title="View artist details">${a.name}</a>`)
|
||||
.join(', ')}`;
|
||||
|
||||
// Album: embed a link to the album page.
|
||||
document.getElementById('track-album').innerHTML =
|
||||
`Album: <a href="/album/${track.album.id}" title="View album details">${track.album.name}</a> (${track.album.album_type})`;
|
||||
|
||||
// Display track duration converted from milliseconds
|
||||
document.getElementById('track-duration').textContent = `Duration: ${msToTime(track.duration_ms)}`;
|
||||
|
||||
// Show if the track is explicit
|
||||
document.getElementById('track-explicit').textContent = track.explicit ? 'Explicit' : 'Clean';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user