v2
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Link } from "react-router-dom";
|
||||
import { Clock, Facebook, Mail, MapPin, Phone } from "lucide-react";
|
||||
import logo from "@/assets/logo-municipality.png";
|
||||
import { useLocale } from "@/i18n/LocaleContext";
|
||||
import { siteSettings } from "@/content/site-settings";
|
||||
import { UI } from "@/i18n/translations";
|
||||
@@ -11,13 +10,14 @@ const QUICK_LINKS: PageKey[] = ["municipality", "community", "businesses", "even
|
||||
export function Footer() {
|
||||
const { t, locale } = useLocale();
|
||||
const year = new Date().getFullYear();
|
||||
const logo = (window as any).__CASCA_SITE__?.logo?.src || "";
|
||||
|
||||
return (
|
||||
<footer className="bg-footer text-footer-foreground mt-12">
|
||||
<div className="container grid gap-10 py-14 md:grid-cols-2 lg:grid-cols-4">
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center gap-3">
|
||||
<img src={logo} alt="" width={48} height={48} className="h-12 w-12 object-contain" />
|
||||
{logo && <img src={logo} alt="" width={48} height={48} className="h-12 w-12 object-contain" />}
|
||||
<span className="font-display italic text-lg leading-tight">
|
||||
{t(siteSettings.municipality.name)}
|
||||
</span>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Link, NavLink, useLocation } from "react-router-dom";
|
||||
import { ChevronDown, Menu, X } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
import logo from "@/assets/logo-municipality.png";
|
||||
import { useLocale } from "@/i18n/LocaleContext";
|
||||
import { siteSettings } from "@/content/site-settings";
|
||||
import { UI } from "@/i18n/translations";
|
||||
@@ -24,6 +23,7 @@ export function Header() {
|
||||
const location = useLocation();
|
||||
const [open, setOpen] = useState(false);
|
||||
const [openSub, setOpenSub] = useState<PageKey | null>(null);
|
||||
const logo = (window as any).__CASCA_SITE__?.logo?.src || "";
|
||||
|
||||
useEffect(() => {
|
||||
setOpen(false);
|
||||
@@ -34,13 +34,15 @@ export function Header() {
|
||||
<header className="bg-background border-b border-border">
|
||||
<div className="container flex items-center justify-between gap-6 py-5">
|
||||
<Link reloadDocument to={getPath("home", locale)} className="flex items-center gap-3 group">
|
||||
<img
|
||||
src={logo}
|
||||
alt=""
|
||||
width={56}
|
||||
height={56}
|
||||
className="h-12 w-12 sm:h-14 sm:w-14 object-contain"
|
||||
/>
|
||||
{logo && (
|
||||
<img
|
||||
src={logo}
|
||||
alt=""
|
||||
width={56}
|
||||
height={56}
|
||||
className="h-12 w-12 sm:h-14 sm:w-14 object-contain"
|
||||
/>
|
||||
)}
|
||||
<span className="font-display italic text-primary leading-tight text-xl sm:text-2xl md:text-[1.7rem]">
|
||||
<span className="block">
|
||||
{locale === "fr" ? "Municipalité de" : "Municipality of"}
|
||||
|
||||
@@ -4,11 +4,7 @@ import { Calendar, MapPin } from "lucide-react";
|
||||
|
||||
function formatDate(iso: string, locale: "fr" | "en") {
|
||||
const d = new Date(iso + "T00:00:00");
|
||||
return new Intl.DateTimeFormat(locale === "fr" ? "fr-CA" : "en-CA", {
|
||||
day: "numeric",
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
}).format(d);
|
||||
return iso;
|
||||
}
|
||||
|
||||
export function EventsList({ block }: { block: EventsListBlock }) {
|
||||
|
||||
Reference in New Issue
Block a user