parent
23a339c3ad
commit
0a69d34ac3
@ -1,34 +0,0 @@
|
|||||||
import { createStyles } from '@mantine/core';
|
|
||||||
import Map from 'react-map-gl/maplibre';
|
|
||||||
import mapstyle from './assets/basemap.json'
|
|
||||||
|
|
||||||
const useStyles = createStyles(() => ({
|
|
||||||
root: {
|
|
||||||
// paddingTop: rem(80),
|
|
||||||
// paddingBottom: rem(120),
|
|
||||||
height: '80vh',
|
|
||||||
position: 'relative',
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
export function Karta() {
|
|
||||||
const { classes } = useStyles();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={classes.root}>
|
|
||||||
<Map
|
|
||||||
initialViewState={{
|
|
||||||
longitude: 55,
|
|
||||||
latitude: 60,
|
|
||||||
zoom: 3
|
|
||||||
}}
|
|
||||||
style={{
|
|
||||||
position: 'absolute',
|
|
||||||
top: 0,
|
|
||||||
bottom: 0
|
|
||||||
}}
|
|
||||||
mapStyle={mapstyle}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,42 +1,21 @@
|
|||||||
import { Grid, Skeleton, Flex, ScrollArea, Autocomplete } from '@mantine/core';
|
import { Grid, Skeleton, Flex, ScrollArea, Autocomplete, Container } from '@mantine/core';
|
||||||
import { Karta } from './Karta';
|
|
||||||
import { ArticleCardVertical } from './ArticleCard';
|
import { ArticleCardVertical } from './ArticleCard';
|
||||||
import articleCard from './assets/card.json';
|
import articleCard from './assets/card.json';
|
||||||
|
import Map from 'react-map-gl/maplibre';
|
||||||
|
import mapstyle from './assets/basemap.json'
|
||||||
|
|
||||||
export function KartaPage() {
|
export function KartaPage() {
|
||||||
return (
|
return (
|
||||||
<Grid >
|
<Map
|
||||||
<Grid.Col span={8}>
|
initialViewState={{
|
||||||
<Karta />
|
longitude: 55,
|
||||||
</Grid.Col>
|
latitude: 60,
|
||||||
<Grid.Col span={4} >
|
zoom: 3
|
||||||
<ScrollArea h={'80vh'} type="auto">
|
}}
|
||||||
<Flex
|
style={{
|
||||||
mih={50}
|
height: '90vh'
|
||||||
gap="md"
|
}}
|
||||||
justify="flex-start"
|
mapStyle={mapstyle}
|
||||||
align="start"
|
/>
|
||||||
direction="column"
|
|
||||||
wrap="wrap"
|
|
||||||
mr={20}
|
|
||||||
>
|
|
||||||
<Autocomplete
|
|
||||||
w={'100%'}
|
|
||||||
placeholder="Поиск"
|
|
||||||
limit={2}
|
|
||||||
data={['Паустовский', 'Бианки', 'Пришвин', 'Брюсов', 'Островский']}
|
|
||||||
/>
|
|
||||||
<ArticleCardVertical {...articleCard} />
|
|
||||||
<Skeleton mb={10} animate={false} height={100} />
|
|
||||||
<Skeleton mb={10} animate={false} height={100} />
|
|
||||||
<Skeleton mb={10} animate={false} height={100} />
|
|
||||||
<ArticleCardVertical {...articleCard} />
|
|
||||||
<Skeleton mb={10} animate={false} height={100} />
|
|
||||||
<Skeleton mb={10} animate={false} height={100} />
|
|
||||||
<Skeleton mb={10} animate={false} height={100} />
|
|
||||||
</Flex>
|
|
||||||
</ScrollArea>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Loading…
Reference in new issue