Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
final commit for day
  • Loading branch information
Robin Gould committed Oct 16, 2023
1 parent 870a65c commit 96e4602
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 28 deletions.
7 changes: 4 additions & 3 deletions app/components/information.tsx
@@ -1,15 +1,16 @@
import '../globals.css';
import {Parallax, Background} from 'react-parallax';
import { Animate, initTE } from "tw-elements";
initTE({ Animate });
//import { Animate, initTE } from "tw-elements";
//initTE({ Animate });
import Map from './map'
import FallenScooters from '../img/FallenScooters.svg';
import ScooterHub from '../img/ScooterHub.svg';
import KidOnScooter from '../img/KidOnScooter.svg';
import { url } from 'inspector';
//import { url } from 'inspector';

const information = () => {
return (

<>
<div className='grid grid-cols-10 gaps-10 shadow-xl bck'>
<img src="uconn.png" className="h-auto w-full col-span-1 relative -top-5 left-1 drop-shadow-md filter grayscale p-7" alt="uconn logo"></img>
Expand Down
4 changes: 2 additions & 2 deletions app/components/map.tsx
Expand Up @@ -20,7 +20,7 @@ const map = () => {
center: [lng, lat],
zoom: zoom
})
map.current.scrollZoom.disable();
//map.current.scrollZoom.disable();
map.current.on('load', () => {
map.current!.addSource('map_data', {
type: 'geojson',
Expand Down Expand Up @@ -62,7 +62,7 @@ const map = () => {
});
return (
<>
<div className="grid grid-cols-6 gap-3 absolute w-screen h-full ">
<div className="grid grid-cols-6 gap-3 absolute w-screen h-full">
<div ref={ mapContainer } className="map-container col-span-4 relative w-full h-screen" />
<div className="grid grid-rows-6 col-span-2 relative w-full h-full">
<Slider />
Expand Down
1 change: 1 addition & 0 deletions app/globals.css
Expand Up @@ -84,6 +84,7 @@ html, body {
background-color: rgba(255, 255, 255, 0.6);
box-shadow: 0px 5px 15px 2px rgba(255,255,255, 0.3);
}

.img-txt{
position: relative;
justify-content: left;
Expand Down
46 changes: 25 additions & 21 deletions app/page.tsx
@@ -1,34 +1,38 @@
"use client"
import React from "react";
import RootLayout from "./layout";
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import map from "./components/map";
import information from "./components/information";
//import RootLayout from "./layout";
//import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import Map from "./components/map";
import Information from "./components/information";
import Lenis from '@studio-freight/lenis'

const lenis = new Lenis()

lenis.on('scroll', (e) => {
console.log(e)
})

function raf(time) {
lenis.raf(time)
if (typeof window !== "undefined") {
const lenis = new Lenis()


lenis.on('scroll', (e) => {
console.log(e)
})

const raf = function (time) {
lenis.raf(time)
requestAnimationFrame(raf)
}
requestAnimationFrame(raf)
}
}

requestAnimationFrame(raf)
function App() {
return(
<>
<Router>
<div>

/*<Router>
<Routes>
<Route path="/map" Component={map} />
<Route path="/" Component={information} />
<Route path="/map" Component={map} />
</Routes>
</div>
</Router>
</Router> */
function App() {
return(
<>
<Information />
</>
);
}
Expand Down
161 changes: 159 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -13,6 +13,7 @@
"@studio-freight/lenis": "^1.0.27",
"@types/mapbox-gl": "^2.7.15",
"@types/react-slider": "^1.3.2",
"@vercel/postgres": "^0.5.0",
"autoprefixer": "10.4.16",
"mapbox-gl": "^2.15.0",
"next": "^13.5.4",
Expand Down
Binary file removed public/escooter.png
Binary file not shown.

0 comments on commit 96e4602

Please sign in to comment.