forked from Rosetta/landing
Добавить юридический футер
This commit is contained in:
@@ -7,6 +7,7 @@ import { FeaturesGrid } from './components/FeaturesGrid/FeaturesGrid';
|
|||||||
import { SEO } from './components/SEO/SEO';
|
import { SEO } from './components/SEO/SEO';
|
||||||
import './style.css'
|
import './style.css'
|
||||||
import { MessageSteps } from './components/MessageSteps/MessageSteps';
|
import { MessageSteps } from './components/MessageSteps/MessageSteps';
|
||||||
|
import { Footer } from './components/Footer/Footer';
|
||||||
|
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
@@ -17,6 +18,7 @@ export default function App() {
|
|||||||
<FeaturesGrid></FeaturesGrid>
|
<FeaturesGrid></FeaturesGrid>
|
||||||
<MessageSteps></MessageSteps>
|
<MessageSteps></MessageSteps>
|
||||||
<DownloadCenter></DownloadCenter>
|
<DownloadCenter></DownloadCenter>
|
||||||
|
<Footer></Footer>
|
||||||
</MantineProvider>
|
</MantineProvider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,14 +33,14 @@ interface UpdateItem {
|
|||||||
const fetchUpdates = async (): Promise<DownloadFeature[]> => {
|
const fetchUpdates = async (): Promise<DownloadFeature[]> => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('https://sdu.rosetta.im/updates/all');
|
const response = await fetch('https://sdu.rosetta.im/updates/all');
|
||||||
const data = await response.json();
|
const data = (await response.json()) as { items?: UpdateItem[] };
|
||||||
|
|
||||||
return (data.items || []).map((item: UpdateItem) => ({
|
return (data.items || []).map((item) => ({
|
||||||
platform: item.platform,
|
platform: item.platform,
|
||||||
arch: item.arch,
|
arch: item.arch,
|
||||||
version: item.version,
|
version: item.version,
|
||||||
link: new URL(item.downloadUrl, 'https://sdu.rosetta.im').toString(),
|
link: new URL(item.downloadUrl, 'https://sdu.rosetta.im').toString(),
|
||||||
})).sort((a : any, b : any) => {
|
})).sort((a, b) => {
|
||||||
const platformOrder = ['darwin', 'linux', 'win32', 'android'];
|
const platformOrder = ['darwin', 'linux', 'win32', 'android'];
|
||||||
const archOrder = ['arm64', 'x64', 'universal']
|
const archOrder = ['arm64', 'x64', 'universal']
|
||||||
const platformComparison = platformOrder.indexOf(a.platform) - platformOrder.indexOf(b.platform);
|
const platformComparison = platformOrder.indexOf(a.platform) - platformOrder.indexOf(b.platform);
|
||||||
@@ -174,4 +174,4 @@ export function DownloadCenter() {
|
|||||||
</Container>
|
</Container>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { IconGauge, IconLock, IconMessage2, IconServer, IconUser, IconUsersGroup } from '@tabler/icons-react';
|
import { IconGauge, IconLock, IconMessage2, IconServer, IconUser, IconUsersGroup, type TablerIcon } from '@tabler/icons-react';
|
||||||
import { Container, Flex, SimpleGrid, Text, ThemeIcon, Title } from '@mantine/core';
|
import { Container, Flex, SimpleGrid, Text, ThemeIcon, Title } from '@mantine/core';
|
||||||
|
import type { ReactNode } from 'react';
|
||||||
import classes from './FeaturesGrid.module.css';
|
import classes from './FeaturesGrid.module.css';
|
||||||
import { RosettaLogo } from '../RosettaLogo/RosettaLogo';
|
import { RosettaLogo } from '../RosettaLogo/RosettaLogo';
|
||||||
|
|
||||||
export const MOCKDATA = [
|
const MOCKDATA = [
|
||||||
{
|
{
|
||||||
icon: IconGauge,
|
icon: IconGauge,
|
||||||
title: 'Performance',
|
title: 'Performance',
|
||||||
@@ -43,9 +44,9 @@ export const MOCKDATA = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
interface FeatureProps {
|
interface FeatureProps {
|
||||||
icon: React.FC<any>;
|
icon: TablerIcon;
|
||||||
title: React.ReactNode;
|
title: ReactNode;
|
||||||
description: React.ReactNode;
|
description: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Feature({ icon: Icon, title, description }: FeatureProps) {
|
export function Feature({ icon: Icon, title, description }: FeatureProps) {
|
||||||
@@ -94,4 +95,4 @@ export function FeaturesGrid() {
|
|||||||
</Container>
|
</Container>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
9
src/components/Footer/Footer.module.css
Normal file
9
src/components/Footer/Footer.module.css
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
.footer {
|
||||||
|
padding: var(--mantine-spacing-xl) var(--mantine-spacing-md);
|
||||||
|
border-top: 1px solid light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-5));
|
||||||
|
}
|
||||||
|
|
||||||
|
.legal {
|
||||||
|
max-width: 720px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
16
src/components/Footer/Footer.tsx
Normal file
16
src/components/Footer/Footer.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { Text } from '@mantine/core';
|
||||||
|
import classes from './Footer.module.css';
|
||||||
|
|
||||||
|
const LEGAL_NAME = 'ROSETTA CLOUD SERVICES LIMITED';
|
||||||
|
|
||||||
|
export function Footer() {
|
||||||
|
const currentYear = new Date().getFullYear();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<footer className={classes.footer}>
|
||||||
|
<Text c="dimmed" fz="sm" ta="center" className={classes.legal}>
|
||||||
|
© {currentYear} {LEGAL_NAME}. All rights reserved.
|
||||||
|
</Text>
|
||||||
|
</footer>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user