Skip to content

Commit

Permalink
adding Layout & Nav files for BeaconPlus
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Oct 1, 2024
1 parent 82f4de0 commit 6df88e9
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/components/BeaconPlusNav.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from "react"
import Link from "next/link"
import { SITE_DEFAULTS } from "../hooks/api"

export default function BeaconPlusNav() {
return (
<header className="section Nav__header">
<nav
className="BeaconPlus__container Nav__wrapper"
role="navigation"
aria-label="main navigation"
>
<Link href="/">
<a className="Nav__logo">
Beacon<sup className="Nav__plus">+</sup>
</a>
</Link>

<div className="Nav__links">
{/*
<ActiveLink label="Aggregator" href="/beaconAggregator/" />
*/}
<a href={SITE_DEFAULTS.MASTERROOTLINK} className="navbar-item">
Progenetix
</a>
<a href={SITE_DEFAULTS.MASTERDOCLINK} className="navbar-item">
Help
</a>
</div>
</nav>
</header>
)
}
59 changes: 59 additions & 0 deletions src/components/EntityLayout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import React from "react"
import { ErrorBoundary } from "react-error-boundary"
import Head from "next/head"
import BeaconPlusNav from "./BeaconPlusNav"
import {ErrorFallback} from "./MenuHelpers"
import { SITE_DEFAULTS, THISYEAR } from "../hooks/api"

export function EntityLayout({ title, headline, children }) {
return (
<>
<BeaconPlusNav />
<div className="section">
<div className="BeaconPlus__container">
<Head>
<title>{title || ""}</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
</Head>
<div className="Layout__lead">
{headline && <h1 className="title is-4">{headline}</h1>}
<ErrorBoundary
FallbackComponent={ErrorFallback}
onReset={() => {
// reset the state of your app so the error doesn't happen again
}}
>
{children}
</ErrorBoundary>
</div>
</div>
</div>
<footer className="footer">
<div className="content container has-text-centered">
© 2000 - {THISYEAR} Progenetix Cancer Genomics Information Resource by
the{" "}
<a href={SITE_DEFAULTS.ORGSITELINK}>
Computational Oncogenomics Group
</a>{" "}
at the{" "}
<a href="https://www.mls.uzh.ch/en/research/baudis/">
University of Zurich
</a>{" "}
and the{" "}
<a href="http://sib.swiss/baudis-michael/">
Swiss Institute of Bioinformatics{" "}
<span className="span-red">SIB</span>
</a>{" "}
is licensed under CC BY 4.0
<a rel="license" href="https://creativecommons.org/licenses/by/4.0">
<img className="Layout__cc__icons" src="/img/cc-cc.svg" />
<img className="Layout__cc__icons" src="/img/cc-by.svg" />
</a>
<br />
No responsibility is taken for the correctness of the data presented
nor the results achieved with the Progenetix tools.
</div>
</footer>
</>
)
}

0 comments on commit 6df88e9

Please sign in to comment.