Skip to content

Commit

Permalink
fix: footer logo (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotonQuantum authored Jun 11, 2024
1 parent 6a8472c commit ce2dffd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/app/docs/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Box, Container, Grid, GridCol, Group, Stack} from "@mantine/core";
import {Box, Container, Grid, GridCol, Group} from "@mantine/core";
import classes from "@/app/global.module.css";
import {ReactNode} from "react";
import {articlesFromHelps, getHelp} from "@/serverRpcs";
Expand All @@ -16,15 +16,15 @@ export default async function DocsLayout({
<Container className={classes.container}>
<Grid>
<GridCol span={2} visibleFrom={"md"}>
<Box style={{position: "sticky", top:20}} mt={20}>
<Box style={{position: "sticky", top: 20}} mt={20}>
<DocNav articles={articles}/>
</Box>
</GridCol>
<GridCol span={1} visibleFrom={"xs"} hiddenFrom={"md"}/>
<GridCol span={{base: 12, xs: 10}}>
<Group hiddenFrom={"md"} style={{position: "sticky", top: 40}} mb={-40}>
<Box ml={"auto"} mr={"xl"}>
<DocSearch articles={articles} variant={"mini"} />
<DocSearch articles={articles} variant={"mini"}/>
</Box>
</Group>
{children}
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import {Ref, useRef} from "react";
import {getHotkeyHandler, HotkeyItem, mergeRefs, useHotkeys} from "@mantine/hooks";
import {getHotkeyHandler, mergeRefs, useHotkeys} from "@mantine/hooks";
import {Badge, TextInput, TextInputProps} from "@mantine/core";
import {IconSearch} from "@tabler/icons-react";
import classes from "@/app/global.module.css";
Expand Down
2 changes: 1 addition & 1 deletion src/parts/docNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const DocNav = ({articles}: DocNavProps) => {
return (
<>
<Box my={"sm"}>
<DocSearch articles={articles} variant={"full"} />
<DocSearch articles={articles} variant={"full"}/>
</Box>
{/*<Box style={{position: "sticky", top: 0}} p={"md"} bg={"var(--mantine-color-body)"}>*/}
{/* <DocSearch articles={articles} variant={"full"} />*/}
Expand Down
6 changes: 4 additions & 2 deletions src/parts/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import {Anchor, Box, Center, Container, Group, Image, Stack, Text} from "@mantine/core";
import NextImage from "next/image";
import classes from "@/app/global.module.css";
import {IconMail, IconMessageDots} from "@tabler/icons-react";
import imgSjtugText from "@/assets/sjtug.svg"
import imgSjtug from "@/assets/sjtug.svg"

export const Footer = () => (
<Stack bg={"var(--mantine-color-footer)"} w={"100%"} py={"xxxl"}>
<Container className={classes.container}>
<Group align="center" justify={"center"} gap={"xl"}>
<Group justify={"center"} style={{flex: 3, flexWrap: "nowrap"}} miw={"min(100%, 30em)"}>
<Box style={{flex: 1}} maw={"20em"} mb={"auto"}>
<Image alt={"SJTUG Logo"} src={imgSjtugText} w={"100%"}/>
<Image component={NextImage} alt={"SJTUG Logo"} src={imgSjtug} sizes="100vw"
w={"100%"} h={"auto"}/>
</Box>
<Stack className={classes.textNormal} gap={"xs"} style={{flex: 3}} miw={"min(100%, 15em)"}>
<Text fw={700} inherit>SJTUG Siyuan Mirror</Text>
Expand Down
8 changes: 4 additions & 4 deletions src/parts/news.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Anchor, Box, Group, Stack, Text} from "@mantine/core";
import {Anchor, Box, Stack, Text} from "@mantine/core";
import classes from "@/app/global.module.css";
import {MyAnchor} from "@/components/MyAnchor";
import {IconExchange, IconExternalLink} from "@tabler/icons-react";
import {IconExternalLink} from "@tabler/icons-react";
import {getNews, newsLocatorFromHref} from "@/serverRpcs";
import Link from "next/link";

Expand All @@ -16,7 +16,7 @@ const NewsEntry = ({title, date, locator}: NewsEntryProps) => (
<Text className={`${classes.textSmall} ${classes.textSecondary}`}>
{new Intl.DateTimeFormat("zh-CN").format(date)}
</Text>
<Anchor className={classes.textSmall} href={"news#"+locator}>
<Anchor className={classes.textSmall} href={"news#" + locator}>
<Text inherit>{title}</Text>
</Anchor>
</Box>
Expand Down Expand Up @@ -48,7 +48,7 @@ export const News = async () => {
}

<MyAnchor size={"sm"} component={Link} href={"news"} target={"_blank"}
rightIcon={<IconExternalLink size={16} stroke={1.5}/> }>
rightIcon={<IconExternalLink size={16} stroke={1.5}/>}>
... 查看更多
</MyAnchor>
</Stack>
Expand Down
4 changes: 2 additions & 2 deletions src/parts/repos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import classes from "@/app/global.module.css";
import {format, TDate} from "timeago.js"
import {IconCheck, IconHelp, IconInfoCircleFilled, IconX} from "@tabler/icons-react";
import {IconCheck, IconHelp, IconX} from "@tabler/icons-react";
import {
ActionIcon,
Anchor,
Expand Down Expand Up @@ -67,7 +67,7 @@ const TableEntry = ({name, server, status, lastSync, helpHref, mirrorzHref}: Tab
{
mirrorzHref &&
<ActionIcon variant={"subtle"} color={"#15658a"} size="xs" radius={"xl"} component={Link}
href={MIRRORZ_HELP_URL+mirrorzHref+"/?mirror=SJTUG-"+server} target={"_blank"}>
href={MIRRORZ_HELP_URL + mirrorzHref + "/?mirror=SJTUG-" + server} target={"_blank"}>
<IconHelp size={16} stroke={2}/>
</ActionIcon>
}
Expand Down

0 comments on commit ce2dffd

Please sign in to comment.