DIGITAL WOOD 식스샵 블로그 통합 코드 - 식스샵 제목/날짜/카테고리 제거 - 좌우 여백 및 오른쪽 밀림 보정 - iframe 높이 5000px 고정=========================================== --> html, body { margin: 0 !important; padding: 0 !important; overflow-x: hidden !important; } /* 식스샵 블로그 기본 제목·날짜·카테고리 영역 제거 */ #blogPostTitle, .blogPost.title, .blogPost.date, .blogPostHeader, .blog-post-header, .postHead, .postHeadInner, .post-header, .entry-header, .article-header, .post-title, .entry-title, .post-date, .entry-date, .post-meta, .entry-meta, .blogPostCategory, .blog-post-category, .post-category, .entry-category, .category-name, .categoryName, .category-title, .categoryTitle, .blog-category-title, .blogCategoryTitle { display: none !important; visibility: hidden !important; height: 0 !important; min-height: 0 !important; max-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden !important; } /* 식스샵 본문 컨테이너 여백 제거 */ .blogPost, .blogPost.content, .postView, .postContent, .post-content, .entry-content, .article-content, .blog-post-container, .blog-post-content, .section-content, .fr-view, .ck-content, .widget-html, .html-widget { width: 100% !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; margin-top: 0 !important; padding-left: 0 !important; padding-right: 0 !important; padding-top: 0 !important; overflow: visible !important; } /* iframe 전체 화면 영역 */ #digitalwood-fullwidth { display: block !important; position: relative !important; left: auto !important; right: auto !important; transform: none !important; width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: #ffffff; overflow: hidden !important; line-height: 0 !important; } #digitalwood-frame { display: block !important; width: 100% !important; min-width: 100% !important; max-width: none !important; height: 5000px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: #ffffff; overflow: hidden !important; } @media screen and (max-width: 1024px) { #digitalwood-frame { height: 5000px !important; } } @media screen and (max-width: 767px) { #digitalwood-frame { height: 5000px !important; } } id="digitalwood-frame" src="https://ycgroupcwsong-cmd.github.io/digitalwood/" title="디지털 목공 실무 교육" scrolling="no" loading="eager" allowfullscreen> (function () { const wrapperId = "digitalwood-fullwidth"; const hideSelectors = [ "#blogPostTitle", ".blogPost.title", ".blogPost.date", ".blogPostHeader", ".blog-post-header", ".postHead", ".postHeadInner", ".post-header", ".entry-header", ".article-header", ".post-title", ".entry-title", ".post-date", ".entry-date", ".post-meta", ".entry-meta", ".blogPostCategory", ".blog-post-category", ".post-category", ".entry-category", ".category-name", ".categoryName", ".category-title", ".categoryTitle", ".blog-category-title", ".blogCategoryTitle" ]; const contentSelectors = [ ".blogPost", ".blogPost.content", ".postView", ".postContent", ".post-content", ".entry-content", ".article-content", ".blog-post-container", ".blog-post-content", ".section-content", ".fr-view", ".ck-content", ".widget-html", ".html-widget" ]; function forceHide(element) { if (!element) return; element.style.setProperty("display", "none", "important"); element.style.setProperty("visibility", "hidden", "important"); element.style.setProperty("height", "0", "important"); element.style.setProperty("min-height", "0", "important"); element.style.setProperty("max-height", "0", "important"); element.style.setProperty("margin", "0", "important"); element.style.setProperty("padding", "0", "important"); element.style.setProperty("border", "0", "important"); element.style.setProperty("overflow", "hidden", "important"); } function hideSixshopHeaders() { hideSelectors.forEach(function (selector) { document.querySelectorAll(selector).forEach(function (element) { if (!element.closest("#" + wrapperId)) { forceHide(element); } }); }); } /* 화면에 남아 있는 '카테고리' 또는 '전체' 문구를 직접 검색해 제거 */ function hideCategoryText() { const wrapper = document.getElementById(wrapperId); if (!wrapper) return; const wrapperTop = wrapper.getBoundingClientRect().top; const elements = document.querySelectorAll( "h1, h2, h3, h4, h5, p, span, a, div" ); elements.forEach(function (element) { if (element.closest("#" + wrapperId)) return; const text = element.textContent .replace(/\s+/g, " ") .trim(); if (text !== "카테고리" && text !== "전체") return; const rect = element.getBoundingClientRect(); const distance = wrapperTop - rect.bottom; /* iframe 바로 위쪽에 있는 식스샵 문구만 제거 */ if (distance >= -30 && distance forceHide(element); let parent = element.parentElement; /* 부모 영역이 카테고리 제목만 담고 있으면 부모 높이와 여백까지 함께 제거 */ for (let i = 0; i const parentText = parent.textContent .replace(/\s+/g, " ") .trim(); const parentRect = parent.getBoundingClientRect(); if ( (parentText === "카테고리" || parentText === "전체") && parentRect.height ) { forceHide(parent); parent = parent.parentElement; } else { break; } } } }); } function removeContentPadding() { contentSelectors.forEach(function (selector) { document.querySelectorAll(selector).forEach(function (element) { if (element.closest("#" + wrapperId)) return; element.style.setProperty("width", "100%", "important"); element.style.setProperty("max-width", "none", "important"); element.style.setProperty("margin-left", "0", "important"); element.style.setProperty("margin-right", "0", "important"); element.style.setProperty("padding-left", "0", "important"); element.style.setProperty("padding-right", "0", "important"); element.style.setProperty("padding-top", "0", "important"); }); }); } /* 식스샵 콘텐츠 영역의 실제 왼쪽 좌표를 측정해 iframe을 브라우저 왼쪽 끝에 정확히 맞춤 */ function alignToViewport() { const wrapper = document.getElementById(wrapperId); const frame = document.getElementById("digitalwood-frame"); if (!wrapper || !frame) return; const viewportWidth = document.documentElement.clientWidth; wrapper.style.setProperty("margin-left", "0px", "important"); wrapper.style.setProperty( "width", viewportWidth + "px", "important" ); wrapper.style.setProperty( "max-width", viewportWidth + "px", "important" ); const currentLeft = wrapper.getBoundingClientRect().left; wrapper.style.setProperty( "margin-left", -currentLeft + "px", "important" ); frame.style.setProperty("width", "100%", "important"); frame.style.setProperty("height", "5000px", "important"); } function applyDigitalwoodLayout() { hideSixshopHeaders(); hideCategoryText(); removeContentPadding(); alignToViewport(); } let scheduled = false; function scheduleLayout() { if (scheduled) return; scheduled = true; requestAnimationFrame(function () { scheduled = false; applyDigitalwoodLayout(); }); } applyDigitalwoodLayout(); window.addEventListener("load", scheduleLayout); window.addEventListener("resize", scheduleLayout); window.addEventListener("orientationchange", scheduleLayout); setTimeout(scheduleLayout, 100); setTimeout(scheduleLayout, 300); setTimeout(scheduleLayout, 800); setTimeout(scheduleLayout, 1500); setTimeout(scheduleLayout, 3000); const observer = new MutationObserver(scheduleLayout); observer.observe(document.body, { childList: true, subtree: true }); })();