diff --git a/src/components/Nav.tsx b/src/components/Nav.tsx index d87c286..7e7bd25 100644 --- a/src/components/Nav.tsx +++ b/src/components/Nav.tsx @@ -21,6 +21,9 @@ export default function Nav() {
  • Servers
  • +
  • + Apps +
  • Releases
  • diff --git a/src/data/apps.ts b/src/data/apps.ts new file mode 100644 index 0000000..5701876 --- /dev/null +++ b/src/data/apps.ts @@ -0,0 +1,31 @@ +export interface App { + name: string; + icon: string; + description: string; + links: { + appleStore?: string; + fdroid?: string; + flathub?: string; + github?: string; + googlePlay?: string; + microsoftStore?: string; + matrix?: string; + snapcraft?: string; + web?: string; + }; +} + +export const apps: App[] = [ + { + name: 'Interstellar', + icon: 'https://raw.githubusercontent.com/jwr1/interstellar/6d8fce0972febccec91fa056746fdb9f4f960217/assets/icons/logo.png', + description: 'An app for Mbin and Lemmy, connecting you to the fediverse.', + links: { + flathub: 'https://flathub.org/apps/one.jwr.interstellar', + github: 'https://github.com/jwr1/interstellar', + googlePlay: + 'https://play.google.com/store/apps/details?id=one.jwr.interstellar', + matrix: 'https://matrix.to/#/#interstellar-space:matrix.org', + }, + }, +]; diff --git a/src/routes/apps.tsx b/src/routes/apps.tsx new file mode 100644 index 0000000..9df96d9 --- /dev/null +++ b/src/routes/apps.tsx @@ -0,0 +1,105 @@ +import { ComponentProps, For, JSX, Show } from 'solid-js'; +import Chip from '~/components/Chip'; + +import SimpleIconsAppstore from '~icons/simple-icons/appstore'; +import SimpleIconsFdroid from '~icons/simple-icons/fdroid'; +import SimpleIconsFlathub from '~icons/simple-icons/flathub'; +import SimpleIconsGithub from '~icons/simple-icons/github'; +import SimpleIconsGoogleplay from '~icons/simple-icons/googleplay'; +import SimpleIconsMatrix from '~icons/simple-icons/matrix'; +import SimpleIconsSnapcraft from '~icons/simple-icons/snapcraft'; +import MaterialSymbolsWeb from '~icons/material-symbols/web'; + +import { apps, App } from '~/data/apps'; + +const linkMap: Record< + keyof App['links'], + { name: string; icon: (props: ComponentProps<'svg'>) => JSX.Element } +> = { + github: { + name: 'GitHub', + icon: SimpleIconsGithub, + }, + matrix: { + name: 'Matrix', + icon: SimpleIconsMatrix, + }, + appleStore: { + name: 'Apple App Store', + icon: SimpleIconsAppstore, + }, + fdroid: { + name: 'F-Droid', + icon: SimpleIconsFdroid, + }, + flathub: { + name: 'Flathub', + icon: SimpleIconsFlathub, + }, + googlePlay: { + name: 'Google Play', + icon: SimpleIconsGoogleplay, + }, + microsoftStore: { + name: 'Microsoft Store', + icon: () => ( + + + + ), + }, + snapcraft: { + name: 'Snapcraft', + icon: SimpleIconsSnapcraft, + }, + web: { + name: 'Web', + icon: MaterialSymbolsWeb, + }, +}; + +export default function ServersPage() { + return ( +
    +

    + Mbin Apps +

    + +
    + + {(app) => { + return ( +
    + +
    +
    {app.name}
    + +

    {app.description}

    + +
    + + {([key, value]) => ( + + + {value.name} + + + )} + +
    +
    + ); + }} +
    +
    +
    + ); +} diff --git a/src/routes/servers.tsx b/src/routes/servers.tsx index 246b407..9e02dc1 100644 --- a/src/routes/servers.tsx +++ b/src/routes/servers.tsx @@ -187,12 +187,7 @@ export default function ServersPage() { users -
    +
    {(server) => { const StatChips = () => ( @@ -254,7 +249,7 @@ export default function ServersPage() { >
    {server.domain}