Skip to content

Commit

Permalink
fix(style): flag icon in challenge cards are not unified
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Aug 7, 2023
1 parent f413e95 commit e926946
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/GZCTF/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"embla-carousel-react": "^7.1.0",
"katex": "^0.16.8",
"lz-string": "^1.5.0",
"marked": "^6.0.0",
"marked": "^7.0.0",
"pdfjs-dist": "3.6.172",
"prismjs": "^1.29.0",
"react": "^18.2.0",
Expand All @@ -48,7 +48,7 @@
"@nabla/vite-plugin-eslint": "^1.5.0",
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/katex": "^0.16.2",
"@types/node": "20.4.7",
"@types/node": "20.4.8",
"@types/prismjs": "^1.26.0",
"@types/react": "^18.2.18",
"@types/react-dom": "^18.2.7",
Expand Down
32 changes: 16 additions & 16 deletions src/GZCTF/ClientApp/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/GZCTF/ClientApp/src/components/ChallengeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Title,
createStyles,
keyframes,
Box,
} from '@mantine/core'
import { mdiFlag } from '@mdi/js'
import { Icon } from '@mdi/react'
Expand Down Expand Up @@ -72,11 +73,11 @@ const ChallengeCard: FC<ChallengeCardProps> = (props: ChallengeCardProps) => {
})}
>
<Stack spacing="sm" pos="relative" style={{ zIndex: 99 }}>
<Group noWrap position="apart" spacing="xs">
<Group noWrap position="apart" spacing={2}>
<Text lineClamp={1} fw={700} size={theme.fontSizes.lg}>
{challenge.title}
</Text>
{solved && <Icon path={mdiFlag} size={1} color={colorStr} />}
<Box miw="1.5em">{solved && <Icon path={mdiFlag} size={1} color={colorStr} />}</Box>
</Group>
<Divider />
<Group noWrap position="apart" align="center" spacing={2}>
Expand Down
2 changes: 1 addition & 1 deletion src/GZCTF/ClientApp/src/components/ChallengePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const GRID_BREAKPOINTS = [
{ maxWidth: 2500, cols: 5 },
{ maxWidth: 2100, cols: 4 },
{ maxWidth: 1700, cols: 3 },
{ maxWidth: 1300, cols: 2 },
{ maxWidth: 1350, cols: 2 },
{ maxWidth: 900, cols: 1 },
]

Expand Down

0 comments on commit e926946

Please sign in to comment.