1
0
mirror of https://github.com/suk-ws/ph-Bookshelf.git synced 2024-12-05 01:16:53 +08:00

完成点击侧边栏当前页面的链接回到页面顶部,为站点标题设置回到主页链接,设置内容区平滑滚动

This commit is contained in:
A.C.Sukazyo Eyre 2022-09-29 17:51:25 +08:00
parent a948c81c6b
commit f64f8aba8a
Signed by: Eyre_S
GPG Key ID: C17CE40291207874
10 changed files with 51 additions and 18 deletions

10
.gitignore vendored
View File

@ -1,14 +1,14 @@
# 忽略开发文件夹
/.vs/
/debug/
/.idea/
.vs/
debug/
.idea/
# 忽略服务器运行时文件
/.well-known/
.well-known/
.user.ini
# 忽略数据
/data/*
data
# 不忽略配置文件
!.htaccess

View File

@ -0,0 +1,9 @@
/******************************************************************************
##############################################################################
##### #####
##### Markdown StyleSheet of ui design BreadCard #####
##### #####
##### @author: Sukazyo Workshop #####
##### #####
##############################################################################
******************************************************************************/

View File

@ -0,0 +1,9 @@
/******************************************************************************
##############################################################################
##### #####
##### Markdown StyleSheet of ui design BreadCard #####
##### #####
##### @author: Sukazyo Workshop #####
##### #####
##############################################################################
******************************************************************************/

View File

@ -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;

View File

@ -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 {

View File

@ -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";

View File

@ -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",
);
}

View File

@ -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
);
}

View File

@ -1,4 +1,5 @@
<main id="main">
<div id="top" ></div>
<div id="main-heading"><div id="page-tools">
<button id="sidebar-show"></button>
</div></div>

View File

@ -2,7 +2,7 @@
<?php require_once "./src/Data/PageMeta.php" ?>
<div id="nav-container" class="prevent-animation"><nav id="sidebar">
<noscript id="noscript-warn">For now, javascript must be enabled to view this site!!</noscript>
<address id="site-title"><?= SiteMeta::getBookshelf()->getSiteName() ?></address>
<a id="site-title" class="no-style" href="/"><?= SiteMeta::getBookshelf()->getSiteName() ?></a>
<div id="menu-container" class="menu-container sidebar-card">
<div id="menu-metas" class="menu">
<div class="menu-item-parent">