"틀:SemanticGraph"의 두 판 사이의 차이

광주문화예술인문스토리플랫폼
이동: 둘러보기, 검색
1번째 줄: 1번째 줄:
 +
 
<onlyinclude>
 
<onlyinclude>
 
{{#tag:html|
 
{{#tag:html|
<div id="semantic-graph-container">
+
<iframe width="100%" height="640px" style="border:0" src="https://app.vaquitalab.com/aistory/story01?server=tcp:encyves.aks.ac.kr&db=gwangju2025&project=gwangju&key={{{key|}}}"></iframe>
<iframe id="semantic-graph-iframe" width="100%" height="640px" style="border:0" src="https://app.vaquitalab.com/aistory/story01?server=tcp:encyves.aks.ac.kr&db=gwangju2025&project=gwangju&key={{{key{{!}}|}}}"></iframe>
 
 
<br/>
 
<br/>
 
<input type="button" value="전체화면" onclick="location.href='https://app.vaquitalab.com/aistory/story01?server=tcp:encyves.aks.ac.kr&db=gwangju2025&project=gwangju&key={{{key}}}'">  
 
<input type="button" value="전체화면" onclick="location.href='https://app.vaquitalab.com/aistory/story01?server=tcp:encyves.aks.ac.kr&db=gwangju2025&project=gwangju&key={{{key}}}'">  
</div>
 
<script>
 
(function() {
 
  var iframe = document.getElementById('semantic-graph-iframe');
 
  var container = document.getElementById('semantic-graph-container');
 
 
 
  iframe.addEventListener('load', function() {
 
    try {
 
      var iframeDoc = iframe.contentDocument {{!}}{{!}} iframe.contentWindow.document;
 
     
 
      if (iframeDoc.title.includes('404') {{!}}{{!}}
 
          iframeDoc.body.innerHTML.includes('404') {{!}}{{!}}
 
          iframeDoc.body.innerHTML.length < 100) {
 
        hideGraphSection();
 
      }
 
    } catch(e) {
 
      fetch(iframe.src, {method: 'HEAD'})
 
        .then(function(response) {
 
          if (!response.ok {{!}}{{!}} response.status === 404) {
 
            hideGraphSection();
 
          }
 
        })
 
        .catch(function() {
 
          hideGraphSection();
 
        });
 
    }
 
  });
 
 
 
  iframe.addEventListener('error', function() {
 
    hideGraphSection();
 
  });
 
 
 
  function hideGraphSection() {
 
    var pTag = container.closest('p');
 
    if (pTag) {
 
      pTag.style.display = 'none';
 
     
 
      var prevElement = pTag.previousElementSibling;
 
      while (prevElement) {
 
        if (prevElement.tagName === 'H2') {
 
          prevElement.style.display = 'none';
 
          break;
 
        }
 
        prevElement = prevElement.previousElementSibling;
 
      }
 
    }
 
  }
 
})();
 
</script>
 
 
}}
 
}}
 
</onlyinclude>
 
</onlyinclude>
 
  
  

2026년 1월 12일 (월) 09:34 판




사용방법

시맨틱 데이터베이스의 특정 노드를 중심으로 하는 네트워크 그래프를 출력하는 틀입니다

{{SemanticGraph | key = }}