Skip to content

Commit

Permalink
1.6.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
YrracOwl committed Oct 12, 2024
1 parent 0f5ee2f commit 3242475
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 6 deletions.
2 changes: 1 addition & 1 deletion default.aproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<project ver="10" name="ChiikawaBest" libEmbed="true" icon="res\chiikawaIcon.ico" ui="win" output="ChiikawaBest.exe" CompanyName="CarryWho" FileDescription="ChiikawaBest" LegalCopyright="Copyright (C) CarryWho 2023" ProductName="ChiikawaBest" InternalName="ChiikawaBest" FileVersion="1.6.1.4" ProductVersion="1.6.1.4" publishDir="/dist/" dstrip="true" local="false" ignored="false">
<project ver="10" name="ChiikawaBest" libEmbed="true" icon="res\chiikawaIcon.ico" ui="win" output="ChiikawaBest.exe" CompanyName="CarryWho" FileDescription="ChiikawaBest" LegalCopyright="Copyright (C) CarryWho 2023" ProductName="ChiikawaBest" InternalName="ChiikawaBest" FileVersion="1.6.1.7" ProductVersion="1.6.1.7" publishDir="/dist/" dstrip="true" local="false" ignored="false">
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
<folder name="资源文件" path="res" embed="true" local="false" ignored="false">
<file name="chiikawa.png" path="res\chiikawa.png" comment="res\chiikawa.png"/>
Expand Down
4 changes: 2 additions & 2 deletions dlg/timeline.aardio
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ tl_webview.html = /**

<?= content_js?>
</head>
<body>
<body id="truebody">
<?= content_body?>
</body>
</html>
Expand Down Expand Up @@ -692,7 +692,7 @@ winform.添加plus.oncommand = function(id,event){

//tl_webview.invoke("updateContent",{tostring(tl_time);tostring(tl_title);tostring(tl_content);imgUrl});
tl_webview.invoke("updateContent",{tostring(tl_time);tostring(tl_title);winform.gfmarkCheckList(tl_content);imgUrl});
tl_webview.invoke("updatedScroll",{tostring(tl_time)});
//tl_webview.invoke("updatedScroll",{tostring(tl_time)});

}
//修改了时间,或者纯粹新增,均不会触发
Expand Down
1 change: 0 additions & 1 deletion release/1.6.1.3

This file was deleted.

1 change: 1 addition & 0 deletions release/1.6.1.6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.6.1.6
Binary file modified release/ChiikawaBest.exe
Binary file not shown.
53 changes: 51 additions & 2 deletions res/template_timeline.aardio
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ body {
list-style-type: decimal-leading-zero;
}

.hide-toc {
display: none;
}

/* Styling */
.timeline {
margin: 4em auto;
Expand Down Expand Up @@ -270,6 +274,44 @@ var content_js = /**
}
});

const toggleTOC = document.createElement("button");
toggleTOC.setAttribute("id","toggleTOC");
toggleTOC.setAttribute("tocstatus","show");
toggleTOC.style.position = 'fixed';
toggleTOC.style.top = '28px';
toggleTOC.style.right = '28px';
toggleTOC.innerHTML = "目录";
toggleTOC.style.fontSize = '1em';
toggleTOC.style.fontWeight = 'bolder';
toggleTOC.style.color = '#31322c';
toggleTOC.style.boxShadow = '6px 6px 3px 3px rgba(26,26,26,.33)';
toggleTOC.style.borderRadius = '6px';
//toggleTOC.style.zIndex = '999';

// 绑定点击切换目录显示功能
toggleTOC.addEventListener('click', function() {
toggleShowTOC();
});

var addedToggleBtn = 0;

function toggleShowTOC() {
var TOC = document.querySelector(".fixed-top");

if (toggleTOC.getAttribute("tocstatus") == "hide") {
TOC.classList.remove('hide-toc');
toggleTOC.setAttribute("tocstatus","show");
console.log("show TOC!")
}
else
{
TOC.classList.add('hide-toc');
toggleTOC.setAttribute("tocstatus","hide");
console.log("hide TOC!")
}
}


function showFullImage(fullImageUrl) {
console.log('进入showFullImage函数了')
// 创建遮罩层
Expand Down Expand Up @@ -1260,6 +1302,7 @@ var content_js = /**
}

window.updateTOC = () => {

const oldTOC = document.querySelector(".fixed-top");
if(oldTOC){
console.log("delete old TOC")
Expand All @@ -1276,8 +1319,14 @@ var content_js = /**
console.log(tocData)

const tocHTMLContent = TOC.build(tocData)
const frag = document.createRange().createContextualFragment(`<fieldset class="fixed-top"><legend>TOC</legend>${tocHTMLContent}</fieldset>`)
document.querySelector(`body`).insertBefore(frag, document.querySelector(`body`).firstChild)
const frag = document.createRange().createContextualFragment(`<fieldset class="fixed-top"><legend>目录</legend>${tocHTMLContent}</fieldset>`)
document.querySelector(`body`).insertBefore(frag, document.querySelector(`body`).firstChild);
if(addedToggleBtn == 0){
var TempTLOverlay = document.getElementById("truebody");
TempTLOverlay.appendChild(toggleTOC);
addedToggleBtn = 1;
toggleShowTOC();
}
}

</script>
Expand Down

0 comments on commit 3242475

Please sign in to comment.