feat: vendor pages /vendor/<slug> with SEO, sitemap updated, links from main
This commit is contained in:
+13
-2
@@ -296,7 +296,8 @@
|
||||
? `<img src="/static/${v.logo}" alt="${v.name}" onerror="this.parentElement.innerHTML='<span class=vib-logo-text>${v.name.slice(0,2).toUpperCase()}</span>'">`
|
||||
: `<span class="vib-logo-text">${v.name.slice(0,2).toUpperCase()}</span>`;
|
||||
let linksHtml = '';
|
||||
if (v.mont_page) linksHtml += `<a class="vib-link mont" href="${v.mont_page}" target="_blank" rel="noopener">MONT ↗</a>`;
|
||||
if (v.slug) linksHtml += `<a class="vib-link mont" href="/vendor/${v.slug}">Подробнее →</a>`;
|
||||
if (v.mont_page) linksHtml += `<a class="vib-link site" href="${v.mont_page}" target="_blank" rel="noopener">MONT ↗</a>`;
|
||||
if (v.website) linksHtml += `<a class="vib-link site" href="${v.website}" target="_blank" rel="noopener">Сайт ↗</a>`;
|
||||
bar.innerHTML = `
|
||||
<div class="vib-logo">${logoInner}</div>
|
||||
@@ -313,7 +314,17 @@
|
||||
const card = document.createElement("article");
|
||||
card.className = "row-card";
|
||||
const title = document.createElement("strong");
|
||||
title.textContent = row.vendor.name;
|
||||
if (row.vendor.slug) {
|
||||
const a = document.createElement("a");
|
||||
a.href = `/vendor/${row.vendor.slug}`;
|
||||
a.textContent = row.vendor.name;
|
||||
a.style.cssText = "color:inherit;text-decoration:none;";
|
||||
a.addEventListener("mouseenter", () => a.style.textDecoration = "underline");
|
||||
a.addEventListener("mouseleave", () => a.style.textDecoration = "none");
|
||||
title.appendChild(a);
|
||||
} else {
|
||||
title.textContent = row.vendor.name;
|
||||
}
|
||||
card.appendChild(title);
|
||||
const tags = document.createElement("div");
|
||||
tags.className = "tags";
|
||||
|
||||
Reference in New Issue
Block a user