Skip to content

Commit 1ce7d85

Browse files
authored
Merge pull request #420 from pycontw/feat/page-venue-accommodation
feat(venue): add accommodation page
2 parents 1987700 + 8577ff1 commit 1ce7d85

File tree

7 files changed

+234
-12
lines changed

7 files changed

+234
-12
lines changed

components/core/header/nav-bar/NavBar.i18n.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ export default genI18nMessages({
2929
tickets: 'Ticket Info',
3030
financialAid: 'Financial Aid',
3131
venue: 'Venue',
32+
venueInfo: 'Venue Info',
33+
accommodation: 'Accommodation',
3234
proposalSystemUrl: 'Proposal System',
3335
codeOfConduct: 'Code of Conduct',
3436
},
@@ -60,6 +62,8 @@ export default genI18nMessages({
6062
tickets: '購票資訊',
6163
financialAid: '財務補助',
6264
venue: '會場',
65+
venueInfo: '會場資訊',
66+
accommodation: '住宿資訊',
6367
proposalSystemUrl: '投稿系統',
6468
codeOfConduct: '行為準則',
6569
},

components/core/header/nav-bar/NavBar.vue

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,13 @@
5656
:class="getPageClassesByPath('registration')"
5757
>
5858
</nav-bar-item-dropdown>
59-
<locale-link
59+
<nav-bar-item-dropdown
6060
v-if="showVenuePage"
61-
to="/venue"
62-
:class="getPageClassesByPath('venue', true)"
63-
customized
61+
:label="$t('venue')"
62+
:items="venueItems"
63+
:class="getPageClassesByPath('venue')"
6464
>
65-
{{ $t('venue') }}
66-
</locale-link>
65+
</nav-bar-item-dropdown>
6766
<ext-link
6867
:href="proposalSystemUrl"
6968
:class="getPageClassesByPath('proposalSystemUrl', true)"
@@ -115,6 +114,12 @@ export default {
115114
this.$store.state.configs.registrationHideItems,
116115
)
117116
},
117+
venueItems() {
118+
return this.generateI18nItems(
119+
navBarItems.venue,
120+
this.$store.state.configs.venueHideItems,
121+
)
122+
},
118123
proposalSystemUrl() {
119124
return `https://tw.pycon.org/prs/${this.$i18n.locale}/dashboard/`
120125
},

components/core/header/nav-bar/NavBarHamburger.vue

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@
7474
:expanding="expandingItem === 'registration'"
7575
@click.native="toggleAccordion('registration')"
7676
></nav-bar-item-accordion>
77-
<locale-link
77+
<nav-bar-item-accordion
7878
v-if="showVenuePage"
79-
class="core-navBarHamburgerSlideInMenu__item"
80-
to="/venue"
81-
customized
82-
>{{ $t('venue') }}</locale-link
83-
>
79+
:label="$t('venue')"
80+
:items="venueItems"
81+
:expanding="expandingItem === 'venue'"
82+
@click.native="toggleAccordion('venue')"
83+
></nav-bar-item-accordion>
8484
<ext-link
8585
class="core-navBarHamburgerSlideInMenu__item"
8686
:href="proposalSystemUrl"
@@ -140,6 +140,12 @@ export default {
140140
this.$store.state.configs.registrationHideItems,
141141
)
142142
},
143+
venueItems() {
144+
return this.generateI18nItems(
145+
navBarItems.venue,
146+
this.$store.state.configs.venueHideItems,
147+
)
148+
},
143149
proposalSystemUrl() {
144150
return `https://tw.pycon.org/prs/${this.$i18n.locale}/dashboard/`
145151
},

components/core/header/nav-bar/nav-bar-items.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ export default Object.freeze({
2727
{ i18nKey: 'tickets', value: '/registration/tickets' },
2828
{ i18nKey: 'financialAid', value: '/registration/financial-aid' },
2929
],
30+
venue: [
31+
{ i18nKey: 'venueInfo', value: '/venue' },
32+
{ i18nKey: 'accommodation', value: '/venue/accommodation' },
33+
],
3034
})

