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 { Karta } from './Karta';
|
||||
import { Grid, Skeleton, Flex, ScrollArea, Autocomplete, Container } from '@mantine/core';
|
||||
import { ArticleCardVertical } from './ArticleCard';
|
||||
import articleCard from './assets/card.json';
|
||||
import Map from 'react-map-gl/maplibre';
|
||||
import mapstyle from './assets/basemap.json'
|
||||
|
||||
export function KartaPage() {
|
||||
return (
|
||||
<Grid >
|
||||
<Grid.Col span={8}>
|
||||
<Karta />
|
||||
</Grid.Col>
|
||||
<Grid.Col span={4} >
|
||||
<ScrollArea h={'80vh'} type="auto">
|
||||
<Flex
|
||||
mih={50}
|
||||
gap="md"
|
||||
justify="flex-start"
|
||||
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>
|
||||
<Map
|
||||
initialViewState={{
|
||||
longitude: 55,
|
||||
latitude: 60,
|
||||
zoom: 3
|
||||
}}
|
||||
style={{
|
||||
height: '90vh'
|
||||
}}
|
||||
mapStyle={mapstyle}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in new issue