Skip to content

Commit

Permalink
Zss opt (#16)
Browse files Browse the repository at this point in the history
* add canaan info

* 去掉mermaid

* 修改底部商标样式

* 更改页面整洁度

---------

Co-authored-by: zhengshanshan <[email protected]>
  • Loading branch information
shan187 and zhengshanshan authored Oct 24, 2024
1 parent 651bcb0 commit 5ee93ed
Show file tree
Hide file tree
Showing 9 changed files with 268 additions and 131 deletions.
234 changes: 113 additions & 121 deletions docs/source/_static/custom-theme.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,104 @@
nav.bd-links li>a:active, .logo__title:hover, nav.bd-links li>a:hover {
text-decoration: none;
}
a {
text-decoration: none;
}
.bd-article-container h1, .bd-article-container h2, .heading-style, h1, h2, h3, h4, h5, h6 {
font-weight: 700;
}
.navbar-brand .logo__title {
font-size: var(--pst-font-size-h1);
font-weight: 700;
}
.prev-next-area a:hover p.prev-next-title:hover {
text-decoration: none;
}
html {
--pst-sidebar-font-size: 1rem;
--pst-font-size-p: 1rem;
/* --pst-font-size-h1: 1.625rem;
--pst-font-size-h2: 1.375rem;
--pst-font-size-h3: 1.25rem;
--pst-font-size-h4: 1.125rem;
--pst-font-size-h5: 1rem;
--pst-font-size-h6: 0.875rem;
*/
--pst-font-size-h1: 1.625rem;
--pst-font-size-h2: 1.375rem;
--pst-font-size-h3: 1.375rem;
--pst-font-size-h4: 1.125rem;
--pst-font-size-h5: 1.125rem;
--pst-font-size-h6: 1rem;
--pst-font-size-desc: 0.875rem;
--pst-sidebar-header-font-weight: 700;
--pst-admonition-font-weight-heading: 700;
}
.toc-entry a.nav-link.active {
font-weight: 700;
}
nav.bd-links .current>a {
font-weight: 700;
}
.copyright {
font-size: var(--pst-font-size-desc);
}
.toctree-wrapper li[class^=toctree-l]>a {
font-size: var(--pst-sidebar-font-size);
}
p {
font-size: var(--pst-font-size-p);
}
.prev-next-area a p.prev-next-title {
text-decoration: none;
font-size: var(--pst-font-size-p);
}
body {
font-family: "Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif";
}
.heading-style, h1, h2, h3, h4, h5, h6 {
margin: 1.7rem 0 0.75rem;
}
.toc-entry a.nav-link:hover {
text-decoration: none;
}
footer .cancat {
font-size: var(--pst-font-size-desc);
}
footer {
font-size: var(--pst-font-size-desc);
}
html[data-theme=light] {
--pst-color-primary: #4d8eef;
--pst-color-primary: #2980b9;
--pst-color-primary-highlight: #2d0ef1;
--sd-color-primary: var(--pst-color-primary);
--sd-color-primary-text: var(--pst-color-primary-text);
--sd-color-primary-highlight: var(--pst-color-primary-highlight);
--sd-color-primary-bg: #547fca;
--sd-color-primary-bg-text: #14181e;

--pst-color-secondary: #4d8eef;
--pst-color-secondary: hsl(204, 60%, 58%);
--pst-color-inline-code: #222832;
--pst-color-secondary-highlight: #2d0ef1;
--sd-color-secondary: var(--pst-color-secondary);
--sd-color-secondary-text: var(--pst-color-secondary-text);
--sd-color-secondary-highlight: var(--pst-color-secondary-highlight);
--sd-color-secondary-bg: #547fca;
--pst-color-primary-bg: #84baf4;
--pst-color-secondary-bg: #547fca;
--pst-color-info-bg: #e6eaef;
--pst-color-info: var(--pst-color-primary);
--pst-color-attention: #f7931a;
--pst-color-accent: #4d8eef;
--pst-color-accent-bg: #92abd0;
}
html[data-theme="light"] .highlight .c1 {
color: #198754;
}
.search-button-field:hover {
border: 1px solid var(--pst-color-border);
box-shadow: 0 0 0 0.15rem var(--pst-color-link-hover);
}
.bd-sidebar-primary {
/* 使元素可滚动 */
overflow-y: scroll; /* 垂直滚动条 */
Expand Down Expand Up @@ -48,123 +126,37 @@ nav.bd-links li>a:active, .logo__title:hover, nav.bd-links li>a:hover {
}
cite {
font-style: normal;
}
.bd-footer {
background-color: #303846;
}
body {
counter-reset: h2counter toc-h2counter toctree-l2counter;
}

h2 {
counter-reset: h3counter;
}

h3 {
counter-reset: h4counter;
}

h4 {
counter-reset: h5counter;
}

h5 {
counter-reset: h6counter;
}

h2::before {
counter-increment: h2counter;
content: counter(h2counter) ". ";
}

h3::before {
counter-increment: h3counter;
content: counter(h2counter) "." counter(h3counter) " ";
}

h4::before {
counter-increment: h4counter;
content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) " ";
}

h5::before {
counter-increment: h5counter;
content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) " ";
}

