|
1 | 1 | import React from "react"; |
| 2 | + |
| 3 | +import Heading from "@theme/Heading"; |
2 | 4 | import Layout from "@theme/Layout"; |
| 5 | +import Link from "@docusaurus/Link"; |
3 | 6 |
|
4 | | -import Container from "@mui/material/Container"; |
5 | | -import Grid2 from "@mui/material/Unstable_Grid2"; |
6 | 7 | import { DocSection } from "../types"; |
7 | 8 |
|
| 9 | +import { Container, Stack } from "@mui/material"; |
8 | 10 | import Groups2OutlinedIcon from "@mui/icons-material/Groups2Outlined"; |
9 | 11 | import PersonOutlineOutlinedIcon from "@mui/icons-material/PersonOutlineOutlined"; |
10 | 12 | import Inventory2OutlinedIcon from "@mui/icons-material/Inventory2Outlined"; |
11 | 13 | import EngineeringOutlinedIcon from "@mui/icons-material/EngineeringOutlined"; |
12 | | -import Doc from "../components/home/Doc"; |
13 | | -import Header from "../components/home/Header"; |
14 | 14 |
|
15 | | -const DocList: DocSection[] = [ |
| 15 | +import clsx from "clsx"; |
| 16 | + |
| 17 | +import styles from "./styles.module.css"; |
| 18 | + |
| 19 | +const sections: DocSection[] = [ |
16 | 20 | { |
17 | | - title: "Users", |
18 | | - description: <>Installing, software, boot management, troubleshooting and more.</>, |
19 | | - link: "docs/user/intro", |
20 | | - img: <PersonOutlineOutlinedIcon sx={{ fontSize: 96 }} />, |
| 21 | + type: "link", |
| 22 | + label: "Users", |
| 23 | + description: "Installing, software, boot management, troubleshooting and more.", |
| 24 | + href: "docs/user/intro", |
| 25 | + icon: PersonOutlineOutlinedIcon, |
21 | 26 | }, |
22 | 27 | { |
23 | | - title: "Packaging", |
24 | | - description: <>Get to grips with our advanced packaging features using easy to follow guides.</>, |
25 | | - link: "docs/packaging", |
26 | | - img: <Inventory2OutlinedIcon sx={{ fontSize: 96 }} />, |
| 28 | + type: "link", |
| 29 | + label: "Packaging", |
| 30 | + description: "Get to grips with our advanced packaging features using easy to follow guides.", |
| 31 | + href: "docs/packaging", |
| 32 | + icon: Inventory2OutlinedIcon, |
27 | 33 | }, |
28 | 34 | { |
29 | | - title: "Organization", |
30 | | - description: <>Learn about the Solus Project organization, and how to contribute.</>, |
31 | | - link: "docs/organization/intro", |
32 | | - img: <Groups2OutlinedIcon sx={{ fontSize: 96 }} />, |
| 35 | + type: "link", |
| 36 | + label: "Organization", |
| 37 | + description: "Learn about the Solus Project organization, and how to contribute.", |
| 38 | + href: "docs/organization/intro", |
| 39 | + icon: Groups2OutlinedIcon, |
33 | 40 | }, |
34 | 41 | { |
35 | | - title: "Dev Log", |
36 | | - description: <>Learn what our developers have been up to, and preview upcoming changes.</>, |
37 | | - link: "blog", |
38 | | - img: <EngineeringOutlinedIcon sx={{ fontSize: 96 }} />, |
| 42 | + type: "link", |
| 43 | + label: "Dev Log", |
| 44 | + description: "Learn what our developers have been up to, and preview upcoming changes.", |
| 45 | + href: "blog", |
| 46 | + icon: EngineeringOutlinedIcon, |
39 | 47 | }, |
40 | 48 | ]; |
41 | 49 |
|
| 50 | +const Card = (item: DocSection) => { |
| 51 | + return ( |
| 52 | + <Link to={item.href} className={clsx("card padding--lg", styles.cardContainer)}> |
| 53 | + <Heading as="h2" className={clsx("text--truncate", styles.cardTitle)} title={item.label}> |
| 54 | + <item.icon fontSize="large" sx={{ marginRight: 1 }} /> {item.label} |
| 55 | + </Heading> |
| 56 | + {item.description && ( |
| 57 | + <p className={clsx("text--truncate", styles.cardDescription)} title={item.description}> |
| 58 | + {item.description} |
| 59 | + </p> |
| 60 | + )} |
| 61 | + </Link> |
| 62 | + ); |
| 63 | +}; |
| 64 | + |
42 | 65 | const Docs = () => { |
43 | 66 | return ( |
44 | 67 | <Layout title="Documentation" description="Solus"> |
45 | | - <Header /> |
46 | | - <Container sx={{ marginBlock: "4vh", maxWidth: 1920 }}> |
47 | | - <Grid2 |
48 | | - columns={{ |
49 | | - xs: 6, |
50 | | - sm: 18, |
51 | | - md: 18, |
52 | | - }} |
53 | | - container |
54 | | - margin={0} |
55 | | - spacing={4} |
56 | | - width={1} |
| 68 | + <Container sx={{ marginBlock: "4vh" }}> |
| 69 | + <Stack |
| 70 | + className="hero hero--secondary" |
| 71 | + alignItems="center" |
| 72 | + justifyContent="center" |
| 73 | + padding="5vh 10vw" |
| 74 | + spacing={2} |
57 | 75 | > |
58 | | - {DocList.map((d) => ( |
59 | | - <Doc {...d} key={`Doc-${d.title}`} /> |
| 76 | + <Heading as="h1" className="hero__title"> |
| 77 | + Solus Help Center |
| 78 | + </Heading> |
| 79 | + <p className="hero__subtitle">Documentation for Solus</p> |
| 80 | + </Stack> |
| 81 | + <section className="row"> |
| 82 | + {sections.map((section, index) => ( |
| 83 | + <article key={index} className="col col--6 margin-bottom--lg"> |
| 84 | + <Card |
| 85 | + type="link" |
| 86 | + href={section.href} |
| 87 | + label={section.label} |
| 88 | + description={section.description} |
| 89 | + icon={section.icon} |
| 90 | + /> |
| 91 | + </article> |
60 | 92 | ))} |
61 | | - </Grid2> |
| 93 | + </section> |
62 | 94 | </Container> |
63 | 95 | </Layout> |
64 | 96 | ); |
|
0 commit comments