Skip to content

Commit

Permalink
default dark and show links
Browse files Browse the repository at this point in the history
  • Loading branch information
KishiTheMechanic committed Oct 3, 2024
1 parent 83ec5a4 commit 6bd30ad
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 7 deletions.
4 changes: 3 additions & 1 deletion appInfo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"copyright": "ELSOUL LABO B.V.",
"twitterId": "@SkeetDev",
"domain": "skeet-v3-next-edge-rc.pages.dev"
"domain": "app.skeeter.dev",
"githubRepo": "elsoul/skeet-v3-next-edge-rc",
"discordInviteURL": "https://discord.gg/H2HeqRq54J"
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"dependencies": {
"@ai-sdk/openai": "0.0.24",
"@auth/prisma-adapter": "2.1.0",
"@fortawesome/fontawesome-svg-core": "6.5.2",
"@fortawesome/free-brands-svg-icons": "6.5.2",
"@fortawesome/free-solid-svg-icons": "6.5.2",
"@fortawesome/react-fontawesome": "0.2.2",
"@hookform/resolvers": "3.4.2",
"@neondatabase/serverless": "0.9.3",
"@prisma/adapter-d1": "5.14.0",
Expand Down
54 changes: 54 additions & 0 deletions pnpm-lock.yaml

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

10 changes: 10 additions & 0 deletions src/app/[locale]/(default)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { LanguageToggle } from '@/components/config/LanguageToggle'
import { ModeToggle } from '@/components/config/ModeToggle'
import { redirect } from '@/navigation'
import { USER_PATHS } from '../user/userNavs'
import {
DiscordIconLink,
GithubIconLink,
TwitterIconLink,
} from '@/components/common/icons'

type Props = {
children: React.ReactNode
Expand Down Expand Up @@ -32,6 +37,11 @@ export default async function DefaultLayout({ children }: Props) {
© {new Date().getFullYear()} {appInfo.copyright}
</p>
<div className="flex flex-grow" />
<div className="flex flex-row items-center gap-4">
<GithubIconLink />
<TwitterIconLink />
<DiscordIconLink />
</div>
</footer>
</div>
</>
Expand Down
4 changes: 2 additions & 2 deletions src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export default async function LocaleLayout({
>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
defaultTheme="dark"
enableSystem={false}
disableTransitionOnChange
>
<NextIntlClientProvider messages={messages}>
Expand Down
3 changes: 1 addition & 2 deletions src/app/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const logoUrl =
'https://pub-f5c1b877dd3a4b63aacd87ee9a480be9.r2.dev/SkeetLogoHorizontal.png'
export const logoUrl = 'https://storage.skeet.dev/SkeetLogoHorizontal.png'

export const locales = ['en', 'ja'] as const
export const defaultLocale = 'en'
Expand Down
56 changes: 56 additions & 0 deletions src/components/common/icons.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import appInfo from '@appInfo'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'

import {
faDiscord,
faGithub,
faXTwitter,
} from '@fortawesome/free-brands-svg-icons'

export function GithubIconLink() {
return (
<a
href={`https://github.com/${appInfo.githubRepo}`}
className="hover:opacity-80"
rel="noopener noreferrer"
target="_blank"
>
<FontAwesomeIcon
icon={faGithub}
className="h-5 w-5 text-zinc-500 dark:text-zinc-300"
/>
</a>
)
}

export function TwitterIconLink() {
return (
<a
href={`https://x.com/${appInfo.twitterId}`}
className="hover:opacity-80"
rel="noopener noreferrer"
target="_blank"
>
<FontAwesomeIcon
icon={faXTwitter}
className="h-5 w-5 text-zinc-500 dark:text-zinc-300"
/>
</a>
)
}

export function DiscordIconLink() {
return (
<a
href={`${appInfo.discordInviteURL}`}
className="hover:opacity-80"
rel="noopener noreferrer"
target="_blank"
>
<FontAwesomeIcon
icon={faDiscord}
className="h-5 w-5 text-zinc-500 dark:text-zinc-300"
/>
</a>
)
}
4 changes: 2 additions & 2 deletions src/components/config/ModeToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export function ModeToggle() {
<DropdownMenuItem onClick={() => setTheme('dark')}>
{t('common.darkMode')}
</DropdownMenuItem>
<DropdownMenuItem onClick={() => setTheme('system')}>
{/* <DropdownMenuItem onClick={() => setTheme('system')}>
{t('common.systemMode')}
</DropdownMenuItem>
</DropdownMenuItem> */}
</DropdownMenuContent>
</DropdownMenu>
)
Expand Down

0 comments on commit 6bd30ad

Please sign in to comment.