Files
web-temp/layers/components/layouts/Footer.vue
2025-10-27 10:25:58 +09:00

232 lines
9.3 KiB
Vue

<template>
<footer id="footer" ref="footerRef" class="bg-black">
<div
class="inner relative max-w-7xl mx-auto px-10 py-9 text-[12px] text-gray-400 md:px-4 md:py-9 md:text-[12px]"
>
<div class="menu-area">
<ul class="flex items-center flex-wrap md:gap-6">
<li
v-for="(footerMenuItem, index) in footerLinks"
:key="index"
class="text-sm md:text-[11px] md:tracking-[-0.5px] relative flex items-center"
>
<NuxtLink
:to="footerMenuItem.url"
:target="footerMenuItem.target"
:class="[
footerMenuItem.active === 'y' && 'text-[#e04600]',
index === 2 && 'text-[#fff]',
'hover:text-gray-600 transition-colors',
]"
>
{{ footerMenuItem.title }}
</NuxtLink>
</li>
<li class="relative">
<button class="hover:text-gray-600 transition-colors" @click="toggleAgeRating">
{{ tm('Footer_AgeRating') }}
</button>
<div v-if="showAgeRating" class="game-rating-card absolute bottom-6 left-1/2 -translate-x-1/2 bg-[#383838] rounded-lg w-[340px] mx-auto z-10">
<!-- 헤더 -->
<div class="px-6 py-4 rounded-t-lg flex justify-between items-center">
<h3 class="text-white text-base">{{ tm('Footer_AgeRating') }}</h3>
<button class="text-white hover:text-gray-300 transition-colors" @click="toggleAgeRating">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>
<!-- 등급 아이콘 그리드 -->
<div class="px-6 pt-2 pb-6">
<!-- 아이콘은 52x60 사이즈 갭은 4px 4개씩 그리드 레이아웃 -->
<div class="grid grid-cols-4 gap-[4px] mb-4 max-w-[220px] justify-start items-start">
<!-- 19 등급 -->
<div v-for="image in getGameRatingImage" :key="image" class="text-center">
<img :src="image" alt="게임이용등급안내" class="w-full h-full object-contain" />
</div>
<div v-for="image in getContentInfoImage" :key="image" class="text-center">
<img :src="image" alt="게임이용등급안내" class="w-full h-full object-contain" />
</div>
</div>
</div>
<!-- 정보 테이블 -->
<div class="px-6 py-6 rounded-b-lg bg-[#A31639]">
<div class="space-y-2">
<div class="flex flex-start border-b border-white/10 pb-2">
<span class="text-white text-sm flex-1">{{ tm('Footer_AgeRating_Info')[0] }}</span>
<span class="text-white text-sm flex-1">{{ footerData.game_rating_info.company_name }}</span>
</div>
<div class="flex flex-start border-b border-white/10 pb-2">
<span class="text-white text-sm flex-1">{{ tm('Footer_AgeRating_Info')[1] }}</span>
<span class="text-white text-sm flex-1">{{ footerData.game_rating_info.rating_grade }}</span>
</div>
<div class="flex flex-start border-b border-white/10 pb-2">
<span class="text-white text-sm flex-1">{{ tm('Footer_AgeRating_Info')[2] }}</span>
<span class="text-white text-sm flex-1">{{ footerData.game_rating_info.reg_no }}</span>
</div>
<div class="flex flex-start border-b border-white/10 pb-2">
<span class="text-white text-sm flex-1">{{ tm('Footer_AgeRating_Info')[3] }}</span>
<span class="text-white text-sm flex-1">{{ footerData.game_rating_info.prod_date }}</span>
</div>
<div class="flex flex-start">
<span class="text-white text-sm flex-1">{{ tm('Footer_AgeRating_Info')[4] }}</span>
<span class="text-white text-sm flex-1">{{ footerData.game_rating_info.rating_class_no }}</span>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="address-area mt-6">
<address class="not-italic text-gray-500">
<div class="row my-1.5 leading-5">
<span
v-dompurify-html="tm('Footer_Address')"
class="[&_a]:cursor-pointer [&_a]:text-blue-500 [&_a]:underline"
></span>
</div>
</address>
</div>
<div class="mt-6 md:mt-6">
<div class="text-xs text-white/30">{{ tm('Footer_caution') }}</div>
</div>
<div class="copyright-area mt-6 text-gray-500 md:mt-4">
<span>&copy; Smilegate. All rights reserved</span>
</div>
<div class="logo-area flex mt-6 md:mt-6">
<a
href="https://www.smilegate.com"
target="_blank"
class="smilegate"
>
<img
src="https://static-pubcomm.gate8.com/local/template/l9/common/logo_smilegate.png"
alt="스마일게이트 로고"
class="w-auto h-auto"
/>
</a>
<a
v-if="setDevCi.dev_ci_yn"
:href="footerData.use_dev_ci_url"
target="_blank"
class="nx3 ml-2.5 md:ml-4"
>
<img
src="https://static-pubcomm.gate8.com/local/template/l9/common/logo_nx3.png"
alt="CI"
class="w-auto h-auto"
/>
<!-- <img
:src="setDevCi.dev_ci_img_path"
alt="CI"
class="w-auto h-auto"
/> -->
</a>
</div>
<div
class="language-area absolute bottom-7 right-10 text-white md:bottom-5.5 md:right-4"
>
<BlocksLanguageSwitcher />
<!-- <SelectLanguage /> -->
<!-- <AtomsLanguageSwitcher /> -->
</div>
</div>
</footer>
</template>
<script setup lang="ts">
const { tm } = useI18n()
const gameDataStore = useGameDataStore()
const { gameData } = storeToRefs(gameDataStore)
const config = useRuntimeConfig()
const staticUrl = config.public.staticUrl
// 공통다국어 data
const footerLinks = computed(() => {
return tm('Footer_Menu') as unknown as any[]
})
const footerData = ref(gameData.value?.footer_json as any)
const setDevCi = ref({
dev_ci_yn: gameData.value?.footer_dev_ci_img_yn as boolean,
dev_ci_img_path: gameData.value?.footer_dev_ci_img_path as string,
})
///local/template/common/grades_age
const getGameRatingImage = computed(() => {
const contentInfo = footerData.value.game_rating_info.rating_type.split(',')
// rating_type 12, 15, 18, 19 에 따라 이미지명을 가져오고 이미지를 반환
return contentInfo.map(item => {
if (item === '12') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/Type12.svg`
} else if (item === '15') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/Type15.svg`
} else if (item === '19') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/Type19.svg`
} else if (item === 'all') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/TypeAll.svg`
} else if (item === 'e') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/TypeExempt.svg`
} else {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/TypeTest.svg`
}
})
})
const getContentInfoImage = computed(() => {
const contentInfo = footerData.value.game_rating_info.content_info.split(',')
contentInfo.pop()
return contentInfo.map(item => {
if (item === '1') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-sexual.svg`
} else if (item === '2') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-fear.svg`
} else if (item === '3') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-inapposite.svg`
} else if (item === '4') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-drug.svg`
} else if (item === '5') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-crime.svg`
} else if (item === '6') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-speculation.svg`
} else if (item === '7') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-violence.svg`
}
})
})
const showAgeRating = ref(false)
const toggleAgeRating = () => {
showAgeRating.value = !showAgeRating.value
}
</script>
<style scoped>
/* 태국어 폰트 크기 조정 */
@media (max-width: 411px) {
:global(.lang-th) .menu-area li {
font-size: 10px;
}
}
@media (max-width: 321px) {
:global(.lang-th) .menu-area li {
font-size: 9px;
}
}
</style>