main
This commit is contained in:
parent
ec996ad08a
commit
35c034ef05
46
src/components/Main/Card.js
Normal file
46
src/components/Main/Card.js
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
|
||||||
|
const Card = ({city}) => {
|
||||||
|
return (
|
||||||
|
<div style={{
|
||||||
|
height: 257,
|
||||||
|
width: 400,
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
backgroundImage: '',
|
||||||
|
}}>
|
||||||
|
<div style={{
|
||||||
|
height: 179,
|
||||||
|
width: 371,
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
justifyContent: 'space-evenly',
|
||||||
|
alignItems: 'center',
|
||||||
|
}}>
|
||||||
|
<span style={{
|
||||||
|
color: '#000',
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: 700
|
||||||
|
}}>Туристическая карта г.{city}</span>
|
||||||
|
<span style={{
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
alignItems: 'center',
|
||||||
|
}}>Приехали в город? <p>Узнай, где выгоднее остановиться, куда</p> <p>сходить и что посмотреть</p></span>
|
||||||
|
<button style={{
|
||||||
|
width: 240,
|
||||||
|
height: 46,
|
||||||
|
backgroundColor: '#4B60AE',
|
||||||
|
borderRadius: 10,
|
||||||
|
color: '#fff',
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: 400,
|
||||||
|
border: 'none'
|
||||||
|
}}>Построить маршрут</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Card;
|
40
src/components/Main/Header.js
Normal file
40
src/components/Main/Header.js
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
const Header = () => {
|
||||||
|
return (
|
||||||
|
<div style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
paddingLeft: '10px',
|
||||||
|
height: 79,
|
||||||
|
width: 400,
|
||||||
|
backgroundColor: '#ffffff',
|
||||||
|
}}>
|
||||||
|
<div style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
}}>
|
||||||
|
<img src="./logo5121.png" alt="#" style={{
|
||||||
|
height: 53,
|
||||||
|
width: 53,
|
||||||
|
}}/>
|
||||||
|
<span style={{
|
||||||
|
color: '#F68C43',
|
||||||
|
width: '60%',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
alignItems: 'start',
|
||||||
|
fontWeight: 700,
|
||||||
|
fontFamily: 'Raleway',
|
||||||
|
fontSize: '20px',
|
||||||
|
}}>Путешествия <p style={{color: '#4EB0F2'}} >Просто!</p></span>
|
||||||
|
</div>
|
||||||
|
<img src="./menu.png" alt="#" style={{
|
||||||
|
height: 20,
|
||||||
|
width: 32,
|
||||||
|
marginRight: 10
|
||||||
|
}}/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Header;
|
@ -1,5 +1,7 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import Header from "./Header";
|
||||||
|
import Card from "./Card";
|
||||||
|
|
||||||
const Main = ({ userData }) => {
|
const Main = ({ userData }) => {
|
||||||
|
|
||||||
@ -49,24 +51,30 @@ const Main = ({ userData }) => {
|
|||||||
console.log(userData.unique);
|
console.log(userData.unique);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
|
<Header />
|
||||||
|
<Card city={userData.selectedCity}/>
|
||||||
<div style={{
|
<div style={{
|
||||||
overflow: 'auto',
|
overflow: 'hidden',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}}>
|
}}>
|
||||||
<h2>Фильмы в г.{userData.selectedCity}</h2>
|
<h2>Кино по пушкинской карте</h2>
|
||||||
<div style={{
|
<div style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
overflowX: 'auto',
|
overflowX: 'auto',
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'center',
|
||||||
}}>
|
}}>
|
||||||
<ul style={{
|
<ul style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
padding: 0, // Убираем внутренние отступы у списка
|
listStyle: 'none',
|
||||||
|
padding: 0,
|
||||||
}}>
|
}}>
|
||||||
{films.map((film, index) => (
|
{films.map((film, index) => (
|
||||||
<li key={index} style={{
|
<li key={index} style={{
|
||||||
marginRight: '10px', // Добавляем небольшой отступ между фильмами
|
marginRight: '10px',
|
||||||
}}>
|
}}>
|
||||||
<div key={index} style={{
|
<div key={index} style={{
|
||||||
height: 200,
|
height: 200,
|
||||||
@ -92,20 +100,21 @@ const Main = ({ userData }) => {
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Guides in {userData.selectedCity}</h2>
|
<h2>Тур. гиды г.{userData.selectedCity}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{gits.map((guide, index) => (
|
{gits.map((guide, index) => (
|
||||||
<li key={index}>{guide.name}</li>
|
<li key={index}>{guide.name}</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2>Museums in {userData.selectedCity}</h2>
|
<h2>Музеи г.{userData.selectedCity}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{museum.map((museumItem, index) => (
|
{museum.map((museumItem, index) => (
|
||||||
<li key={index}>{museumItem.name}</li>
|
<li key={index}>{museumItem.name}</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user