This commit is contained in:
2026-01-30 17:20:52 +09:00
commit 21b6332c9c
459 changed files with 190743 additions and 0 deletions

2
kngil/js/qa/jquery-3.6.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

5
kngil/js/qa/jquery.mousewheel.min.js vendored Normal file
View File

@@ -0,0 +1,5 @@
/*!
* jQuery Mousewheel 3.1.13
* Copyright OpenJS Foundation and other contributors
*/
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(a){var u,r,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in window.document||9<=window.document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],f=Array.prototype.slice;if(a.event.fixHooks)for(var n=e.length;n;)a.event.fixHooks[e[--n]]=a.event.mouseHooks;var d=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],i,!1);else this.onmousewheel=i;a.data(this,"mousewheel-line-height",d.getLineHeight(this)),a.data(this,"mousewheel-page-height",d.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],i,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=a(e),e=t["offsetParent"in a.fn?"offsetParent":"parent"]();return e.length||(e=a("body")),parseInt(e.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return a(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(e){var t,n=e||window.event,i=f.call(arguments,1),o=0,l=0,s=0,h=0;if((e=a.event.fix(n)).type="mousewheel","detail"in n&&(s=-1*n.detail),"wheelDelta"in n&&(s=n.wheelDelta),"wheelDeltaY"in n&&(s=n.wheelDeltaY),"wheelDeltaX"in n&&(l=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(l=-1*s,s=0),o=0===s?l:s,"deltaY"in n&&(o=s=-1*n.deltaY),"deltaX"in n&&(l=n.deltaX,0===s&&(o=-1*l)),0!==s||0!==l)return 1===n.deltaMode?(o*=t=a.data(this,"mousewheel-line-height"),s*=t,l*=t):2===n.deltaMode&&(o*=t=a.data(this,"mousewheel-page-height"),s*=t,l*=t),h=Math.max(Math.abs(s),Math.abs(l)),(!r||h<r)&&c(n,r=h)&&(r/=40),c(n,h)&&(o/=40,l/=40,s/=40),o=Math[1<=o?"floor":"ceil"](o/r),l=Math[1<=l?"floor":"ceil"](l/r),s=Math[1<=s?"floor":"ceil"](s/r),d.settings.normalizeOffset&&this.getBoundingClientRect&&(h=this.getBoundingClientRect(),e.offsetX=e.clientX-h.left,e.offsetY=e.clientY-h.top),e.deltaX=l,e.deltaY=s,e.deltaFactor=r,e.deltaMode=0,i.unshift(e,o,l,s),u&&window.clearTimeout(u),u=window.setTimeout(w,200),(a.event.dispatch||a.event.handle).apply(this,i)}function w(){r=null}function c(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}a.fn.extend({mousewheel:function(e){return e?this.on("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.off("mousewheel",e)}})});

1325
kngil/js/qa/qa_common.js Normal file

File diff suppressed because it is too large Load Diff

198
kngil/js/qa/qa_index.js Normal file
View File

@@ -0,0 +1,198 @@
$(function () {
var obj = document.getElementById("video_play");
var video = $("#video_play").get(0);
var i = 1;
// 영상 소스를 비율에 맞게 설정하는 함수
function updateVideoSource() {
var width = $(window).width();
var height = $(window).height();
var ratio = width / height;
// 비율이 가로가 더 길면 기본 영상, 세로가 더 길면 '_v'가 붙은 영상
if (ratio > 1) {
$("#video_play").attr("src", "img/main_" + i + ".mp4");
$("ul.pagination_main").removeClass("m");
} else {
$("#video_play").attr("src", "img/main_" + i + "_v.mp4");
$("ul.pagination_main").addClass("m");
}
// 영상 로드 및 자동 재생
video.load();
video.play();
}
// 페이지 로드 시 비율에 맞는 영상 설정
updateVideoSource();
// 화면 사이즈가 변경될 때마다 비율에 맞는 영상 설정
$(window).resize(function () {
updateVideoSource();
});
console.log("리사이징 완료");
// 인트로 페이지 종료 후 첫 영상 실행
video.pause();
$(".pagination_main").hide();
if (sessionStorage.getItem("visited")) {
video.play();
$(".pagination_main").show();
} else {
setTimeout(function () {
video.play();
$(".pagination_main").show();
}, 2800);
}
// 페이지 네이션 - 클릭하면 해당 영상 실행
function setPageVideo(pageNum) {
i = pageNum;
updateVideoSource(); // 비율에 맞는 영상으로 설정
$(".page_0" + i).addClass("page_on");
$(".pagination_main div")
.not(".page_0" + i)
.removeClass("page_on");
$(".main_link_0" + i).addClass("link_on");
$(".main_link a")
.not(".main_link_0" + i)
.removeClass("link_on");
}
// 각 페이지 클릭 시 영상 변경
$(".page_01").click(function () {
setPageVideo(1);
console.log("영상1 재생");
});
$(".page_02").click(function () {
setPageVideo(2);
console.log("영상2 재생");
});
$(".page_03").click(function () {
setPageVideo(3);
console.log("영상3 재생");
});
$(".page_04").click(function () {
setPageVideo(4);
console.log("영상4 재생");
});
$(".page_05").click(function () {
setPageVideo(5);
console.log("영상5 재생");
});
// 영상 종료 후 다음 영상 실행
$("#video_play").on("ended", function () {
if (i < 5) {
i = i + 1;
updateVideoSource();
$(".page_0" + i).addClass("page_on");
$(".pagination_main div")
.not(".page_0" + i)
.removeClass("page_on");
$(".main_link_0" + i).addClass("link_on");
$(".main_link a")
.not(".main_link_0" + i)
.removeClass("link_on");
} else {
i = 1;
updateVideoSource();
$(".page_0" + i).addClass("page_on");
$(".pagination_main div")
.not(".page_0" + i)
.removeClass("page_on");
$(".main_link_0" + i).addClass("link_on");
$(".main_link a")
.not(".main_link_0" + i)
.removeClass("link_on");
}
video.play(); // 영상 자동 재생
});
});
// index footer 동작
$(function () {
let currentMode = null;
// 디바이스 체크 함수
function getDeviceType() {
const ua = navigator.userAgent.toLowerCase();
const isMobile =
/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(ua);
const isTablet = /(ipad|tablet|playbook|silk)|(android(?!.*mobile))/i.test(
ua
);
// 터치 지원 여부도 체크
const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
// 모바일 또는 태블릿이면서 터치 지원
if ((isMobile || isTablet) && hasTouch) {
return "mo";
}
return "pc";
}
function setupFooterEvents() {
const newMode = getDeviceType();
// 모드가 변경되지 않았으면 리턴
if (currentMode === newMode) return;
currentMode = newMode;
// 기존 이벤트 제거
$(".main").off("wheel mousewheel touchmove");
if (newMode === "pc") {
// PC: 기본 footer_off 상태
$("footer").addClass("footer_off").removeClass("footer_on");
// wheel 이벤트로 토글
$(".main").on("wheel", function (e) {
if (e.originalEvent.deltaY < 0) {
// 위로 스크롤
$("footer").addClass("footer_off").removeClass("footer_on");
} else {
// 아래로 스크롤
$("footer").addClass("footer_on").removeClass("footer_off");
}
});
} else {
// 모바일/태블릿: touchmove 시 footer_on
$(".main").on("touchmove", function () {
$("footer").addClass("footer_on").removeClass("footer_off");
});
}
}
// 초기 설정
setupFooterEvents();
// footer 닫기
$(".footer_close")
.off("click")
.on("click", function () {
$("footer").addClass("footer_off").removeClass("footer_on");
});
});
// 인트로 없애기
// 1. 홈페이지에 들어오면 sessionStorage에 visited 추가
// 2. visited가 있는 동안에는 인트로 삭제
// 3. 브라우저 종료 or 탭 닫으면 visited 자동 삭제
document.addEventListener("DOMContentLoaded", function () {
const intro = document.querySelector(".intro_wrap");
if (sessionStorage.getItem("visited")) {
console.log("visited");
intro.style.display = "none";
document.querySelector(".main_mask").classList.add("skip");
} else {
setTimeout(() => {
sessionStorage.setItem("visited", "true");
}, 1000);
}
});

256
kngil/js/qa/qa_popup.js Normal file
View File

@@ -0,0 +1,256 @@
window.onload = function() {
$.ajax({
url: "some_api_endpoint",
success: function(response) {
},
complete: function() {
// 팝업 닫기버튼
$(document).ready(function() {
$('.btn_close').click(function() {
$('.popup_wrap').hide();
$('body').css('overflow', ''); // 기본 스크롤 상태로 복귀
lenis.start();
console.log('lenis 재시작')
});
});
$(document).ready(function() {
$('.btn_map_close').click(function() {
$('.popup_sitemap').hide();
$('body').css('overflow', ''); // 기본 스크롤 상태로 복귀
lenis.start();
console.log('lenis 재시작')
});
});
// 이메일 직접입력
$(document).ready(function() {
$('#domain-list').change(function() {
if ($(this).val() === 'type') {
$('#custom-domain').show().focus();
} else {
$('#custom-domain').hide().val('');
}
});
});
// 인증번호 타이머
$(document).ready(function() {
// 인증번호 버튼 클릭 시
$('.cert_number').click(function() {
$('.code').show();
});
// 확인 버튼 클릭 시
$('.check').click(function() {
$(this).hide();
$('.check.complete').show();
clearInterval(interval); // 타이머 멈춤
$('.timer').remove(); // 타이머 요소 삭제
});
// 타이머 함수
var interval;
function startTimer(duration, display) {
clearInterval(interval);
var timer = duration, minutes, seconds;
function updateTimer() {
minutes = parseInt(timer / 60, 10);
seconds = parseInt(timer % 60, 10);
minutes = minutes < 10 ? "0" + minutes : minutes;
seconds = seconds < 10 ? "0" + seconds : seconds;
display.text(minutes + ":" + seconds);
if (--timer < 0) {
clearInterval(interval);
display.text("00:00");
}
}
updateTimer();
interval = setInterval(updateTimer, 1000);
}
var threeMinutes = 60 * 3,
display = $('.timer');
startTimer(threeMinutes, display);
$('.cert_number').click(function() {
startTimer(threeMinutes, display);
});
});
// 아이디찾기
$(document).ready(function(){
$('.find_email').click(function(){
$('.find_ph').removeClass('on').prop('checked', false);
$(this).addClass('on').prop('checked', true);
$('.ph').hide();
$('.email').show();
});
$('.find_ph').click(function(){
$('.find_email').removeClass('on').prop('checked', false);
$(this).addClass('on').prop('checked', true);
$('.email').hide();
$('.ph').show();
});
});
$(document).ready(function() {
$('.btn_id').on('click', function() {
$('.btn_id').addClass('on');
$('.btn_pw').removeClass('on');
$('.content.id').show();
$('.content.pw').hide();
});
$('.btn_pw').on('click', function() {
$('.btn_pw').addClass('on');
$('.btn_id').removeClass('on');
$('.content.pw').show();
$('.content.id').hide();
});
$('#domain-list').on('change', function() {
if ($(this).val() === 'type') {
$('#custom-domain').show();
} else {
$('#custom-domain').hide();
}
});
});
// 전체약관동의
// $(document).ready(function() {
// function toggleJoinButton() {
// // 모든 개별 체크박스가 체크되었는지 확인
// var allChecked = $('.terms_wrap input[type="checkbox"]').length === $('.terms_wrap input[type="checkbox"]:checked').length;
// // '약관에 모두 동의합니다' 체크박스 상태에 따라 조정
// $('.checkbox_wrap.all input[type="checkbox"]').prop('checked', allChecked);
// // 모든 체크박스가 체크되지 않은 경우 버튼에 'none' 클래스 추가하고 disabled 속성 추가
// if (allChecked) {
// $('.join_btn_wrap').removeClass('none');
// $('.join_btn_wrap button').prop('disabled', false);
// } else {
// $('.join_btn_wrap').addClass('none');
// $('.join_btn_wrap button').prop('disabled', true);
// }
// }
// // '약관에 모두 동의합니다' 체크박스의 변경 이벤트
// $('.checkbox_wrap.all input[type="checkbox"]').on('change', function() {
// var isChecked = $(this).is(':checked');
// $('.terms_wrap input[type="checkbox"]').prop('checked', isChecked);
// toggleJoinButton(); // 버튼 상태 업데이트
// });
// // 각 terms_wrap의 개별 체크박스 변경 이벤트
// $('.terms_wrap input[type="checkbox"]').on('change', function() {
// toggleJoinButton(); // 버튼 상태 업데이트
// });
// // 초기 상태 설정
// toggleJoinButton();
// });
// 전체약관동의 수정 250813
(function ($) {
if (window.__agreeBound) return; // 중복 바인딩 방지
window.__agreeBound = true;
const $container = $('#pop_agreement');
const $items = $container.find('.terms_wrap input[type="checkbox"]'); // agree11, agree21
const $all = $container.find('.checkbox_wrap.all input[type="checkbox"]');
const $btn = $container.find('#btn_agree');
function syncAll() {
const allChecked = $items.length > 0 && $items.filter(':checked').length === $items.length;
$all.prop('checked', allChecked);
// 버튼은 disable 하지 않음 (스타일만 조정하고 싶다면 클래스만 토글)
// $('.join_btn_wrap').toggleClass('none', !allChecked); <-- 필요 없으면 제거
}
// 전체동의 → 개별
$all.on('change', function () {
const on = $(this).is(':checked');
$items.prop('checked', on);
syncAll();
});
// 개별 → 전체동의 동기화
$items.on('change', syncAll);
// 동의 버튼 클릭 시에만 검사
$btn.off('click.agree').on('click.agree', function (e) {
e.preventDefault();
const allChecked = $items.filter(':checked').length === $items.length;
if (!allChecked) {
alert('약관에 모두 동의해주세요.');
return false;
}
// 통과 시 다음 단계로 진행(필요 시 주석 해제)
// $('#pop_agreement').hide();
// $('#pop_register_form').show();
// $('body').css('overflow','hidden');
});
// 외부에서 팝업 열 때 상태 초기화가 필요하면 이 함수 호출
window.resetAgreementUI = function () {
$items.prop('checked', false);
$all.prop('checked', false);
syncAll();
// 버튼은 항상 활성
$('#btn_agree, #fregister button[type=submit]')
.prop('disabled', false)
.css('pointer-events', 'auto');
};
})(jQuery);
// 가입완료
$(document).ready(function() {
$('.join.completion .join_btn_wrap button').click(function() {
$('.pop_input_wrap form').children().not('.messages').hide();
$('.messages').show();
});
});
$(document).ready(function() {
$('.join.completion .join_btn_wrap button').click(function() {
$('.pop_input_wrap form').children().not('.messages').hide();
$('.messages').show();
// 세 번째 단계에 'on' 클래스 추가하고, 다른 단계에서 'on' 클래스 제거
$('.join_progress .join_step').removeClass('on');
$('.join_progress .join_step').eq(2).addClass('on');
});
});
// 개인정보 보호정책 스크립트
$(document).ready(function() {
$('.tab_privacy').on('click', function() {
$(this).addClass('on');
$('.tab_agreement').removeClass('on');
$('.content.pri').addClass('show').removeClass('hide');
$('.content.agr').removeClass('show').addClass('hide');
});
$('.tab_agreement').on('click', function() {
$(this).addClass('on');
$('.tab_privacy').removeClass('on');
$('.content.agr').addClass('show').removeClass('hide');
$('.content.pri').removeClass('show').addClass('hide');
});
});
}
});
};