import clsx from "clsx"; import React, { FC } from "react"; import { Breadcrumbs, LinkCrumb } from "../../components/Breadcrumbs"; import Viewport from "../../components/ViewPort"; import styles from './default.module.scss'; export type DefaultPageProps = { className?: string; path?: string; lastUpdated?: string; children?: React.ReactChild; }; export type RelPathProps = { path: string; }; const RelPath : FC = ({path, ...props}) => { const _path = path[path.length - 1] === '/' ? path.substr(0, path.length - 1) : path; const parts = _path.split('/'); const rels = ['']; for(let i = 1; i < parts.length; i++) { rels.push([rels[i - 1], parts[i]].join('/')); } rels[0] = '/'; parts[0] = 'flu0r1ne.net'; return ( {rels.map((relHref, i) => ( {parts[i]} ))} ); } const LastUpdatedDate : FC<{ children: React.ReactNode }> = ({children}) => ( Last Updated: {children} ) const DefaultPage : FC = ({className, lastUpdated, children, path, ...props}) => ( {path !== undefined ? : undefined} {lastUpdated ? {lastUpdated} : undefined} {children} ); export default DefaultPage;