Loading resources/javascript/xml_2_html.js +38 −1 Original line number Diff line number Diff line Loading @@ -233,7 +233,7 @@ function openFigureWindow(elementId) { } td,th { border-bottom:1px solid #ccc; font-size:1.2rem; font-size:1rem; } .fig-table label { Loading Loading @@ -271,4 +271,41 @@ function openFigureWindow(elementId) { } } // Drag div document.addEventListener('DOMContentLoaded', function() { const dragBar = document.getElementById('drag-bar'); const leftPane = document.getElementById('left'); const rightPane = document.getElementById('right'); let isDragging = false; let startX; let initialWidthLeft; let initialWidthRight; dragBar.addEventListener('mousedown', (e) => { isDragging = true; startX = e.clientX; initialWidthLeft = leftPane.offsetWidth; initialWidthRight = rightPane.offsetWidth; document.addEventListener('mousemove', onMouseMove); document.addEventListener('mouseup', onMouseUp); }); function onMouseMove(e) { if (!isDragging) return; const newWidthLeft = initialWidthLeft + e.clientX - startX; const newWidthRight = initialWidthRight - e.clientX + startX; if (newWidthLeft > 100 && newWidthRight > 100) { leftPane.style.width = `${newWidthLeft}px`; rightPane.style.width = `${newWidthRight}px`; } } function onMouseUp() { isDragging = false; document.removeEventListener('mousemove', onMouseMove); document.removeEventListener('mouseup', onMouseUp); } }); No newline at end of file resources/styles/xml_2_html.css +24 −2 Original line number Diff line number Diff line Loading @@ -288,7 +288,7 @@ table { td,th { border-bottom:1px solid #ccc; font-size:1.2rem; font-size:1.1rem; /* padding:5px;*/ } Loading Loading @@ -623,3 +623,25 @@ ul, ol { margin-bottom:2ex; line-height: 150% ; } iframe { border: solid 0.5pt; } #map { height: 400px; } #drag-bar { width: 1px; cursor: col-resize; background-color: black; display: block; z-index: 1000; } #drag-bar:hover { width: 5px; cursor: col-resize; background-color: #ddd; z-index: 1000; } tei2html.xsl +3 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ <xsl:template match="tei:TEI"> <div class="article-and-metas"> <div class="left-contents"> <div class="left-contents" id="left"> <div class="article-wrap"> <h1> <xsl:apply-templates select=".//tei:p[@rend='title-main']"/> Loading @@ -93,7 +93,8 @@ <xsl:apply-templates select=".//tei:body"/> </div> </div> <div class="right-contents"> <div id="drag-bar" class="drag-bar"></div> <div class="right-contents" id="right"> <xsl:apply-templates select=".//tei:front"/> </div> </div> Loading Loading
resources/javascript/xml_2_html.js +38 −1 Original line number Diff line number Diff line Loading @@ -233,7 +233,7 @@ function openFigureWindow(elementId) { } td,th { border-bottom:1px solid #ccc; font-size:1.2rem; font-size:1rem; } .fig-table label { Loading Loading @@ -271,4 +271,41 @@ function openFigureWindow(elementId) { } } // Drag div document.addEventListener('DOMContentLoaded', function() { const dragBar = document.getElementById('drag-bar'); const leftPane = document.getElementById('left'); const rightPane = document.getElementById('right'); let isDragging = false; let startX; let initialWidthLeft; let initialWidthRight; dragBar.addEventListener('mousedown', (e) => { isDragging = true; startX = e.clientX; initialWidthLeft = leftPane.offsetWidth; initialWidthRight = rightPane.offsetWidth; document.addEventListener('mousemove', onMouseMove); document.addEventListener('mouseup', onMouseUp); }); function onMouseMove(e) { if (!isDragging) return; const newWidthLeft = initialWidthLeft + e.clientX - startX; const newWidthRight = initialWidthRight - e.clientX + startX; if (newWidthLeft > 100 && newWidthRight > 100) { leftPane.style.width = `${newWidthLeft}px`; rightPane.style.width = `${newWidthRight}px`; } } function onMouseUp() { isDragging = false; document.removeEventListener('mousemove', onMouseMove); document.removeEventListener('mouseup', onMouseUp); } }); No newline at end of file
resources/styles/xml_2_html.css +24 −2 Original line number Diff line number Diff line Loading @@ -288,7 +288,7 @@ table { td,th { border-bottom:1px solid #ccc; font-size:1.2rem; font-size:1.1rem; /* padding:5px;*/ } Loading Loading @@ -623,3 +623,25 @@ ul, ol { margin-bottom:2ex; line-height: 150% ; } iframe { border: solid 0.5pt; } #map { height: 400px; } #drag-bar { width: 1px; cursor: col-resize; background-color: black; display: block; z-index: 1000; } #drag-bar:hover { width: 5px; cursor: col-resize; background-color: #ddd; z-index: 1000; }
tei2html.xsl +3 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ <xsl:template match="tei:TEI"> <div class="article-and-metas"> <div class="left-contents"> <div class="left-contents" id="left"> <div class="article-wrap"> <h1> <xsl:apply-templates select=".//tei:p[@rend='title-main']"/> Loading @@ -93,7 +93,8 @@ <xsl:apply-templates select=".//tei:body"/> </div> </div> <div class="right-contents"> <div id="drag-bar" class="drag-bar"></div> <div class="right-contents" id="right"> <xsl:apply-templates select=".//tei:front"/> </div> </div> Loading