mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-24 15:47:08 +00:00
Improve homepage (#245)
* Improve how generators are listed on home * Add some icons for generators * Remove debug * Refactor cachedFetch and use generated changelogs * Add limit to how many changes are shown by default * Add more generator icons * Refactor cards * Fix generator icons for light theme * Add more worldgen icons * Add remaining generator icons * Refactor navigation and badges style * Group on homepage for guides and tools * Fix header button style * Add versions and technical changelog to homepage * Make it clear that not all changes could be documented
This commit is contained in:
22
src/app/components/ToolGroup.tsx
Normal file
22
src/app/components/ToolGroup.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { ComponentChildren } from 'preact'
|
||||
import type { Icons } from './Icons.jsx'
|
||||
import type { Octicon } from './Octicon.jsx'
|
||||
import { ToolCard } from './ToolCard.jsx'
|
||||
|
||||
interface Props {
|
||||
title: string,
|
||||
titleIcon?: keyof typeof Octicon | keyof typeof Icons,
|
||||
link?: string,
|
||||
children?: ComponentChildren,
|
||||
}
|
||||
export function ToolGroup({ title, titleIcon, link, children }: Props) {
|
||||
return <div class="tool-group">
|
||||
{link === undefined
|
||||
? <div class="tool-card"><h3>{title}</h3></div>
|
||||
: <ToolCard {...{ title, titleIcon, link}} />
|
||||
}
|
||||
{children && <div class="tool-body">
|
||||
{children}
|
||||
</div>}
|
||||
</div>
|
||||
}
|
||||
Reference in New Issue
Block a user