40 lines
1.9 KiB
TypeScript
40 lines
1.9 KiB
TypeScript
import Image from "next/image";
|
|
import logo from "@/public/eritors-favicon-white.png";
|
|
import React, {useContext} from "react";
|
|
import {BookContext, BookContextProps} from "@/context/BookContext";
|
|
import {useTranslations} from "next-intl";
|
|
|
|
export default function ScribeTopBar() {
|
|
const book: BookContextProps = useContext(BookContext);
|
|
const t = useTranslations();
|
|
return (
|
|
<div className="flex items-center justify-between px-6 py-3 bg-primary shadow-lg border-b border-primary-dark">
|
|
<div className="flex items-center space-x-4 group">
|
|
<div className="transition-transform duration-300 group-hover:scale-110">
|
|
<Image src={logo} alt={t("scribeTopBar.logoAlt")} width={24} height={24}/>
|
|
</div>
|
|
<span
|
|
className="font-['ADLaM_Display'] text-xl tracking-wide text-white/95">{t("scribeTopBar.scribe")}</span>
|
|
</div>
|
|
{book.book && (
|
|
<div
|
|
className="flex items-center space-x-3 bg-white/10 backdrop-blur-sm px-4 py-2 rounded-lg border border-white/20">
|
|
<div className="h-8 w-1 bg-white/40 rounded-full"></div>
|
|
<div className="text-center">
|
|
<p className="text-text-primary font-semibold text-base tracking-wide">
|
|
{book.book.title}
|
|
</p>
|
|
{book.book.subTitle && (
|
|
<p className="text-white/70 text-xs italic mt-0.5">
|
|
{book.book.subTitle}
|
|
</p>
|
|
)}
|
|
</div>
|
|
<div className="h-8 w-1 bg-white/40 rounded-full"></div>
|
|
</div>
|
|
)}
|
|
<div className="flex items-center space-x-2 min-w-[120px] justify-end">
|
|
</div>
|
|
</div>
|
|
)
|
|
} |