i18n/venue/accommodation.i18n.js

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import { genI18nMessages } from '~/utils/i18n.utils'
2+
3+
export default genI18nMessages({
4+
'en-us': {
5+
title: 'Accommodation Guidelines',
6+
intro:
7+
'PyCon TW has on-site lodging at Academia Sinica Activities' +
8+
' Center, a 3-minute walk to the venue.',
9+
roomType: {
10+
fieldName: 'Room Type',
11+
content: ['Single room: NT$1,500/day', 'Twin room: NT$1,600/day'],
12+
remark:
13+
'An extra person is available for a single room for $150/day.' +
14+
' An extra bed is available for a twin room for $300/day',
15+
},
16+
roomFacilities: {
17+
fieldName: 'Room Facilities',
18+
content:
19+
'Room facilities include TV, Wi-Fi, water kettle,' +
20+
' hair dryer, bodywash and shampoo. No disposable toiletries ' +
21+
'(toothbrush, comb, razor, shower cap, soap and paper slippers) are provided. ' +
22+
'More information on {0}.',
23+
linkName: 'the original website',
24+
},
25+
applicationHowTo: {
26+
fieldName: 'Application Process',
27+
content:
28+
'To apply for on-site lodging, please send an email to {0}' +
29+
' (the venue team of PyCon TW) with the following information by 23:59, July 23:',
30+
applicationInfo: [
31+
'Check-in and check-out dates',
32+
'Number of people',
33+
'Room type and number of rooms',
34+
'Names and genders of guests',
35+
],
36+
remark:
37+
'Note: All date / time is represented in the UTC+08 time zone.' +
38+
' Early check-in and late check-out must be noted in advance.',
39+
},
40+
og: {
41+
title: 'Accommodation Guidelines',
42+
description:
43+
'Stay at the Academia Sinica Activity Center during PyCon TW, ' +
44+
'just a 3-minute walk from the venue. Choose from elegant single or double' +
45+
' rooms with optional extra beds, and enjoy amenities like TV, Wi-Fi, and toiletries.' +
46+
"Apply by emailing PyCon TW's venue team with your details.",
47+
},
48+
},
49+
'zh-hant': {
50+
title: '住宿指引',
51+
intro: 'PyCon TW 提供中研院學術活動中心的住宿,距會場約 3 分鐘走路路程,若有需要可以提出申請。',
52+
roomType: {
53+
fieldName: '房型',
54+
content: [
55+
'精緻單人房:新台幣 1,500 元/日',
56+
'精緻雙人房:新台幣 1,600 元/日',
57+
],
58+
remark: '單人房可加一人 150元/日;雙人房可加一床 300元/日',
59+
},
60+
roomFacilities: {
61+
fieldName: '客房設施',
62+
content:
63+
'客房設施包括電視、無線網路、熱水壺、吹風機、沐浴乳和洗髮精。' +
64+
'未提供一次性備品(牙刷、梳子、刮鬍刀、浴帽及紙拖鞋),請住宿人自行攜帶。' +
65+
'更多資訊請見 {0}。',
66+
linkName: '原住宿提供網站',
67+
},
68+
applicationHowTo: {
69+
fieldName: '申請流程',
70+
content:
71+
'請於 7 月 23 日 23:59 前寄信至 {0} (PyCon TW 場務組) 並提供以下資訊:',
72+
applicationInfo: [
73+
'入住和退房日期',
74+
'人數',
75+
'各房型所需之數目',
76+
'入住人員姓名與性別',
77+
],
78+
remark: '註:所有使用的時間皆為時區 UTC+08。提早 check-in 和晚 check-out 都需要事先告知。',
79+
},
80+
og: {
81+
title: '住宿指引',
82+
description:
83+
'在 PyCon TW 期間,您可以入住位於中央研究院活動中心的住宿,距離會場僅有三分鐘步行路程。' +
84+
'您可以選擇優雅的單人或雙人房,也可以選擇加床服務,同時享受電視、Wi-Fi和盥洗用品等設施。' +
85+
'請透過發送電子郵件至 PyCon TW 的會場團隊,提供您的詳細資料進行申請。',
86+
},
87+
},
88+
})

