diff --git a/app/app.vue b/app/app.vue index 7731032..b74de48 100644 --- a/app/app.vue +++ b/app/app.vue @@ -57,6 +57,7 @@ const createStyleLinks = (faviconJson: GameDataImg, fontPath: string = '') => { // 메타 태그 생성 헬퍼 const createMetaTags = (metaTag: Partial = {}) => { + if (!metaTag) return [] const metaList = [ { name: 'description', content: metaTag.page_desc }, { property: 'og:title', content: metaTag.og_title }, @@ -92,11 +93,11 @@ const createStyleCss = (keyColorJson: GameDataKeyColors) => { // 게임 헤드 설정 const setupGameHead = (data: GameDataValue) => { try { - const metaTag: Partial = data.meta_tag_json ?? {} + const metaTag: Partial = data?.meta_tag_json ?? {} const designTheme = data.design_theme === 1 ? 'light' : 'dark' const styleLinks = createStyleLinks( data.favicon_json, - data?.game_font?.font_path + data?.game_font_json?.font_path ) const styleCss = createStyleCss(data.key_color_json) diff --git a/app/pages/inspection/index.vue b/app/pages/inspection/index.vue index 86d570b..e809eba 100644 --- a/app/pages/inspection/index.vue +++ b/app/pages/inspection/index.vue @@ -207,7 +207,7 @@ const enabledMarkets = computed(() => { const logoImgUrl = computed(() => { const currentLocale = locale.value || 'ko' const localeData = (webInspectionData.value as any)?.[currentLocale] - return formatPathHost(localeData?.img_json.bi_large) + return formatPathHost(localeData?.img_json?.bi_large) }) const communityUrl = computed(() => { diff --git a/layers/assets/css/components/_splide.css b/layers/assets/css/components/_splide.css index 1494a8a..8c1c71d 100644 --- a/layers/assets/css/components/_splide.css +++ b/layers/assets/css/components/_splide.css @@ -38,8 +38,4 @@ .type-full .splide__arrow--next { @apply right-10; } - - .splide-arrow svg { - @apply hidden; - } } diff --git a/layers/components/atoms/Button/Circle.vue b/layers/components/atoms/Button/Circle.vue index 0c76db0..6b143a6 100644 --- a/layers/components/atoms/Button/Circle.vue +++ b/layers/components/atoms/Button/Circle.vue @@ -21,7 +21,6 @@ const componentTag = computed((): string => { return 'button' } }) - const componentProps = computed(() => { switch (props.type) { case 'link': @@ -34,7 +33,9 @@ const componentProps = computed(() => { @@ -51,4 +52,8 @@ const componentProps = computed(() => { .btn-circle:deep(svg) { @apply w-[20px] h-[20px] md:w-[24px] md:h-[24px]; } + +.icon { + @apply transition-transform duration-300 ease-spring; +} diff --git a/layers/components/atoms/Button/Play.vue b/layers/components/atoms/Button/Play.vue index 3c1ae77..946a705 100644 --- a/layers/components/atoms/Button/Play.vue +++ b/layers/components/atoms/Button/Play.vue @@ -2,6 +2,7 @@ import type { TrackingObject } from '#layers/types/api/common' interface Props { + bgColor?: string tracking: TrackingObject } @@ -16,15 +17,29 @@ const handlePlayClick = () => { diff --git a/layers/components/atoms/Button/index.vue b/layers/components/atoms/Button/index.vue index 07b8b7c..c7452bf 100644 --- a/layers/components/atoms/Button/index.vue +++ b/layers/components/atoms/Button/index.vue @@ -10,6 +10,8 @@ interface props { backgroundColor?: string textColor?: string disabled?: boolean + gradient?: boolean + useGameFont?: boolean } const props = withDefaults(defineProps(), { @@ -19,8 +21,13 @@ const props = withDefaults(defineProps(), { target: '_self', textColor: 'var(--alternative-02)', disabled: false, + gradient: false, + useGameFont: false, }) +const gameDataStore = useGameDataStore() +const { fontFamily } = storeToRefs(gameDataStore) + const componentTag = computed((): string => { switch (props.type) { case 'external': @@ -29,17 +36,11 @@ const componentTag = computed((): string => { case 'download': return props.href ? 'a' : 'button' case 'internal': - return 'AtomsLocaleLink' + return props.href ? 'AtomsLocaleLink' : 'button' default: return 'button' } }) -const backgroundColor = computed(() => { - if (props.backgroundColor) { - return props.backgroundColor - } - return props.variant === 'filled' ? 'var(--primary)' : 'white' -}) const componentProps = computed(() => { if (props.type === 'external' || props.type === 'link') { return { @@ -49,9 +50,12 @@ const componentProps = computed(() => { } if (props.type === 'internal') { - return { - to: props.href, + if (props.href) { + return { + to: props.href, + } } + return {} } if (props.type === 'download') { @@ -67,6 +71,30 @@ const componentProps = computed(() => { return {} }) +const textColor = computed(() => { + return props.textColor ? props.textColor : 'var(--text-secondary)' +}) +const buttonStyle = computed(() => { + const backgroundColor = + props.variant === 'filled' ? 'var(--primary)' : 'white' + const style: Record = { + backgroundColor: props.backgroundColor ?? backgroundColor, + '--disabled-color': textColor.value, + } + + return style +}) +const textStyle = computed(() => { + const style: Record = { + color: textColor.value, + } + + if (props.useGameFont && fontFamily.value) { + style.fontFamily = fontFamily.value + } + + return style +}) @@ -34,4 +36,7 @@ const handleScrollToTop = () => { .btn-top { @apply bg-[image:var(--button-top)] bg-center bg-cover bg-no-repeat; } +.btn-top:hover :deep(.icon) { + @apply -translate-y-[3px]; +} diff --git a/layers/components/blocks/Button/SlideArrows.vue b/layers/components/blocks/Button/SlideArrows.vue index e2b9f72..9acdba9 100644 --- a/layers/components/blocks/Button/SlideArrows.vue +++ b/layers/components/blocks/Button/SlideArrows.vue @@ -10,6 +10,13 @@ const props = defineProps() const { locale } = useI18n() const { sendLog } = useAnalytics() +const getArrowBgColor = (direction: 'prev' | 'next') => { + return getColorCodeFromData( + props.arrowsData?.[direction === 'prev' ? 0 : 1]?.display, + 'none' + ) +} + const handleArrowClick = (direction: 'prev' | 'next') => { if (props.arrowsData) { const arrowIndex = direction === 'prev' ? 0 : 1 @@ -23,12 +30,28 @@ const handleArrowClick = (direction: 'prev' | 'next') => { + > + + + > + + + + diff --git a/layers/components/blocks/DatePicker.vue b/layers/components/blocks/DatePicker.vue index 28de42d..109ad5d 100644 --- a/layers/components/blocks/DatePicker.vue +++ b/layers/components/blocks/DatePicker.vue @@ -436,7 +436,7 @@ onMounted(() => { > {{ t('Text_MonthYear', { month: month + 1, year: year }) }} - +