master
gtitov 3 years ago
parent 23a339c3ad
commit 0a69d34ac3

@ -1,6 +1,5 @@
import { AppShell, Container } from '@mantine/core';
import { AppShell, Container, ScrollArea } from '@mantine/core';
import { HeaderSimple } from './Header';
// import { Karta } from './Karta';
import { KartaPage } from './KartaPage';
import { FooterLinks } from './Footer';
// import { ArticleCardPanel } from './ArticleCardPanel';
@ -12,18 +11,16 @@ import headerLinks from './assets/header.json';
function App() {
return (
<AppShell
padding="md"
header={<HeaderSimple links={headerLinks.links} />}
footer={<FooterLinks data={footerLinks.data} />}
>
<KartaPage></KartaPage>
</AppShell>
// <div>
// <HeaderSimple links={headerLinks.links} />
// <KartaPage></KartaPage>
// <FooterLinks data={footerLinks.data} />
// </div>
<div style={{
position: 'absolute',
width: '100%',
top: 0
}}>
<HeaderSimple links={headerLinks.links} />
<KartaPage></KartaPage>
<FooterLinks data={footerLinks.data} />
</div >
);
}

@ -4,7 +4,6 @@ import { createStyles, Text, Container, rem, Title } from '@mantine/core';
const useStyles = createStyles((theme) => ({
footer: {
marginTop: rem(40),
paddingTop: rem(40),
paddingBottom: rem(40),
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[0],
@ -138,6 +137,7 @@ export function FooterLinks({ data }: FooterLinksProps) {
</Text>
</div>
<div className={classes.groups}>{groups}</div>
</Container>
</footer>
);

@ -70,7 +70,7 @@ export function HeaderSimple({ links }: HeaderSimpleProps) {
));
return (
<Header height={60} mb={120}>
<Header height={60}>
<Container className={classes.header}>
<Title order={3}>Литкарта</Title>
{/* <MantineLogo size={28} /> */}

@ -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…
Cancel
Save