{"id":1263,"date":"2026-11-17T11:58:01","date_gmt":"2026-11-17T02:58:01","guid":{"rendered":"https:\/\/www.swanyglove.jp\/contents\/?p=1263"},"modified":"2026-11-24T11:43:04","modified_gmt":"2026-11-24T02:43:04","slug":"material-item-guide","status":"publish","type":"post","link":"https:\/\/www.swanyglove.jp\/contents\/2026\/11\/17\/material-item-guide\/","title":{"rendered":"\u7d20\u6750\u30fb\u30a2\u30a4\u30c6\u30e0\u5225 \u4f7f\u3044\u5206\u3051\u30ac\u30a4\u30c9"},"content":{"rendered":"\r\n<!-- \u5916\u90e8HTML\u30b3\u30f3\u30c6\u30f3\u30c4\u57cb\u3081\u8fbc\u307f\uff1a\u3053\u3053\u304b\u3089 -->\r\n\r\n<style>\r\n.external-content {\r\n  width: 100%;\r\n  max-width: 100%;\r\n  margin: 0 auto;\r\n}\r\n\r\n.external-content__frame {\r\n  display: block;\r\n  width: 100%;\r\n  height: 800px;\r\n  border: 0;\r\n  overflow: hidden;\r\n}\r\n<\/style>\r\n\r\n<div class=\"external-content\">\r\n  <iframe\r\n    class=\"external-content__frame\"\r\n    src=\"https:\/\/www.swanyglove.jp\/contents\/static\/material-item-guide\/index.html\"\r\n    title=\"\u30b9\u30ce\u30fc\u30b0\u30ed\u30fc\u30d6\u306e\u9078\u3073\u65b9\"\r\n    loading=\"lazy\"\r\n    scrolling=\"no\">\r\n  <\/iframe>\r\n<\/div>\r\n\r\n<script>\r\n(function () {\r\n  function initExternalContent() {\r\n    const frames = document.querySelectorAll(\r\n      '.external-content__frame:not([data-resize-init])'\r\n    );\r\n\r\n    frames.forEach(function (frame) {\r\n      frame.dataset.resizeInit = 'true';\r\n\r\n      let observer = null;\r\n      let resizeId = null;\r\n      let lastWidth = window.innerWidth;\r\n\r\n      function resizeFrame() {\r\n        try {\r\n          const doc = frame.contentDocument;\r\n          if (!doc || !doc.body) return;\r\n\r\n          const win = doc.defaultView;\r\n          let bottom = 0;\r\n\r\n          \/\/ iframe\u306e\u9ad8\u3055\u3092\u7e2e\u3081\u305a\u3001\u5b9f\u969b\u306e\u5185\u5bb9\u3092\u8a08\u6e2c\r\n          Array.from(doc.body.children).forEach(function (el) {\r\n            if (['STYLE', 'SCRIPT', 'LINK'].includes(el.tagName)) {\r\n              return;\r\n            }\r\n\r\n            const style = win.getComputedStyle(el);\r\n\r\n            if (style.display === 'none' ||\r\n                style.position === 'fixed') {\r\n              return;\r\n            }\r\n\r\n            const rect = el.getBoundingClientRect();\r\n            const margin = parseFloat(style.marginBottom) || 0;\r\n\r\n            bottom = Math.max(\r\n              bottom,\r\n              rect.bottom + win.scrollY + margin\r\n            );\r\n          });\r\n\r\n          const bodyStyle = win.getComputedStyle(doc.body);\r\n\r\n          const height = Math.ceil(\r\n            bottom +\r\n            (parseFloat(bodyStyle.paddingBottom) || 0) +\r\n            (parseFloat(bodyStyle.marginBottom) || 0) +\r\n            2\r\n          );\r\n\r\n          \/\/ \u9ad8\u3055\u304c\u5909\u308f\u3063\u305f\u3068\u304d\u3060\u3051\u66f4\u65b0\r\n          if (height > 0 &&\r\n              Math.abs(frame.offsetHeight - height) > 2) {\r\n            frame.style.height = height + 'px';\r\n          }\r\n\r\n        } catch (e) {\r\n          console.warn('iframe resize failed:', e);\r\n        }\r\n      }\r\n\r\n      function scheduleResize() {\r\n        if (resizeId !== null) {\r\n          cancelAnimationFrame(resizeId);\r\n        }\r\n\r\n        resizeId = requestAnimationFrame(function () {\r\n          resizeId = null;\r\n          resizeFrame();\r\n        });\r\n      }\r\n\r\n      function onFrameLoad() {\r\n        let doc;\r\n\r\n        try {\r\n          doc = frame.contentDocument;\r\n        } catch (e) {\r\n          return;\r\n        }\r\n\r\n        if (!doc || !doc.body) return;\r\n\r\n        if (observer) observer.disconnect();\r\n\r\n        \/\/ \u5546\u54c1\u30ea\u30f3\u30af\u3092\u30da\u30fc\u30b8\u5168\u4f53\u3067\u958b\u304f\r\n        doc.querySelectorAll('a[href*=\"\/SHOP\/\"]').forEach(\r\n          function (link) {\r\n            link.setAttribute('target', '_top');\r\n          }\r\n        );\r\n\r\n        scheduleResize();\r\n\r\n        \/\/ \u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u30b5\u30a4\u30ba\u5909\u66f4\u3092\u76e3\u8996\r\n        if (typeof ResizeObserver !== 'undefined') {\r\n          observer = new ResizeObserver(scheduleResize);\r\n          observer.observe(doc.body);\r\n\r\n          Array.from(doc.body.children).forEach(function (el) {\r\n            if (!['STYLE', 'SCRIPT', 'LINK'].includes(el.tagName)) {\r\n              observer.observe(el);\r\n            }\r\n          });\r\n        }\r\n\r\n        \/\/ \u30d5\u30a9\u30f3\u30c8\u8aad\u307f\u8fbc\u307f\u5f8c\r\n        if (doc.fonts) {\r\n          doc.fonts.ready.then(scheduleResize);\r\n        }\r\n\r\n        \/\/ \u753b\u50cf\u8aad\u307f\u8fbc\u307f\u5f8c\r\n        doc.querySelectorAll('img').forEach(function (img) {\r\n          if (!img.complete) {\r\n            img.addEventListener('load', scheduleResize,\r\n              { once: true });\r\n            img.addEventListener('error', scheduleResize,\r\n              { once: true });\r\n          }\r\n        });\r\n      }\r\n\r\n      frame.addEventListener('load', onFrameLoad);\r\n\r\n      try {\r\n        if (frame.contentDocument &&\r\n            frame.contentDocument.readyState === 'complete') {\r\n          onFrameLoad();\r\n        }\r\n      } catch (e) {}\r\n\r\n      \/\/ \u6a2a\u5e45\u304c\u5909\u308f\u3063\u305f\u3068\u304d\u306e\u307f\u518d\u8a08\u7b97\r\n      window.addEventListener('resize', function () {\r\n        const currentWidth = window.innerWidth;\r\n\r\n        if (currentWidth === lastWidth) return;\r\n\r\n        lastWidth = currentWidth;\r\n        scheduleResize();\r\n      });\r\n    });\r\n  }\r\n\r\n  if (document.readyState === 'loading') {\r\n    document.addEventListener(\r\n      'DOMContentLoaded',\r\n      initExternalContent\r\n    );\r\n  } else {\r\n    initExternalContent();\r\n  }\r\n})();\r\n<\/script>\r\n\r\n<!-- \u5916\u90e8HTML\u30b3\u30f3\u30c6\u30f3\u30c4\u57cb\u3081\u8fbc\u307f\uff1a\u3053\u3053\u307e\u3067 -->\r\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1266,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"vk-ltc-link":"","vk-ltc-target":"0"},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/www.swanyglove.jp\/contents\/wp-json\/wp\/v2\/posts\/1263"}],"collection":[{"href":"https:\/\/www.swanyglove.jp\/contents\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.swanyglove.jp\/contents\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.swanyglove.jp\/contents\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.swanyglove.jp\/contents\/wp-json\/wp\/v2\/comments?post=1263"}],"version-history":[{"count":8,"href":"https:\/\/www.swanyglove.jp\/contents\/wp-json\/wp\/v2\/posts\/1263\/revisions"}],"predecessor-version":[{"id":1276,"href":"https:\/\/www.swanyglove.jp\/contents\/wp-json\/wp\/v2\/posts\/1263\/revisions\/1276"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.swanyglove.jp\/contents\/wp-json\/wp\/v2\/media\/1266"}],"wp:attachment":[{"href":"https:\/\/www.swanyglove.jp\/contents\/wp-json\/wp\/v2\/media?parent=1263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.swanyglove.jp\/contents\/wp-json\/wp\/v2\/categories?post=1263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.swanyglove.jp\/contents\/wp-json\/wp\/v2\/tags?post=1263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}