mirror of
https://github.com/UiO-Gaming/uiogaming.no.git
synced 2026-11-07 06:34:26 +01:00
I should've divided this into multiple commits but oh well. This is just initial as there are still parts that needs to be done. Particularly user generated content needs to be translated somehow. See issue #45 for more info
39 lines
893 B
JavaScript
39 lines
893 B
JavaScript
import * as React from "react"
|
|
import * as styles from "./header.module.css"
|
|
|
|
import { graphql, useStaticQuery } from "gatsby"
|
|
import { GatsbyImage } from "gatsby-plugin-image"
|
|
import { useTranslation } from "gatsby-plugin-react-i18next"
|
|
|
|
const Header = () => {
|
|
const data = useStaticQuery(graphql`
|
|
query {
|
|
placeholder: file(relativePath: { eq: "logo.jpg" }) {
|
|
childImageSharp {
|
|
gatsbyImageData(
|
|
placeholder: BLURRED
|
|
transformOptions: { fit: CONTAIN }
|
|
width: 256
|
|
)
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<header id="hjem" className={styles.container}>
|
|
<GatsbyImage
|
|
image={data.placeholder.childImageSharp.gatsbyImageData}
|
|
alt="UiO Gaming logo"
|
|
/>
|
|
|
|
<h1>UiO Gaming</h1>
|
|
<p>{t("header.text")}</p>
|
|
</header>
|
|
)
|
|
}
|
|
|
|
export default Header
|