From f64f8aba8a530190819b59a16f11611a4bca4959 Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Thu, 29 Sep 2022 17:51:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=82=B9=E5=87=BB=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E5=BD=93=E5=89=8D=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E5=9B=9E=E5=88=B0=E9=A1=B5=E9=9D=A2=E9=A1=B6?= =?UTF-8?q?=E9=83=A8=EF=BC=8C=E4=B8=BA=E7=AB=99=E7=82=B9=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=9B=9E=E5=88=B0=E4=B8=BB=E9=A1=B5=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=EF=BC=8C=E8=AE=BE=E7=BD=AE=E5=86=85=E5=AE=B9=E5=8C=BA?= =?UTF-8?q?=E5=B9=B3=E6=BB=91=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 10 +++++----- assets/bread-card-markdown-extension-github.css | 9 +++++++++ assets/bread-card-markdown-extension-shelf.css | 9 +++++++++ assets/bread-card-markdown.css | 6 ++++-- assets/main.css | 12 ++++++++++++ constant.php | 2 +- src/Data/SiteMeta.php | 16 ++++++++-------- src/Element/BookContent/Page.php | 2 +- template/main.php | 1 + template/nav.php | 2 +- 10 files changed, 51 insertions(+), 18 deletions(-) create mode 100644 assets/bread-card-markdown-extension-github.css create mode 100644 assets/bread-card-markdown-extension-shelf.css diff --git a/.gitignore b/.gitignore index 040bb85..743c522 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,14 @@ # 忽略开发文件夹 -/.vs/ -/debug/ -/.idea/ +.vs/ +debug/ +.idea/ # 忽略服务器运行时文件 -/.well-known/ +.well-known/ .user.ini # 忽略数据 -/data/* +data # 不忽略配置文件 !.htaccess diff --git a/assets/bread-card-markdown-extension-github.css b/assets/bread-card-markdown-extension-github.css new file mode 100644 index 0000000..f0d1e26 --- /dev/null +++ b/assets/bread-card-markdown-extension-github.css @@ -0,0 +1,9 @@ +/****************************************************************************** + ############################################################################## + ##### ##### + ##### Markdown StyleSheet of ui design BreadCard ##### + ##### ##### + ##### @author: Sukazyo Workshop ##### + ##### ##### + ############################################################################## + ******************************************************************************/ \ No newline at end of file diff --git a/assets/bread-card-markdown-extension-shelf.css b/assets/bread-card-markdown-extension-shelf.css new file mode 100644 index 0000000..f0d1e26 --- /dev/null +++ b/assets/bread-card-markdown-extension-shelf.css @@ -0,0 +1,9 @@ +/****************************************************************************** + ############################################################################## + ##### ##### + ##### Markdown StyleSheet of ui design BreadCard ##### + ##### ##### + ##### @author: Sukazyo Workshop ##### + ##### ##### + ############################################################################## + ******************************************************************************/ \ No newline at end of file diff --git a/assets/bread-card-markdown.css b/assets/bread-card-markdown.css index de0938c..c58c0ac 100644 --- a/assets/bread-card-markdown.css +++ b/assets/bread-card-markdown.css @@ -96,7 +96,8 @@ hr { p, h1, h2, h3, h4, h5, h6, -ul, ol, table { +ul, ol, table, +pre { margin-block-start: 1.6rem; margin-block-end: 1.6rem; @@ -186,7 +187,8 @@ code { } pre { - margin: 0 1.4rem; + margin-left: 1.4rem; + margin-right: 1.4rem; padding: 0.7rem 0; border-radius: 0.5rem; display: block; diff --git a/assets/main.css b/assets/main.css index 29b1b61..25463aa 100644 --- a/assets/main.css +++ b/assets/main.css @@ -29,6 +29,7 @@ --color-warn-noscript: #ce263d; --color-font-warn-noscript: #f5eaea; --color-font-sidebar-sitetitle: #3a2b8c; + --color-font-sidebar-sitetitle-highlight: #4a60b6; --color-sidebar-sitetitle-background: #e8f0fe; --color-menu-list-separator: #ebeff2; @@ -297,10 +298,20 @@ body { font-style: normal; background: var(--color-sidebar-sitetitle-background); color: var(--color-font-sidebar-sitetitle); + /*transition:*/ + /* color calc(var(--element-href-anima-speed) * var(--animation-speed-multiplier)),*/ + /* background calc(var(--element-href-anima-speed) * var(--animation-speed-multiplier));*/ border-radius: 0.5rem; z-index:10; } +#sidebar > #site-title:hover { + /*background: var(--color-font-sidebar-sitetitle);*/ + /*color: var(--color-font-sidebar-sitetitle-highlight);*/ + /*background: var(--color-font-sidebar-sitetitle-highlight);*/ + text-decoration: underline; +} + #sidebar > #site-title + *, #sidebar > noscript#noscript-warn + * { margin-top: -1rem; @@ -466,6 +477,7 @@ body { flex-grow: 1; overflow: auto; position: relative; + scroll-behavior: smooth; } #main > #main-heading { diff --git a/constant.php b/constant.php index 6bc618e..59f57cf 100644 --- a/constant.php +++ b/constant.php @@ -2,6 +2,6 @@ const APP_NAME = "ph-Bookshelf"; -const VERSION = "0.3.0.12"; +const VERSION = "0.3.0.13"; const CHANNEL = "suk-ws"; const BRANCH = "master"; diff --git a/src/Data/SiteMeta.php b/src/Data/SiteMeta.php index 5f81b8e..72650b4 100644 --- a/src/Data/SiteMeta.php +++ b/src/Data/SiteMeta.php @@ -38,12 +38,12 @@ class SiteMeta { // "/assets/gitbook-fix.css", // "/assets/ref.css", (PageMeta::getConfigurationLevelPage("customization.article.codeblock.highlightjs")=="false"? - null:"//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/".PageMeta::highlightJsTheme().".min.css"), - "/assets/bread-card-markdown.css", + null:"//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/".PageMeta::highlightJsTheme().".min.css"), + "/assets/bread-card-markdown.css?ver=1", (PageMeta::getConfigurationLevelPage("customization.article.listing.rainbow.marker")=="true"? - "/assets/bread-card-markdown-enhanced-listing-rainbow.css":null), - "/assets/bread-card-markdown-compat-highlight-js.css", - "/assets/main.css", + "/assets/bread-card-markdown-enhanced-listing-rainbow.css?ver=1":null), + "/assets/bread-card-markdown-compat-highlight-js.css?ver=1", + "/assets/main.css?ver=1", ); } @@ -54,9 +54,9 @@ class SiteMeta { // "https://cdn.jsdelivr.net/npm/marked/marked.min.js", // "/assets/ref.js", (PageMeta::getConfigurationLevelPage("customization.article.codeblock.highlightjs")=="false"? - null:"//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js"), - "/assets/utils-touchscreen-event.js", - "/assets/main.js", + null:"//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js"), + "/assets/utils-touchscreen-event.js?ver=1", + "/assets/main.js?ver=1", ); } diff --git a/src/Element/BookContent/Page.php b/src/Element/BookContent/Page.php index 2cee6f9..e59621a 100644 --- a/src/Element/BookContent/Page.php +++ b/src/Element/BookContent/Page.php @@ -92,7 +92,7 @@ class Page { EOF, $this->id, $this->id, PageMeta::$page->getId()==$this->id ? " current" : "", - PageMeta::$page->getId()==$this->id ? "#" : $this->encodeUrl(), + PageMeta::$page->getId()==$this->id ? "#top" : $this->encodeUrl(), $this->name ); } diff --git a/template/main.php b/template/main.php index 884565a..df8c179 100644 --- a/template/main.php +++ b/template/main.php @@ -1,4 +1,5 @@
+
diff --git a/template/nav.php b/template/nav.php index 1fb22ed..8770322 100644 --- a/template/nav.php +++ b/template/nav.php @@ -2,7 +2,7 @@