Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix taglist overflowing on stats page #550

Merged
merged 1 commit into from
Nov 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions templates/stats.html.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,12 @@
<div class="collapsible-body">
<div id="tagList"
style="max-width: 80vw; display: flex; height:calc(2048px - 25vw); flex-direction: column; flex-wrap:wrap; align-items:flex-start">
</div>
</div><br>
(These statistics only show tags that appear at least twice in your database.)
</div>
</li>
</ul>

<br>
<br>
<input type="button" value="Return to Library" onclick="window.location.replace('./');" class="stdbtn"
id="goback">
Expand Down Expand Up @@ -116,7 +115,10 @@
const namespacedTag = LRR.buildNamespacedTag(tag.namespace, tag.text);
const url = LRR.getTagSearchURL(tag.namespace, tag.text);

let html = `<a href="${url}" class="${tag.namespace}-tag" > ${namespacedTag} <b>(${tag.weight})</b></div><br/>`;
const ocss = 'max-width: 95%; display: flex;';
const icss = 'text-overflow: ellipsis; white-space: nowrap; overflow: hidden; min-width: 0; max-width: 100%;';

let html = `<a href="${url}" title="${namespacedTag}" class="${tag.namespace}-tag" style="${ocss}"><span style="${icss}">${namespacedTag}</span>&nbsp;<b>(${tag.weight})</b>`;
tagList.append(html);
});

Expand Down