add people components
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
import { graphql } from "@/gql";
|
||||
import {EventFragment} from "@/gql/graphql"
|
||||
import { EventFragment } from "@/gql/graphql";
|
||||
import { getClient } from "@/app/client";
|
||||
import { EventList } from "@/components/events/EventList";
|
||||
import { Body } from "@/components/general/Body";
|
||||
import Image from "next/image";
|
||||
import { PersonList } from "@/components/people/PersonList";
|
||||
|
||||
export default async function Home() {
|
||||
const homeQuery = graphql(`
|
||||
@ -14,13 +15,21 @@ export default async function Home() {
|
||||
}
|
||||
`);
|
||||
const { data, error } = await getClient().query(homeQuery, {});
|
||||
const events = (data?.events ?? []) as EventFragment[]
|
||||
const events = (data?.events ?? []) as EventFragment[];
|
||||
|
||||
return (
|
||||
<main className="site-main" id="main">
|
||||
<div>
|
||||
<EventList events={events} />
|
||||
<blockquote>«Hvor Glæden hersker, er alltid Fest»</blockquote>
|
||||
<div>
|
||||
<h2>Styret</h2>
|
||||
<PersonList />
|
||||
</div>
|
||||
<div>
|
||||
<h2>Administrasjonen</h2>
|
||||
<PersonList />
|
||||
</div>
|
||||
<p className="lead">
|
||||
Sed sodales nunc quis sapien malesuada, a faucibus turpis blandit.
|
||||
Suspendisse potenti. Sed auctor enim et augue dapibus, vitae laoreet
|
||||
|
27
web/src/components/people/PersonItem.tsx
Normal file
27
web/src/components/people/PersonItem.tsx
Normal file
@ -0,0 +1,27 @@
|
||||
import styles from "./personItem.module.scss";
|
||||
|
||||
export const PersonItem = () => {
|
||||
return (
|
||||
<li className={styles.personItem}>
|
||||
<div className={styles.image}></div>
|
||||
<div className={styles.text}>
|
||||
<h1 className={styles.name}>Ellisiv Sunde Myrva</h1>
|
||||
<p className={styles.role}>Kommunikasjonssjef</p>
|
||||
<ul className={styles.contact}>
|
||||
<li>
|
||||
<span className={styles.icon}>✉ </span>
|
||||
<a href="mailto:ellisiv@neuf.no" target="_blank">
|
||||
ellisiv@neuf.no
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<span className={styles.icon}>☎ </span>
|
||||
<a href="tel:94 47 34 04" target="_blank">
|
||||
94 47 34 04
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
};
|
12
web/src/components/people/PersonList.tsx
Normal file
12
web/src/components/people/PersonList.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import { PersonItem } from "./PersonItem";
|
||||
import styles from "./personList.module.scss";
|
||||
|
||||
export const PersonList = () => {
|
||||
return (
|
||||
<ul className={styles.personList}>
|
||||
<PersonItem />
|
||||
<PersonItem />
|
||||
<PersonItem />
|
||||
</ul>
|
||||
);
|
||||
};
|
43
web/src/components/people/personItem.module.scss
Normal file
43
web/src/components/people/personItem.module.scss
Normal file
@ -0,0 +1,43 @@
|
||||
.personItem {
|
||||
position: relative;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.image {
|
||||
flex: none;
|
||||
width: 7rem;
|
||||
height: 7rem;
|
||||
background: var(--color-neufPink);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.text {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.name,
|
||||
.role {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.role {
|
||||
font-family: var(--font-serif);
|
||||
}
|
||||
|
||||
.contact {
|
||||
list-style: none;
|
||||
margin: .6rem 0;
|
||||
font-size: var(--font-size-caption);
|
||||
font-weight: 500;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
text-align: center;
|
||||
margin-right: .4rem;
|
||||
}
|
19
web/src/components/people/personList.module.scss
Normal file
19
web/src/components/people/personList.module.scss
Normal file
@ -0,0 +1,19 @@
|
||||
.personList {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
column-gap: var(--spacing-gap-column);
|
||||
row-gap: var(--spacing-gap-row);
|
||||
padding-bottom: var(--spacing-section-bottom);
|
||||
}
|
||||
|
||||
@media (min-width: 700px) {
|
||||
.personList {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.personList {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
@ -6,6 +6,7 @@
|
||||
|
||||
html {
|
||||
min-height: 100%;
|
||||
font-size: calc(1rem + 8 * (100vw - 320px) / 1920);
|
||||
}
|
||||
|
||||
html,
|
||||
|
Reference in New Issue
Block a user