-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
658 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"cSpell.words": [ | ||
"htmlfilename", | ||
"luxon", | ||
"mantine", | ||
"pdfs", | ||
"porthmadog", | ||
"ukho" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import TidalData from "./data/tides.json"; | ||
import path from "path"; | ||
import { TidesJson_PDFObject } from "./src/types"; | ||
import { CreatePagesArgs } from "gatsby"; | ||
|
||
export const createPages = async function ({ | ||
actions, | ||
graphql, | ||
}: CreatePagesArgs) { | ||
TidalData.pdfs.forEach((pdf: TidesJson_PDFObject) => { | ||
actions.createPage({ | ||
path: "tide-tables/" + pdf.url, | ||
component: path.resolve(`./src/components/templates/TideTablePage.tsx`), | ||
context: { pdf }, | ||
defer: false, | ||
}); | ||
}); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from "react" | ||
import { useSiteMetadata } from "../hooks/use-site-metadata" | ||
|
||
export const SEO = ({ title, description, pathname, children }: { title?: string, description?: string, pathname?: string, children?: React.ReactNode }) => { | ||
const { title: defaultTitle, description: defaultDescription, siteUrl } = useSiteMetadata() | ||
|
||
const seo = { | ||
title: (title ? title + " | " : "") + defaultTitle, | ||
description: description || defaultDescription, | ||
url: `${siteUrl}${pathname || ``}`, | ||
} | ||
|
||
return ( | ||
<> | ||
<title>{seo.title}</title> | ||
<meta charSet="utf-8" /> | ||
<meta name="description" content={seo.description} /> | ||
<meta name="twitter:card" content="summary_large_image" /> | ||
<meta name="twitter:title" content={seo.title} /> | ||
<meta name="twitter:url" content={seo.url} /> | ||
<meta name="twitter:description" content={seo.description} /> | ||
<link rel="icon" type="image/x-icon" href="/favicon.ico" /> | ||
{children} | ||
</> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.inner { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding-top: var(--mantine-spacing-xl); | ||
padding-bottom: var(--mantine-spacing-xl); | ||
|
||
@media (max-width: $mantine-breakpoint-xs) { | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
.links { | ||
@media (max-width: $mantine-breakpoint-xs) { | ||
margin-top: var(--mantine-spacing-md); | ||
} | ||
} | ||
|
||
.link { | ||
text-decoration: none; | ||
color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-0)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Container, Group, Text } from '@mantine/core'; | ||
import * as classes from './Footer.module.css'; | ||
import React from 'react'; | ||
import { Link } from 'gatsby'; | ||
import { useBuildDate } from '../../hooks/use-build-date'; | ||
|
||
export function Footer() { | ||
const buildYear = useBuildDate() | ||
|
||
return ( | ||
<Container size="xl" className={classes.inner}> | ||
<Text>Times are GMT/BST. No warranty is provided for the accuracy of data displayed. Tidal Data is ©Crown Copyright. Reproduced by permission of the Controller of Her Majesty's Stationery Office and the UK Hydrographic Office (www.ukho.gov.uk). No tidal data may be reproduced without the expressed permission of the UKHO licensing department.</Text> | ||
<Text>©2014-{buildYear} James Bithell</Text> | ||
</Container> | ||
); | ||
} |
Oops, something went wrong.