From 08f74bac473b9060459b9f514f566c7b25db5b42 Mon Sep 17 00:00:00 2001 From: Gwen Friedman Date: Wed, 19 Feb 2020 20:41:03 -0500 Subject: [PATCH] added anchors --- package-lock.json | 13 +++++ package.json | 2 + src/App.js | 6 +- src/Components/Home.js | 127 ++++++++++++++++++++++------------------- src/Components/Nav.js | 21 +++---- 5 files changed, 99 insertions(+), 70 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5265705..6c71e46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10341,6 +10341,11 @@ "prop-types": "^15.6.2" } }, + "react-anchor-link-smooth-scroll": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/react-anchor-link-smooth-scroll/-/react-anchor-link-smooth-scroll-1.0.12.tgz", + "integrity": "sha512-aaY+9X0yh8YnC0jBfoTKpsiCLdO/Y6pCltww+VB+NnTBPDOvnIdnp1AlazajsDitc1j+cVSQ+yNtaVeTIMQbxw==" + }, "react-app-polyfill": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-1.0.6.tgz", @@ -10618,6 +10623,14 @@ "tiny-warning": "^1.0.0" } }, + "react-router-hash-link": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/react-router-hash-link/-/react-router-hash-link-1.2.2.tgz", + "integrity": "sha512-LBthLVHdqPeKDVt3+cFRhy15Z7veikOvdKRZRfyBR2vjqIE7rxn+tKLjb6DOmLm6JpoQVemVDnxQ35RVnEHdQA==", + "requires": { + "prop-types": "^15.6.0" + } + }, "react-scripts": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.3.1.tgz", diff --git a/package.json b/package.json index 09587fc..33039bf 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,11 @@ "@testing-library/user-event": "^7.2.1", "bootstrap": "^4.4.1", "react": "^16.12.0", + "react-anchor-link-smooth-scroll": "^1.0.12", "react-bootstrap": "^1.0.0-beta.16", "react-dom": "^16.12.0", "react-router-dom": "^5.1.2", + "react-router-hash-link": "^1.2.2", "react-scripts": "3.3.1" }, "scripts": { diff --git a/src/App.js b/src/App.js index 714229d..44dd66a 100644 --- a/src/App.js +++ b/src/App.js @@ -10,12 +10,16 @@ import {BrowserRouter as Router, Route} from "react-router-dom"; function App() { return (
-
- {/*replace header name here*/} -

Mechanical Projects

+
+ {/*replace header name here*/} +

Mechanical Projects

- {/*copy and paste this to add a new section, update image, text, and link*/} -
- Emissions simulation -
-
- {/*Replace Name here*/} -

Emissions Simulation

+ {/*copy and paste this to add a new section, update image, text, and link*/} +
+ Emissions simulation +
+
+ {/*Replace Name here*/} +

Emissions Simulation

- {/*Replace Description here*/} -

- A simulation that takes physical input of users driving toy cars - along a model roadway and changes the imagery displayed on the - roadway’s backdrop in real time. -

+ {/*Replace Description here*/} +

+ A simulation that takes physical input of users driving toy cars + along a model roadway and changes the imagery displayed on the + roadway’s backdrop in real time. +

+
-
-
- Ballista -
-
- {/*Replace Name here*/} -

Ballista

- - {/*Replace Description here*/} -

- A physics final project with the objective of transferring torsional - energy into ballistic kinetic energy. -

+
+ Ballista +
+
+ {/*Replace Name here*/} +

Ballista

+ + {/*Replace Description here*/} +

+ A physics final project with the objective of transferring torsional + energy into ballistic kinetic energy. +

+
-
- +
@@ -89,23 +90,27 @@ function Home() {
- {/*replace header name here*/} -

Electrical Projects

+
+ {/*replace header name here*/} +

Electrical Projects

- {/*copy and paste this to add a new section, update image, text, and link*/} -
- Hashbrowwn balloon -
-
- {/*Replace Name here*/} -

HASHBROWWN BALLOON

+ {/*copy and paste this to add a new section, update image, text, and link*/} +
+ Hashbrowwn balloon +
+
+ {/*Replace Name here*/} +

HASHBROWWN BALLOON

- {/*Replace Description here*/} -

High-Altitude Solar-Heated Balloon Research Observatory With Wind Navigation

+ {/*Replace Description here*/} +

High-Altitude Solar-Heated Balloon Research + Observatory + With Wind Navigation

+
-
+
@@ -113,25 +118,29 @@ function Home() {
- {/*replace header name here*/} -

Materials Projects

+
+ {/*replace header name here*/} +

Materials Projects

- {/*copy and paste this to add a new section, update image, text, and link*/} -
- Hashbrowwn balloon -
-
- {/*Replace Name here*/} -

HASHBROWWN BALLOON

+ {/*copy and paste this to add a new section, update image, text, and link*/} +
+ Hashbrowwn balloon +
+
+ {/*Replace Name here*/} +

HASHBROWWN BALLOON

- {/*Replace Description here*/} -

High-Altitude Solar-Heated Balloon Research Observatory With Wind Navigation

+ {/*Replace Description here*/} +

High-Altitude Solar-Heated Balloon Research + Observatory + With Wind Navigation

+
-
- +
+ ); } diff --git a/src/Components/Nav.js b/src/Components/Nav.js index ff451ba..0e87eba 100644 --- a/src/Components/Nav.js +++ b/src/Components/Nav.js @@ -1,16 +1,14 @@ import React from 'react'; import './Nav.css'; -import {Link} from "react-router-dom"; +import { HashLink as Link } from 'react-router-hash-link'; function Nav() { return (