diff --git a/public/img/icons/sunny-custom.png b/public/img/icons/sunny-custom.png new file mode 100644 index 0000000..b4b1301 Binary files /dev/null and b/public/img/icons/sunny-custom.png differ diff --git a/src/layouts/TheTop.vue b/src/layouts/TheTop.vue index 0e7766f..e64e21e 100644 --- a/src/layouts/TheTop.vue +++ b/src/layouts/TheTop.vue @@ -11,9 +11,9 @@
{{ weather.description }} @@ -351,6 +351,20 @@ tempMax: null, }); + const customIconUrl = computed(() => { + if (weather.value.icon === "01d" || weather.value.icon === "01n") { + return "/img/icons/sunny-custom.png"; + } + return `https://openweathermap.org/img/wn/${weather.value.icon}@2x.png`; + }); + + const customIconClass = computed(() => { + if (weather.value.icon === "01d" || weather.value.icon === "01n") { + return "weather-icon custom-sunny-icon"; + } + return "weather-icon"; + }); + const weatherKorean = computed(() => weather.value.description || '날씨 정보 없음'); onMounted(() => { @@ -425,4 +439,8 @@ white-space: nowrap; overflow: hidden; } +.custom-sunny-icon { + width: 5% !important; + height: 5% !important; +}