Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add titles to all pages #475

Merged
merged 1 commit into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ TopBarProgress.config({
},
})

export const handle = {
breadcrumb: 'GCN',
}

export const meta: MetaFunction = () => {
return {
charset: 'utf-8',
viewport: 'width=device-width,initial-scale=1',
title: 'GCN - General Coordinates Network',
}
}

Expand Down Expand Up @@ -97,16 +100,22 @@ export function useHostname() {
}

function Document({ children }: { children?: React.ReactNode }) {
const [{ data }] = useMatches()
const matches = useMatches()
const [{ data }] = matches
const { email } = data as Awaited<ReturnType<typeof loader>>
const transition = useTransition()
const showProgress = useSpinDelay(transition.state !== 'idle')
const breadcrumbs = matches
.map(({ handle }) => handle?.breadcrumb)
.filter(Boolean)
const title = breadcrumbs.join(' - ')

return (
<html lang="en-US">
<head>
<Meta />
<Links />
<title>{title}</title>
</head>
<body>
<a className="usa-skipnav" href="#main-content">
Expand Down
2 changes: 2 additions & 0 deletions app/routes/$.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { ButtonGroup } from '@trussworks/react-uswds'
import type { LoaderFunction } from '@remix-run/node'
import { Link } from '@remix-run/react'

export const handle = { breadcrumb: 'Page Not Found' }

export const loader: LoaderFunction = function () {
throw new Response(null, { status: 404 })
}
Expand Down
5 changes: 1 addition & 4 deletions app/routes/circulars.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
meta:
title: GCN - Circulars
---
export const handle = { breadcrumb: 'Circulars' }

import {
SummaryBox,
Expand Down
4 changes: 4 additions & 0 deletions app/routes/docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
import { SideNav } from '@trussworks/react-uswds'
import { NavLink, Outlet } from '@remix-run/react'

export const handle = {
breadcrumb: 'Documentation',
}

export default function Docs() {
return (
<div className="grid-row grid-gap">
Expand Down
5 changes: 1 addition & 4 deletions app/routes/docs/client.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
meta:
title: GCN - Client Configuration
---
export const handle = { breadcrumb: 'Client Configuration' }

import { ClientSampleCode } from '~/components/ClientSampleCode'

Expand Down
5 changes: 1 addition & 4 deletions app/routes/docs/contributing.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
meta:
title: GCN - Contributing
---
export const handle = { breadcrumb: 'Contributing' }

import {
ProcessList,
Expand Down
5 changes: 1 addition & 4 deletions app/routes/docs/faq.md → app/routes/docs/faq.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
meta:
title: GCN - Frequently Asked Questions
---
export const handle = { breadcrumb: 'Frequently Asked Questions' }

# Frequently Asked Questions

Expand Down
4 changes: 2 additions & 2 deletions app/routes/docs/index.md → app/routes/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
meta:
title: GCN - About
handle:
breadcrumb: About GCN
---

# What is GCN?
Expand Down
4 changes: 2 additions & 2 deletions app/routes/docs/roadmap.md → app/routes/docs/roadmap.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
meta:
title: GCN - Road Map
handle:
breadcrumb: Road Map
---

# Road Map
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
meta:
title: GCN - Circulars Style Guide
---
export const handle = { breadcrumb: 'Circulars Style Guide' }

# Circulars Style Guide

Expand Down
5 changes: 1 addition & 4 deletions app/routes/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
meta:
title: GCN - General Coordinates Network
---
export const handle = { breadcrumb: 'General Coordinates Network' }

import { Link } from '@remix-run/react'
import {
Expand Down
2 changes: 2 additions & 0 deletions app/routes/missions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import { SideNav } from '@trussworks/react-uswds'
import { NavLink, Outlet } from '@remix-run/react'

export const handle = { breadcrumb: 'Missions' }

export default function Missions() {
return (
<div className="grid-row grid-gap">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
meta:
title: GCN - AGILE
---
export const handle = { breadcrumb: 'AGILE' }

# Astrorivelatore Gamma a Immagini Leggero (AGILE)

<img
<img
src="/_static/img/agile-logo.png"
width="200"
align="right"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
meta:
title: GCN - CALET
---
export const handle = { breadcrumb: 'CALET' }

# CALorimetric Electron Telescope (CALET)

<img
<img
src="/_static/img/calet-logo.png"
alt="CALET logo"
align="right"
Expand Down
47 changes: 37 additions & 10 deletions app/routes/missions/fermi.md → app/routes/missions/fermi.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
meta:
title: GCN - Fermi
---
export const handle = { breadcrumb: 'Fermi' }

# Fermi Gamma-ray Space Telescope

<img
<img
src="/_static/img/Fermi_Gamma-ray_Space_Telescope_logo.svg"
align="right"
alt="Fermi Gamma-ray Space Telescope logo"
Expand Down Expand Up @@ -76,13 +73,43 @@ https://fermi.gsfc.nasa.gov/ssc/data/

<table className="usa-table">
<thead>
<tr><th>Instrument</th><th>Type</th><th>Rates</th></tr>
<tr>
<th>Instrument</th>
<th>Type</th>
<th>Rates</th>
</tr>
</thead>
<tbody>
<tr><td rowSpan="5"><strong>GBM</strong></td><td>Short gamma-ray burst</td><td>35–40</td></tr>
<tr><td>Long gamma-ray burst</td><td>200</td></tr><tr><td>Soft gamma-ray repeater flares</td><td>35–40</td></tr>
<tr><td>Terrestrial gamma-ray flashes</td><td>80–90</td></tr>
<tr><td>Solar flares</td><td>90–95</td></tr><tr><td><strong>LAT</strong></td><td>Gamma-ray burst</td><td>15–20</td></tr>
<tr>
<td rowSpan="5">
<strong>GBM</strong>
</td>
<td>Short gamma-ray burst</td>
<td>35–40</td>
</tr>
<tr>
<td>Long gamma-ray burst</td>
<td>200</td>
</tr>
<tr>
<td>Soft gamma-ray repeater flares</td>
<td>35–40</td>
</tr>
<tr>
<td>Terrestrial gamma-ray flashes</td>
<td>80–90</td>
</tr>
<tr>
<td>Solar flares</td>
<td>90–95</td>
</tr>
<tr>
<td>
<strong>LAT</strong>
</td>
<td>Gamma-ray burst</td>
<td>15–20</td>
</tr>
</tbody>
</table>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
meta:
title: GCN - GECAM
---
export const handle = { breadcrumb: 'GECAM' }

# Gravitational Wave High-energy Electromagnetic Counterpart All-sky Monitor (GECAM)

<img
<img
src="/_static/img/gecam.jpg"
align="right"
alt="GECAM logo"
Expand Down
7 changes: 2 additions & 5 deletions app/routes/missions/hawc.md → app/routes/missions/hawc.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
meta:
title: GCN - HAWC
---
export const handle = { breadcrumb: 'HAWC' }

# High Altitude Water Cherenkov Gamma-Ray Observatory (HAWC)

<img
<img
src="/_static/img/hawc-logo.png"
align="right"
alt="HAWC logo"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
---
meta:
title: GCN - IceCube
---
export const handle = { breadcrumb: 'IceCube' }

# IceCube

<img
src="/_static/img/icecube-logo.png"
alt="IceCube logo"
/>
<img src="/_static/img/icecube-logo.png" alt="IceCube logo" />

**Construction Completion Date:** December 17, 2010

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
meta:
title: GCN - Missions, Instruments, and Facilities
---
export const handle = { breadcrumb: 'Missions' }

# Missions, Instruments, and Facilities

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
meta:
title: GCN - INTEGRAL
---
export const handle = { breadcrumb: 'INTEGRAL' }

# INTErnational Gamma-Ray Astrophysics Laboratory (INTEGRAL)

<img
<img
src="/_static/img/integral-logo.jpg"
width="200"
align="right"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
meta:
title: GCN - Konus-Wind
---
export const handle = { breadcrumb: 'Konus-Wind' }

# Konus-Wind

Expand Down
23 changes: 6 additions & 17 deletions app/routes/missions/lvk.md → app/routes/missions/lvk.mdx
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
---
meta:
title: GCN - LIGO/Virgo/KAGRA
---
export const handle = { breadcrumb: 'LIGO/Virgo/KAGRA' }

# Gravitational Wave Network

<div
align="right"
className="grid-col-6 mobile-lg:grid-col-4 tablet:grid-col-2 desktop:grid-col-3">
<img
src="/_static/img/lsc-logo.png"
alt="LIGO logo"
/>
<img
src="/_static/img/virgo-logo.png"
alt="Virgo logo"
/>
<img
src="/_static/img/kagra-logo.png"
alt="KAGRA logo"
/>
className="grid-col-6 mobile-lg:grid-col-4 tablet:grid-col-2 desktop:grid-col-3"
>
<img src="/_static/img/lsc-logo.png" alt="LIGO logo" />
<img src="/_static/img/virgo-logo.png" alt="Virgo logo" />
<img src="/_static/img/kagra-logo.png" alt="KAGRA logo" />
</div>

**Planned Lifetime:** 2028+
Expand Down
7 changes: 2 additions & 5 deletions app/routes/missions/maxi.md → app/routes/missions/maxi.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
meta:
title: GCN - MAXI
---
export const handle = { breadcrumb: 'MAXI' }

# Monitor of All-sky X-ray Image (MAXI)

<img
<img
src="/_static/img/maxi-logo.png"
width="200"
align="right"
Expand Down
5 changes: 1 addition & 4 deletions app/routes/missions/moa.md → app/routes/missions/moa.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
meta:
title: GCN - MOA
---
export const handle = { breadcrumb: 'MOA' }

# MOA Gravitational Lensing Event

Expand Down
7 changes: 2 additions & 5 deletions app/routes/missions/sksn.md → app/routes/missions/sksn.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
meta:
title: GCN - Super-Kamiokande
---
export const handle = { breadcrumb: 'Super-Kamiokande' }

# Super-Kamioka Neutrino Detection Experiment (Super-Kamiokande)

<img
<img
src="/_static/img/sk-logo.png"
align="right"
alt="Super-Kamiokande logo"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
meta:
title: GCN - SNEWS
---
export const handle = { breadcrumb: 'SNEWS' }

# SuperNova Early Warning System (SNEWS)

<img
<img
src="/_static/img/snews-logo.jpg"
width="200"
align="right"
Expand Down
Loading