Skip to content

Commit c9c7cd7

Browse files
authored
Merge pull request #200 from vuejs-jp/enhance/event-page-section
EventPageSection (WIP)
2 parents 67bbca3 + 8fae375 commit c9c7cd7

File tree

14 files changed

+160
-7
lines changed

14 files changed

+160
-7
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<script setup lang="ts">
2+
import type { Event } from '@vuejs-jp/model'
3+
4+
interface EventAssetProps {
5+
title: Extract<Event, 'creative-wall' | 'refreshment-space' | 'tattoo-booth'>
6+
}
7+
8+
const props = defineProps<EventAssetProps>()
9+
</script>
10+
11+
<template>
12+
<div class="eventcard-image">
13+
<img :src="`/event/${title}.png`" alt="" />
14+
</div>
15+
</template>
16+
17+
<style scoped>
18+
.eventcard-image {
19+
--head-img-width: 292px;
20+
}
21+
22+
.eventcard-image ::v-deep(img) {
23+
width: var(--head-img-width);
24+
25+
@media (--mobile) {
26+
--head-img-width: 100%;
27+
}
28+
}
29+
</style>

apps/web/app/components/event/EventCard.vue

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,32 @@ const props = defineProps<EventCardProps>()
1111
<template>
1212
<VFEventFrame :title="$t(`event.${title.replaceAll('-', '_')}`)">
1313
<template #content>
14-
<MarkdownText :path="title.replaceAll('-', '_')" />
14+
<div class="eventcard-content">
15+
<MarkDownText :path="title.replaceAll('-', '_')" />
16+
</div>
1517
</template>
1618
<template #default>
17-
Test
19+
<slot />
1820
</template>
1921
</VFEventFrame>
2022
</template>
23+
24+
<style scoped>
25+
.eventcard-content {
26+
font-size: 16px;
27+
font-weight: 500;
28+
line-height: 25.6px;
29+
color: var(--color-vue-blue);
30+
}
31+
32+
.eventcard-content ::v-deep(a) {
33+
color: var(--color-vue-green200);
34+
text-decoration: underline;
35+
}
36+
37+
.eventcard-content ::v-deep(a:hover) {
38+
opacity: 0.4;
39+
transition: .2s;
40+
}
41+
42+
</style>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<script setup lang="ts">
2+
import type { Event } from '@vuejs-jp/model'
3+
4+
interface EventMultipleAssetsProps {
5+
title?: Extract<Event, 'vuejs-handson'>
6+
}
7+
8+
const props = withDefaults(defineProps<EventMultipleAssetsProps>(), {
9+
title: 'vuejs-handson',
10+
})
11+
</script>
12+
13+
<template>
14+
<div class="eventcard-images">
15+
<img :src="`/event/${title}-1.png`" alt="" />
16+
<img :src="`/event/${title}-2.png`" alt="" />
17+
</div>
18+
</template>
19+
20+
<style scoped>
21+
@import url('~/assets/media.css');
22+
23+
.eventcard-images {
24+
display: flex;
25+
gap: calc(var(--unit) * 1.5);
26+
27+
@media (--mobile) {
28+
flex-direction: column;
29+
}
30+
}
31+
32+
.eventcard-images ::v-deep(img) {
33+
--head-img-height: 192px;
34+
35+
height: var(--head-img-height);
36+
}
37+
</style>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<script setup lang="ts">
2+
import type { Speaker } from '@vuejs-jp/model'
3+
import { useLocaleCurrent } from '~/composables/useLocaleCurrent'
4+
5+
interface PanelerListProps {
6+
panelers: Speaker[]
7+
}
8+
9+
const props = defineProps<PanelerListProps>()
10+
11+
const currentLocale = useLocaleCurrent().locale
12+
</script>
13+
14+
<template>
15+
<h4>{{ $t('event.scheduled_speakers') }}</h4>
16+
<div class="eventcard-persons">
17+
<VFSpeaker
18+
v-for="paneler in panelers"
19+
:key="paneler.id"
20+
:image="paneler.image_url"
21+
:company="currentLocale === 'en' ? paneler.caption_en : paneler.caption_ja"
22+
:division="currentLocale === 'en' ? paneler.description_en : paneler.description_ja"
23+
:name="currentLocale === 'en' ? paneler.name_en : paneler.name_ja"
24+
:github-id="paneler.github_id"
25+
:x-id="paneler.x_id"
26+
/>
27+
</div>
28+
</template>
29+
30+
<style scoped>
31+
.eventcard-persons {
32+
--head-img-width: 193px;
33+
34+
display: flex;
35+
gap: calc(var(--unit) * 2);
36+
}
37+
38+
.eventcard-persons ::v-deep(img) {
39+
width: var(--head-img-width);
40+
41+
@media (--mobile) {
42+
--head-img-width: 93px;
43+
}
44+
}
45+
</style>

apps/web/app/lang/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
"end_ampm": "pm"
2424
},
2525
"event": {
26+
"title": "Event",
27+
"scheduled_speakers": "Scheduled Speakers",
2628
"welcome_vuejs_community": "Welcome to the Vue.js community!",
2729
"vuejs_handson": "Vue.js / Nuxt Hands-on",
2830
"nextgen_frontend_crosstalk": "Next generation front-end crosstalk",

apps/web/app/lang/ja.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
"end_minute": "00"
4242
},
4343
"event": {
44+
"title": "イベント",
45+
"scheduled_speakers": "登壇予定者",
4446
"welcome_vuejs_community": "Vue.jsコミュニティにようこそ!",
4547
"vuejs_handson": "Vue.js / Nuxt ハンズオン",
4648
"nextgen_frontend_crosstalk": "次世代フロントエンドクロストーク",
115 KB
Loading
113 KB
Loading
119 KB
Loading
39.4 KB
Loading

0 commit comments

Comments
 (0)