feat: Rewrite nav, improve comment faves/boosts

Also, this is perhaps last featire commit here, I'll merge duckquill and my main site, it can be still used as a theme, it's just will be more convenient
This commit is contained in:
daudix
2024-01-17 18:58:49 +03:00
parent 7fb135c2a9
commit 5d8b14530b
8 changed files with 137 additions and 99 deletions

View File

@ -211,21 +211,23 @@ which were inspired by https://codeberg.org/jwildeboer/jwildeboersource/src/comm
let interactions = document.createElement("footer");
if(status.reblogs_count > 0) {
let boosts = document.createElement("span");
boosts.className = "boosts";
boosts.setAttribute("title", "Boosts");
boosts.textContent = status.reblogs_count;
let reblogs = document.createElement("a");
reblogs.setAttribute("href", status.url + "/reblogs");
reblogs.className = "reblogs";
reblogs.setAttribute("title", "Boosts");
reblogs.textContent = status.reblogs_count;
interactions.appendChild(boosts);
interactions.appendChild(reblogs);
}
if(status.favourites_count > 0) {
let faves = document.createElement("span");
faves.className = "faves";
faves.setAttribute("title", "Favorites");
faves.textContent = status.favourites_count;
let favourites = document.createElement("a");
favourites.setAttribute("href", status.url + "/favourites");
favourites.className = "favourites";
favourites.setAttribute("title", "Favorites");
favourites.textContent = status.favourites_count;
interactions.appendChild(faves);
interactions.appendChild(favourites);
}
let comment = document.createElement("article");

View File

@ -1,5 +1,5 @@
<nav class="nav">
<div class="nav-container">
<header>
<nav>
<a href="{{ get_url(path='') }}">
{% if config.extra.nav.icons %}
<i class="bi bi-house"></i>
@ -29,5 +29,5 @@
</li>
{% endif %}
</ul>
</div>
</nav>
</nav>
</header>