Skip to content

Commit ea27cdd

Browse files
authored
Merge pull request #357 from vuejs-jp/fix/resize-images
fix: 画像サイズを修正
2 parents 4b5881b + b2fda42 commit ea27cdd

24 files changed

+152
-74
lines changed

apps/web/app/components/AccessPageSection.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ const { color } = useColor()
6363
</div>
6464

6565
<figure class="place_image">
66-
<img src="/access/fig_access01.jpg" alt="" />
67-
<img src="/access/fig_access02.jpg" alt="" />
66+
<img src="/access/fig_access01.jpg" alt="" loading="lazy" />
67+
<img src="/access/fig_access02.jpg" alt="" loading="lazy" />
6868
</figure>
6969

7070
</div>

apps/web/app/components/CooperationPartnerSection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<source srcset="/logo/logo_vueconf-de.png" media="(min-width: 768px)" />
1111
<img
1212
src="/logo/logo_vueconf-de_sp.png"
13-
loading="lazy"
1413
alt="vuejs.de"
1514
class="partner-image"
15+
loading="lazy"
1616
/>
1717
</picture>
1818
</NuxtLink>

apps/web/app/components/TeamPageSection.vue

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ const props = defineProps<{
1111
1212
const config = useRuntimeConfig()
1313
14-
const coreTeam = config.public.staffDatasource === 'supabase' ? props.data.coreStaffs.list : teamData
15-
const volunteerTeam = config.public.staffDatasource === 'supabase'
16-
? props.data.volunteerStaffs.list.map((staff) => staff.name)
17-
: volunteers
14+
const coreTeam =
15+
config.public.staffDatasource === 'supabase' ? props.data.coreStaffs.list : teamData
16+
const volunteerTeam =
17+
config.public.staffDatasource === 'supabase'
18+
? props.data.volunteerStaffs.list.map((staff) => staff.name)
19+
: volunteers
1820
// const team = teamData
1921
</script>
2022

@@ -32,8 +34,13 @@ const volunteerTeam = config.public.staffDatasource === 'supabase'
3234
<div class="team-members-container">
3335
<div v-for="member in coreTeam" :key="member.name" class="team-member-wrapper">
3436
<template v-if="member.x_id !== ''">
35-
<a :href="`https://x.com/${member.x_id}`" target="_blank" :aria-label="member.name">
36-
<VFAvatar :src="member.image_url" :alt="member.name" />
37+
<a
38+
:href="`https://x.com/${member.x_id}`"
39+
target="_blank"
40+
:aria-label="member.name"
41+
class="team-member-link"
42+
>
43+
<VFAvatar :src="member.image_url" :alt="member.name" size="medium" />
3744
</a>
3845
<div class="team-member-info">
3946
<VFTextLink
@@ -47,7 +54,7 @@ const volunteerTeam = config.public.staffDatasource === 'supabase'
4754
</div>
4855
</template>
4956
<template v-else>
50-
<VFAvatar :src="member.image_url" :alt="member.name" />
57+
<VFAvatar :src="member.image_url" :alt="member.name" size="medium" />
5158
<div class="team-member-info">
5259
<span class="team-member-name">{{ member.name }} </span>
5360
</div>
@@ -153,6 +160,10 @@ const volunteerTeam = config.public.staffDatasource === 'supabase'
153160
gap: 8px;
154161
}
155162
163+
.team-member-link {
164+
width: 100%;
165+
}
166+
156167
.team-member-name {
157168
--team-member-name-font-size: 0.875rem;
158169

apps/web/app/components/TopPageSection.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const getAnchorPath = computed(
2121
<p class="place">
2222
Otemachi PLACE HALL &amp; CONFERENCE
2323
<br /><time datetime="2024-10-19T00:00+09:00"
24-
>{{ $t('top_page.date') }}<template v-if="locale === 'ja'"><span class="day-of-week">SAT</span></template></time
24+
>{{ $t('top_page.date')
25+
}}<template v-if="locale === 'ja'"><span class="day-of-week">SAT</span></template></time
2526
>
2627
</p>
2728
</div>
@@ -80,11 +81,12 @@ const getAnchorPath = computed(
8081
z-index: -1;
8182
width: 100%;
8283
}
84+
8385
.image-wrapper {
8486
position: relative;
8587
width: 100%;
8688
height: var(--background-image-height);
87-
background-image: url('/main-visual.png');
89+
background-image: url('/main-visual.jpg');
8890
background-size: cover;
8991
background-repeat: no-repeat;
9092
background-position: top;
@@ -149,8 +151,8 @@ const getAnchorPath = computed(
149151
}
150152
.image-wrapper {
151153
background-size: auto 100%;
154+
background-image: url('/main-visual-mobile.jpg');
152155
}
153-
154156
.section-title {
155157
font-size: var(--font-size-heading500);
156158
font-weight: 700;

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,24 @@
22
import type { Event } from '@vuejs-jp/model'
33
44
interface EventAssetProps {
5-
title: Extract<Event, 'creative-wall' | 'free-drinks-and-snacks' | 'tattoo-space' | 'cocktail-bash'>
5+
title: Extract<
6+
Event,
7+
'creative-wall' | 'free-drinks-and-snacks' | 'tattoo-space' | 'cocktail-bash'
8+
>
69
marginTop?: number
710
}
811
912
const props = defineProps<EventAssetProps>()
1013
</script>
1114

1215
<template>
13-
<img :src="`/event/${title}.png`" alt="" class="eventcard-image" :style="{ marginTop: `${marginTop}px` }" />
16+
<NuxtImg
17+
:src="`/event/${title}.png`"
18+
alt=""
19+
class="eventcard-image"
20+
:style="{ marginTop: `${marginTop}px` }"
21+
loading="lazy"
22+
/>
1423
</template>
1524

1625
<style scoped>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const props = defineProps<EventCardProps>()
1717
:title="$t(`event.${title.replaceAll('-', '_')}`)"
1818
:font-class
1919
:padding-class
20+
class="frame"
2021
>
2122
<template #content>
2223
<div class="eventcard-content">
@@ -34,6 +35,13 @@ const props = defineProps<EventCardProps>()
3435
<style scoped>
3536
@import url('~/assets/media.css');
3637
38+
.frame {
39+
display: flex;
40+
flex-direction: column;
41+
align-items: space-between;
42+
justify-content: space-between;
43+
}
44+
3745
.eventcard-content {
3846
font-size: 16px;
3947
font-weight: 500;

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

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@ const props = defineProps<EventMultipleAssetsProps>()
1616
'--head-img-height': `${imgHeight}px`,
1717
}"
1818
>
19-
<img v-for="(title, key) in titleList" :key :src="`/event/${title}-${key + 1}.png`" alt="" />
19+
<NuxtImg
20+
v-for="(title, key) in titleList"
21+
:key
22+
:src="`/event/${title}-${key + 1}.png`"
23+
alt=""
24+
width="792"
25+
height="512"
26+
fit="cover"
27+
loading="lazy"
28+
class="image"
29+
/>
2030
</div>
2131
</template>
2232

@@ -34,9 +44,10 @@ const props = defineProps<EventMultipleAssetsProps>()
3444
}
3545
}
3646
37-
.eventcard-images ::v-deep(img) {
47+
.image {
48+
height: var(--head-img-height);
49+
width: auto;
3850
padding: 0;
3951
margin: 0 auto;
40-
height: var(--head-img-height);
4152
}
4253
</style>

apps/web/app/components/sponsor/SponsorList.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ const currentLocale = useLocaleCurrent().locale
2222
class="sponsor-list-item-link"
2323
:to="`${currentLocale === 'ja' ? '/' : `/${currentLocale}/`}sponsors/${item['detail_page_id']}`"
2424
>
25-
<img class="sponsor-list-item-image" :src="item['image_url']" :alt="item.name" />
25+
<NuxtImg
26+
class="sponsor-list-item-image"
27+
:src="item['image_url']"
28+
:alt="item.name"
29+
loading="lazy"
30+
/>
2631
</NuxtLink>
2732
</li>
2833
</ul>

apps/web/app/components/ticket/NamecardSection.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ const { locale: currentLocale } = useLocaleCurrent()
2424
</div>
2525

2626
<div class="content-wrapper">
27-
<img :src="'/namecard/namecard-samples.png'" alt="test" />
27+
<NuxtImg
28+
:src="'/namecard/namecard-samples.png'"
29+
alt="test"
30+
width="596"
31+
loading="lazy"
32+
/>
2833
<div class="buttons-wrapper">
2934
<VFLinkButton
3035
class="action-button"

apps/web/app/components/ticket/PersonalSponsorSection.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import { ticketUrl } from '~/utils/constants'
1414
:key="i"
1515
:title="$t(`personal_sponsor.merit${i}.title`)"
1616
:detail="$t(`personal_sponsor.merit${i}.detail`)"
17-
:caution="(i === 2 || i === 4) ? $t(`personal_sponsor.merit${i}.caution`) : ''"
17+
:caution="i === 2 || i === 4 ? $t(`personal_sponsor.merit${i}.caution`) : ''"
1818
>
19-
<img alt="" :src="`/sponsor/merit-${i}.jpg`" />
19+
<NuxtImg alt="" :src="`/sponsor/merit-${i}.jpg`" loading="lazy" class="image" />
2020
</VFMeritCard>
2121
</div>
2222
<div class="personal-sponsor-text">
@@ -89,6 +89,12 @@ import { ticketUrl } from '~/utils/constants'
8989
color: var(--color-white);
9090
}
9191
92+
.image {
93+
width: 100%;
94+
height: 100%;
95+
object-fit: cover;
96+
}
97+
9298
.apply {
9399
display: flex;
94100
flex-direction: column;
@@ -109,7 +115,8 @@ import { ticketUrl } from '~/utils/constants'
109115
110116
@media (--tablet) {
111117
.personal-sponsor-body {
112-
--personal-sponsor-body-padding: calc(var(--unit) * 4) calc(var(--unit) * 2) calc(var(--unit) * 4);
118+
--personal-sponsor-body-padding: calc(var(--unit) * 4) calc(var(--unit) * 2)
119+
calc(var(--unit) * 4);
113120
}
114121
115122
.personal-sponsor-body h3 {

0 commit comments

Comments
 (0)