ui - fix links and remove useless call to map file

This commit is contained in:
florian 2024-03-17 19:10:07 +01:00
parent 372ae9056a
commit 2b6031141e
No known key found for this signature in database
GPG key ID: 93EE47CC3D061500
4 changed files with 15 additions and 9 deletions

View file

@ -104,11 +104,16 @@ class News {
news.tags,
news.date,
);
const BASE_URL = this.BASE_URL;
let cleanHTML = DOMPurify.sanitize(cardHTML);
//add to DOM
document
.querySelector("[data-news-container]")
.insertAdjacentHTML("afterbegin", cleanHTML);
document.querySelector(`.blog-click-${news.slug}`).addEventListener("click", function () { window.open(`${BASE_URL}/blog/post/${news.slug}`, '_blank') });
document.querySelectorAll(".blog-click-tag").forEach((tag) => {
tag.target = "_blank";
});
});
}
@ -118,7 +123,7 @@ class News {
tags.forEach((tag) => {
tagList += ` <a
href="${this.BASE_URL}/blog/tag/${tag.slug}"
class="my-0 mr-1 rounded bg-secondary hover:brightness-90 hover:-translate-y-0.4 text-white py-1 px-2 text-sm"
class="blog-click-tag my-0 mr-1 rounded bg-secondary hover:brightness-90 hover:-translate-y-0.4 text-white py-1 px-2 text-sm"
>
${tag.name}
</a>`;
@ -130,19 +135,16 @@ class News {
>
<div>
<img role="link"
onclick="window.location.href='${this.BASE_URL}/blog/post/${slug}'"
class="cursor-pointer rounded w-full h-40 m-0 object-cover"
class="blog-click-${slug} cursor-pointer rounded w-full h-40 m-0 object-cover"
src="${img}"
alt="image"
/>
<span role="link"
onclick="window.location.href='${this.BASE_URL}/blog/post/${slug}'"
class="block cursor-pointer mt-3 mb-1 text-xl font-semibold text-primary dark:text-white tracking-wide">${title}</span>
class="blog-click-${slug} block cursor-pointer mt-3 mb-1 text-xl font-semibold text-primary dark:text-white tracking-wide">${title}</span>
</div>
<div>
<div role="link"
onclick="window.location.href='${this.BASE_URL}/blog/post/${slug}'"
class="cursor-pointer min-h-[100px] mb-3 dark:text-gray-300 text-gray-600 pt-3">
class="blog-click-${slug} cursor-pointer min-h-[100px] mb-3 dark:text-gray-300 text-gray-600 pt-3">
${excerpt}
</div>
<div class="min-h-[75px] mt-2 flex flex-wrap justify-start items-end align-bottom">

File diff suppressed because one or more lines are too long

View file

@ -94,6 +94,7 @@
{% if pro_info['link_message'] %}
<div class="flex justify-center mt-2">
<a class="text-center font-semibold text-yellow-500 underline"
target="_blank"
href="https://panel.bunkerweb.io/?utm_campaign=self&utm_source=ui#pro">{{ pro_info['link_message'] }}</a>
</div>
{% endif %}

View file

@ -12,6 +12,7 @@
<p class="dark:brightness-125 mb-0 text-center text-xs xs:text-sm text-white">
Get the most of BunkerWeb by upgrading to the PRO version. More info and free trial
<a class="dark:brightness-125 font-medium underline text-gray-100 dark:text-gray-50 hover:no-underline"
target="_blank"
href="https://panel.bunkerweb.io/?utm_campaign=self&utm_source=banner#pro">here</a>.
</p>
</div>
@ -22,6 +23,7 @@
<p class="dark:brightness-125 mb-0 text-center text-xs xs:text-sm text-white">
Need premium support or tailored consulting around BunkerWeb ? Check out our
<a class="dark:brightness-125 font-medium underline text-gray-100 dark:text-gray-50 hover:no-underline"
target="_blank"
href="https://panel.bunkerweb.io/?utm_campaign=self&utm_source=banner#services">professional services</a>.
</p>
</div>
@ -32,9 +34,11 @@
<p class="dark:brightness-125 mb-0 text-center text-xs xs:text-sm text-white">
Be part of the Bunker community by joining the
<a class="dark:brightness-125 font-medium underline text-gray-100 dark:text-gray-50 hover:no-underline"
href="https://discord.bunkerweb.io">Discord chat</a>
target="_blank"
href="https://discord.bunkerweb.io">Discord chat</a>
and following us on
<a class="dark:brightness-125 font-medium underline text-gray-100 dark:text-gray-50 hover:no-underline"
target="_blank"
href="https://www.linkedin.com/company/bunkerity/">LinkedIn</a>.
</p>
</div>