async function handleAjaxResponse(response) {
if (response.status != 200) {
+ // Got an error; redirect to the error page
window.location.href = response.url;
}
// Update URL in browser window, minus request-type field
var url = new URL(response.url);
url.searchParams.delete("request-type");
- // Get page content from XML response
+ // Get page content from response
var text = await response.text();
window.history.pushState(text, "", url);
.profile-link {
font-weight: bold;
text-decoration: none;
- /* color: var(--purple); */
}
.user-list {
gap: 10px;
}
+.user-list-entry-container {
+ border-radius: 10px;
+ box-shadow: 0px 0px 5px 0px;
+}
+
.user-list-entry {
+ box-sizing: border-box;
+ height: 100%;
background: var(--yellow);
border-radius: 10px;
- box-shadow: 0px 0px 5px 0px;
- height: 48px;
+ padding: 5px;
display: flex;
align-items: center;
text-decoration: none;
+ gap: 5px;
}
.user-list-entry span {
- line-height: 32px;
- padding: 10px;
font-weight: bold;
+ color: var(--purple);
}
/* Sliders (e.g. volume) */
.small-pfp {
max-width: 32px;
max-height: 32px;
- margin: 0px;
- margin-left: 6px;
border-radius: 5px;
border: solid 2px var(--purple);
+ background-color: var(--purple);
+ vertical-align: middle;
}
.profile-bio {
gap: 10px;
align-items: center;
flex-grow: 1;
- margin: 10px;
+ margin: 5px;
}
/* Artist on separate line for mobile */
.song-list-button img {
image-rendering: pixelated;
width: 32px;
+ vertical-align: middle;
}
div.song-details {
<div class="user-list">
{% for user in users %}
- <a href="/users/{{ user['username'] }}" class="user-list-entry" style="--yellow:{{ user['bgcolor'] }};--black:{{ user['fgcolor'] }};--purple:{{ user['accolor'] }};">
- {% if user['has_pfp'] -%}
- <img class="small-pfp" src="/pfp/{{ user['userid'] }}" />
- {%- endif %}
- <span>{{ user['username'] }}</span>
- </a>
+ <div class="user-list-entry-container">
+ <a href="/users/{{ user['username'] }}" class="user-list-entry" style="--yellow:{{ user['bgcolor'] }};--black:{{ user['fgcolor'] }};--purple:{{ user['accolor'] }};">
+ {% if user['has_pfp'] -%}
+ <img class="small-pfp" src="/pfp/{{ user['userid'] }}" />
+ {%- endif %}
+ <span>{{ user['username'] }}</span>
+ </a>
+ </div>
{% endfor %}
</div>
{% for song in songs %}
<div class="song" data-song="{{ song.json() }}">
<div class="song-main">
- <!-- Profile Picture -->
- {% if song.user_has_pfp -%}
- <img class="small-pfp" src="/pfp/{{ song.userid }}" onerror="this.style.display = 'none'" />
- {%- endif %}
-
<div class="song-info">
+ {%- if song.user_has_pfp %}
+ <!-- Profile Picture -->
+ <img class="small-pfp" src="/pfp/{{ song.userid }}" onerror="this.style.display = 'none'" />
+ {%- else -%}
+ <div class="spacer"></div>
+ {%- endif %}
<!-- Song Title -->
<div class="song-title"><a href="/song/{{ song.userid }}/{{ song.songid }}?action=view">{{ song.title }}</a></div>