mirror of
https://github.com/suk-ws/ph-Bookshelf.git
synced 2024-12-05 09:26:52 +08:00
完成点击侧边栏当前页面的链接回到页面顶部,为站点标题设置回到主页链接,设置内容区平滑滚动
This commit is contained in:
parent
a948c81c6b
commit
f64f8aba8a
10
.gitignore
vendored
10
.gitignore
vendored
@ -1,14 +1,14 @@
|
|||||||
# 忽略开发文件夹
|
# 忽略开发文件夹
|
||||||
/.vs/
|
.vs/
|
||||||
/debug/
|
debug/
|
||||||
/.idea/
|
.idea/
|
||||||
|
|
||||||
# 忽略服务器运行时文件
|
# 忽略服务器运行时文件
|
||||||
/.well-known/
|
.well-known/
|
||||||
.user.ini
|
.user.ini
|
||||||
|
|
||||||
# 忽略数据
|
# 忽略数据
|
||||||
/data/*
|
data
|
||||||
|
|
||||||
# 不忽略配置文件
|
# 不忽略配置文件
|
||||||
!.htaccess
|
!.htaccess
|
||||||
|
9
assets/bread-card-markdown-extension-github.css
Normal file
9
assets/bread-card-markdown-extension-github.css
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
##############################################################################
|
||||||
|
##### #####
|
||||||
|
##### Markdown StyleSheet of ui design BreadCard #####
|
||||||
|
##### #####
|
||||||
|
##### @author: Sukazyo Workshop #####
|
||||||
|
##### #####
|
||||||
|
##############################################################################
|
||||||
|
******************************************************************************/
|
9
assets/bread-card-markdown-extension-shelf.css
Normal file
9
assets/bread-card-markdown-extension-shelf.css
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
##############################################################################
|
||||||
|
##### #####
|
||||||
|
##### Markdown StyleSheet of ui design BreadCard #####
|
||||||
|
##### #####
|
||||||
|
##### @author: Sukazyo Workshop #####
|
||||||
|
##### #####
|
||||||
|
##############################################################################
|
||||||
|
******************************************************************************/
|
@ -96,7 +96,8 @@ hr {
|
|||||||
|
|
||||||
p,
|
p,
|
||||||
h1, h2, h3, h4, h5, h6,
|
h1, h2, h3, h4, h5, h6,
|
||||||
ul, ol, table {
|
ul, ol, table,
|
||||||
|
pre {
|
||||||
margin-block-start: 1.6rem;
|
margin-block-start: 1.6rem;
|
||||||
margin-block-end: 1.6rem;
|
margin-block-end: 1.6rem;
|
||||||
|
|
||||||
@ -186,7 +187,8 @@ code {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
margin: 0 1.4rem;
|
margin-left: 1.4rem;
|
||||||
|
margin-right: 1.4rem;
|
||||||
padding: 0.7rem 0;
|
padding: 0.7rem 0;
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
--color-warn-noscript: #ce263d;
|
--color-warn-noscript: #ce263d;
|
||||||
--color-font-warn-noscript: #f5eaea;
|
--color-font-warn-noscript: #f5eaea;
|
||||||
--color-font-sidebar-sitetitle: #3a2b8c;
|
--color-font-sidebar-sitetitle: #3a2b8c;
|
||||||
|
--color-font-sidebar-sitetitle-highlight: #4a60b6;
|
||||||
--color-sidebar-sitetitle-background: #e8f0fe;
|
--color-sidebar-sitetitle-background: #e8f0fe;
|
||||||
|
|
||||||
--color-menu-list-separator: #ebeff2;
|
--color-menu-list-separator: #ebeff2;
|
||||||
@ -297,10 +298,20 @@ body {
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
background: var(--color-sidebar-sitetitle-background);
|
background: var(--color-sidebar-sitetitle-background);
|
||||||
color: var(--color-font-sidebar-sitetitle);
|
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;
|
border-radius: 0.5rem;
|
||||||
z-index:10;
|
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 > #site-title + *,
|
||||||
#sidebar > noscript#noscript-warn + * {
|
#sidebar > noscript#noscript-warn + * {
|
||||||
margin-top: -1rem;
|
margin-top: -1rem;
|
||||||
@ -466,6 +477,7 @@ body {
|
|||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
scroll-behavior: smooth;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main > #main-heading {
|
#main > #main-heading {
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
const APP_NAME = "ph-Bookshelf";
|
const APP_NAME = "ph-Bookshelf";
|
||||||
|
|
||||||
const VERSION = "0.3.0.12";
|
const VERSION = "0.3.0.13";
|
||||||
const CHANNEL = "suk-ws";
|
const CHANNEL = "suk-ws";
|
||||||
const BRANCH = "master";
|
const BRANCH = "master";
|
||||||
|
@ -38,12 +38,12 @@ class SiteMeta {
|
|||||||
// "/assets/gitbook-fix.css",
|
// "/assets/gitbook-fix.css",
|
||||||
// "/assets/ref.css",
|
// "/assets/ref.css",
|
||||||
(PageMeta::getConfigurationLevelPage("customization.article.codeblock.highlightjs")=="false"?
|
(PageMeta::getConfigurationLevelPage("customization.article.codeblock.highlightjs")=="false"?
|
||||||
null:"//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/".PageMeta::highlightJsTheme().".min.css"),
|
null:"//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/".PageMeta::highlightJsTheme().".min.css"),
|
||||||
"/assets/bread-card-markdown.css",
|
"/assets/bread-card-markdown.css?ver=1",
|
||||||
(PageMeta::getConfigurationLevelPage("customization.article.listing.rainbow.marker")=="true"?
|
(PageMeta::getConfigurationLevelPage("customization.article.listing.rainbow.marker")=="true"?
|
||||||
"/assets/bread-card-markdown-enhanced-listing-rainbow.css":null),
|
"/assets/bread-card-markdown-enhanced-listing-rainbow.css?ver=1":null),
|
||||||
"/assets/bread-card-markdown-compat-highlight-js.css",
|
"/assets/bread-card-markdown-compat-highlight-js.css?ver=1",
|
||||||
"/assets/main.css",
|
"/assets/main.css?ver=1",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,9 +54,9 @@ class SiteMeta {
|
|||||||
// "https://cdn.jsdelivr.net/npm/marked/marked.min.js",
|
// "https://cdn.jsdelivr.net/npm/marked/marked.min.js",
|
||||||
// "/assets/ref.js",
|
// "/assets/ref.js",
|
||||||
(PageMeta::getConfigurationLevelPage("customization.article.codeblock.highlightjs")=="false"?
|
(PageMeta::getConfigurationLevelPage("customization.article.codeblock.highlightjs")=="false"?
|
||||||
null:"//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js"),
|
null:"//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js"),
|
||||||
"/assets/utils-touchscreen-event.js",
|
"/assets/utils-touchscreen-event.js?ver=1",
|
||||||
"/assets/main.js",
|
"/assets/main.js?ver=1",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ class Page {
|
|||||||
EOF,
|
EOF,
|
||||||
$this->id, $this->id,
|
$this->id, $this->id,
|
||||||
PageMeta::$page->getId()==$this->id ? " current" : "",
|
PageMeta::$page->getId()==$this->id ? " current" : "",
|
||||||
PageMeta::$page->getId()==$this->id ? "#" : $this->encodeUrl(),
|
PageMeta::$page->getId()==$this->id ? "#top" : $this->encodeUrl(),
|
||||||
$this->name
|
$this->name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<main id="main">
|
<main id="main">
|
||||||
|
<div id="top" ></div>
|
||||||
<div id="main-heading"><div id="page-tools">
|
<div id="main-heading"><div id="page-tools">
|
||||||
<button id="sidebar-show">☰</button>
|
<button id="sidebar-show">☰</button>
|
||||||
</div></div>
|
</div></div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<?php require_once "./src/Data/PageMeta.php" ?>
|
<?php require_once "./src/Data/PageMeta.php" ?>
|
||||||
<div id="nav-container" class="prevent-animation"><nav id="sidebar">
|
<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>
|
<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-container" class="menu-container sidebar-card">
|
||||||
<div id="menu-metas" class="menu">
|
<div id="menu-metas" class="menu">
|
||||||
<div class="menu-item-parent">
|
<div class="menu-item-parent">
|
||||||
|
Loading…
Reference in New Issue
Block a user