@zoyth/simple-site-framework 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/components/index.js
CHANGED
|
@@ -34196,6 +34196,32 @@ function Header({ locale, config }) {
|
|
|
34196
34196
|
// src/components/layout/Footer.tsx
|
|
34197
34197
|
var import_image3 = __toESM(require("next/image"));
|
|
34198
34198
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
34199
|
+
function renderWithLangBadge(text) {
|
|
34200
|
+
const langPattern = /\(([a-z]{2})\)/gi;
|
|
34201
|
+
const parts = [];
|
|
34202
|
+
let lastIndex = 0;
|
|
34203
|
+
let match;
|
|
34204
|
+
while ((match = langPattern.exec(text)) !== null) {
|
|
34205
|
+
if (match.index > lastIndex) {
|
|
34206
|
+
parts.push(text.slice(lastIndex, match.index));
|
|
34207
|
+
}
|
|
34208
|
+
parts.push(
|
|
34209
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
34210
|
+
"span",
|
|
34211
|
+
{
|
|
34212
|
+
className: "lang-badge inline-block ml-[0.4em] px-[0.4em] py-[0.02em] border border-black/[0.18] rounded-full text-[0.65em] tracking-[0.06em] uppercase opacity-75 group-hover:opacity-100 transition-opacity -translate-y-[0.15em]",
|
|
34213
|
+
children: match[1]
|
|
34214
|
+
},
|
|
34215
|
+
match.index
|
|
34216
|
+
)
|
|
34217
|
+
);
|
|
34218
|
+
lastIndex = match.index + match[0].length;
|
|
34219
|
+
}
|
|
34220
|
+
if (lastIndex < text.length) {
|
|
34221
|
+
parts.push(text.slice(lastIndex));
|
|
34222
|
+
}
|
|
34223
|
+
return parts.length > 0 ? parts : text;
|
|
34224
|
+
}
|
|
34199
34225
|
function Footer({ locale, config }) {
|
|
34200
34226
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
34201
34227
|
const copyrightText = replaceVariables(
|
|
@@ -34215,8 +34241,8 @@ function Footer({ locale, config }) {
|
|
|
34215
34241
|
target: "_blank",
|
|
34216
34242
|
rel: "noopener noreferrer"
|
|
34217
34243
|
},
|
|
34218
|
-
className: "text-charcoal hover:text-primary transition-colors",
|
|
34219
|
-
children: getNavigationString(link.label, locale)
|
|
34244
|
+
className: "group text-charcoal hover:text-primary transition-colors",
|
|
34245
|
+
children: renderWithLangBadge(getNavigationString(link.label, locale))
|
|
34220
34246
|
}
|
|
34221
34247
|
) }, link.id)) })
|
|
34222
34248
|
] }, section.heading ? Object.values(section.heading)[0] : "section")) }),
|