Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple map design #364

Merged
merged 2 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Disaster-Response-Platform/frontend/components/Map/MainMap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { useState, useRef } from 'react'
import { MapContainer, TileLayer, Marker } from 'react-leaflet'
import 'leaflet/dist/leaflet.css'
import styles from './MainMap.module.scss'

export default function Map() {
const [center, setCenter] = useState({ lat: 41.08714, lng: 29.043474 })
const ZOOM_LEVEL = 15
const mapRef = useRef()


return (

<div className={styles.map} >
<MapContainer center={center} zoom={ZOOM_LEVEL} ref={mapRef} className={styles.map}>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
/>

</MapContainer>
</div>

)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.map{
width:100% !important;
float: left;
height:90vh !important;
margin-right: 0.2rem;
border-radius: 5px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import 'leaflet/dist/leaflet.css'
import styles from './Map.module.scss'

export default function Map() {
const [center, setCenter] = useState({ lat: -4.043477, lng: 39.668205 })
const ZOOM_LEVEL = 9
const [center, setCenter] = useState({ lat: 37.4, lng: 37 })
const ZOOM_LEVEL = 6
const mapRef = useRef()


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { color } from "framer-motion";
import styles from "./MapFilterMenu.module.scss";
import { FaSearch } from "react-icons/fa";
export default function MapFilterMenu() {
return (
<div className={styles.main}>
<div className={styles.searchBox}>
<div className={styles.search}>
<input
type="text"
className={styles.searchTerm}
placeholder="Ne arıyorsunuz ?"
></input>
<button type="submit" className={styles.searchButton}>
<FaSearch />
</button>
</div>
</div>
<div className="CheckBox">
<div className={styles.header}>Aradıklarınız</div>
Sahin-Albayram marked this conversation as resolved.
Show resolved Hide resolved
<hr
style={{
background: "gray",
borderColor: "gray",
height: "1px",
alignSelf: "center",
}}
/>
<div>
<input type="checkbox" className={styles.checkbox} />
Resource
</div>
<div>
<input type="checkbox" className={styles.checkbox} />
Event
</div>
<div>
<input type="checkbox" className={styles.checkbox} />
Actions
</div>
<div>
<input type="checkbox" className={styles.checkbox} />
Needs
</div>
</div>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

.main{
background-color: #c7eff4;
float: right;
width: 20%;
border-radius: 5px;
margin: 0;
padding: 0.4rem;
}
@import url(https://fonts.googleapis.com/css?family=Open+Sans);
Sahin-Albayram marked this conversation as resolved.
Show resolved Hide resolved
Sahin-Albayram marked this conversation as resolved.
Show resolved Hide resolved



.search {
width: 100%;
//position: relative;
display: flex;
}

.searchTerm {
background-color: #ffffff;
width: 100%;
border: 3px solid #00B4CC;
border-right: none;
padding: 0.5rem;
height: 80%;
border-radius: 5px 0 0 5px;
outline: none;
color: #6c6c6c;
}

.searchTerm:focus{
color: #6c6c6c;
}

.searchButton {
width: 12%;
//height: 100%;
border: 1px solid #00B4CC;
background: #00B4CC;
text-align: center;
padding-left: 5px;
padding-right: 5px;
color: #fff;
border-radius: 0 5px 5px 0;
cursor: pointer;
font-size: 1rem;
}

/*Resize the wrap to see the search bar change!*/
.searchBox{
position: relative;
}


//////////////////////////////////////////////////

.header{
color: #4f4f4f !important;
text-align: center;
}

.checkbox{
color: white;

}
52 changes: 52 additions & 0 deletions Disaster-Response-Platform/frontend/components/NavigationBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import styles from "./NavigationBar.module.scss";
import {FaMapMarkedAlt} from "react-icons/fa";
import {BsSearch} from "react-icons/bs";
import {Button} from "@nextui-org/react";
import {CgProfile} from "react-icons/cg";
import Link from "next/link";



export default function NavigationBar() {
return (
<main className={styles.main}>
<div className={styles.navbar}>
<div className={styles.leftbar}>

<nav className={styles.nav}>
<Link href={`/`}>
<h1>DaRP </h1>
</Link>
</nav>
</div>
<div className={styles.rightbar}>
<nav className={styles.nav}>
<Link href={`/map`}>
<FaMapMarkedAlt size={30} />

</Link>
</nav>
<nav className={styles.nav}>
<Link href={`search`}>
<BsSearch size={25} />
</Link>
</nav>
<nav className={styles.nav}>
<Link href={`/profile`}>
<CgProfile size={30} />
</Link>
</nav>
<nav>
<Button color="primary" className={styles.button}>
Acil Durum
</Button>
</nav>
</div>

</div>


</main>
)

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
@import "@/styles/variables.scss";

.icon {
padding: 1rem;
}

.main {
display: flex;
flex-direction: column;
justify-content: center;


}

.navbar {
border-bottom: 1px solid #3C4043;
//background-color: #1C9BEF;
display: flex;
flex-direction: row;
justify-content: space-between;
nav {

div {
cursor: pointer;
}
}
}

.icon {
svg {
width:30px !important;
height:30px !important;
}

}
.selected {
border-left: 3px solid $base-color;
pointer-events: none;

}

.nav {
padding: 1em;
width: 100%;
text-align: center;
height: 3.5em;


}
.rightbar {
display: flex;
flex-direction: row;
}

.button {
overflow:hidden;
border-radius: 1em;
white-space: nowrap;
border-style: none;
outline-offset: 0;
margin:0;
height:100%;
padding-left: 3em;
padding-right: 3em;
padding-top: 1em;
padding-bottom: 1em;
background-color: #e00000;
}
.body {
display: flex;
flex-direction: column;
align-items: center;
background-color: $bg-color;
color:#262626;
padding: 2rem;
// min-width: 600px;

}

61 changes: 13 additions & 48 deletions Disaster-Response-Platform/frontend/layouts/MainLayout.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,22 @@

import Link from "next/link";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import styles from "./MainLayout.module.scss";
import {FaMapMarkedAlt} from "react-icons/fa";
import {BsSearch} from "react-icons/bs";
import {Button} from "@nextui-org/react";
import {CgProfile} from "react-icons/cg";
import { FaMapMarkedAlt } from "react-icons/fa";
import { BsSearch } from "react-icons/bs";
import { Button } from "@nextui-org/react";
import { CgProfile } from "react-icons/cg";
import NavigationBar from "@/components/NavigationBar.js";

function MainLayout({ children }) {
const router = useRouter();

return (
<main className={styles.main}>
<div className={styles.navbar}>
<div className={styles.leftbar}>

<nav className={styles.nav}>
<Link href={`/`}>
<h1>DaRP </h1>
</Link>
</nav>
</div>
<div className={styles.rightbar}>
<nav className={styles.nav}>
<Link href={`/map`}>
<FaMapMarkedAlt size={30} />

</Link>
</nav>
<nav className={styles.nav}>
<Link href={`search`}>
<BsSearch size={25} />
</Link>
</nav>
<nav className={styles.nav}>
<Link href={`/profile`}>
<CgProfile size={30} />
</Link>
</nav>
<nav>
<Button color="primary" className={styles.button}>
Acil Durum
</Button>
</nav>
</div>

</div>

<div className={styles.body}>{children}</div>
</main>
const router = useRouter();

);
return (
<div className={styles.main}>
<NavigationBar />
<div className={styles.body}>{children}</div>
</div>
);
}

export default MainLayout;
export default MainLayout;
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
}

.main {
max-width: 70vw !important;
min-width: 600px;
margin: 0 auto;
overflow-x: hidden;
display: flex;
flex-direction: column;
justify-content: center;
Expand Down
Loading