Skip to content

Commit

Permalink
update period end
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyuujin committed Jul 10, 2024
1 parent f7c8824 commit f4a3074
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 9 deletions.
65 changes: 57 additions & 8 deletions apps/web/app/components/SponsorPageSection.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { useI18n } from '#i18n'
import { useFetch, useRuntimeConfig } from '#imports'
import { useFetch, useLocaleCurrent, useRuntimeConfig } from '#imports'
import { useColor, useTypography } from '@vuejs-jp/composable'
import { useTranslation } from '@/composables/useTranslation'
import SponsorList from './sponsor/SponsorList.vue'
Expand All @@ -15,18 +15,40 @@ const { color } = useColor()
const { t } = useI18n()
const { translate } = useTranslation()
const periodStart = {
prefixYear: t('prefix_year'),
date: t('sponsor.start_date'),
dayOfWeek: translate('day_of_week.monday'),
}
const currentLocale = useLocaleCurrent().locale
// const periodStart = {
// prefixYear: t('prefix_year'),
// date: t('sponsor.start_date'),
// dayOfWeek: translate('day_of_week.monday'),
// }
// const periodEnd = {
// suffixYear: t('suffix_year'),
// date: t('sponsor.end_date'),
// dayOfWeek: translate('day_of_week.thursday'),
// }
const firstPeriodEnd = {
prefixYear: t('prefix_year'),
suffixyear: t('suffix_year'),
date: t('sponsor.first_end_date'),
dayOfWeek: translate('day_of_week.wednesday'),
}
const secondPeriodEnd = {
prefixYear: t('prefix_year'),
suffixyear: t('suffix_year'),
date: t('sponsor.second_end_date'),
dayOfWeek: translate('day_of_week.saturday'),
}
const endPeriodTime = {
hour: t('speaker.end_hour'),
minute: t('speaker.end_minute'),
ampm: currentLocale.value === 'en' && t('speaker.end_ampm'),
}
const { data, error } = await useFetch('/api/sponsors')
if (error.value) {
console.error(error.value)
Expand Down Expand Up @@ -72,9 +94,30 @@ const {
}"
class="sponsor-subtitle"
>
{{ $t('sponsor.apply_period') }}
{{ $t('sponsor.apply_deadline') }}
</h3>
<VFDatePeriod :start="periodStart" />
<p
:style="{
fontWeight: fontWeight('heading/100'),
fontSize: fontSize('heading/100'),
color: color('vue-blue'),
}"
class="sponsor-subtitle-category"
>
{{ $t('sponsor.creative_wall_drinks_snacks_merchandise') }}
</p>
<VFDateTime :date="firstPeriodEnd" :time="endPeriodTime" />
<p
:style="{
fontWeight: fontWeight('heading/100'),
fontSize: fontSize('heading/100'),
color: color('vue-blue'),
}"
class="sponsor-subtitle-category"
>
{{ $t('sponsor.all_others') }}
</p>
<VFDateTime :date="secondPeriodEnd" :time="endPeriodTime" />
</template>

<div class="sponsor-buttons">
Expand Down Expand Up @@ -180,6 +223,12 @@ const {
-webkit-background-clip: text;
}
.sponsor-subtitle-category {
text-align: center;
line-height: 1.2;
margin-top: calc(var(--unit) * 2.5);
}
.sponsor-term {
display: block;
margin: var(--sponsor-term-margin);
Expand Down
5 changes: 5 additions & 0 deletions apps/web/app/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@
"title": "Sponsors",
"apply": "Apply",
"apply_period": "Sponsor Application Period",
"apply_deadline": "Sponsor Application Deadline",
"creative_wall_drinks_snacks_merchandise": "Creative wall, drinks, snacks, merchandise sponsor",
"all_others": "All other sponsors",
"check_doc": "View Sponsorship materials",
"start_date": "May 13",
"end_date": "25,",
"first_end_date": "July 31",
"second_end_date": "August 31",
"platinum": "Platinum",
"gold": "Gold",
"silver": "Silver",
Expand Down
8 changes: 7 additions & 1 deletion apps/web/app/lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"monday": "",
"tuesday": "",
"wednesday": "",
"thursday": ""
"thursday": "",
"saturday": ""
},
"top_page": {
"latest_information": "最新情報は公式SNSでご紹介しています",
Expand Down Expand Up @@ -43,9 +44,14 @@
"title": "スポンサー",
"apply": "申し込む",
"apply_period": "スポンサー申込期間",
"apply_deadline": "スポンサー申込締切",
"creative_wall_drinks_snacks_merchandise": "クリエイティブウォール、ドリンク、スナック、グッズスポンサー",
"all_others": "その他すべてのスポンサー",
"check_doc": "資料を見る",
"start_date": "5.13",
"end_date": "4.25",
"first_end_date": "7.31",
"second_end_date": "8.31",
"platinum": "プラチナ",
"gold": "ゴールド",
"silver": "シルバー",
Expand Down

0 comments on commit f4a3074

Please sign in to comment.