Skip to content

Commit c7c2c07

Browse files
authored
Merge pull request #205 from vuejs-jp/enhance/prepare-for-close-cfp
prepare for "close cfp"
2 parents aab7ee0 + aaf2a69 commit c7c2c07

File tree

4 files changed

+41
-38
lines changed

4 files changed

+41
-38
lines changed

apps/web/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ SUPABASE_URL=
66
SUPABASE_KEY=
77
SPEAKER_DATASOURCE= # local or supabase
88
SPONSOR_DATASOURCE= # local or supabase
9+
AVAILABLE_APPLY_SPEAKER=
910
AVAILABLE_APPLY_SPONSOR=
1011
ENABLE_INVITE_STAFF=
1112
ENABLE_OPERATE_ADMIN=

apps/web/app/components/SpeakerPageSection.vue

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import { useFetch } from '#imports'
3+
import SpeakerCfp from '~/components/speaker/SpeakerCfp.vue'
34
import { useLocaleCurrent } from '@/composables/useLocaleCurrent'
45
import type { SpeakerCategory, SpeakerInfo } from '@vuejs-jp/model'
56
@@ -17,9 +18,9 @@ const { sessionSpeakers, lightningTalkSpeakers, sponsorSessionSpeakers } = data.
1718

1819
<template>
1920
<div class="speaker">
20-
<SpeakerCfp />
21+
<article class="speaker-body-wrapper">
22+
<SpeakerCfp />
2123

22-
<article class="speaker-body">
2324
<div class="speaker-text">
2425
<MarkDownText path="speaker" />
2526
</div>
@@ -108,12 +109,7 @@ const { sessionSpeakers, lightningTalkSpeakers, sponsorSessionSpeakers } = data.
108109
}
109110
}
110111
111-
.title {
112-
text-align: center;
113-
line-height: 1.2;
114-
}
115-
116-
.speaker-body {
112+
.speaker-body-wrapper {
117113
margin: 0 1.5%;
118114
max-width: calc(960px + 6%);
119115
isolation: isolate;
@@ -168,7 +164,7 @@ const { sessionSpeakers, lightningTalkSpeakers, sponsorSessionSpeakers } = data.
168164
--speaker-row-gap: 0px;
169165
}
170166
171-
.speaker-body {
167+
.speaker-body-wrapper {
172168
--speaker-body-padding: calc(var(--unit) * 4) 4.5% calc(var(--unit) * 6);
173169
}
174170

apps/web/app/components/SpeakerCfp.vue renamed to apps/web/app/components/speaker/SpeakerCfp.vue

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ import { useColor } from '@vuejs-jp/composable'
44
import { useTranslation } from '@/composables/useTranslation'
55
import { useLocaleCurrent } from '@/composables/useLocaleCurrent'
66
import { cfpEnUrl, cfpJaUrl } from '~/utils/constants'
7+
import { useRuntimeConfig } from '#imports'
78
89
const { color } = useColor()
910
11+
const config = useRuntimeConfig()
12+
1013
const { t } = useI18n()
1114
const { translate } = useTranslation()
1215
@@ -26,40 +29,42 @@ const endPeriodTime = {
2629
</script>
2730

2831
<template>
29-
<article class="cfp-body">
32+
<div class="cfp-body">
3033
<VFTitle id="speakers" class="title">
3134
{{ $t('speaker.title') }}
3235
</VFTitle>
3336

34-
<div class="cfp-text">
35-
<MarkDownText path="speaker_cfp" />
36-
</div>
37-
38-
<h3 class="cfp-subtitle">
39-
{{ $t('speaker.application_period') }}
40-
</h3>
41-
<VFDateTime :date="endPeriodDate" :time="endPeriodTime" />
42-
43-
<div class="cfp-buttons">
44-
<VFLinkButton
45-
class="cfp-button"
46-
:href="currentLocale !== 'en' ? cfpJaUrl : cfpEnUrl"
47-
background-color="vue-green/200"
48-
color="white"
37+
<template v-if="config.public.availableApplySpeaker">
38+
<div class="cfp-text">
39+
<MarkDownText path="speaker_cfp" />
40+
</div>
41+
42+
<h3 class="cfp-subtitle">
43+
{{ $t('speaker.application_period') }}
44+
</h3>
45+
<VFDateTime :date="endPeriodDate" :time="endPeriodTime" />
46+
47+
<div class="cfp-buttons">
48+
<VFLinkButton
49+
class="cfp-button"
50+
:href="currentLocale !== 'en' ? cfpJaUrl : cfpEnUrl"
51+
background-color="vue-green/200"
52+
color="white"
53+
>
54+
{{ $t('speaker.apply') }}
55+
</VFLinkButton>
56+
</div>
57+
58+
<div
59+
class="cfp-more-information"
60+
:style="{
61+
color: color('vue-blue'),
62+
}"
4963
>
50-
{{ $t('speaker.apply') }}
51-
</VFLinkButton>
52-
</div>
53-
54-
<div
55-
class="cfp-more-information"
56-
:style="{
57-
color: color('vue-blue'),
58-
}"
59-
>
60-
<MarkDownText path="speaker_information" />
61-
</div>
62-
</article>
64+
<MarkDownText path="speaker_information" />
65+
</div>
66+
</template>
67+
</div>
6368
</template>
6469

6570
<style scoped>

apps/web/nuxt.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export default defineNuxtConfig({
159159
speakerDatasource : process.env.SPEAKER_DATASOURCE, // local or supabase
160160
sponsorDatasource : process.env.SPONSOR_DATASOURCE, // local or supabase
161161
// feature
162+
availableApplySpeaker: process.env.AVAILABLE_APPLY_SPEAKER,
162163
availableApplySponsor: process.env.AVAILABLE_APPLY_SPONSOR,
163164
enableInviteStaff: process.env.ENABLE_INVITE_STAFF,
164165
enableOperateAdmin: process.env.ENABLE_OPERATE_ADMIN,

0 commit comments

Comments
 (0)