Content Migration from websites repo

This commit is contained in:
Neshura 2022-12-03 21:02:13 +01:00
parent c1d93528d7
commit ba88a7adc5
No known key found for this signature in database
GPG key ID: ACDF5B6EBECF6B0A
22 changed files with 8767 additions and 1 deletions

11
components/footer.tsx Normal file
View file

@ -0,0 +1,11 @@
import styles from '/styles/Home.module.css'
const Footer = () => {
return (
<footer className={styles.footer}>
Built using Next.js
</footer>
);
}
export default Footer;

37
components/layout.tsx Normal file
View file

@ -0,0 +1,37 @@
import Footer from './footer'
import Navbar from './navbar'
import styles from '/styles/Home.module.css'
import Script from 'next/script'
const Layout = ({ children }: { children: React.ReactNode }) => {
return (
<div className={styles.page}>
<Script id="matomo_analytics">
{`
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "www.neshura-server.net"]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//temp.neshura-server.net/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '2']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
`}
</Script>
<Navbar />
<main className={styles.main}>
{children}
</main>
<Footer />
</div>
);
}
export default Layout;

30
components/navbar.tsx Normal file
View file

@ -0,0 +1,30 @@
import styles from '/styles/Home.module.css'
import Link from 'next/link'
import { useRouter } from 'next/router'
const navLinks = [
{ name: "Home", href: "/" },
{ name: "About", href: "/about" },
{ name: "Games", href: "/games" },
{ name: "Services", href: "/services" }
]
const Navbar = () => {
const router = useRouter();
return (
<nav className={styles.navbar}>
{navLinks.map((item, index) => (
<Link key={item.name} href={item.href}>
<a className={router.pathname == item.href ? styles.navelem_active : styles.navelem}>{item.name}</a>
</Link>
))}
<Link key="Mastodon_Verify" href="https://mastodon.neshura-server.net/@neshura">
<a className={styles.navelem} rel="me" href="https://mastodon.neshura-server.net/@neshura">Mastodon</a>
</Link>
</nav>
);
}
export default Navbar;