diff --git a/index.css b/index.css index 7444ff3..c0cbacb 100644 --- a/index.css +++ b/index.css @@ -7,19 +7,11 @@ body { margin: 0; padding: 0; } -.mj-body { - display: flex; - flex-direction: row; -} -.side-menu { - width: var(--sideMenu); - border-right: 1px dashed lightblue; -} .main-content { - width:calc(100% - var(--sideMenu)); - height: 100%; + width: 100%; } #content { + width: 100%; height: 100%; overflow: auto; } @@ -29,9 +21,6 @@ body { } /* 小于700像素的 */ @media screen and (max-width: 700px) { - .mj-body { - flex-direction: column; - } .side-menu { width: 100%; } @@ -50,13 +39,6 @@ em { font-style: normal; font-weight: bolder; } -.mj-navigate-btn { - position: fixed; - top: 0; - right: 0; - margin-right: 10px; - margin-top: 10px; -} /* chrome浏览器的滚动条大小 */ ::-webkit-scrollbar { width: 2px !important; diff --git a/index.html b/index.html index 8f89878..86fd9d2 100644 --- a/index.html +++ b/index.html @@ -1,36 +1,94 @@ - + - - - - - - - - - - - lmj01 document - - -
- book - dev-note - dev-web - 个人笔记 - 线上资源 - 标准 - Community - CS - 医学技术 - Blender - 网页 - 练习题 -
-
-
-
- - - + + + + + + + + + + + + + + + lmj01 Doc + + + +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/index.mjs b/index.mjs index 22340bc..37b1187 100644 --- a/index.mjs +++ b/index.mjs @@ -16,7 +16,7 @@ const ud = { // 测试 document.getElementById('content').innerHTML = md2Html('# Marked in the browser\n\nRendered by **marked**.'); const elBtnBack = document.createElement('button'); -elBtnBack.classList.add('btn', 'btn-primary', 'mj-navigate-btn'); +elBtnBack.classList.add('btn', 'btn-primary', 'position-absolute', 'top-0', 'end-0', 'mt-3', 'me-3'); elBtnBack.textContent = 'Back'; elBtnBack.addEventListener('click', ()=>{ console.log(ud.cacheUrls) @@ -64,7 +64,7 @@ function updateContent(text, options = {}) { elContent.replaceChildren(); elContent.appendChild(elPre); } - document.querySelectorAll('.main-content a').forEach(a=>tagLinkUpdateEvent(a)); + catchAllTagLink(); } elContent.appendChild(elBtnBack); } @@ -75,6 +75,7 @@ function tagLinkClickCaption(event, aLink) { event.stopPropagation(); event.preventDefault(); } + console.log('22click', event, aLink, aLink.href) const strHref = aLink.href; ud.cacheUrls.push(strHref); const ext = strHref.substring(strHref.lastIndexOf('.') + 1); @@ -95,10 +96,12 @@ function tagLinkUpdateEvent(aLink) { aLink.removeEventListener('click', tagLinkClickCaption); aLink.addEventListener('click', (event)=> tagLinkClickCaption(event, aLink), false); } - +function catchAllTagLink() { + document.querySelectorAll('a').forEach(a => tagLinkUpdateEvent(a)); +} // 获取所有 ud.cacheUrls = []; -document.querySelectorAll('.side-menu a').forEach(a => tagLinkUpdateEvent(a)); +catchAllTagLink(); fetch('/articles/demo.md').then(res=>res.text()).then(text=>{ document.getElementById('content').innerHTML = md2Html(text); }) \ No newline at end of file diff --git a/index/article.md b/index/article.md index 0a930ed..8394e89 100644 --- a/index/article.md +++ b/index/article.md @@ -7,6 +7,7 @@ - [数学笔记](/articles/notes/math.md) - [excel笔记](/articles/notes/excel.md) - [软硬件一体的项目](/articles/others/robot.md) +- [Blender](/cg/blender/index.md) ### 图形学 - [裁剪](../cg/tools/culling.md)