Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
aggre committed Sep 9, 2024
1 parent 0333d51 commit cd02b28
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 98 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,6 @@ package-lock.json

# vitest output
vitest.config.ts.*

# astro
.astro
5 changes: 0 additions & 5 deletions .preview/preview.ssr/.astro/settings.json

This file was deleted.

20 changes: 10 additions & 10 deletions src/components/About.svelte
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<script lang="ts">
import { onMount } from 'svelte'
import { i18nFactory } from '@devprotocol/clubs-core'
import { onMount } from 'svelte'
import { i18nFactory } from '@devprotocol/clubs-core'
import { Strings } from '../i18n'
import { Strings } from '../i18n'
export let name: string = 'Clubs'
export let name: string = 'Clubs'
const i18nBase = i18nFactory(Strings)
let i18n = i18nBase(['en'])
const i18nBase = i18nFactory(Strings)
let i18n = i18nBase(['en'])
onMount(() => {
i18n = i18nBase(navigator.languages)
})
onMount(() => {
i18n = i18nBase(navigator.languages)
})
</script>

<h2 class="text-center text-xl font-bold lg:text-4xl">
{i18n('About', [name])}
{i18n('About', [name])}
</h2>
6 changes: 3 additions & 3 deletions src/components/Card/Card.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
const { class: className } = Astro.props as {
blur?: boolean
class?: string
blur?: boolean
class?: string
}
---

<div class={`rounded-lg p-6 bg-black/5 ${className ? className : ''}`}>
<slot />
<slot />
</div>
30 changes: 15 additions & 15 deletions src/components/Header/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ import { ClubsLogo as Clubs } from '@devprotocol/clubs-core/layouts'
import type { ClubsPropsPages } from '@devprotocol/clubs-core'
const { connection = true } = Astro.props as ClubsPropsPages & {
connection?: boolean
connection?: boolean
}
---

<header class="absolute z-10 flex w-full items-center">
<a
href="https://www.clubs.place/"
class="absolute left-0 top-0 m-4 flex items-center justify-center gap-2"
><span
class="flex h-10 w-10 p-1 items-center justify-center rounded-full bg-[var(--backgroundColor)]"
><Clubs class="h-full" /></span
></a
>
<div
class="container mx-auto flex max-w-7xl items-center justify-between px-6 xl:px-0"
>
<i class="h-20" role="presentation"></i>
{connection && <slot name="header:connect-button" />}
</div>
<a
href="https://www.clubs.place/"
class="absolute left-0 top-0 m-4 flex items-center justify-center gap-2"
><span
class="flex h-10 w-10 items-center justify-center rounded-full bg-[var(--backgroundColor)] p-1"
><Clubs class="h-full" /></span
></a
>
<div
class="container mx-auto flex max-w-7xl items-center justify-between px-6 xl:px-0"
>
<i class="h-20" role="presentation"></i>
{connection && <slot name="header:connect-button" />}
</div>
</header>
14 changes: 7 additions & 7 deletions src/components/Hero/Description.svelte
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script lang="ts">
let open = false
let open = false
const onClick = () => {
open = !open
}
const onClick = () => {
open = !open
}
</script>

<!-- svelte-ignore a11y-click-events-have-key-events -->
<section class="cursor-pointer lg:cursor-auto" on:click={onClick}>
<p class={`overflow-hidden text-left lg:text-xl ${open ? '' : 'truncate'}`}>
<slot />
</p>
<p class={`overflow-hidden text-left lg:text-xl ${open ? '' : 'truncate'}`}>
<slot />
</p>
</section>
20 changes: 10 additions & 10 deletions src/components/MembershipTitle.svelte
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<script lang="ts">
import { onMount } from 'svelte'
import { i18nFactory } from '@devprotocol/clubs-core'
import { onMount } from 'svelte'
import { i18nFactory } from '@devprotocol/clubs-core'
import { Strings } from '../i18n'
import { Strings } from '../i18n'
export let hasSingleMembership: boolean = false
export let hasSingleMembership: boolean = false
const i18nBase = i18nFactory(Strings)
let i18n = i18nBase(['en'])
const i18nBase = i18nFactory(Strings)
let i18n = i18nBase(['en'])
onMount(() => {
i18n = i18nBase(navigator.languages)
})
onMount(() => {
i18n = i18nBase(navigator.languages)
})
</script>

<h2 class="text-center text-2xl font-bold lg:text-4xl">
{i18n(hasSingleMembership ? 'BecomeMember' : 'SelectMembership')}
{i18n(hasSingleMembership ? 'BecomeMember' : 'SelectMembership')}
</h2>
32 changes: 16 additions & 16 deletions src/components/Share/Share.svelte
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<script lang="ts">
export let title: string
export let text: string
export let url: string
export let className: string | undefined = undefined
export let title: string
export let text: string
export let url: string
export let className: string | undefined = undefined
const shareData = {
title,
text,
url,
}
const shareData = {
title,
text,
url,
}
const handleClick = async () => {
try {
await navigator.share(shareData)
} catch (err) {
console.error({ err })
}
}
const handleClick = async () => {
try {
await navigator.share(shareData)
} catch (err) {
console.error({ err })
}
}
</script>

<button on:click={handleClick} class={className ?? ''}><slot /></button>
24 changes: 12 additions & 12 deletions src/components/WaitForLaunch.svelte
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<script lang="ts">
import { onMount } from 'svelte'
import { i18nFactory } from '@devprotocol/clubs-core'
import { onMount } from 'svelte'
import { i18nFactory } from '@devprotocol/clubs-core'
import { Strings } from '../i18n'
import { Strings } from '../i18n'
const i18nBase = i18nFactory(Strings)
let i18n = i18nBase(['en'])
const i18nBase = i18nFactory(Strings)
let i18n = i18nBase(['en'])
onMount(() => {
i18n = i18nBase(navigator.languages)
})
onMount(() => {
i18n = i18nBase(navigator.languages)
})
</script>

<div
class="mx-auto my-8 w-full max-w-2xl rounded-lg bg-black/10 p-6 text-center"
class="mx-auto my-8 w-full max-w-2xl rounded-lg bg-black/10 p-6 text-center"
>
<h2 class="text-xl font-bold lg:text-4xl">
{i18n('WaitForLaunch')}
</h2>
<h2 class="text-xl font-bold lg:text-4xl">
{i18n('WaitForLaunch')}
</h2>
</div>
40 changes: 20 additions & 20 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import type { ClubsI18nParts } from '@devprotocol/clubs-core'

export const Strings = {
SelectMembership: {
en: 'Select a membership',
ja: 'メンバーシップを選択してください',
},
BecomeMember: {
en: 'Become a member',
ja: 'メンバーになる',
},
WaitForLaunch: {
en: 'Please wait for the launch',
ja: 'ローンチまでお待ちください',
},
About: {
en: ([name]) => `About ${name}`,
ja: ([name]) => `${name} について`,
},
JPY: {
en: 'JPY',
ja: '円',
},
SelectMembership: {
en: 'Select a membership',
ja: 'メンバーシップを選択してください',
},
BecomeMember: {
en: 'Become a member',
ja: 'メンバーになる',
},
WaitForLaunch: {
en: 'Please wait for the launch',
ja: 'ローンチまでお待ちください',
},
About: {
en: ([name]) => `About ${name}`,
ja: ([name]) => `${name} について`,
},
JPY: {
en: 'JPY',
ja: '円',
},
} satisfies ClubsI18nParts

0 comments on commit cd02b28

Please sign in to comment.