h6::before {
counter-increment: h6counter;
content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) "." counter(h6counter) " ";
}

/* TOC heading counters */
.toc-h2 {
counter-reset: toc-h3counter;
}

.toc-h3 {
counter-reset: toc-h4counter;
}

.toc-h4 {
counter-reset: toc-h5counter;
}

.toc-h5 {
counter-reset: toc-h6counter;
}

.toc-h2 > .nav-link::before {
counter-increment: toc-h2counter;
content: counter(toc-h2counter) ". ";
}

.toc-h3 > .nav-link::before {
counter-increment: toc-h3counter;
content: counter(toc-h2counter) "." counter(toc-h3counter) " ";
}

.toc-h4 > .nav-link::before {
counter-increment: toc-h4counter;
content: counter(toc-h2counter) "." counter(toc-h3counter) "." counter(toc-h4counter) " ";
}

.toc-h5 > .nav-link::before {
counter-increment: toc-h5counter;
content: counter(toc-h2counter) "." counter(toc-h3counter) "." counter(toc-h4counter) "." counter(toc-h5counter) " ";
}

.toc-h6 > .nav-link::before {
counter-increment: toc-h6counter;
content: counter(toc-h2counter) "." counter(toc-h3counter) "." counter(toc-h4counter) "." counter(toc-h5counter) "." counter(toc-h6counter) " ";
}

/* Toctree counters */
.toctree-l2 {
counter-reset: toctree-l3counter;
}

.toctree-l3 {
counter-reset: toctree-l4counter;
}

.toctree-l4 {
counter-reset: toctree-l5counter;
}

.toctree-l2 > a::before {
counter-increment: toctree-l2counter;
content: counter(toctree-l2counter) ". ";
}

.toctree-l3 > a::before {
counter-increment: toctree-l3counter;
content: counter(toctree-l2counter) "." counter(toctree-l3counter) " ";
}

.toctree-l4 > a::before {
counter-increment: toctree-l4counter;
content: counter(toctree-l2counter) "." counter(toctree-l3counter) "." counter(toctree-l4counter) " ";
}

.toctree-l5 > a::before {
counter-increment: toctree-l5counter;
content: counter(toctree-l2counter) "." counter(toctree-l3counter) "." counter(toctree-l4counter) "." counter(toctree-l5counter) " ";
}
.bd-footer .footer-items__end {
text-align: left;
}
.bd-footer .footer-items__center {
text-align: left;
}
.search-button-field:hover {
border: 1px solid var(--pst-color-border);
box-shadow: 0 0 0 0.1875rem var(--pst-color-link-hover);
}
.bd-footer .footer-items__center, .bd-footer .footer-items__end, .bd-footer .footer-items__start {
justify-content: flex-start;
}
@media (min-width: 960px) {
.bd-sidebar-primary {
font-size: 0.875rem;
}
}
@media (min-width: 1200px) {
.bd-sidebar-secondary {
font-size: 0.875rem;
}
.page-toc .nav-link {
font-size: .875rem;
}
}
.h3,h3,.h5,h5 {
font-weight: 400;
}

