@ -1,17 +1,32 @@ | |||||
import React from 'react'; | import React from 'react'; | ||||
//import ModalList from './ModalList'; | //import ModalList from './ModalList'; | ||||
import ModalGrid from './ModalGrid'; | |||||
//import ModalGrid from './ModalGrid'; | |||||
//import ImageGallery from './ImageGallery'; | |||||
import MultipleGridImages from 'react-multiple-image-grid' | |||||
// TODO fix modallist to display right item | // TODO fix modallist to display right item | ||||
const Home = () => { | const Home = () => { | ||||
return ( | return ( | ||||
<div> | <div> | ||||
<div className="wrapper"> | |||||
<h1 style={{padding:10, fontSize:45}}>Welcome to TinyForest</h1> | |||||
<ModalGrid /> | |||||
<div style={{width: '60%'}}> | |||||
<MultipleGridImages images={[ | |||||
"../Photos/kokous1.jpeg", | |||||
"../photos/kolvaus1.jpeg", | |||||
"../photos/kolvaus2.jpg", | |||||
"../photos/kolvaus3.jpg", | |||||
"../photos/kolvaus4.jpg", | |||||
"../photos/konstaRpi.jpeg", | |||||
"../photos/rpiMoist.jpeg", | |||||
"../photos/rpiPek.jpeg", | |||||
"../photos/rpiTemp.jpeg", | |||||
"../photos/valkosipulivk1.jpeg", | |||||
"../photos/valkosipulivk2.jpg", | |||||
"../photos/valkosipulivk3.jpg"]}/> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
); | ); | ||||
}; | }; | ||||
@ -0,0 +1,42 @@ | |||||
import React, { useState } from 'react'; | |||||
import {Gallery, GalleryImage} from 'react-gesture-gallery'; | |||||
const ImageGallery = props => { | |||||
const images = [ | |||||
"../photos/kokous1.jpeg", | |||||
"../photos/kolvaus1.jpeg", | |||||
"../photos/kolvaus2.jpg", | |||||
"../photos/kolvaus3.jpg", | |||||
"../photos/kolvaus4.jpg", | |||||
"../photos/konstaRpi.jpeg", | |||||
"../photos/rpiMoist.jpeg", | |||||
"../photos/rpiPek.jpeg", | |||||
"../photos/rpiTemp.jpeg", | |||||
"../photos/valkosipulivk1.jpeg", | |||||
"../photos/valkosipulivk2.jpg", | |||||
"../photos/valkosipulivk3.jpg"] | |||||
const [index, setIndex] = useState(0) | |||||
return ( | |||||
<Gallery | |||||
style={{ | |||||
height: '50vh', | |||||
width: '60vw', | |||||
background: 'black' | |||||
}} | |||||
index={index} | |||||
onRequestChange={i => { | |||||
setIndex(i); | |||||
}} | |||||
> | |||||
{images.map(image => ( | |||||
<GalleryImage objectFit="fit" src={image} /> | |||||
))} | |||||
</Gallery> | |||||
); | |||||
}; | |||||
export default ImageGallery; |
@ -0,0 +1,25 @@ | |||||
import React from 'react'; | |||||
import { Link } from 'react-router-dom'; | |||||
import 'bootstrap/dist/css/bootstrap.min.css'; | |||||
import '../App.css'; | |||||
import {Navbar, Nav} from 'react-bootstrap'; | |||||
const Navigator2 = () => { | |||||
return ( | |||||
<div> | |||||
<Navbar collapseOnSelect expand="lg" bg="dark" variant="dark"> | |||||
<Link className="navbar-brand" to="/">TinyForest</Link> | |||||
<Navbar.Toggle aria-controls="responsive-navbar-nav" /> | |||||
<Navbar.Collapse id="responsive-navbar-nav"> | |||||
<Nav className="mr-auto"> | |||||
<Link className="nav-link" to="/">Home</Link> | |||||
<Link className="nav-link" to="/system">System Information</Link> | |||||
<Link className="nav-link" to="/plants">My Plants</Link> | |||||
</Nav> | |||||
</Navbar.Collapse> | |||||
</Navbar> | |||||
</div> | |||||
); | |||||
}; | |||||
export default Navigator2; |