diff --git a/.obsidian/app.json b/.obsidian/app.json index 6212097f..515d6b53 100644 --- a/.obsidian/app.json +++ b/.obsidian/app.json @@ -42,5 +42,6 @@ "analysabilité", "multiparadigme" ], - "propertiesInDocument": "visible" + "propertiesInDocument": "visible", + "useMarkdownLinks": false } \ No newline at end of file diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index 4621d0df..45063e83 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -15,6 +15,5 @@ "dynamic-outline", "obsidian-git", "cmdr", - "math-in-callout", - "floating-toc" + "math-in-callout" ] \ No newline at end of file diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json index 5728d513..9a5fe6a6 100644 --- a/.obsidian/core-plugins.json +++ b/.obsidian/core-plugins.json @@ -14,7 +14,7 @@ "slash-command": true, "editor-status": false, "starred": false, - "markdown-importer": false, + "markdown-importer": true, "zk-prefixer": true, "random-note": true, "outline": true, diff --git a/.obsidian/plugins/floating-toc/data.json b/.obsidian/plugins/floating-toc/data.json deleted file mode 100644 index 3d516a76..00000000 --- a/.obsidian/plugins/floating-toc/data.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ignoreHeaders": "", - "ignoreTopHeader": false, - "positionStyle": "left", - "isLoadOnMobile": true, - "isLeft": false, - "isDefaultPin": false, - "isTooltip": false, - "defaultCollapsedLevel": 6, - "expandAllSubheadings": false -} \ No newline at end of file diff --git a/.obsidian/plugins/floating-toc/main.js b/.obsidian/plugins/floating-toc/main.js deleted file mode 100644 index 541527cc..00000000 --- a/.obsidian/plugins/floating-toc/main.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - This is the Obsidian example vault is amazing, there are a lot of dazzling features and showcase, I believe you will wonder a bit, is this Obsidian? - [Blue-topaz-examples](https://github.com/cumany/Blue-topaz-examples) - */ - -var Ce=Object.create;var D=Object.defineProperty;var Ee=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty;var j=t=>D(t,"__esModule",{value:!0});var Te=(t,e)=>{j(t);for(var n in e)D(t,n,{get:e[n],enumerable:!0})},xe=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ye(e))!Se.call(t,o)&&o!=="default"&&D(t,o,{get:()=>e[o],enumerable:!(n=Ee(e,o))||n.enumerable});return t},I=t=>xe(j(D(t!=null?Ce(we(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var w=(t,e,n)=>new Promise((o,a)=>{var s=l=>{try{r(n.next(l))}catch(d){a(d)}},i=l=>{try{r(n.throw(l))}catch(d){a(d)}},r=l=>l.done?o(l.value):Promise.resolve(l.value).then(s,i);r((n=n.apply(t,e)).next())});Te(exports,{default:()=>z,refresh_node:()=>ve,selfDestruct:()=>_});var v=I(require("obsidian"));var C=I(require("obsidian"));function F(t,e){return t+1e[t].level:!1}function U(t,e,n){t.stopPropagation();let o=e.getAttribute("isCollapsed");o!==null&&(o==="true"?Ae(e,n):o==="false"&&Le(e))}function Ae(t,e){t.setAttribute("isCollapsed","false");let n=parseInt(t.getAttribute("data-level")),o=t.nextElementSibling;if(e)for(;o&&parseInt(o.getAttribute("data-level"))>n;)o.style.display="block",o.getAttribute("isCollapsed")!==null&&o.setAttribute("isCollapsed","false"),o=o.nextElementSibling;else{let a=!1,s=Number.MAX_VALUE;for(;o&&parseInt(o.getAttribute("data-level"))>n;){let i=o.getAttribute("isCollapsed")!==null,r=parseInt(o.getAttribute("data-level"));a?r<=s&&(o.style.display="block",a=i,s=i?r:Number.MAX_VALUE):(i&&(a=!0,s=r),o.style.display="block"),o=o.nextElementSibling}}}function Le(t){t.setAttribute("isCollapsed","true");let e=parseInt(t.getAttribute("data-level")),n=t.nextElementSibling;for(;n&&parseInt(n.getAttribute("data-level"))>e;)n.style.display="none",n.getAttribute("isCollapsed")!==null&&n.setAttribute("isCollapsed","true"),n=n.nextElementSibling}function P(t,e,n,o,a,s){return w(this,null,function*(){let i=/^(?:\s*)[0-9]+\.\s/,r=/^(?:\s*)[\-\+]\s/,l,d="";(l=i.exec(n))!==null?(d=l[0],n=n.replace(i,"")):(l=r.exec(n))!==null&&(d=l[0],n=n.replace(r,""));let u=Number(o.parentElement.getAttribute("data-id")),p=Number(o.parentElement.getAttribute("data-level")),T=h=>{h.stopImmediatePropagation(),U(h,o.parentElement,t.settings.expandAllSubheadings)};o.parentElement.addEventListener("click",T),o.parentElement.hasAttribute("isCollapsed")?F(u,t.headingdata)||(o.parentElement.removeAttribute("isCollapsed"),o.parentElement.removeEventListener("click",T)):F(u,t.headingdata)&&o.parentElement.setAttribute("isCollapsed","false");let m=o;s=new C.Component,yield C.MarkdownRenderer.renderMarkdown(n,m,a,s),m&&m.classList.add("heading-rendered");let S=m.createEl("a");S.addClass("text"),S.onclick=function(h){var b;h.stopPropagation();let g=(b=parseInt(m.parentElement.getAttribute("data-line")))!=null?b:0;if(h.ctrlKey||h.metaKey)He(e,g);else{ke(e,g);let f=m.parentElement.parentElement.querySelector(".text-wrap.located");f&&f.removeClass("located"),m.addClass("located")}};let c=m.querySelector("p");if(c){let h=/]*>|<\/[^>]*a>/gm;d?S.innerHTML=d+c.innerHTML.replace(h,""):S.innerHTML=c.innerHTML.replace(h,""),m.removeChild(c),t.settings.isTooltip&&(m.setAttribute("aria-label",n),t.settings.positionStyle=="right"&&m.setAttribute("aria-label-position","left"),t.settings.positionStyle=="left"&&m.setAttribute("aria-label-position","right"),t.settings.positionStyle=="both"&&m.setAttribute("aria-label-position","top"))}})}function q(t,e,n,o,a){return w(this,null,function*(){let s=n.createEl("li");s.addClass("heading-list-item"),s.setAttribute("data-level",o.level.toString()),s.setAttribute("data-id",a.toString()),s.setAttribute("data-line",o.position.start.line.toString());let i=s.createEl("div");i.addClass("text-wrap"),P(t,e,o.heading,i,e.file.path,null);let r=s.createEl("div");r.addClass("line-wrap"),r.createDiv().addClass("line")})}var ke=(t,e)=>{t.leaf.openFile(t.file,{eState:{line:e}})},He=(t,e)=>{var s,i;let n=(i=(s=t==null?void 0:t.currentMode.getFoldInfo())==null?void 0:s.folds)!=null?i:[],o=e,a=0;if(n.some((r,l)=>(a=l,r.from==o)))n.splice(a,1);else{let r={from:e,to:e+1};n.push(r)}t==null||t.currentMode.applyFoldInfo({folds:n,lines:t.editor.lineCount()}),t==null||t.onMarkdownFold()};function V(t,e){var a;let n=(s,i)=>{var h;let r=t.workspace.getActiveFile(),l=t.metadataCache.getFileCache(r).headings,d=[];if(l==null||l.map(g=>{g.heading=g.heading.replace(/<\/?[\s\S]*?(?:".*")*>/g,""),d.push(g)}),e.headingdata=d,e.headingdata.length==0)return;e.settings.positionStyle=="right"?(i.addClass("floating-right"),i.removeClass("floating-left"),i.removeClass("floating-both")):e.settings.positionStyle=="left"?(i.addClass("floating-left"),i.removeClass("floating-rigth"),i.removeClass("floating-both")):e.settings.positionStyle=="both"&&(i.addClass("floating-both"),i.removeClass("floating-left"),i.removeClass("floating-rigth")),e.settings.isLeft?(i.removeClass("alignLeft"),i.addClass("alignLeft")):i.removeClass("alignLeft");let u=i.createEl("ul");u.addClass("floating-toc");let p=u.createEl("div");if(p.addClass("toolbar"),p.addClass("pin"),p.addClass("hide"),new C.ButtonComponent(p).setIcon("pin").setTooltip("pin").onClick(()=>{i.classList.contains("pin")?i.removeClass("pin"):i.addClass("pin")}),u.onmouseenter=function(){p.removeClass("hide"),i.addClass("hover")},u.onmouseleave=function(){p.addClass("hide"),i.removeClass("hover")},new C.ButtonComponent(p).setIcon("double-up-arrow-glyph").setTooltip("Scroll to Top").setClass("top").onClick(()=>{let g=this.app.workspace.getActiveViewOfType(C.MarkdownView);g&&g.setEphemeralState({scroll:0})}),new C.ButtonComponent(p).setIcon("double-down-arrow-glyph").setTooltip("Scroll to Bottom").setClass("bottom").onClick(()=>w(this,null,function*(){let g=this.app.workspace.getActiveViewOfType(C.MarkdownView);if(g){let b=this.app.workspace.getActiveFile(),L=(yield this.app.vault.cachedRead(b)).split(` -`),E=L.length;if(g.getMode()==="preview")for(;E>0&&L[E-1].trim()==="";)E--;g.currentMode.applyScroll(E-1)}})),new C.ButtonComponent(p).setIcon("copy").setTooltip("copy to clipboard").setClass("copy").onClick(()=>w(this,null,function*(){let g=e.headingdata.map(b=>" ".repeat(b.level-1)+b.heading);yield navigator.clipboard.writeText(g.join(` -`)),new C.Notice("Copied")})),e.settings.ignoreHeaders){let g=e.settings.ignoreHeaders.split(` -`);e.headingdata=(h=t.metadataCache.getFileCache(r).headings)==null?void 0:h.filter(b=>!g.includes(b.level.toString()))}e.headingdata.forEach((g,b)=>{let f=t.workspace.getActiveViewOfType(C.MarkdownView);q(e,f,u,g,b)}),s==null||s.querySelector(".markdown-source-view").insertAdjacentElement("beforebegin",i)};if(this.app.workspace.getActiveViewOfType(C.MarkdownView)){(0,C.requireApiVersion)("0.15.0")?activeDocument=activeWindow.document:activeDocument=window.document;let s=e.app.workspace.getActiveViewOfType(C.MarkdownView);if(s){if((a=s.contentEl)==null?void 0:a.querySelector(".floating-toc-div"))return;{let r=createEl("div");r.addClass("floating-toc-div"),e.settings.isDefaultPin&&r.addClass("pin"),n(s.contentEl,r)}}}}var x=I(require("obsidian"));var G=["left","right","both"],J={ignoreHeaders:"",ignoreTopHeader:!1,positionStyle:"left",isLoadOnMobile:!0,isLeft:!1,isDefaultPin:!1,isTooltip:!1,defaultCollapsedLevel:6,expandAllSubheadings:!1};var me=I(require("obsidian"));var K={};var X={};var Y={};var $={};var N={"ctrl + click on the floating toc to collapse/expand the header.":"ctrl + click on the floating toc to collapse/expand the header.","Floating TOC position":"Floating TOC position","Floating TOC position, default on the left side of the notes":"Floating TOC position, default on the left side of the notes","Hide heading level":"Hide heading level","Whichever option is selected, the corresponding heading level will be hidden":"Whichever option is selected, the corresponding heading level will be hidden","Plugin Settings":"Plugin Settings","Default Pin":"Default Pin","Enable Tooltip":"Enable Tooltip","Plugin Style Settings":"Plugin Style Settings","Mobile enabled or not":"Mobile enabled or not","Whether to enable the plugin for the mobile client, the default is enabled.":"Whether to enable the plugin for the mobile client, the default is enabled.","If the floating Toc option is not found in the style setting, please reload the style setting plugin (turn it off and on again)":"If the floating Toc option is not found in the style setting, please reload the style setting plugin (turn it off and on again)","Left alignment of TOC text":"Left alignment of TOC text","Aligned on both sides":"Aligned on both sides","Floating TOC position, on the right side of the notes":"Floating TOC position, on the right side of the notes","whether the text in TOC is left aligned":"whether the text in TOC is left aligned","When the panel is split left and right, the right side of the layout is aligned right and the left side of the panel is aligned left.":"When the panel is split left and right, the right side of the layout is aligned right and the left side of the panel is aligned left.","Set the default collapsed level of headings when initialised":"Set the default collapsed level of headings when initialised","Default Collapsed Level":"Default Collapsed Levels","Expand All Subheadings Recursively":"Expand All Subheadings Recursively","When disabled, only direct subheadings will be expanded":"When disabled, only direct subheadings will be expanded"};var Q={};var Z={};var ee={};var te={};var ie={};var le={};var ne={};var se={};var oe={};var ae={};var re={};var de={};var ce={};var ge={};var he={};var pe={};var fe={"ctrl + click on the floating toc to collapse/expand the header.":"\u6309\u4F4Fctrl \u70B9\u51FB\u76EE\u5F55\u4E2D\u7684\u6807\u9898\uFF0C\u53EF\u4EE5\u4F7F\u5BF9\u5E94\u7684\u6B63\u6587\u5185\u5BB9\u6298\u53E0/\u5C55\u5F00\u3002","Floating TOC position":"\u6D6E\u52A8\u76EE\u5F55\u663E\u793A\u4F4D\u7F6E","Floating TOC position, default on the left side of the notes":"\u6D6E\u52A8\u76EE\u5F55\u663E\u793A\u4F4D\u7F6E\uFF0C\u9ED8\u8BA4\u663E\u793A\u5728\u7B14\u8BB0\u5DE6\u4FA7","Hide heading level":"\u9690\u85CF\u6307\u5B9A\u7684\u6807\u9898\u5C42\u7EA7","Whichever option is selected, the corresponding heading level will be hidden":"\u9690\u85CF\u9009\u4E2D\u7684\u6807\u9898\u5C42\u7EA7\uFF0C\u9009\u4E2D\u7684\u6807\u9898\u4E0D\u4F1A\u5728\u6D6E\u52A8\u76EE\u5F55\u4E2D\u663E\u793A\u3002","Plugin Settings":"\u63D2\u4EF6\u8BBE\u7F6E","Default Pin":"\u662F\u5426\u9ED8\u8BA4\u9489\u5728\u7B14\u8BB0\u4E0A","Enable Tooltip":"\u662F\u5426\u5F00\u542F\u6807\u9898\u63D0\u793A","Plugin Style Settings":"\u63D2\u4EF6\u6837\u5F0F\u8BBE\u7F6E","Mobile enabled or not":"\u662F\u5426\u5728\u79FB\u52A8\u7AEF\u542F\u7528","Whether to enable the plugin for the mobile client, the default is enabled.":"\u79FB\u52A8\u5BA2\u6237\u7AEF\u662F\u5426\u542F\u7528\u63D2\u4EF6\uFF0C\u9ED8\u8BA4\u542F\u7528\u3002","If the floating Toc option is not found in the style setting, please reload the style setting plugin (turn it off and on again)":"\u5982\u679Cstyle setting \u4E2D\u65E0\u6CD5\u770B\u5230 floating Toc\u9009\u9879\uFF0C\u8BF7\u91CD\u8F7Dstyle setting\u63D2\u4EF6\uFF08\u5173\u95ED\u518D\u5F00\u542F\u5373\u53EF\uFF09","Left alignment of TOC text":"\u76EE\u5F55\u6587\u5B57\u5DE6\u5BF9\u9F50","Floating TOC position, on the right side of the notes":"\u6D6E\u52A8\u76EE\u5F55\u663E\u793A\u4F4D\u7F6E\uFF0C\u663E\u793A\u5728\u7B14\u8BB0\u53F3\u4FA7","whether the text in TOC is left aligned":"\u5F53\u5DE5\u5177\u680F\u5728\u53F3\u4FA7\u65F6\uFF0C\u76EE\u5F55\u4E2D\u7684\u6807\u9898\u662F\u5426\u5DE6\u5BF9\u9F50","Aligned on both sides":"\u4E24\u7AEF\u5BF9\u9F50","When the panel is split left and right, the right side of the layout is aligned right and the left side of the panel is aligned left.":"\u5F53\u9762\u677F\u5DE6\u53F3\u5206\u5272\u7684\u65F6\u5019\uFF0C\u53F3\u4FA7\u7248\u9762\u53F3\u5BF9\u9F50\uFF0C\u5DE6\u4FA7\u9762\u677F\u5DE6\u5BF9\u9F50\u3002","Set the default collapsed level of headings when initialised":"\u8BBE\u7F6E\u521D\u59CB\u5316\u65F6TOC\u4E2D\u9ED8\u8BA4\u6298\u53E0\u7684\u6807\u9898\u7EA7\u522B","Default Collapsed Level":"\u9ED8\u8BA4\u6298\u53E0\u7EA7\u522B","Expand All Subheadings Recursively":"\u9012\u5F52\u5C55\u5F00\u6240\u6709\u5B50\u6807\u9898","When disabled, only direct subheadings will be expanded":"\u5173\u95ED\u6B64\u9009\u9879\u65F6, \u53EA\u5C55\u5F00\u76F4\u63A5\u5B50\u6807\u9898"};var ue={"Floating TOC position":"\u6D6E\u52D5\u76EE\u9304\u986F\u793A\u4F4D\u7F6E","Floating TOC position, default on the left side of the notes":"\u6D6E\u52D5\u76EE\u9304\u986F\u793A\u4F4D\u7F6E\uFF0C\u9ED8\u8A8D\u986F\u793A\u5728\u7B46\u8A18\u5DE6\u5074","Ignore top-level headers":"\u662F\u5426\u5FFD\u7565\u9802\u7D1A\u76EE\u9304","Select whether to ignore the top-level headings. When turned on, the top-level headings in the current note are not displayed in the floating TOC.":"\u9078\u64C7\u662F\u5426\u5FFD\u7565\u9802\u7D1A\u6A19\u984C\uFF0C\u958B\u555F\u5F8C\u7576\u524D\u6587\u6A94\u4E2D\u6700\u9802\u7D1A\u7684\u6A19\u984C\u4E0D\u986F\u793A\u5728\u6D6E\u52D5\u76EE\u9304\u4E2D\u3002","Plugin Settings":"\u63D2\u4EF6\u8A2D\u7F6E","Default Pin":"\u662F\u5426\u9ED8\u8A8D\u91D8\u5728\u7B46\u8A18\u4E0A","Plugin Style Settings":"\u63D2\u4EF6\u6A23\u5F0F\u8A2D\u7F6E","Mobile enabled or not":"\u662F\u5426\u5728\u79FB\u52D5\u7AEF\u555F\u7528","Whether to enable the plugin for the mobile client, the default is enabled.":"\u79FB\u52D5\u5BA2\u6236\u7AEF\u662F\u5426\u555F\u7528\u63D2\u4EF6\uFF0C\u9ED8\u8A8D\u555F\u7528\u3002","If the floating Toc option is not found in the style setting, please reload the style setting plugin (turn it off and on again)":"\u5982\u679Cstyle setting \u4E2D\u7121\u6CD5\u770B\u5230 floating Toc\u9078\u9805\uFF0C\u8ACB\u91CD\u8F09style setting\u63D2\u4EF6\uFF08\u95DC\u9589\u518D\u958B\u555F\u5373\u53EF\uFF09","Left alignment of TOC text":"\u76EE\u9304\u6587\u5B57\u5DE6\u5C0D\u9F4A","Floating TOC position, on the right side of the notes":"\u6D6E\u52D5\u76EE\u9304\u986F\u793A\u4F4D\u7F6E\uFF0C\u986F\u793A\u5728\u7B46\u8A18\u53F3\u5074","whether the text in TOC is left or right aligned When the floating toc is on the right":"\u7576\u5DE5\u5177\u6B04\u5728\u53F3\u5074\u6642\uFF0C\u76EE\u9304\u4E2D\u7684\u6A19\u984C\u662F\u5426\u5DE6\u5C0D\u9F4A","Aligned on both sides":"\u5169\u7AEF\u5C0D\u9F4A","When the panel is split left and right, the right side of the layout is aligned right and the left side of the panel is aligned left.":"\u7576\u9762\u677F\u5DE6\u53F3\u5206\u5272\u7684\u6642\u5019\uFF0C\u53F3\u5074\u7248\u9762\u53F3\u5C0D\u9F4A\uFF0C\u5DE6\u5074\u9762\u677F\u5DE6\u5C0D\u9F4A\u3002"};var Me={ar:K,cs:X,da:Y,de:$,en:N,"en-gb":Q,es:Z,fr:ee,hi:te,id:ie,it:le,ja:ne,ko:se,nl:oe,nn:ae,pl:re,pt:de,"pt-br":ce,ro:ge,ru:he,tr:pe,"zh-cn":fe,"zh-tw":ue},be=Me[me.moment.locale()];function y(t){return be&&be[t]||N[t]}var B=class{constructor(e){this.checkedList=[];this.containerEl=e,this.flowListEl=this.containerEl.createDiv({cls:"check-list"})}addItem(e,n,o,a){let s=this.flowListEl.createDiv({cls:"check-item"}),i=s.createEl("input",{type:"checkbox"});return i.checked=o,i.checked&&this.checkedList.push(n),i.addEventListener("change",l=>{i.checked?this.checkedList.includes(n)||this.checkedList.push(n):this.checkedList.includes(n)&&this.checkedList.remove(n)}),i.addEventListener("change",l=>a(i.checked)),s.createDiv({cls:"flow-label"}).setText(e),s}};var R=class extends x.PluginSettingTab{constructor(e,n){super(e,n);this.plugin=n,addEventListener("refresh-toc",()=>{_(),V(e,this.plugin)})}display(){let{containerEl:e}=this;e.empty(),e.createEl("h1",{text:"Obsidian Floating TOC "}),e.createEl("span",{text:""}).createEl("a",{text:"Author: Cuman \u2728",href:"https://github.com/cumany"}),e.createEl("span",{text:""}).createEl("a",{text:"Readme:\u4E2D\u6587",href:"https://pkmer.cn/Pkmer-Docs/10-obsidian/obsidian%E7%A4%BE%E5%8C%BA%E6%8F%92%E4%BB%B6/floating-toc/"}),e.createEl("span",{text:""}).createEl("a",{text:"|English ",href:"https://github.com/cumany/obsidian-floating-toc-plugin/blob/master/README.md"});let n=e.createEl("div");n.addClass("callout"),n.setAttribute("data-callout","info");let o=n.createEl("div",{text:"\u{1F511}TIPS:"});o.addClass("callout-title"),o.createEl("br"),n.createEl("div",{text:y("ctrl + click on the floating toc to collapse/expand the header.")}).addClass("callout-content"),e.createEl("h2",{text:y("Plugin Settings")});let s=new x.Setting(e);s.setName(y("Floating TOC position")),this.plugin.settings.positionStyle=="both"?s.setDesc(y("When the panel is split left and right, the right side of the layout is aligned right and the left side of the panel is aligned left.")):this.plugin.settings.positionStyle=="right"?s.setDesc(y("Floating TOC position, on the right side of the notes")):s.setDesc(y("Floating TOC position, default on the left side of the notes")),s.addDropdown(c=>{let h={};G.map(g=>h[g]=g),c.addOptions(h),c.setValue(this.plugin.settings.positionStyle).onChange(g=>{this.plugin.settings.positionStyle=g,this.plugin.saveSettings(),setTimeout(()=>{this.display(),dispatchEvent(new Event("refresh-toc"))},100)})}),this.plugin.settings.positionStyle!="left"&&new x.Setting(e).setName(y("Left alignment of TOC text")).setDesc(y("whether the text in TOC is left aligned")).addToggle(c=>{var h;return c.setValue((h=this.plugin.settings)==null?void 0:h.isLeft).onChange(g=>{this.plugin.settings.isLeft=g,this.plugin.saveSettings(),setTimeout(()=>{this.display(),dispatchEvent(new Event("refresh-toc"))},100)})}),new x.Setting(e).setName(y("Expand All Subheadings Recursively")).setDesc(y("When disabled, only direct subheadings will be expanded")).addToggle(c=>c.setValue(this.plugin.settings.expandAllSubheadings).onChange(h=>{this.plugin.settings.expandAllSubheadings=h,this.plugin.saveSettings(),setTimeout(()=>{dispatchEvent(new Event("refresh-toc"))},100)})),new x.Setting(e).setName(y("Hide heading level")).setDesc(y("Whichever option is selected, the corresponding heading level will be hidden"));let i=new B(e);[1,2,3,4,5,6].forEach(c=>w(this,null,function*(){let g=this.plugin.settings.ignoreHeaders.split(` -`).includes(c.toString());i.addItem(c.toString(),c.toString(),g,b=>{this.plugin.settings.ignoreHeaders=i.checkedList.join(` -`),this.plugin.saveSettings(),setTimeout(()=>{dispatchEvent(new Event("refresh-toc"))},100)})})),new x.Setting(e).setName(y("Default Pin")).addToggle(c=>{var h;return c.setValue((h=this.plugin.settings)==null?void 0:h.isDefaultPin).onChange(g=>{this.plugin.settings.isDefaultPin=g,this.plugin.saveSettings(),setTimeout(()=>{dispatchEvent(new Event("refresh-toc"))},100)})}),new x.Setting(e).setName(y("Enable Tooltip")).addToggle(c=>{var h;return c.setValue((h=this.plugin.settings)==null?void 0:h.isTooltip).onChange(g=>{this.plugin.settings.isTooltip=g,this.plugin.saveSettings(),setTimeout(()=>{dispatchEvent(new Event("refresh-toc"))},100)})}),e.createEl("h2",{text:y("Plugin Style Settings")});let l=e.createEl("div");l.addClass("callout"),l.setAttribute("data-callout","warning"),l.createEl("div",{text:"\u{1F514} Notice: Please click the button again,If the floating-toc option is not found in the style settings"}).addClass("callout-title");let u=l.createEl("div");u.addClass("callout-content"),app.plugins.enabledPlugins.has("obsidian-style-settings")?(u.createEl("br"),new x.ButtonComponent(u).setIcon("palette").setClass("mod-cta").setButtonText("\u{1F3A8} Open style settings").onClick(()=>{app.setting.open(),app.setting.openTabById("obsidian-style-settings"),app.workspace.trigger("parse-style-settings"),setTimeout(()=>{var g,b,f;let h=app.setting.activeTab.containerEl.querySelector(".setting-item-heading[data-id='floating-toc-styles']");h?(g=h.addClass)==null||g.call(h,"float-cta"):(app.workspace.trigger("parse-style-settings"),(f=(b=app.setting.activeTab.containerEl.querySelector(".setting-item-heading[data-id='floating-toc-styles']"))==null?void 0:b.addClass)==null||f.call(b,"float-cta"))},250)})):(u.createEl("br"),u.createEl("span",{text:""}).createEl("a",{text:"Please install or enable the style-settings plugin",href:"obsidian://show-plugin?id=obsidian-style-settings"}));let T=e.createEl("div",{cls:"cDonationSection"}),m=createEl("p"),S=createEl("p");S.appendText("If you like this Plugin and are considering donating to support continued development, use the button below!"),m.setAttribute("style","color: var(--text-muted)"),T.appendChild(S),T.appendChild(m),T.appendChild(Fe("https://github.com/cumany#thank-you-very-much-for-your-support"))}},Fe=t=>{let e=createEl("a");return e.setAttribute("href",t),e.addClass("buymeacoffee-img"),e.innerHTML='',e};var A,O=0;function _(){(0,v.requireApiVersion)("0.15.0")?A=activeWindow.document:A=window.document,A.querySelectorAll(".floating-toc-div").forEach(e=>{e&&e.remove()})}function ve(t,e){var o,a;(0,v.requireApiVersion)("0.15.0")?A=activeWindow.document:A=window.document;let n=(o=e.contentEl)==null?void 0:o.querySelector(".floating-toc-div");if(n){let s=n.querySelector("ul.floating-toc");s||(s=n.createEl("ul"),s.addClass("floating-toc"));let i=n==null?void 0:n.querySelectorAll("li.heading-list-item"),r=t.headingdata;if(t.settings.ignoreHeaders){let l=t.settings.ignoreHeaders.split(` -`);r=(a=t.headingdata)==null?void 0:a.filter(d=>!l.includes(d.level.toString()))}return r?(i.length>=r.length?i==null||i.forEach((l,d)=>{var u;if(r[d])if(r[d].level==l.getAttribute("data-level")&&r[d].heading==l.children[0].innerText&&r[d].position.start.line==l.getAttribute("data-line")){let p=Number(l.getAttribute("data-id"));F(p,t.headingdata)?l.hasAttribute("iscollapsed")||l.setAttribute("isCollapsed","false"):l.hasAttribute("iscollapsed")&&l.removeAttribute("isCollapsed");return}else l.setAttribute("data-level",r[d].level.toString()),l.setAttribute("data-id",d.toString()),l.setAttribute("data-line",r[d].position.start.line.toString()),(u=l.children[0].querySelector("a"))==null||u.remove(),P(t,e,r[d].heading,l.children[0],e.file.path,null);else l.remove()}):r==null||r.forEach((l,d)=>{var u;if(d<=i.length-1)if(l.level.toString()==i[d].getAttribute("data-level")&&l.heading==i[d].children[0].innerText&&l.position.start.line.toString()==i[d].getAttribute("data-line")){let p=Number(i[d].getAttribute("data-id"));F(p,t.headingdata)?i[d].hasAttribute("iscollapsed")||i[d].setAttribute("isCollapsed","false"):i[d].hasAttribute("iscollapsed")&&i[d].removeAttribute("isCollapsed");return}else i[d].setAttribute("data-level",l.level.toString()),i[d].setAttribute("data-id",d.toString()),i[d].setAttribute("data-line",l.position.start.line.toString()),(u=i[d].children[0].querySelector("a"))==null||u.remove(),P(t,e,l.heading,i[d].children[0],e.file.path,null);else q(t,e,s,l,d)}),!0):(s.remove(),!1)}else return!1}function W(t){var e=[];if(t==null?void 0:t.previousElementSibling)for(;t=t.previousElementSibling;)t.nodeType==1&&e.push(t);return e}function Oe(t,e,n){var a,s,i,r,l,d;let o=n.target;if(((a=o.parentElement)==null?void 0:a.classList.contains("cm-editor"))||((s=o.parentElement)==null?void 0:s.classList.contains("markdown-reading-view"))){let u=t.workspace.getActiveViewOfType(v.MarkdownView),p,T={};if(u){p=(i=u.currentMode.getScroll())!=null?i:0;let m=e.headingdata,S=(r=m==null?void 0:m.length)!=null?r:0,c=u.contentEl.querySelector(".floating-toc");if(c){let h=parseInt((l=c.querySelector("li.heading-list-item"))==null?void 0:l.getAttribute("data-line")),g=parseInt((d=c.lastElementChild)==null?void 0:d.getAttribute("data-line"));if(p<=0){let b=c.querySelector(".heading-list-item.located");b&&b.removeClass("located");let f=c==null?void 0:c.querySelector(`li[data-line='${h}']`);f&&f.addClass("located");let L=parseInt(f==null?void 0:f.getAttribute("data-level"));L=L>1?L-1:1;let E=W(f),M=c==null?void 0:c.querySelector("li.focus");M&&M.removeClass("focus"),E.some(k=>{if(k.dataset.level<=L.toString())return k.addClass("focus"),!0});let H=c.querySelector(".heading-list-item");setTimeout(()=>H.scrollIntoViewIfNeeded(),300)}else{for(;--S>=0;)if(m[S].position.start.line<=p){T=m[S],O=m[S].position.start.line;break}if(!T)return;let b=c.querySelector(".heading-list-item.located");b&&b.removeClass("located"),!O&&c&&(O=h);let f=c==null?void 0:c.querySelector(`li[data-line='${O}']`);if(f){if(O==g||O==h)f.addClass("located");else if(f.nextElementSibling)if(parseInt(f.nextElementSibling.getAttribute("data-line"))<=p){f.nextElementSibling.addClass("located");let E=parseInt(f.nextElementSibling.getAttribute("data-level"));E=E>1?E-1:1;let M=W(f.nextElementSibling),H=c==null?void 0:c.querySelector("li.focus");H&&H.removeClass("focus"),M.some(k=>{if(k.dataset.level<=E.toString())return k.addClass("focus"),!0})}else{f.addClass("located");let E=parseInt(f.getAttribute("data-level"));E=E>1?E-1:1;let M=W(f),H=c==null?void 0:c.querySelector("li.focus");H&&H.removeClass("focus"),M.some(k=>{if(k.dataset.level<=E.toString())return k.addClass("focus"),!0})}f.scrollIntoViewIfNeeded()}}}}}}var z=class extends v.Plugin{constructor(){super(...arguments);this.handleScroll=(e,n,o)=>(0,v.debounce)(Oe(e,n,o),200)}onload(){return w(this,null,function*(){(0,v.requireApiVersion)("0.15.0")?A=activeWindow.document:A=window.document,yield this.loadSettings();let e=a=>{a&&(ve(this,a)||V(app,this))};this.addCommand({id:"pin-toc-panel",name:"Pinning the Floating TOC panel",icon:"pin",callback:()=>w(this,null,function*(){let a=this.app.workspace.getActiveViewOfType(v.MarkdownView);if(a){let s=a.contentEl.querySelector(".floating-toc-div");s&&(s.classList.contains("pin")?s.removeClass("pin"):s.addClass("pin"))}})}),this.addCommand({id:"hide-toc-panel",name:"Hide/Show the Floating TOC panel",icon:"list",callback:()=>w(this,null,function*(){let a=this.app.workspace.getActiveViewOfType(v.MarkdownView);if(a){let s=a.contentEl.querySelector(".floating-toc-div");s&&(s.classList.contains("hide")?s.removeClass("hide"):s.addClass("hide"))}})}),this.addCommand({id:"scroll-to-bottom",name:"Scroll to Bottom",icon:"double-down-arrow-glyph",callback:()=>w(this,null,function*(){let a=this.app.workspace.getActiveViewOfType(v.MarkdownView);if(a){let s=this.app.workspace.getActiveFile(),r=(yield this.app.vault.cachedRead(s)).split(` -`),l=r.length;if(a.getMode()==="preview")for(;l>0&&r[l-1].trim()==="";)l--;a.currentMode.applyScroll(l-1)}})}),this.addCommand({id:"scroll-to-top",name:"Scroll to Top",icon:"double-up-arrow-glyph",callback:()=>w(this,null,function*(){let a=this.app.workspace.getActiveViewOfType(v.MarkdownView);a&&a.setEphemeralState({scroll:0})})}),this.addCommand({id:"toggle-position-style",name:"Toggle Floating TOC Position (left/right)",icon:"switch",callback:()=>{this.settings.positionStyle==="left"?this.settings.positionStyle="right":this.settings.positionStyle==="right"?this.settings.positionStyle="left":this.settings.positionStyle==="both"&&new Notice("Position style set to both. Toogle position only works when fixed position (left or right) is selected."),this.saveSettings(),dispatchEvent(new Event("refresh-toc"))}}),this.registerEvent(this.app.workspace.on("active-leaf-change",()=>{let a=this.app.workspace.getActiveViewOfType(v.MarkdownView);if(a){let s=this.app.workspace.getActiveFile(),i=this.app.metadataCache.getFileCache(s).headings,r=[];if(i==null||i.map(l=>{l.heading=l.heading.replace(/<\/?[\s\S]*?(?:".*")*>/g,""),r.push(l)}),this.headingdata=r,this.settings.ignoreHeaders){let l=this.settings.ignoreHeaders.split(` -`);this.headingdata=i.filter(d=>!l.includes(d.level.toString()))}o(a)}})),this.registerEvent(this.app.metadataCache.on("changed",()=>{var s;let a=this.app.workspace.getActiveViewOfType(v.MarkdownView);if(a){let i=a.file,r=this.app.metadataCache.getFileCache(i).headings,l=[];r==null||r.map(p=>{p.heading=p.heading.replace(/<\/?[\s\S]*?(?:".*")*>/g,""),l.push(p)});let d=l==null?void 0:l.map(p=>p.level+p.heading+p.position.start.line),u=(s=this.headingdata)==null?void 0:s.map(p=>p.level+p.heading+p.position.start.line);if(JSON.stringify(u)==JSON.stringify(d))return;if(this.headingdata=l,this.settings.ignoreHeaders){let p=this.settings.ignoreHeaders.split(` -`);this.headingdata=r.filter(T=>!p.includes(T.level.toString()))}o(a)}}));let n=a=>{e(a)},o=a=>(0,v.debounce)(n(a),300,!0);A.addEventListener("scroll",a=>{this.handleScroll(this.app,this,a)},!0),this.addSettingTab(new R(this.app,this)),e(this.app.workspace.getActiveViewOfType(v.MarkdownView)),(0,v.requireApiVersion)("0.15.0")&&this.app.workspace.on("window-open",a=>{a.doc.addEventListener("scroll",s=>{this.handleScroll(this.app,this,s)},!0)}),app.workspace.onLayoutReady(()=>{app.workspace.trigger("parse-style-settings")})})}onunload(){(0,v.requireApiVersion)("0.15.0")?A=activeWindow.document:A=window.document,A.removeEventListener("scroll",e=>{this.handleScroll(this.app,this,e)},!0),_()}setHeadingdata(e){this.headingdata=e}loadSettings(){return w(this,null,function*(){this.settings=Object.assign({},J,yield this.loadData())})}saveSettings(){return w(this,null,function*(){yield this.saveData(this.settings)})}}; diff --git a/.obsidian/plugins/floating-toc/manifest.json b/.obsidian/plugins/floating-toc/manifest.json deleted file mode 100644 index e439af3a..00000000 --- a/.obsidian/plugins/floating-toc/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "floating-toc", - "name": "floating toc", - "version": "2.4.7", - "minAppVersion": "0.14.0", - "description": "This is a floating Toc plugin that hovers a table of content containing a header level on the notes sidebar.", - "author": "Cuman ", - "authorUrl": "https://github.com/cumany/obsidian-floating-toc-plugin", - "isDesktopOnly": false -} diff --git a/.obsidian/plugins/floating-toc/styles.css b/.obsidian/plugins/floating-toc/styles.css deleted file mode 100644 index 537955e8..00000000 --- a/.obsidian/plugins/floating-toc/styles.css +++ /dev/null @@ -1,1468 +0,0 @@ - -/* @settings - -name: Floating TOC -id: floating-toc-styles -settings: - - - id: floating-toc-font-color-header - title: color setting - title.zh: 颜色相关设置 - type: heading - level: 2 - collapsed: true - - - id: floating-toc-header-settings - title: Headers - title.zh: 大纲标题(H1-H6) - type: heading - level: 3 - collapsed: true - - - id: floating-toc-remove-heading-indicator - title: Remove H1-H6 Indicators after Headings - title.zh: 移除标题后的H1-H6 - type: class-toggle - default: false - - - id: toggle-floating-toc-header-color - title: toggle header color - title.zh: 是否开启标题颜色 - type: class-toggle - default: false - - - id: floating-toc-color-h1 - title: Header 1 - type: variable-themed-color - opacity: true - format: hex - default-light: '#' - default-dark: '#' - - - id: floating-toc-color-h2 - title: Header 2 - type: variable-themed-color - opacity: true - format: hex - default-light: '#' - default-dark: '#' - - - id: floating-toc-color-h3 - title: Header 3 - type: variable-themed-color - opacity: true - format: hex - default-light: '#' - default-dark: '#' - - - id: floating-toc-color-h4 - title: Header 4 - type: variable-themed-color - opacity: true - format: hex - default-light: '#' - default-dark: '#' - - - id: floating-toc-color-h5 - title: Header 5 - type: variable-themed-color - opacity: true - format: hex - default-light: '#' - default-dark: '#' - - - id: floating-toc-color-h6 - title: Header 6 - type: variable-themed-color - opacity: true - format: hex - default-light: '#' - default-dark: '#' - - - id: floating-toc-settings - title: Other color settings - title.zh: 其他颜色设置 - type: heading - level: 3 - collapsed: true - - - id: floating-toc-font-color - title: font color - title.zh: 目录字体颜色 - type: variable-themed-color - format: hex - opacity: false - default-light: '#f5f6f8' - default-dark: '#1b1b1b' - - - id: floating-toc-hover-color - title: hover color - title.zh: 鼠标聚焦hover色 - description: The header color when the mouse is over the line . - description.zh: 当鼠标在条目上方时,标题颜色。 - type: variable-themed-color - format: hex - opacity: false - default-light: '#f5f6f8' - default-dark: '#1b1b1b' - - - id: floating-toc-header-background-color - title: Header background color - title.zh: 标题背景色 - type: variable-themed-color - format: hex - opacity: true - default-light: '#ffffff8c' - default-dark: '#202020c4' - - - id: floating-toc-background-color - title: toc background color - title.zh: 目录背景色 - type: variable-themed-color - format: hex - opacity: true - default-light: '#dddddd4d' - default-dark: '#20202066' - - - id: floating-toc-highlight-color - title: highlight color - title.zh: 高亮颜色 - description: Click on the header background color and the indicator color when scrolling . - description.zh: 点击标题背景色和同步滚动时的指示器颜色 - type: variable-color - format: hex - alt-format: - - - id: floating-toc-highlight-color-rgb - format: rgb-values - default: '#ff8000' - - - id: floating-toc-line-color - title: Indicator line color - title.zh: 指示条颜色 - type: variable-themed-color - format: hex - opacity: true - default-light: '#7a9486' - default-dark: '#84a83a' - - - id: floating-toc-layout-header - title: layout settings - title.zh: 版面相关设置 - type: heading - level: 2 - collapsed: true - - - id: enable-heading-nowrap - title: Header single line display - title.zh: 目录标题单行显示 - type: class-toggle - default: false - - - id: floating-toc-font-size - title: font size - title.zh: 字体大小 - type: variable-number - format: rem - default: 0.7 - - - id: floating-toc-line-height - title: line height - title.zh: 目录行间距 - type: variable-number - format: rem - default: 1.5 - - - id: floating-toc-position - title: TOC Position relative to the edge - title.zh: TOC距离边界的相对位置 - type: variable-number-slider - default: 0 - format: px - min: -100 - max: 100 - step: 1 - - - id: indicator-bar-position - title: Indicator bar position relative to the edge - title.zh: 指示条的相对位置 - type: variable-number-slider - default: 0 - format: em - min: -3 - max: 3 - step: 0.1 - - - id: floating-toc-line-width - title: Line Width of floating-toc - title.zh: 目录显示宽度 - description: The maximum line width in rem units (1rem = Body font size) - type: variable-number - default: 18 - format: rem - - - id: floating-toc-appearance-header - title: Appearance settings - title.zh: 外观设置 - type: heading - level: 2 - collapsed: true - - - id: enable-outline-style - title: enable outline style - title.zh: 显示层级线 - type: class-select - allowEmpty: false - default: default-outline-style - options: - - - label: Default - value: default-outline-style - - - label: curves - value: float-curves-outline-style - - - label: line - value: float-outline-style - - - id: enable-bar-icon - title: Replace the indicator bar with an icon - title.zh: 用图标代替指示条 - type: class-toggle - default: false - - - id: enable-bar-heading-text - title: Show heading text next to indicator bar (including parent) - title.zh: 在指示条旁边显示标题上下级 - type: class-toggle - default: false - - - id: focus-heading - title: Focus on the current heading - title.zh: 突出显示当前标题 - description: Focus on the header corresponding to the current scrollbar, other headers will be faded . Set the fade level here. - description.zh: 重点突出当前滚动条对应的标题,其他标题将淡化显示。这里调整淡化程度。 - type: variable-number-slider - default: 0.9 - min: 0 - max: 1 - step: 0.1 - - - id: floating-toc-response-time - title: Response Time - title.zh: 浮动目录响应速度 - description: Adjust the eject sensitivity. The larger the value, the less sensitive it is - description.zh: 调整浮动目录弹出灵敏度。值越大越不灵敏 - type: variable-number-slider - level: 1 - format: s - default: 0.3 - min: 0 - max: 1 - step: 0.1 - - - id: floating-background-settings - title: Notes background blur effect settings - title.zh: 笔记背景模糊效果设置 - type: heading - level: 3 - collapsed: true - - - id: enable-background-blur-dept - title: Activate Blurred background - title.zh: 开启触发目录后笔记背景模糊效果 - type: class-toggle - default: false - - - id: background-blur-depth - title: Blurred background after opening the toc - title.zh: 触发目录背景模糊程度 - description: To adjust the radius of blur - description.zh: 调整背景模糊程度 - type: variable-number-slider - default: 2 - format: px - min: 0 - max: 30 - step: 1 - - - id: floating-toc - title: If you have ideas or feedback, welcome to commit issues on github 😁 - title.zh: 有任何想法可以跟我交流😁,欢迎来访,QQ群:908688452 - type: heading - level: 1 - collapsed: true -*/ - -.theme-light, -.theme-dark { - --background-blur-depth:2px; - --floating-toc-font-color: var(--text-normal); - --floating-toc-hover-color: var(--text-accent-hover); - --floating-toc-font-size: 0.7rem; - --floating-toc-highlight-color: var(--text-highlight-bg-active); - --floating-toc-highlight-color-rgb: 255,128,0; - --floating-toc-line-color: var(--text-accent); - --floating-toc-line-height: 1.5rem; - --floating-toc-response-time: 0.3s; - --floating-toc-position:0px; - --focus-heading:0.9; - --floating-toc-line-width:18rem; - -} -@media (max-width: 767px) { - .theme-light, - .theme-dark { - --floating-toc-line-width: 10rem; /* 适应较小屏幕 */ - } -} -.theme-light{ - --floating-toc-header-background-color:var(--background-primary); - --floating-toc-background-color: rgba(221, 221, 221, 0.3); -} -.theme-dark{ - --floating-toc-header-background-color: rgb(32 32 32 / 77%); - --floating-toc-background-color: rgba(32, 32, 32, 0.4); -} - - -div.workspace-leaf-content[data-type="style-settings"] div.style-settings-heading[data-id="floating-toc"] { - margin-top: 10px; - margin-bottom: 0; - pointer-events: none; - cursor: text; - border-top: 2px solid var(--background-modifier-border); - pointer-events: none; -} - -.style-settings-heading[data-id="floating-toc"] .setting-item-control, -.style-settings-heading[data-id="floating-toc"] .style-settings-collapse-indicator { - display: none; -} - -.style-settings-heading[data-id="floating-toc"] .setting-item-name::before { - display: inline-block; - width: 20px; - height: fit-content; - padding-right: 8px; - font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; - font-weight: initial; - color: unset; - content: "❤️"; -} - - -.heading-list-item.located .line-wrap .line { - background: rgb(var(--floating-toc-highlight-color-rgb),0.8); - height: 2.5px; -} - -.heading-list-item.located .text-wrap:not(.located) .text { - color: var(--floating-toc-highlight-color); -} - -.heading-list-item .text-wrap.located .text { - background-color: rgba(var(--floating-toc-highlight-color-rgb),0.4); -} - -.heading-list-item { - - z-index: 1; - font-size: var(--floating-toc-font-size); - min-height: var(--floating-toc-line-height); - padding: 0; - white-space: nowrap; - position: relative; -} - -.heading-list-item .line-wrap { - position: absolute; - top: 0; - bottom: 0; - width: 1.5rem; - z-index: -1; - animation: lineAppear-72a6a55b 250ms cubic-bezier(0.34, 1.56, 0.64, 1) both; -} - -@keyframes lineAppear-72a6a55b { - 0% { - transform: translateX(1rem); - } - - 100% { - transform: translateX(0rem); - } -} - -.heading-list-item .line-wrap .line { - position: absolute; - top: 50%; - margin-top: calc(2px / -2); - height: 2px; - width: 1.5rem; - background: var(--floating-toc-line-color); -} - -.heading-list-item .text-wrap { - z-index: 9999; - opacity: 0; - pointer-events: none; - height: 100%; - display: inline-flex; - align-items: center; - animation: textAppear-72a6a55b 250ms cubic-bezier(0.34, 1.56, 0.64, 1); - position: relative; -} - -@keyframes textAppear-72a6a55b { - 0% { - transform: translateX(-1rem); - } - - 100% { - transform: translateX(0rem); - } -} - -.heading-list-item .text-wrap .text { - padding: 0.25rem; - border-radius: 0.5rem; - text-decoration: none; - cursor: pointer; - color: var(--floating-toc-font-color); - backdrop-filter: blur(5px); - background: var(--floating-toc-header-background-color); -} - -body.enable-heading-nowrap .floating-toc-div.pin .floating-toc .heading-list-item>.text-wrap { - max-width: unset; -} -body.enable-heading-nowrap .heading-list-item .text-wrap .text { - max-width: calc(var(--floating-toc-line-width) - 3rem); - overflow: hidden; - text-overflow: ellipsis; -} -.heading-list-item .text-wrap .text:hover { - color: var(--floating-toc-hover-color); - font-weight: bold; -} - -.heading-list-item .text-wrap .text:hover::after { - font-size: 8px; -} - - -.heading-list-item:hover .line-wrap .line { - opacity: 0; - pointer-events: none; -} - -.heading-list-item:hover .text-wrap { - opacity: 1; - pointer-events: all; -} -.heading-list-item[data-level="2"] .text-wrap { - margin-left: 0.5rem; - -} -.heading-list-item[data-level="3"] .text-wrap { - margin-left: 1rem; -} -.heading-list-item[data-level="4"] .text-wrap { - margin-left: 1.5rem; -} -.heading-list-item[data-level="5"] .text-wrap { - margin-left: 2rem; - -} -.heading-list-item[data-level="6"] .text-wrap { - margin-left: 2.5rem; - -} - -.heading-list-item[data-level="1"] { - padding-left: 0rem; -} - -.heading-list-item[data-level="1"] .text::after { - content: "H1"; - font-size: 8px; - margin-left: 1px; - color: var(--text-muted); - font-weight: normal !important; - padding: 1px 2px 1px 2px; -} - -.heading-list-item[data-level="2"] { - padding-left: 0.5rem; -} - -.heading-list-item[data-level="2"] .text::after { - content: "H2"; - font-size: 8px; - margin-left: 1px; - color: var(--text-muted); - font-weight: normal !important; - padding: 1px 2px 1px 2px; -} - -.heading-list-item[data-level="3"] { - padding-left: 1rem; -} - -.heading-list-item[data-level="3"] .text::after { - content: "H3"; - font-size: 8px; - margin-left: 1px; - color: var(--text-muted); - font-weight: normal !important; - padding: 1px 2px 1px 2px; -} - -.heading-list-item[data-level="4"] { - padding-left: 1.5rem; -} - -.heading-list-item[data-level="4"] .text::after { - content: "H4"; - font-size: 8px; - margin-left: 1px; - color: var(--text-muted); - font-weight: normal !important; - padding: 1px 2px 1px 2px; -} - -.heading-list-item[data-level="5"] { - padding-left: 1.6rem; -} - -.heading-list-item[data-level="5"] .text::after { - content: "H5"; - font-size: 8px; - margin-left: 1px; - color: var(--text-muted); - font-weight: normal !important; - padding: 1px 2px 1px 2px; -} - -.heading-list-item[data-level="6"] { - padding-left: 1.8rem; -} - -.heading-list-item[data-level="6"] .text::after { - content: "H6"; - font-size: 8px; - margin-left: 1px; - color: var(--text-muted); - font-weight: normal !important; - padding: 1px 2px 1px 2px; -} - - -.floating-toc { - overflow: hidden; - list-style: none; - margin: 0; - padding: 0; - position: absolute; - top: 95px; - display: flex; - flex-direction: column; - justify-content: flex-start; - bottom: 40px; - /* width: 13rem; */ - scroll-behavior: smooth; - min-height: max-content; - max-height: calc(100% - 135px) ; - left:var(--floating-toc-position); - padding-top: 0.5rem; -} - -.floating-toc-div.pin .floating-toc, -.floating-toc:hover { - z-index: 2; - align-items: flex-start; - min-width: 6rem; - max-width: var( --floating-toc-line-width); - width: auto; - overflow-y: auto; - background: var(--floating-toc-background-color); -} - -.floating-toc-div.pin .floating-toc::-webkit-scrollbar, -.floating-toc:hover::-webkit-scrollbar { - display: none; -} - - -body:not(.enable-heading-nowrap) .floating-toc-div.pin .floating-toc .heading-list-item, -body:not(.enable-heading-nowrap) .floating-toc:hover .heading-list-item { - min-height: auto; -} -.floating-toc-div:is(.hover,.pin) .floating-toc .heading-list-item -{ - padding:0 1rem; -} - -.floating-toc-div.pin .floating-toc .heading-list-item -{ - max-width: fit-content; -} - -body.enable-heading-nowrap .floating-toc-div.pin .floating-toc .heading-list-item>.text-wrap, -body.enable-heading-nowrap .floating-toc:hover .heading-list-item>.text-wrap { - white-space: nowrap; -} -.floating-toc-div.pin .floating-toc .heading-list-item>.text-wrap, -.floating-toc:hover .heading-list-item>.text-wrap { - /* min-width: 12rem; */ - white-space: normal; - opacity: 1; - transition-delay: var(--floating-toc-response-time); - transition-property: opacity; - transition-timing-function: ease-in-out; - -webkit-transition-delay: var(--floating-toc-response-time); - -webkit-transition-property: opacity; - -webkit-transition-timing-function: ease-in-out; -} - - -.floating-toc-div.pin .heading-list-item>.line-wrap, -.floating-toc:hover .heading-list-item>.line-wrap { - display: none; - -} - -/* .workspace-leaf-content .floating-toc-div.pin:is(.floating-left,.floating-both)+.markdown-source-view .cm-editor { - padding-left: 2rem; - -} */ - - - -.workspace-leaf-content .floating-toc-div:is(.floating-left,.floating-both)+.markdown-source-view>.cm-editor { - padding-left: 2rem; -} - -.workspace-leaf-content .floating-toc-div.pin:is(.floating-left,.floating-both)+.markdown-source-view>.cm-editor { - padding-left: var(--floating-toc-line-width); -} - - -.workspace-leaf-content .floating-toc-div:is(.floating-left,.floating-both)~.markdown-reading-view .markdown-preview-view { - padding-left: 4rem; -} - -.floating-toc-div:is(.floating-left,.floating-both)+.markdown-source-view .cm-panels { - margin-left: -2rem; -} - -/****right*********/ -.floating-toc-div.pin .floating-toc .heading-list-item>.text-wrap a>a, -.floating-toc-div .floating-toc:hover .heading-list-item>.text-wrap a>a { - - pointer-events: none; -} - -.floating-toc-div.pin .floating-toc .heading-list-item>.text-wrap a>a.external-link, -.floating-toc-div .floating-toc:hover .heading-list-item>.text-wrap a>a.external-link { - - background-image: none; -} - - - -.workspace-leaf-content .floating-toc-div.floating-right~.markdown-reading-view .markdown-preview-view { - padding-right: 2rem; - -} - -.floating-toc-div.floating-right .floating-toc { - right: calc(0.5rem + var(--floating-toc-position)); - align-items: flex-end; - left: unset; -} - -.floating-toc-div.floating-right .heading-list-item { - text-align: right; -} - -.floating-toc-div.floating-right .heading-list-item .line-wrap { - right: 0.5rem; -} - - -.floating-toc-div.floating-right .heading-list-item[data-level="1"] .line-wrap { - padding-left: 0.5rem; -} - -.floating-toc-div.floating-right .heading-list-item[data-level="2"] .line-wrap { - padding-left: 0.7rem; -} - -.floating-toc-div.floating-right .heading-list-item[data-level="3"] .line-wrap { - padding-left: 0.9rem; -} - -.floating-toc-div.floating-right .heading-list-item[data-level="4"] .line-wrap { - padding-left: 1.1rem; -} - -.floating-toc-div.floating-right .heading-list-item[data-level="5"] .line-wrap { - padding-left: 1.3rem; -} - -.floating-toc-div.floating-right .heading-list-item[data-level="6"] .line-wrap { - padding-left: 1.5rem; -} - -.floating-toc-div.floating-right.pin .floating-toc .heading-list-item>.text-wrap, -.floating-toc-div.floating-right .floating-toc:hover .heading-list-item>.text-wrap { - justify-content: flex-end; - text-align: right; - display: inline-flex; -} - -/****pin button***/ - -.floating-right.floating-toc-div .toolbar.pin { - right: 10px; - -} - - -.floating-toc-div.pin .toolbar.pin { - opacity: 1; - display: block; -} - - -.floating-toc-div .toolbar.pin:hover { - opacity: 1; - -} -.floating-toc-div .toolbar button:hover { - box-shadow: none; - color: var( --interactive-accent-hover); - - transform: scale(1.2); -} - -@keyframes shake { - - 0%, - 100% { - -webkit-transform: translateX(0); - } - - 10%, - 30%, - 50%, - 70%, - 90% { - -webkit-transform: translateX(-0.1px); - } - - 20%, - 40%, - 60%, - 80% { - -webkit-transform: translateX(0.1px); - } -} -.floating-toc-div .toolbar.pin.hide { - display: none; -} - -.floating-toc-div .toolbar -{ - display: list-item; - opacity: 0.8; - z-index: 2; - background: var(--floating-toc-background-color); - position: fixed; - top: 75px; - margin-left: 10px; -} -.floating-toc-div.pin .toolbar.pin -{ -display: block; -} -.floating-toc-div.pin .toolbar.pin button[aria-label="pin"] -{ -color: var(--interactive-accent-hover); -animation: shake 0.5s 2 alternate linear; /* 设置动画为2秒钟的时间,并无限循环 */ -} -.floating-toc-div .toolbar button -{ - margin: 0; - padding: 0 10px; - background-color:transparent; - margin-right: 5px; - width: 10px; - display: inline-grid; - box-shadow: none; - transition: transform 0.3s; -} - -.floating-toc-div .toolbar button svg{ - width: 12px; - height: 12px; -} - - - -.floating-toc-div.pin .floating-toc .heading-list-item>.text-wrap { - max-width: calc(var(--floating-toc-line-width) - 1rem); -} - - -body.enable-background-blur-dept .workspace-leaf-content .floating-toc-div.hover:not(.pin)+.markdown-source-view>.cm-editor -{ - - filter: blur(var(--background-blur-depth)); - -webkit-filter: blur(var(--background-blur-depth)); - background: var(--floating-toc-background-color); -} -body.enable-background-blur-dept .workspace-leaf-content .floating-toc-div.hover:not(.pin) ~.markdown-reading-view .markdown-preview-view -{ - filter: blur(var(--background-blur-depth)); - -webkit-filter: blur(var(--background-blur-depth)); - background: var(--floating-toc-background-color); -} - -body.enable-background-blur-dept .floating-toc-div.hover:not(.pin) .heading-list-item .text-wrap:not(.located) .text { - background: transparent; - - -} - -body.enable-background-blur-dept .floating-toc-div.pin .floating-toc, -body.enable-background-blur-dept .floating-toc:hover { - background: transparent; -} - - -/****alignLeft**/ - -.floating-toc-div.floating-right.alignLeft .floating-toc { - - align-items: flex-start; -} -.floating-right.floating-toc-div.alignLeft .toolbar.pin { - right: 4rem; -} -.floating-toc-div.floating-right.alignLeft.pin .floating-toc .heading-list-item>.text-wrap, -.floating-toc-div.floating-right.alignLeft .floating-toc:hover .heading-list-item>.text-wrap -{ - max-width: 12rem; - text-overflow: ellipsis; -justify-content: flex-start; - -text-align: left; -} - - - - -/* .heading-list-item.located .text::before -{ - content: "•"; - margin-right: 2px; - margin-left: -0.5rem; -} */ -/* .heading-list-item.focus .text::before -{ - content: "▾"; - margin-right: 2px; - margin-left: -1rem; -} */ -heading-list-item.focus .text -{ - font-weight: bold; -} -.floating-toc-div:not(:is(.hover,.pin)) .heading-list-item -{ - width: 2rem; - overflow: hidden; - margin-left: var(--indicator-bar-position); -} -.floating-toc-div:hover .heading-list-item -{ - width: unset; -} -.floating-toc-div:not(:is(.hover)) .heading-list-item:not(:is(.located,.focus)) -{ -opacity: var(--focus-heading); -} - - - -/****enable-bar-heading-text**/ - -body.enable-bar-heading-text .floating-toc-div:not(:is(.hover,.pin)) .heading-list-item:is(.located,.focus) -{ -width:unset; -} -body.enable-bar-heading-text .floating-toc-div:not(:is(.hover,.pin)) .heading-list-item:is(.located,.focus) .text-wrap -{ - opacity: 1; - margin-left: 10px; - -} -body.enable-bar-heading-text .floating-toc-div:not(:is(.hover,.pin)) .heading-list-item:is(.located,.focus) .text-wrap .text -{ - max-width: 12rem; - overflow:hidden; - text-overflow:ellipsis; - white-space:nowrap; - color: var(--text-normal); -} - -body.enable-bar-heading-text .floating-toc-div:not(:is(.hover,.pin)) .heading-list-item:is(.located,.focus) .text-wrap .text::before -{ -content: ''; -margin-left: 0.2rem; -} - -.heading-list-item.focus .text-wrap .text { - font-weight:bolder; -} -/******/ - .heading-list-item:not(.focus,.located) .text-wrap .text { - font-weight:normal; -} - -.workspace-tabs.mod-stacked .workspace-tab-header:not(.is-active) + .workspace-leaf .floating-toc-div -{ - opacity: 0; -} - -/******/ - - -/**第二个tabs右侧*/ -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both~.markdown-reading-view .markdown-preview-view { - padding-right: 2rem; - -} - - -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both .floating-toc { - right: calc(0.5rem + var(--floating-toc-position)); - align-items: flex-end; - left: unset; -} - -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both .heading-list-item { - text-align: right; -} - -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both .heading-list-item .line-wrap { - right: 0.5rem; -} - - -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both .heading-list-item[data-level="1"] .line-wrap { - padding-left: 0.5rem; -} - -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both .heading-list-item[data-level="2"] .line-wrap { - padding-left: 0.7rem; -} - -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both .heading-list-item[data-level="3"] .line-wrap { - padding-left: 0.9rem; -} - -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both .heading-list-item[data-level="4"] .line-wrap { - padding-left: 1.1rem; -} - -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both .heading-list-item[data-level="5"] .line-wrap { - padding-left: 1.3rem; -} - -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both .heading-list-item[data-level="6"] .line-wrap { - padding-left: 1.5rem; -} - -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both.pin .floating-toc .heading-list-item>.text-wrap, -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both .floating-toc:hover .heading-list-item>.text-wrap { - justify-content: flex-end; - text-align: right; - display: inline-flex; -} - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-tabs -.floating-toc-div.floating-both~.markdown-reading-view .markdown-preview-view { - padding-right: 2rem; - -} -/**垂直分割后第二个tabs*/ - -.workspace-split.mod-vertical > .workspace-tabs ~.workspace-tabs .floating-toc-div.floating-both + .markdown-source-view>.cm-editor { - padding-right: 2rem; - padding-left: 0; -} -.workspace-split.mod-vertical > .workspace-tabs ~.workspace-tabs .floating-toc-div.floating-both ~.markdown-reading-view .markdown-preview-view { - padding-left: 2rem; - padding-right: 4rem; -} - -.workspace-split.mod-vertical > .workspace-tabs ~.workspace-tabs .floating-toc-div.floating-both.alignLeft.hover .floating-toc -{ - align-items: flex-start; -} -.workspace-split.mod-vertical > .workspace-tabs ~.workspace-tabs - .floating-toc-div.floating-both .floating-toc { - right: calc(0.5rem + var(--floating-toc-position)); - align-items: flex-end; - left: unset; -} - -.workspace-split.mod-vertical > .workspace-tabs ~.workspace-tabs - .floating-toc-div.floating-both .heading-list-item { - text-align: right; -} - -.workspace-split.mod-vertical > .workspace-tabs ~.workspace-tabs - .floating-toc-div.floating-both .heading-list-item .line-wrap { - right: 0.5rem; -} - - - -.workspace-split.mod-vertical > .workspace-tabs ~.workspace-tabs -.floating-toc-div.floating-both.pin .floating-toc .heading-list-item>.text-wrap, -.workspace-split.mod-vertical > .workspace-tabs ~.workspace-tabs - .floating-toc-div.floating-both .floating-toc:hover .heading-list-item>.text-wrap { - justify-content: flex-end; - text-align: right; - display: inline-flex; -} - - -/**垂直分割 然后水平分割的tabs*/ - - - - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs - .floating-toc-div.floating-both .floating-toc { - right: calc(0.5rem + var(--floating-toc-position)); - align-items: flex-end; - left: unset; -} - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs - .floating-toc-div.floating-both .heading-list-item { - text-align: right; -} - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs - .floating-toc-div.floating-both .heading-list-item .line-wrap { - right: 0.5rem; -} - - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both .heading-list-item[data-level="1"] .line-wrap { - padding-left: 0.5rem; -} - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both .heading-list-item[data-level="2"] .line-wrap { - padding-left: 0.7rem; -} - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both .heading-list-item[data-level="3"] .line-wrap { - padding-left: 0.9rem; -} - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both .heading-list-item[data-level="4"] .line-wrap { - padding-left: 1.1rem; -} - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both .heading-list-item[data-level="5"] .line-wrap { - padding-left: 1.3rem; -} - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs - .floating-toc-div.floating-both .heading-list-item[data-level="6"] .line-wrap { - padding-left: 1.5rem; -} - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both.pin .floating-toc .heading-list-item>.text-wrap, -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs - .floating-toc-div.floating-both .floating-toc:hover .heading-list-item>.text-wrap { - justify-content: flex-end; - text-align: right; - display: inline-flex; -} -/***/ - -/**两个垂直分割 水平分割的tabs*/ - -.workspace-split.mod-horizontal ~.workspace-split.mod-horizontal>.workspace-tabs - .floating-toc-div.floating-both .floating-toc { - right: calc(0.5rem + var(--floating-toc-position)); - align-items: flex-end; - left: unset; -} -.workspace-split.mod-horizontal ~.workspace-split.mod-horizontal>.workspace-tabs - .floating-toc-div.floating-both:is(.pin,.hover) .floating-toc { - right: calc(-2.5rem + var(--floating-toc-position)); - align-items: unset; - left: unset; -} -.workspace-split.mod-vertical ~.workspace-split.mod-horizontal>.workspace-tabs - .floating-toc-div.floating-both .heading-list-item { - text-align: right; -} - -.workspace-split.mod-vertical ~.workspace-split.mod-horizontal>.workspace-tabs - .floating-toc-div.floating-both .heading-list-item .line-wrap { - right: 0.5rem; -} - - -.workspace-split.mod-vertical ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both .heading-list-item[data-level="1"] .line-wrap { - padding-left: 0.5rem; -} - -.workspace-split.mod-vertical ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both .heading-list-item[data-level="2"] .line-wrap { - padding-left: 0.7rem; -} - -.workspace-split.mod-vertical ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both .heading-list-item[data-level="3"] .line-wrap { - padding-left: 0.9rem; -} - -.workspace-split.mod-vertical ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both .heading-list-item[data-level="4"] .line-wrap { - padding-left: 1.1rem; -} - -.workspace-split.mod-vertical ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both .heading-list-item[data-level="5"] .line-wrap { - padding-left: 1.3rem; -} - -.workspace-split.mod-vertical ~.workspace-split.mod-horizontal>.workspace-tabs - .floating-toc-div.floating-both .heading-list-item[data-level="6"] .line-wrap { - padding-left: 1.5rem; -} - -.workspace-split.mod-vertical ~.workspace-split.mod-horizontal>.workspace-tabs -.floating-toc-div.floating-both.pin .floating-toc .heading-list-item>.text-wrap, -.workspace-split.mod-vertical ~.workspace-split.mod-horizontal>.workspace-tabs - .floating-toc-div.floating-both .floating-toc:hover .heading-list-item>.text-wrap { - justify-content: flex-end; - text-align: right; - display: inline-flex; -} - - -/***/ - -/**第二个tabs右侧*/ - - -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both.alignLeft .toolbar.pin { - right: 4rem; -} -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both.alignLeft.pin .floating-toc .heading-list-item>.text-wrap, -.workspace-tabs~.workspace-tabs.mod-top-right-space .floating-toc-div.floating-both.alignLeft .floating-toc:hover .heading-list-item>.text-wrap -{ - max-width: 12rem; - text-overflow: ellipsis; -justify-content: flex-start; -text-align: left; -} - - - - -/**垂直分割 然后水平分割的tabs*/ - -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs .floating-toc-div.floating-both.alignLeft .toolbar.pin { - right: 4rem; -} -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs .floating-toc-div.floating-both.alignLeft.pin .floating-toc .heading-list-item>.text-wrap, -.workspace-split.mod-vertical .workspace-tabs ~.workspace-split.mod-horizontal>.workspace-tabs .floating-toc-div.floating-both.alignLeft .floating-toc:hover .heading-list-item>.text-wrap -{ - max-width: 12rem; - text-overflow: ellipsis; -justify-content: flex-start; -text-align: left; -} - - -/***floating-both.alignLeft***/ - - -.workspace-split.mod-vertical > .workspace-tabs ~.workspace-tabs .floating-toc-div.floating-both.alignLeft .toolbar.pin { - right: 4rem; -} -.workspace-split.mod-vertical > .workspace-tabs ~.workspace-tabs .floating-toc-div.floating-both.alignLeft.pin .floating-toc .heading-list-item>.text-wrap, -.workspace-split.mod-vertical > .workspace-tabs ~.workspace-tabs .floating-toc-div.floating-both.alignLeft .floating-toc:hover .heading-list-item>.text-wrap -{ - max-width: 12rem; - text-overflow: ellipsis; -justify-content: flex-start; -text-align: left; -} - - - - - - - -/*****/ -.setting-item-heading.float-cta:after { - content: ""; - position: absolute; - top: -10%; - width: 104%; - left: -2%; - height: 120%; - outline: 2px solid var(--text-accent); - border-radius: 1em; - pointer-events: none; -} -.setting-item-heading.float-cta { - position: relative; -} - - -.floating-toc-remove-heading-indicator .heading-list-item[data-level] .text::after { - display: none; -} - -body:not(.toggle-floating-toc-header-color) .setting-item[data-id^="floating-toc-color-"] -{ - display: none; -} - -body.toggle-floating-toc-header-color .floating-toc-div .floating-toc -.heading-list-item[data-level="1"] a.text -{ - color:var(--floating-toc-color-h1,var(--h1-color)); -} -body.toggle-floating-toc-header-color .floating-toc-div .floating-toc -.heading-list-item[data-level="2"] a.text -{ - color:var(--floating-toc-color-h2,var(--h2-color)); -} -body.toggle-floating-toc-header-color .floating-toc-div .floating-toc -.heading-list-item[data-level="3"] a.text -{ - color:var(--floating-toc-color-h3,var(--h3-color)); -} -body.toggle-floating-toc-header-color .floating-toc-div .floating-toc -.heading-list-item[data-level="4"] a.text -{ - color:var(--floating-toc-color-h4,var(--h4-color)); -} -body.toggle-floating-toc-header-color .floating-toc-div .floating-toc -.heading-list-item[data-level="5"] a.text -{ - color:var(--floating-toc-color-h5,var(--h5-color)); -} -body.toggle-floating-toc-header-color .floating-toc-div .floating-toc -.heading-list-item[data-level="6"] a.text -{ - color:var(--floating-toc-color-h6,var(--h6-color)); -} - -/**************/ - -.enable-bar-icon .floating-toc-div:not(.hover) .floating-toc:before { - content: ''; - height: 12px; - z-index: 10; - background-repeat: no-repeat; - cursor: var(--cursor); - text-align: right; - padding: 4px 20px; - margin-bottom: 2px; - border-radius: 5px; - font-weight: 500; - font-size: var(--font-adaptive-small); -} -.enable-bar-icon .floating-toc-div:not(.hover) .floating-toc:before { - opacity: .35; - background-position: center center; - background-size: 18px; - background-image: url("data:image/svg+xml,%3Csvg t='1671519666455' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='11772' width='16' height='16'%3E%3Cpath d='M887.212102 264.644379 320.083527 264.644379c-29.826306 0-54.012148-23.896246-54.012148-53.723575s24.185842-53.723575 54.012148-53.723575l567.127552 0c29.827329 0 54.012148 23.896246 54.012148 53.723575S917.039431 264.644379 887.212102 264.644379zM887.212102 562.426483 320.083527 562.426483c-29.826306 0-54.012148-24.408923-54.012148-54.235229 0-29.828352 24.185842-54.235229 54.012148-54.235229l567.127552 0c29.827329 0 54.012148 24.406876 54.012148 54.235229C941.22425 538.018583 917.039431 562.426483 887.212102 562.426483zM887.212102 859.18528 320.083527 859.18528c-29.826306 0-54.012148-24.407899-54.012148-54.235229s24.185842-54.235229 54.012148-54.235229l567.127552 0c29.827329 0 54.012148 24.407899 54.012148 54.235229S917.039431 859.18528 887.212102 859.18528zM153.565003 257.94377l-47.261397 0c-13.05534 0-23.630187-10.601452-23.630187-23.655769l0-47.234791c0-13.080923 10.574846-23.630187 23.630187-23.630187l47.261397 0c13.054317 0 23.630187 10.549264 23.630187 23.630187l0 47.234791C177.19519 247.341295 166.61932 257.94377 153.565003 257.94377L153.565003 257.94377zM153.565003 852.076372l-47.261397 0c-13.05534 0-23.630187-10.600429-23.630187-23.655769l0-47.233768c0-13.080923 10.574846-23.63121 23.630187-23.63121l47.261397 0c13.054317 0 23.630187 10.550287 23.630187 23.63121l0 47.233768C177.19519 841.475943 166.61932 852.076372 153.565003 852.076372L153.565003 852.076372zM153.565003 541.507034l-47.261397 0c-13.05534 0-23.630187-10.601452-23.630187-23.655769l0-47.234791c0-13.080923 10.574846-23.630187 23.630187-23.630187l47.261397 0c13.054317 0 23.630187 10.549264 23.630187 23.630187l0 47.234791C177.19519 530.905582 166.61932 541.507034 153.565003 541.507034L153.565003 541.507034z' fill='white' p-id='11773'%3E%3C/path%3E%3C/svg%3E"); -} -.theme-light.enable-bar-icon .floating-toc-div:not(.hover) .floating-toc:before { - background-image: url("data:image/svg+xml,%3Csvg t='1671519666455' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='11772' width='16' height='16'%3E%3Cpath d='M887.212102 264.644379 320.083527 264.644379c-29.826306 0-54.012148-23.896246-54.012148-53.723575s24.185842-53.723575 54.012148-53.723575l567.127552 0c29.827329 0 54.012148 23.896246 54.012148 53.723575S917.039431 264.644379 887.212102 264.644379zM887.212102 562.426483 320.083527 562.426483c-29.826306 0-54.012148-24.408923-54.012148-54.235229 0-29.828352 24.185842-54.235229 54.012148-54.235229l567.127552 0c29.827329 0 54.012148 24.406876 54.012148 54.235229C941.22425 538.018583 917.039431 562.426483 887.212102 562.426483zM887.212102 859.18528 320.083527 859.18528c-29.826306 0-54.012148-24.407899-54.012148-54.235229s24.185842-54.235229 54.012148-54.235229l567.127552 0c29.827329 0 54.012148 24.407899 54.012148 54.235229S917.039431 859.18528 887.212102 859.18528zM153.565003 257.94377l-47.261397 0c-13.05534 0-23.630187-10.601452-23.630187-23.655769l0-47.234791c0-13.080923 10.574846-23.630187 23.630187-23.630187l47.261397 0c13.054317 0 23.630187 10.549264 23.630187 23.630187l0 47.234791C177.19519 247.341295 166.61932 257.94377 153.565003 257.94377L153.565003 257.94377zM153.565003 852.076372l-47.261397 0c-13.05534 0-23.630187-10.600429-23.630187-23.655769l0-47.233768c0-13.080923 10.574846-23.63121 23.630187-23.63121l47.261397 0c13.054317 0 23.630187 10.550287 23.630187 23.63121l0 47.233768C177.19519 841.475943 166.61932 852.076372 153.565003 852.076372L153.565003 852.076372zM153.565003 541.507034l-47.261397 0c-13.05534 0-23.630187-10.601452-23.630187-23.655769l0-47.234791c0-13.080923 10.574846-23.630187 23.630187-23.630187l47.261397 0c13.054317 0 23.630187 10.549264 23.630187 23.630187l0 47.234791C177.19519 530.905582 166.61932 541.507034 153.565003 541.507034L153.565003 541.507034z' fill='%23272636' p-id='11773'%3E%3C/path%3E%3C/svg%3E"); - } - .enable-bar-icon .floating-toc-div:not(.pin) .floating-toc:not(:hover) li - { - display: none; - } - .enable-bar-icon .floating-toc-div.pin .floating-toc:before - { - display: none; - } - -/******/ - - - -body.float-curves-outline-style .floating-toc-div:is(.hover,.pin) -.heading-list-item[data-level='1'] + li.heading-list-item[data-level='2']::before, -body.float-curves-outline-style .floating-toc-div:is(.hover,.pin) -.heading-list-item[data-level='2'] + li.heading-list-item[data-level='3']::before, -body.float-curves-outline-style .floating-toc-div:is(.hover,.pin) -.heading-list-item[data-level='3'] + li.heading-list-item[data-level='4']::before , -body.float-curves-outline-style .floating-toc-div:is(.hover,.pin) -.heading-list-item[data-level='4'] + li.heading-list-item[data-level='5']::before , -body.float-curves-outline-style .floating-toc-div:is(.hover,.pin) - .heading-list-item[data-level='5'] + li.heading-list-item[data-level='6']::before -{ - top: calc(calc(var(--nav-item-size) * 1.8) / 2 * -0.8)!important; - -} - -body.float-curves-outline-style .floating-toc-div:is(.hover,.pin) -.heading-list-item[data-level='1'] ~ .heading-list-item[data-level='2']:not([iscollapsed])::before, -body.float-curves-outline-style .floating-toc-div:is(.hover,.pin) -.heading-list-item[data-level='2'] ~ .heading-list-item[data-level='3']:not([iscollapsed])::before, -body.float-curves-outline-style .floating-toc-div:is(.hover,.pin) -.heading-list-item[data-level='3'] ~ .heading-list-item[data-level='4']:not([iscollapsed])::before , -body.float-curves-outline-style .floating-toc-div:is(.hover,.pin) -.heading-list-item[data-level='4'] ~ .heading-list-item[data-level='5']:not([iscollapsed])::before , -body.float-curves-outline-style .floating-toc-div:is(.hover,.pin) -.heading-list-item[data-level='5'] ~ .heading-list-item[data-level='6']:not([iscollapsed])::before - { - content: " "; - position: absolute; - top: calc(calc(var(--nav-item-size) * 1.8) / 2 * -1.6); - /* left: -10px; */ - bottom: calc(100% - (calc(var(--nav-item-size) * 1.8) - 4px) / 2 ); - width: 18px; - border-bottom-left-radius: var(--radius-m); - border-bottom: 1.5px solid hsla(var(--color-accent-hsl), 0.9); - border-left: 2px solid hsla(var(--color-accent-hsl), 0.9); - pointer-events: none; -} -.heading-list-item[data-level='2']::before -{ - left: 0.7rem; -} -.heading-list-item[data-level='3']::before -{ - left: 1.2rem; -} -.heading-list-item[data-level='4']::before -{ - left: 1.7rem; -} -.heading-list-item[data-level='5']::before -{ - left: 2.2rem; -} -.heading-list-item[data-level='6']::before -{ - left: 2.7rem; -} - - -body.float-outline-style -.heading-list-item[data-level='2'] + .heading-list-item[data-level='2']::before, -body.float-outline-style -.heading-list-item[data-level='3'] + .heading-list-item[data-level='3']::before , -body.float-outline-style -.heading-list-item[data-level='4'] + .heading-list-item[data-level='4']::before , -body.float-outline-style - .heading-list-item[data-level='5'] + .heading-list-item[data-level='5']::before , - body.float-outline-style - .heading-list-item[data-level='6'] + .heading-list-item[data-level='6']::before - { - content: " "; - position: absolute; - display: block; - - top: -2.6em; - bottom: 100%; - border-right: 1px solid var(--text-muted); - pointer-events: none; - - } - - /*********/ - - - .floating-toc-div.hide - { - display:none; - } - - - -/******/ -/* 默认不显示伪元素 */ -/* .heading-list-item::before { - content: ''; -} */ - -/* 对于折叠状态 */ -.floating-toc-div.pin .heading-list-item[isCollapsed="true"] .heading-rendered::before, -.floating-toc-div.hover .heading-list-item[isCollapsed="true"] .heading-rendered::before { - /* content: '▶'; */ - /* 源文件是src/resources/右键头,需要调整颜色和大小后转化成 URL encoded */ - content: url("data:image/svg+xml,%3C%3Fxml version='1.0' standalone='no'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg t='1701099392052' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='4217' xmlns:xlink='http://www.w3.org/1999/xlink' width='0.65em' height='0.65em'%3E%3Cpath d='M757.792745 435.407215L419.597482 96.904967c-40.010393-40.010393-104.886579-40.010393-144.896972 0-40.010393 40.010393-40.010393 104.988908 0 144.9993L540.344959 507.855701 274.70051 773.807135c-40.010393 40.112721-40.010393 104.988908 0 144.9993 40.010393 40.010393 104.886579 40.010393 144.896972 0l338.092935-338.39992c40.112721-40.010393 40.112721-104.988908 0.102328-144.9993z' fill='%23d3c6aa' p-id='4218'%3E%3C/path%3E%3C/svg%3E%0A"); - position: absolute; - width: 1em; - margin-left: -0.9em; /* 向左偏移自身宽度,使伪元素不占用.text-wrap的空间 */ - padding-right: 0.5rem; - z-index: 2; - left: 0; /* 使伪元素位于li的最左边 */ - top: 50%; /* 垂直居中 */ - transform: translateY(-50%); /* 偏移自身高度的一半以实现精确的垂直居中 */ - text-align: center; /* 确保字符水平居中 */ -} - -/* 对于展开状态 */ -.floating-toc-div.pin .heading-list-item[isCollapsed="false"] .heading-rendered::before, -.floating-toc-div.hover .heading-list-item[isCollapsed="false"] .heading-rendered::before { - /* content: '▼'; */ - content: url("data:image/svg+xml,%3C%3Fxml version='1.0' standalone='no'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg t='1701099490786' class='icon' viewBox='0 0 1026 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='7616' xmlns:xlink='http://www.w3.org/1999/xlink' width='0.65em' height='0.65em'%3E%3Cpath d='M857.088 224.256q28.672-28.672 69.12-28.672t69.12 28.672q29.696 28.672 29.696 68.608t-29.696 68.608l-382.976 380.928q-12.288 14.336-30.72 19.968t-38.912 4.608-40.448-8.704-34.304-22.016l-376.832-374.784q-29.696-28.672-29.696-68.608t29.696-68.608q14.336-14.336 32.256-21.504t36.864-7.168 37.376 7.168 32.768 21.504l313.344 309.248z' fill='%23d3c6aa' p-id='7617'%3E%3C/path%3E%3C/svg%3E%0A"); - position: absolute; - width: 1em; - margin-left: -0.9em; - padding-right: 0.5rem; - z-index: 2; - left: 0; - top: 50%; - transform: translateY(-50%); - text-align: center; -} -.check-list { - gap: 0.2em; - display: flex; - padding: 6px; -} -.check-item { - display: flex; - padding: 3px 8px 3px 8px; - align-items: center; -} - -.floating-toc>.toolbar + .heading-list-item -{ - padding-top:0.5rem; -} - diff --git a/.obsidian/plugins/obsidian-style-settings/data.json b/.obsidian/plugins/obsidian-style-settings/data.json index 54164166..229a9366 100644 --- a/.obsidian/plugins/obsidian-style-settings/data.json +++ b/.obsidian/plugins/obsidian-style-settings/data.json @@ -70,5 +70,6 @@ "obsidian-dynamic-outline@@disable-heading-word-wrap": false, "obsidian-dynamic-outline@@heading-level-styling": "none", "obsidian-dynamic-outline@@dynamic-outline-active-heading-background": "var(--dynamic-outline-background-accent)", - "obsidian-dynamic-outline@@dynamic-outline-font-size": "var(--font-smallest)" + "obsidian-dynamic-outline@@dynamic-outline-font-size": "var(--font-smallest)", + "obsidian-dynamic-outline@@dynamic-outline-li-padding-tab-size": 16 } \ No newline at end of file diff --git a/test.md b/test.md new file mode 100644 index 00000000..332ba79e --- /dev/null +++ b/test.md @@ -0,0 +1,5 @@ +--- +aliases: +up: +tags: +---