pages/venue/accommodation.vue

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<template>
2+
<i18n-page-wrapper>
3+
<core-h1 :title="$t('title')"></core-h1>
4+
<p class="mb-14 text-sm md:text-base">{{ $t('intro') }}</p>
5+
<div class="mx-auto w-full lg:w-9/12">
6+
<two-col-wrapper class="py-2 lg:py-5">
7+
<template #default>
8+
<p>{{ $t('roomType.fieldName') }}</p>
9+
</template>
10+
<template #right-col>
11+
<ul class="ml-[19px] list-outside list-disc">
12+
<li
13+
v-for="(content, i) in $t('roomType.content')"
14+
:key="`room_type_content_${i}`"
15+
>
16+
{{ content }}
17+
</li>
18+
</ul>
19+
<span>
20+
{{ $t('roomType.remark') }}
21+
</span>
22+
</template>
23+
</two-col-wrapper>
24+
25+
<two-col-wrapper>
26+
<template #default>
27+
<p>{{ $t('roomFacilities.fieldName') }}</p>
28+
</template>
29+
<template #right-col>
30+
<i18n path="roomFacilities.content" tag="p">
31+
<ext-link
32+
href="https://dga.sinica.edu.tw/posts/78730"
33+
highlight
34+
underline
35+
>{{ $t('roomFacilities.linkName') }}</ext-link
36+
>
37+
</i18n>
38+
</template>
39+
</two-col-wrapper>
40+
<two-col-wrapper>
41+
<template #default>
42+
<p>{{ $t('applicationHowTo.fieldName') }}</p>
43+
</template>
44+
<template #right-col>
45+
<i18n path="applicationHowTo.content" tag="p">
46+
<ext-link :href="`mailto:${venueTeamEmail}`" highlight
47+
>{{ venueTeamEmail }}
48+
</ext-link>
49+
</i18n>
50+
<ul class="ml-[19px] list-outside list-disc py-2">
51+
<li
52+
v-for="(item, i) in $t(
53+
'applicationHowTo.applicationInfo',
54+
)"
55+
:key="`application_info_${i}`"
56+
>
57+
{{ item }}
58+
</li>
59+
</ul>
60+
<span>
61+
{{ $t('applicationHowTo.remark') }}
62+
</span>
63+
</template>
64+
</two-col-wrapper>
65+
</div>
66+
</i18n-page-wrapper>
67+
</template>
68+
69+
<script>
70+
import I18nPageWrapper from '@/components/core/i18n/PageWrapper'
71+
import i18n from '@/i18n/venue/accommodation.i18n'
72+
import CoreH1 from '@/components/core/titles/H1'
73+
import TwoColWrapper from '@/components/core/layout/TwoColWrapper'
74+
import ExtLink from '@/components/core/links/ExtLink.vue'
75+
76+
export default {
77+
i18n,
78+
name: 'PageVenueHotels',
79+
components: {
80+
CoreH1,
81+
I18nPageWrapper,
82+
TwoColWrapper,
83+
ExtLink,
84+
},
85+
data() {
86+
return {
87+
venueTeamEmail: '[email protected]',
88+
}
89+
},
90+
head() {
91+
return {
92+
title: this.$i18n.t('title'),
93+
meta: [
94+
{
95+
hid: 'og:title',
96+
property: 'og:title',
97+
content: this.$i18n.t('og.title'),
98+
},
99+
{
100+
hid: 'og:description',
101+
property: 'og:description',
102+
content: this.$i18n.t('og.description'),
103+
},
104+
{
105+
hid: 'description',
106+
name: 'description',
107+
content: this.$i18n.t('og.description'),
108+
},
109+
],
110+
}
111+
},
112+
}
113+
</script>
114+
<style lang="postcss" scoped></style>

store/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const state = () => ({
2727
eventsHideItems: ['sprints', 'openSpaces'], // ['sprints', 'openSpaces', 'jobs']
2828
conferenceHideItems: [], // ['keynotes', 'talks', 'tutorials', 'youngInspirers']
2929
registrationHideItems: [], // ['tickets', 'financialAid']
30+
venueHideItems: [], // ['venueInfo', 'accommodation']
3031
},
3132
})
3233

0 commit comments

Comments
 (0)