add new page links and remove unused templates, add icon for external link
This commit is contained in:
@ -1,6 +1,10 @@
|
||||
import styles from "./icon.module.scss";
|
||||
|
||||
export default function Icon({ type }: { type?: "doc" | "arrow" }) {
|
||||
export default function Icon({
|
||||
type,
|
||||
}: {
|
||||
type?: "doc" | "arrow" | "externalLink";
|
||||
}) {
|
||||
return (
|
||||
<div className={styles.icon}>
|
||||
{type === "doc" && (
|
||||
@ -12,6 +16,7 @@ export default function Icon({ type }: { type?: "doc" | "arrow" }) {
|
||||
</svg>
|
||||
)}
|
||||
{type === "arrow" && <div>→</div>}
|
||||
{type === "externalLink" && <div>↗</div>}
|
||||
{!type && (
|
||||
<div>
|
||||
<svg
|
||||
|
@ -3,6 +3,7 @@
|
||||
height: var(--size-icon);
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
line-height: 1;
|
||||
|
||||
svg {
|
||||
display: block;
|
||||
|
@ -4,6 +4,7 @@ import { usePathname } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import styles from "./header.module.scss";
|
||||
import { Logo, LogoIcon } from "@/components/general/Logo";
|
||||
import Icon from "../general/Icon";
|
||||
|
||||
export const Header = () => {
|
||||
const [showMenu, setShowMenu] = useState(false);
|
||||
@ -129,21 +130,10 @@ export const Header = () => {
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/" data-active={pathname === "/frivillig"}>
|
||||
<Link href="/frivillig" data-active={pathname === "/frivillig"}>
|
||||
Bli frivillig
|
||||
</Link>
|
||||
</li>
|
||||
<li className={styles.search}>
|
||||
<label>
|
||||
<p>Søk</p>
|
||||
<input type="text" />
|
||||
</label>
|
||||
</li>
|
||||
<li className={styles.galtinn}>
|
||||
<a href="https://galtinn.neuf.no/" target="_blank">
|
||||
Mitt medlemskap →
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{/* TODO: skal trolig ikke være så synlig ved lansering */}
|
||||
<Link href="/lokaler">Lokaler*</Link>
|
||||
@ -152,6 +142,22 @@ export const Header = () => {
|
||||
{/* TODO: skal trolig ikke være så synlig ved lansering */}
|
||||
<Link href="/foreninger">Foreninger*</Link>
|
||||
</li>
|
||||
<li className={styles.search}>
|
||||
<label>
|
||||
<p>Søk</p>
|
||||
<input type="text" />
|
||||
</label>
|
||||
</li>
|
||||
<li className={styles.galtinn}>
|
||||
<a
|
||||
href="https://galtinn.neuf.no/"
|
||||
target="_blank"
|
||||
className="button tertiary"
|
||||
>
|
||||
<span>Mitt medlemskap</span>
|
||||
<Icon type="externalLink" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
@ -100,7 +100,7 @@
|
||||
|
||||
.search,
|
||||
.galtinn {
|
||||
margin-top: var(--spacing-l);
|
||||
margin-top: var(--spacing-m);
|
||||
}
|
||||
|
||||
.siteMenu[data-show=true] {
|
||||
|
Reference in New Issue
Block a user