Skip to content

Commit

Permalink
Merge pull request #178 from agiledev-students-fall2023/user_story_#80
Browse files Browse the repository at this point in the history
bg change
  • Loading branch information
lunnnnnn authored Dec 6, 2023
2 parents f1c26cf + a09321e commit 6d8c4b5
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 13 deletions.
Binary file added front-end/public/field.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added front-end/public/river.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion front-end/src/components/common/navBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const NavBar = ({children, relative}) => {
return (
<>
<div className="h-[calc(3vh+2rem)]">
<nav className={`${relative?"relative":"fixed"} flex pt-[2vh] pb-[1vh] px-[10%] h-[calc(3vh+2rem)] w-full
<nav className={`${relative?"relative":"fixed"} my-2 flex pt-[2vh] pb-[1vh] px-[10%] h-[calc(3vh+2rem)] w-full
bg-beige1 duration-700 ${navHidden} z-20`}>
<div className="flex flex-row justify-between w-full max-w-[30rem] mx-auto">
{children}
Expand Down
11 changes: 5 additions & 6 deletions front-end/src/components/form/formBtn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ const FormBtn = (props) => {
return (
<div className="w-full py-2">
<button className="rounded-lg py-2 w-full
border-solid border-0 border-navyBlue bg-transparent text-navyBlue
hover:cursor-pointer hover:bg-navyBlue hover:text-beige1
active:cursor-pointer active:bg-transparent active:text-navyBlue"
border-solid border-2 border-navyBlue bg-navyBlue text-beige1
hover:cursor-pointer
active:cursor-pointer active:bg-white active:text-navyBlue"
onClick={props?.handleClick}>
{props?.value ?? "Submit"}
</button>
Expand All @@ -25,9 +25,8 @@ const FormBtns = (props) => {
return (
<div className="w-full py-2" key={i}>
<button className="rounded-lg py-2 w-full
border-solid border-0 border-navyBlue bg-transparent text-navyBlue
hover:cursor-pointer hover:bg-navyBlue hover:text-beige1
active:cursor-pointer active:bg-transparent active:text-navyBlue"
border-solid border-2 border-navyBlue bg-white text-navyBlue
hover:cursor-pointer active:cursor-pointer"
onClick={props?.handleClick}>
{button?.value ?? "Submit"}
</button>
Expand Down
16 changes: 16 additions & 0 deletions front-end/src/components/map/lookupBtn.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const LookupBtn = (props) => {
//attribute: value, handleClick
return (
<div className="w-full py-2">
<button className="rounded-lg py-2 w-full
border-solid border-0 border-navyBlue bg-transparent text-navyBlue
hover:cursor-pointer hover:bg-navyBlue hover:text-beige1
active:cursor-pointer active:bg-transparent active:text-navyBlue"
onClick={props?.handleClick}>
{props?.value ?? "Submit"}
</button>
</div>
)
}

export default LookupBtn
19 changes: 19 additions & 0 deletions front-end/src/pages/Authenticate/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,26 @@ const Login = () => {


return(
//<div className='bg-monet-login-pattern bg-cover w-screen h-screen bg-no-repeat'>
<>
<style>
{`
body::before {
content: '';
position: fixed; /* Cover the entire viewport */
top: 0;
right: 0;
bottom: 0;
left: 0;
background-image: url('/field.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
filter: blur(2px); /* Apply the blur effect */
z-index: -1; /* Ensure it's behind the content */
}
`}
</style>
<AuthHeader header="Login" message={message}/>
<form ref={formRef} onSubmit = {handleClick}>
<FormInputs fields={fields} />
Expand Down
18 changes: 18 additions & 0 deletions front-end/src/pages/Authenticate/Register.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@ const Register = () => {

return (
<>
<style>
{`
body::before {
content: '';
position: fixed; /* Cover the entire viewport */
top: 0;
right: 0;
bottom: 0;
left: 0;
background-image: url('/river.jpeg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
filter: blur(2px); /* Apply the blur effect */
z-index: -1; /* Ensure it's behind the content */
}
`}
</style>
<AuthHeader header="Register" message={message} />
<form>
<FormInputs fields={fields} />
Expand Down
12 changes: 7 additions & 5 deletions front-end/src/pages/MainMap/MainMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@ import { useState, useRef } from 'react'
import { MapContainer, TileLayer, Marker, Popup, useMapEvents, GeoJSON } from 'react-leaflet'
import { Icon } from 'leaflet';
import { useOutletContext } from "react-router-dom"
import FormBtn from '../../components/form/formBtn';

import LookupBtn from '../../components/map/lookupBtn';
import InfoCard from '../../components/map/InfoCard';
const MainMap = () => {
const mapRef = useRef(null)

return(
<>
<MapContainer className='mapContainer'
<>
<MapContainer className='mapContainer my-4'
center={[51.505, -0.09]}
zoom={4}
scrollWheelZoom={false}
whenCreated={map => mapRef.current = map}>

<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<LocationMarker/>
</MapContainer>

</>
)
}
Expand Down Expand Up @@ -57,7 +59,7 @@ function LocationMarker(props) {
<Marker icon={customIcon} position={position} ref={markerRef}>
<Popup>

<FormBtn value="Look up" handleClick={handleClick}/>
<LookupBtn value="Look up 🔍" handleClick={handleClick}/>
</Popup>
</Marker>

Expand Down
3 changes: 2 additions & 1 deletion front-end/src/pages/MainMap/MapLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useEffect, useState } from "react";
import PopupSearch from "./popupSearch";
import TimeRange from '../../components/timeline/TimeRange.jsx';
import { format, setYear, endOfYear } from 'date-fns';
import InfoCard from "../../components/map/InfoCard.jsx";

//timeline-related
const getSpecificYear = (year) => setYear(new Date(), year);
Expand Down Expand Up @@ -80,7 +81,6 @@ const MapLayout = () => {
return (
<>
<div className="h-[calc(100vh-6rem)] flex flex-col relative">

<div className="h-[12rem]">
<nav className="fixed py-[2vh] px-[10%] w-full bg-beige1 flex flex-col justify-between">
<div className="relative w-full my-1">
Expand Down Expand Up @@ -121,6 +121,7 @@ const MapLayout = () => {

<div className="w-full h-full">
<Outlet context={[searchData, foundData, setFoundData, setRefreshPopup]}/>

</div>

<PopupSearch foundData={foundData} refreshPopup={refreshPopup} setRefreshPopup={setRefreshPopup}/>
Expand Down
4 changes: 4 additions & 0 deletions front-end/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export default {
backgroundColor: {
"beige1": "#F8F0E5",
},
backgroundImage: {
'monet-login-pattern': "url('/field.jpg')",
'monet-register-pattern': "url('/sunset.jpg')"
},
spacing: {
"80%": "80%",
"90%": "90%",
Expand Down

0 comments on commit 6d8c4b5

Please sign in to comment.