prije gemini provjere
This commit is contained in:
36
001.FRONTEND/src/components/WelcomeHeader.astro
Normal file
36
001.FRONTEND/src/components/WelcomeHeader.astro
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
// src/components/WelcomeHeader.astro
|
||||
import site from "../data/site.json";
|
||||
|
||||
const currentPath = Astro.url.pathname.replace(/\/$/, "") || "/";
|
||||
const currentPageData = site.navigation.find(item => item.url === currentPath);
|
||||
|
||||
console.log("Current Path:", currentPath);
|
||||
|
||||
const {
|
||||
welcomeHeaderTextH1 = "Dobrodošli",
|
||||
welcomeHeaderTextH1dodatno = "",
|
||||
welcomeHeaderPodnaslov = "Pregled sustava",
|
||||
welcomeHeaderPovratniURL = "",
|
||||
welcomeHeaderDisplay = true
|
||||
} = currentPageData || {};
|
||||
---
|
||||
|
||||
{welcomeHeaderDisplay && (
|
||||
<header class="mb-12 px-2">
|
||||
{welcomeHeaderPovratniURL && (
|
||||
<a href={welcomeHeaderPovratniURL} class="text-blue-600 text-[10px] font-black uppercase tracking-widest no-underline flex items-center gap-2 mb-6 hover:opacity-70 transition-opacity italic">
|
||||
<i class="fa-solid fa-arrow-left text-[8px]"></i> Povratak
|
||||
</a>
|
||||
)}
|
||||
|
||||
<div class="text-left">
|
||||
<h1 class="text-4xl sm:text-6xl font-black text-gray-900 dark:text-white uppercase tracking-tighter leading-none italic">
|
||||
{welcomeHeaderTextH1} <span class="text-blue-600"> {welcomeHeaderTextH1dodatno}</span>
|
||||
</h1>
|
||||
<p class="text-gray-500 dark:text-gray-400 mt-4 font-medium italic text-lg leading-tight">
|
||||
{welcomeHeaderPodnaslov}
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
)}
|
||||
Reference in New Issue
Block a user