Move themes section header to environment variables. Add target=_blank option to navigation items in header.

This commit is contained in:
Hikmet 2024-04-01 16:01:20 +03:00
parent 6fd59c712b
commit 0063cecf5d
2 changed files with 13 additions and 2 deletions

View File

@ -20,7 +20,18 @@ export function AppBar({ home }: { home: "/admin" | "/" }) {
{JSON.parse(process.env.NEXT_PUBLIC_NAVIGATION_ITEMS!).map(
(item: any) => {
return (
<a className="simple" href={item.link} key={item.title}>
<a
className="simple"
target={item.targetBlank ? "_blank" : "_self"}
href={
(item.link.startsWith("/")
? home === "/"
? ""
: home
: "") + item.link
}
key={item.title}
>
{item.title}
</a>
);

View File

@ -15,7 +15,7 @@ export function ThemesSection({
return (
<article id="temalar" className={styles["themes"]}>
<div>
<h4>Temel Lazca</h4>
<h4>{process.env.NEXT_PUBLIC_THEMES_HEADLINE}</h4>
<section aria-label="temalar">
<ol className={styles["cards"]}>
{themePreviews.map((preview) => {