add quick links
This commit is contained in:
7
public/open-external-link-icon.svg
Normal file
7
public/open-external-link-icon.svg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
|
||||||
|
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools -->
|
||||||
|
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#ffffff">
|
||||||
|
|
||||||
|
<g id="SVGRepo_bgCarrier" stroke-width="0"/>
|
||||||
|
|
After Width: | Height: | Size: 687 B |
@ -1,11 +1,32 @@
|
|||||||
import { type NextPage } from "next/types";
|
import { type NextPage } from "next/types";
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
interface QuickLink {
|
interface QuickLink {
|
||||||
label: string,
|
label: string,
|
||||||
href: string,
|
href: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const links: QuickLink[] = [
|
||||||
|
{
|
||||||
|
label: "University of Iowa",
|
||||||
|
href: "https://uiowa.edu/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Wendell Johnson",
|
||||||
|
href: "https://www.facilities.uiowa.edu/named-building/wendell-johnson-speech-and-hearing-center",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
const QuickLink = ({label, href}: QuickLink) => {
|
||||||
|
return (
|
||||||
|
<a className="hover:underline space-x-2" target="_blank" href={href}>
|
||||||
|
<Image className="inline" alt="external link" width={16} height={16} src="/open-external-link-icon.svg" />
|
||||||
|
<span className="inline">{label}</span>
|
||||||
|
</a>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
interface ContactInfo {
|
interface ContactInfo {
|
||||||
name: string,
|
name: string,
|
||||||
title: string,
|
title: string,
|
||||||
@ -55,9 +76,7 @@ const FooterLabeledSection = ({title, children}: {
|
|||||||
return (
|
return (
|
||||||
<div className="flex flex-col px-8">
|
<div className="flex flex-col px-8">
|
||||||
<h1 className="font-bold text-xl text-neutral-400">{title}</h1>
|
<h1 className="font-bold text-xl text-neutral-400">{title}</h1>
|
||||||
<div className="flex flex-col divide-y divide-neutral-500">
|
{children}
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -83,13 +102,22 @@ const Footer: NextPage = () => {
|
|||||||
{/** Header and tabs */}
|
{/** Header and tabs */}
|
||||||
<div className="flex flex-row text-neutral-200 px-4 divide-x divide-neutral-500">
|
<div className="flex flex-row text-neutral-200 px-4 divide-x divide-neutral-500">
|
||||||
<FooterLabeledSection title="Quick Links">
|
<FooterLabeledSection title="Quick Links">
|
||||||
|
<div className="flex flex-col pt-4 space-y-2">
|
||||||
|
{links.map((quickLink, index) => {
|
||||||
|
return (
|
||||||
|
<QuickLink key={index} {...quickLink}/>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
</FooterLabeledSection>
|
</FooterLabeledSection>
|
||||||
<FooterLabeledSection title="Contact">
|
<FooterLabeledSection title="Contact">
|
||||||
{contacts.map((contactInfo, index) => {
|
<div className="flex flex-col divide-y divide-neutral-500">
|
||||||
return (
|
{contacts.map((contactInfo, index) => {
|
||||||
<ContactInfo key={index} {...contactInfo} />
|
return (
|
||||||
)
|
<ContactInfo key={index} {...contactInfo} />
|
||||||
})}
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
</FooterLabeledSection>
|
</FooterLabeledSection>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user