add bottom nav
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
b411055d88
commit
e7131529e3
|
@ -1,15 +1,45 @@
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: space-between;
|
flex-flow: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
/* or inline-flex */
|
/* or inline-flex */
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {}
|
.item {
|
||||||
|
display: inline-block;
|
||||||
.anglePath {
|
color: var(--primary-text);
|
||||||
stroke: var(--primary-accent)
|
font-size: calc(28rem / 16);
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left.arrow {
|
.item:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
transform: scaleX(0);
|
||||||
|
height: 2px;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: var(--primary-accent);
|
||||||
|
cursor: pointer;
|
||||||
|
transform-origin: bottom right;
|
||||||
|
transition: transform 0.25s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:hover:after {
|
||||||
|
transform: scaleX(1);
|
||||||
|
transform-origin: bottom left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.linePath {
|
||||||
|
stroke: var(--primary-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrowPath {
|
||||||
|
fill: var(--primary-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.left {
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
|
@ -1,32 +1,61 @@
|
||||||
|
import Link from "next/link";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import styles from "./BottomNav.module.css";
|
import styles from "./BottomNav.module.css";
|
||||||
export function BottomNav() {
|
|
||||||
|
interface PageLinks {
|
||||||
|
leftPage: string;
|
||||||
|
rightPage: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function BottomNav(props: PageLinks) {
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<Arrow pointLeft={true}></Arrow>
|
<Arrow isPointRight={true}></Arrow>
|
||||||
<p className={styles.item}>View Demographics</p>
|
<Link href={props.leftPage}>
|
||||||
<p className={styles.item}>View Co-ops</p>
|
<a className={styles.item}>View Demographics</a>
|
||||||
<Arrow pointLeft={false}></Arrow>
|
</Link>
|
||||||
|
<Link href={props.leftPage}>
|
||||||
|
<a className={styles.item}>View Co-ops</a>
|
||||||
|
</Link>
|
||||||
|
<Arrow isPointRight={false}></Arrow>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ArrowProps {
|
interface ArrowProps {
|
||||||
pointLeft: boolean;
|
isPointRight: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Arrow({ pointLeft }: ArrowProps) {
|
function Arrow({ isPointRight }: ArrowProps) {
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
viewBox="0 0 50 50"
|
width="300px"
|
||||||
className={pointLeft ? `${styles.left} ${styles.arrow}` : styles.arrow}
|
height="150px"
|
||||||
|
className={isPointRight ? styles.right : styles.left}
|
||||||
>
|
>
|
||||||
<path
|
<defs>
|
||||||
d="M100,2 L2,2 L2,100"
|
<marker
|
||||||
fill="none"
|
id="arrow"
|
||||||
strokeWidth="10"
|
markerWidth="10"
|
||||||
className={styles.anglePath}
|
markerHeight="10"
|
||||||
|
refX="5"
|
||||||
|
refY="3"
|
||||||
|
orient="auto"
|
||||||
|
markerUnits="strokeWidth"
|
||||||
|
>
|
||||||
|
<path d="M0,0 L0,6 L9,3 z" className={styles.arrowPath} />
|
||||||
|
</marker>
|
||||||
|
</defs>
|
||||||
|
|
||||||
|
<line
|
||||||
|
x1="295"
|
||||||
|
y1="75"
|
||||||
|
x2="95"
|
||||||
|
y2="75"
|
||||||
|
strokeWidth="3"
|
||||||
|
markerEnd="url(#arrow)"
|
||||||
|
className={styles.linePath}
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
|
|
|
@ -135,7 +135,7 @@ export default function Home() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2></h2>
|
<h2></h2>
|
||||||
<BottomNav></BottomNav>
|
<BottomNav leftPage="/" rightPage="/"></BottomNav>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue