From 2d437550c36385f62256fed6b7df80eb285eef3c Mon Sep 17 00:00:00 2001 From: dalnim Date: Wed, 25 Sep 2024 12:37:42 +0900 Subject: [PATCH] =?UTF-8?q?=EC=96=B8=EC=96=B4=EB=B3=84=20=EB=A0=88?= =?UTF-8?q?=EB=94=A7=20=EA=B2=BD=EB=A1=9C=20=EB=8B=A4=EB=A5=B4=EA=B2=8C=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95.=20=ED=95=9C=EA=B5=AD=EC=96=B4=EC=9D=BC?= =?UTF-8?q?=EB=95=8C=EB=A7=8C=20=EC=B9=B4=ED=86=A1=EC=95=84=EC=9D=B4?= =?UTF-8?q?=EC=BD=98=20=EB=B3=B4=EC=9D=B4=EA=B2=8C,=20=EB=94=94=EC=8A=A4?= =?UTF-8?q?=EC=BD=94=EB=93=9C=EB=8A=94=20=EC=B4=88=EB=8C=80=EC=9E=A5=20?= =?UTF-8?q?=EB=A7=8C=EB=A3=8C=EB=A1=9C=20=EC=9D=BC=EB=8B=A8=20=EC=88=A8?= =?UTF-8?q?=EA=B2=A8=EB=B2=84=EB=A6=BC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/style.css | 6 ++++ .../{group_19.webp => players__thamnail.webp} | Bin index.html | 6 ++-- language.js | 34 ++++++++++++++++-- 4 files changed, 42 insertions(+), 4 deletions(-) rename assets/images/home/{group_19.webp => players__thamnail.webp} (100%) diff --git a/assets/css/style.css b/assets/css/style.css index 58e0533..16a59c2 100755 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -710,4 +710,10 @@ footer .copyright__wrapp { height: 100%; } +.kakao-visible { + display: inline-block !important; /* !important를 사용하여 기존 스타일을 덮어씌움 */ +} +.kakao-hidden { + display: none !important; /* !important를 사용하여 기존 스타일을 덮어씌움 */ +} diff --git a/assets/images/home/group_19.webp b/assets/images/home/players__thamnail.webp similarity index 100% rename from assets/images/home/group_19.webp rename to assets/images/home/players__thamnail.webp diff --git a/index.html b/index.html index 5d7e446..fcc1205 100755 --- a/index.html +++ b/index.html @@ -630,13 +630,15 @@

- + Google Play Store + + KakaoTalk diff --git a/language.js b/language.js index f131546..d098722 100755 --- a/language.js +++ b/language.js @@ -2192,12 +2192,20 @@ function getLanguageData(language) { return languageData[language] || languageData['en']; // Default to English if language is not recognized } +// 기본 언어를 반환하는 함수 +function getStoredLanguage() { + return localStorage.getItem('selectedLanguage') || 'en'; +} + // Main function to update language function updateLanguage(language) { - const { jsonData, metaData } = getLanguageData(language); + const { jsonData, metaData } = getLanguageData(language); + const storedLanguage = getStoredLanguage(); updateTextContent(jsonData); updateMetaTags(metaData); + updateRedditLink(storedLanguage); + updateKakaoLinkVisibility(storedLanguage); updateImageSources(language); } @@ -2210,7 +2218,7 @@ document.querySelector("#language").addEventListener('change', function () { }) // on page load, set the selected language from local storage document.addEventListener('DOMContentLoaded', function () { - const storedLanguage = localStorage.getItem('selectedLanguage') || 'en'; + const storedLanguage = getStoredLanguage(); document.querySelector("#language").value = storedLanguage; updateLanguage(storedLanguage); console.log('stored lang', storedLanguage); @@ -2222,4 +2230,26 @@ document.addEventListener('DOMContentLoaded', function () { } }) +// 언어에 따른 Reddit 링크 설정 +function updateRedditLink(language) { + const redditLink = document.getElementById('redditLink'); + if (language === 'ko') { + redditLink.href = 'https://www.reddit.com/r/AraMultiPlayer/comments/1e9h787/아라_멀티플레이어/'; + } else { + redditLink.href = 'https://www.reddit.com/r/AraMultiPlayer/comments/1e9fk9t/about_aramultiplayer_app/'; + } +} +// 언어에 따른 KakaoTalk 링크 표시 여부 설정 +function updateKakaoLinkVisibility(language) { + const kakaoLink = document.getElementById('kakaoLink'); + if (language === 'ko') { + kakaoLink.classList.remove('kakao-hidden'); // 한국어일 때만 보이도록 설정 + kakaoLink.classList.add('kakao-visible'); + } else { + kakaoLink.classList.remove('kakao-visible'); // 다른 언어일 경우 숨김 + kakaoLink.classList.add('kakao-hidden'); + } +} + +