3 changes: 0 additions & 3 deletions docs/source/_static/init_mermaid.js

This file was deleted.

24 changes: 24 additions & 0 deletions docs/source/_templates/Fleft.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<style>
.cancat{
font-size: 1rem;
font-weight: 700;
color: #fff;
margin-bottom: 1rem;
}
.canact-section a{
color: #ebedf0;
line-height: 30px;
font-weight: 400;
text-decoration: none;
}
.canact-section a:hover {
color: #4d8eef;
}
</style>
<div class="footer-center">
<div class="cancat">开发者资源</div>
<section class="canact-section"><a href="https://developer.canaan-creative.com/resource">资料下载</a></section>
<section class="canact-section"><a href="https://developer.canaan-creative.com/blog">博客</a></section>
<section class="canact-section"><a href="https://developer.canaan-creative.com/document">文档中心</a></section>
<section class="canact-section"><a href="https://developer.canaan-creative.com/answer">问答社区</a></section>
</div>
24 changes: 24 additions & 0 deletions docs/source/_templates/FleftEn.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<style>
.cancat{
font-size: 1rem;
font-weight: 700;
color: #fff;
margin-bottom: 1rem;
}
.canact-section a{
color: #ebedf0;
line-height: 30px;
font-weight: 400;
text-decoration: none;
}
.canact-section a:hover {
color: #4d8eef;
}
</style>
<div class="footer-center">
<div class="cancat">Developer Resources</div>
<section class="canact-section"><a href="https://developer.canaan-creative.com/resource">Downloads</a></section>
<section class="canact-section"><a href="https://developer.canaan-creative.com/blog">Blog</a></section>
<section class="canact-section"><a href="https://developer.canaan-creative.com/document">Document Center</a></section>
<section class="canact-section"><a href="https://developer.canaan-creative.com/answer">Answer</a></section>
</div>
26 changes: 26 additions & 0 deletions docs/source/_templates/Footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<style>
.cancat{
font-size: 1rem;
font-weight: 700;
color: #fff;
margin-bottom: 1rem;
}
.canact-section a{
color: #ebedf0;
line-height: 30px;
font-weight: 400;
text-decoration: none;
}
.canact-section a:hover {
color: #4d8eef;
}
.copy-right {
margin-top:30px;
color: #ebedf0;
}
</style>
<div class="footer-center">
<div class="cancat">联系我们</div>
<section class="canact-section"><a href="mailto:[email protected]">邮箱:[email protected]</a></section>
<!-- <section class="canact-section copy-right">© Copyright 2024 Canaan Inc.</section> -->
</div>
26 changes: 26 additions & 0 deletions docs/source/_templates/FooterEn.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<style>
.cancat{
font-size: 1rem;
font-weight: 700;
color: #fff;
margin-bottom: 1rem;
}
.canact-section a{
color: #ebedf0;
line-height: 30px;
font-weight: 400;
text-decoration: none;
}
.canact-section a:hover {
color: #4d8eef;
}
.copy-right {
margin-top:30px;
color: #ebedf0;
}
</style>
<div class="footer-center">
<div class="cancat">Contact Us</div>
<section class="canact-section"><a href="mailto:[email protected]">Mail: [email protected]</a></section>
<!-- <section class="canact-section copy-right">© Copyright 2024 Canaan Inc.</section> -->
</div>
Loading

0 comments on commit 5ee93ed

Please sign in to comment.