From e08f372cdfef59108b4bbc9b98e35dcdc5c4870f Mon Sep 17 00:00:00 2001 From: Wcowin <1135801806@qq.com> Date: Mon, 22 Apr 2024 16:31:43 +0800 Subject: [PATCH] 4/22 --- .../plugin/git-committers/page-authors.json | 2 +- .ignore | 68 ++ README.md | 3 + docs/_data/link.yaml | 21 - docs/about/link.md | 687 +++++++++++++++--- docs/about/test.md | 141 ++-- docs/blog/Mkdocs/mkdocs1.md | 18 +- docs/blog/websitebeauty/header.md | 31 +- docs/blog/websitebeauty/mkcomments.md | 233 +++--- docs/index.md | 71 +- docs/stylesheets/customize.css | 158 +++- mkdocs.yml | 21 +- requirements.txt | 34 + 13 files changed, 1160 insertions(+), 328 deletions(-) create mode 100644 .ignore delete mode 100644 docs/_data/link.yaml diff --git a/.cache/plugin/git-committers/page-authors.json b/.cache/plugin/git-committers/page-authors.json index 6e8b80b..8e8bc9c 100644 --- a/.cache/plugin/git-committers/page-authors.json +++ b/.cache/plugin/git-committers/page-authors.json @@ -1 +1 @@ -{"cache_date": "2024-04-12", "page_authors": {}} \ No newline at end of file +{"cache_date": "2024-04-22", "page_authors": {}} \ No newline at end of file diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..c7b1053 --- /dev/null +++ b/.ignore @@ -0,0 +1,68 @@ +# Copyright (c) 2016-2024 Martin Donath + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +# ----------------------------------------------------------------------------- +# Node, TypeScript, Python +# ----------------------------------------------------------------------------- + +# Dependencies +node_modules +__pycache__ +venv +.venv + +# Build files +blog +build +site +docs/blog +# Distribution files +dist +mkdocs_material.egg-info + +# Caches and logs +*.cpuprofile +*.log +*.tsbuildinfo +.cache +.eslintcache +__pycache__ + +# Examples +example +example.zip + +# ----------------------------------------------------------------------------- +# General +# ----------------------------------------------------------------------------- + +# Never ignore .gitkeep files +!**/.gitkeep + +# macOS internals +.DS_Store + +# Temporary files +TODO +tmp + +# IDEs & Editors +.idea +*~ \ No newline at end of file diff --git a/README.md b/README.md index 5876125..16bfd2c 100644 --- a/README.md +++ b/README.md @@ -68,3 +68,6 @@ [![Built with Material for MkDocs](https://img.shields.io/badge/Material_for_MkDocs-526CFE?style=for-the-badge&logo=MaterialForMkDocs&logoColor=white)](https://squidfunk.github.io/mkdocs-material/) +## 版权声明 + +本作品采用[知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans)进行许可。 \ No newline at end of file diff --git a/docs/_data/link.yaml b/docs/_data/link.yaml deleted file mode 100644 index ec95880..0000000 --- a/docs/_data/link.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# 友链列表 -friends: - - name: Wcowin's Web - link: https://wcowin.work/ - avatar: https://s2.loli.net/2024/02/01/gaE47y5fKM6kosV.png - description: 循此苦旅,以达星辰 - - name: W1ndysの小屋 - link: https://blog.w1ndys.top/ - avatar: https://blog.w1ndys.top/img/about/avatar.png - description: 欲戴皇冠,必承其重 - - name: Lenny's Web - link: https://lennychen.top/ - avatar: https://s2.loli.net/2024/03/31/Ht3QBqhgLYNAuwj.png - description: 天地不仁,以万物为刍狗 - -# 失联列表 -gone: - - name: 失联的友链1 - link: https://wcowin.com/ - avatar: https://agentestudio.com/uploads/post/image/69/main_how_to_design_404_page.png - description: 失联的友链1 diff --git a/docs/about/link.md b/docs/about/link.md index ddd6ae8..62c5b94 100644 --- a/docs/about/link.md +++ b/docs/about/link.md @@ -2,104 +2,38 @@ title: 友链 comments: true hide: - # - navigation # 显示右 - # - toc #显示左 +# - navigation # 显示右 +# - toc #显示左 - footer - feedback --- -
-

贡献者列表(不分先后)

-
+ + + + + - - - -
- -
-

失联人员

-
- - -
+# 欢迎加入友链(不分先后) -
-

交换友链,请添加本站友链后下方留言申请,期望您的站点:

-
- -- 独立博客(不要求独立域名),https,访问流畅 -- 原创内容为主,原创内容 3 篇以上 -- 处于活跃状态,有一定的更新频率 -- 建站一个月以上 -- 未添加友链或申请未通过,评论留言会被隐藏。 - -本站已经加入[十年之约](https://www.foreverblog.cn/): - 请放心添加本站友链 - -**友链格式示例/本站信息:** - - - -=== "Txt" - - - >名称: Wcowin's Web - >链接: https://wcowin.work/ - >头像: https://s2.loli.net/2024/02/01/gaE47y5fKM6kosV.png - >简介: 循此苦旅,以达星辰 - -=== "HTML(推荐)" - - 推荐在评论区发送这种格式 - - ```html + + + + + + + + +
+ + +# 失联人员 + + + +
+ +
+

交换友链,请添加本站友链后下方留言申请,期望您的站点:

+
+ + +* 独立博客(不要求独立域名),https,访问流畅 +* 原创内容为主,原创内容3篇以上 +* 处于活跃状态,有一定的更新频率 +* 建站一个月以上 +* 未添加友链或申请未通过,评论留言会被隐藏。 + +本站已经加入[十年之约](https://www.foreverblog.cn/): + 请放心添加本站友链 + +*** + +**友链格式示例/本站信息:** + + + +=== "Txt" + + >名称: Wcowin's Web + >链接: https://wcowin.work/ + >头像: https://s2.loli.net/2024/02/01/gaE47y5fKM6kosV.png + >简介: 循此苦旅,以达星辰 + +=== "HTML(推荐)" + + 推荐在评论区发送这种格式,带*号的需要填写自己的信息 + + ```html +
+ +
+
+ *你的站点名称* +
+
+ *你的站点描述* +
+
+
``` === "Butterfly" @@ -119,4 +619,9 @@ hide: link: https://wcowin.work/ avatar: https://s2.loli.net/2024/02/01/gaE47y5fKM6kosV.png descr: 循此苦旅,以达星辰 - ``` \ No newline at end of file + ``` +=== "通用" + + 点击右侧**友链申请**填写问卷 + + diff --git a/docs/about/test.md b/docs/about/test.md index 91d9bba..e9f7197 100644 --- a/docs/about/test.md +++ b/docs/about/test.md @@ -1,39 +1,68 @@ !!!info 测试中的小组件,可看源代码自行取用 +
“循此苦旅 以达星辰”
+ -![LY1r2.png](https://i.imgs.ovh/2023/10/09/LY1r2.png) -## Search -
- -
-
-
    -
    + + +
    +
    + +- :material-tooltip-edit:{ .lg .middle } __关于__ + + --- + - [效率][Software] + [Software]: javascript:document.getElementById('software').scrollIntoView() +
    - - :octicons-light-bulb-16: - **Tip:** Enter some keywords to find icons and emojis and click on the - shortcode to copy it to your clipboard. - -![截屏2022-06-24 21.22.34](https://i2.100024.xyz/2023/10/09/ncsp35.webp) +
    + +- :material-star-shooting:{ .lg .middle } __推荐__ + + --- + + :material-eye-check:{ .lg .middle } [Wcowin](https://github.com/Wcowin/Wcowin.github.io) - 技术博客 + +
    -
    +- :material-file-link:{ .lg .middle } __Release__ + + --- + + 更新中... + + [→ 所有版本](https://github.com/Wcowin/Wcowin.github.io) + + +- :material-flag-variant-minus:{ .lg .middle } __Wcowin__ + + --- + + 更新中... + + [→ 了解更多](https://github.com/Wcowin/Wcowin.github.io) + +
    + +
    + +
    + + + + -![Image title](https://dummyimage.com/600x400/){ loading=lazy } +
    ![Image title](https://dummyimage.com/600x400/){ width="300" }
    Image caption
    @@ -52,6 +81,43 @@ $\overset{wáng}{王}\overset{kē}{科}\overset{wén}{文}$ [![Readme Card](https://github-readme-stats-beta-amber-44.vercel.app/api?username=Wcowin&show_icons=true&role=OWNER,ORGANIZATION_MEMBER,COLLABORATOR&locale=zh-my)](#) + + + + + + + + + + +
    + + + + + + + + + +
    + + + + +

    01

    @@ -65,9 +131,6 @@ $\overset{wáng}{王}\overset{kē}{科}\overset{wén}{文}$

    - - -***
    - :material-clock-fast:{ .lg .middle } __Set up in 5 minutes__ @@ -105,6 +168,10 @@ $\overset{wáng}{王}\overset{kē}{科}\overset{wén}{文}$
    +

    这是测试并且被掩盖的文字!

    + + + *** === "C" @@ -194,17 +261,21 @@ $$ +左对齐,右对齐 +![img](https://s1.imagehub.cc/images/2024/02/02/91a767e93d1a344e44c69936464c583e.png){ align=left } + +
    - ![Image title](https://cn.mcecy.com/image/20231013/79fcedff6e2bcb3e948e274a80e6dd8b.png){ width="300" } + ![img](https://s1.imagehub.cc/images/2024/02/02/91a767e93d1a344e44c69936464c583e.png){ width="300" }
    图片说明
    **明暗** -![](https://user-assets.sxlcdn.com/images/951476/Ftmzj__CFg8LDIkzyQsF3OLKWeRX.png?imageMogr2/strip/auto-orient/thumbnail/1920x9000%3E/quality/90!/format/png#only-light) +![](https://s2.loli.net/2024/02/01/ps8UM6xu2OL3Dyr.jpg#only-light) -![](https://user-assets.sxlcdn.com/images/951476/FsX9lVAmvPiFVnoBgz7l6AQq5i10.png?imageMogr2/strip/auto-orient/thumbnail/1920x9000%3E/quality/90!/format/png#only-dark) +![](https://s2.loli.net/2024/02/01/cxrEKTLp5CiQeBw.jpg#only-dark) ``` mermaid graph LR @@ -237,12 +308,6 @@ sequenceDiagram ++ctrl+alt+del++ -
    -
    -

    50%

    -
    -
    - :octicons-arrow-right-24: [点我回到顶部](#) [Hover me][example] @@ -320,11 +385,6 @@ $$\displaystyle\lim_{x \rightarrow + \infty}(1 + \frac{1}{x})^x = e$$ *** - -![img](https://cn.mcecy.com/image/20230615/749725b48e5972165d0bce10b364695e.png) - - -
    @@ -361,11 +421,6 @@ $$\displaystyle\lim_{x \rightarrow + \infty}(1 + \frac{1}{x})^x = e$$ 600 - -
      -
    1. Coffee
    2. -
    3. Milk
    4. -
    diff --git a/docs/blog/Mkdocs/mkdocs1.md b/docs/blog/Mkdocs/mkdocs1.md index 51411b7..80fa17e 100644 --- a/docs/blog/Mkdocs/mkdocs1.md +++ b/docs/blog/Mkdocs/mkdocs1.md @@ -5,9 +5,18 @@ tags: --- !!! info - 官方网站:[MkDocs](https://www.mkdocs.org/){target=“_blank”} + Material for MkDocs官方网站:[MkDocs](https://www.mkdocs.org/){target=“_blank”} - 我的个人网站成果:{target=“_blank”} +--- +推荐看下这个视频: +:fontawesome-brands-youtube:{ style="color: #EE0F0F" } +__[How to set up Material for MkDocs]__ by @james-willett – :octicons-clock-24: +15m – Learn how to create and host a documentation site using Material for +MkDocs on GitHub Pages in a step-by-step guide. + + [How to set up Material for MkDocs]: https://www.youtube.com/watch?v=Q-YA_dA8C20 + +--- ## 一、准备工作 @@ -15,7 +24,6 @@ tags: 2.有一个GitHub账号​​​​​​​(有手就行) *** - ## 二、Creating your site 参考教程: @@ -118,7 +126,7 @@ jobs: - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - uses: actions/cache@v3 with: - key: mkdocs-material-$【【 env.cache_id 】】 # 此处把【【】】改成`{``{``}``}`(只有英文大括号) + key: mkdocs-material-${{ env.cache_id }} path: .cache restore-keys: | mkdocs-material- @@ -194,4 +202,4 @@ https://你github的名字.github.io/ 下次谈谈网站的[mkdocs.yml具体配置](mkdocs2.md) -[^注]:于2024.4.24重写此文 \ No newline at end of file +[^注]:于2023.3.24重写此文 \ No newline at end of file diff --git a/docs/blog/websitebeauty/header.md b/docs/blog/websitebeauty/header.md index 5eb2eeb..9e4298c 100644 --- a/docs/blog/websitebeauty/header.md +++ b/docs/blog/websitebeauty/header.md @@ -10,9 +10,6 @@ tags: - Mkdocs comments: false #评论,默认不开启 --- - -> 下面全部内容把】改成},把【改成{ - ![image.png](https://s2.loli.net/2024/02/02/mvCEgeP4lANuXI8.png) docs/overrides下新建main.html ,针对main.html文件 @@ -36,33 +33,33 @@ $ tree -a ``` ```html -【#- +{#- This file was automatically generated - do not edit - -#】 - 【% extends "base.html" %】 - 【% block extrahead %】 - - 【% endblock %】 - 【% block announce %】 + -#} + {% extends "base.html" %} + {% block extrahead %} + + {% endblock %} + {% block announce %} Follow @Wcowin on - 【% include ".icons/fontawesome/brands/bilibili.svg" %】 + {% include ".icons/fontawesome/brands/bilibili.svg" %} Bilibili and Twitter - 【% endblock %】 - 【% block scripts %】 - 【【 super() 】】 - - 【% endblock %】 + {% endblock %} + {% block scripts %} + {{ super() }} + + {% endblock %} ``` diff --git a/docs/blog/websitebeauty/mkcomments.md b/docs/blog/websitebeauty/mkcomments.md index 8f91171..a6a4e81 100644 --- a/docs/blog/websitebeauty/mkcomments.md +++ b/docs/blog/websitebeauty/mkcomments.md @@ -4,39 +4,33 @@ comments: true tags: - Mkdocs --- - -> 下面全部内容把】改成},把【改成{ - -官方文档:[Adding a comment system](https://squidfunk.github.io/mkdocs-material/setup/adding-a-comment-system/) +官方文档:[Adding a comment system](https://squidfunk.github.io/mkdocs-material/setup/adding-a-comment-system/) 这里我同样推荐[giscus](https://giscus.app/zh-CN) + 利用 GitHub Discussions 实现的评论系统,让访客借助 GitHub 在你的网站上留下评论和反应吧!本项目深受 utterances 的启发。 -- 开源。🌏 -- 无跟踪,无广告,永久免费。📡 🚫 -- 无需数据库。所有数据均储存在 GitHub Discussions 中。:octocat: -- 支持自定义主题!🌗 -- 支持多种语言。🌐 -- 高可配置性。🔧 -- 自动从 GitHub 拉取新评论与编辑。🔃 -- 可自建服务!🤳 +* 开源。🌏 +* 无跟踪,无广告,永久免费。📡 🚫 +* 无需数据库。所有数据均储存在 GitHub Discussions 中。:octocat: +* 支持自定义主题!🌗 +* 支持多种语言。🌐 +* 高可配置性。🔧 +* 自动从 GitHub 拉取新评论与编辑。🔃 +* 可自建服务!🤳 言归正传 ## 第一步 - -mkdocs.yml 中添加 - +mkdocs.yml中添加 ``` theme: name: material custom_dir: docs/overrides #主要是这一行 ``` - -参考下图新建 overrides 文件,在此文件下参考下图新建覆盖 html 文件 -树状结构如下: - +参考下图新建overrides文件,在此文件下参考下图新建覆盖html文件 +树状结构如下: ``` $ tree -a . @@ -53,18 +47,17 @@ $ tree -a │ └──comments.html │ └── mkdocs.yml -``` +``` ![img](https://s1.imagehub.cc/images/2024/02/02/214447b92070792905259a843de3e233.png) -在 comments.html 中 +在comments.html中 ```html hl_lines="4-18" -【% if page.meta.comments %】 -

    【【 lang.t("meta.comments") 】】

    - - - - -【% endif %】 + + +{% endif %} ``` - ## 第二步 +打开 走完这个页面的流程就会得到(这会在你的Github创建新的仓库,建议自己先去新建个 Discussions) +![](https://s1.imagehub.cc/images/2024/02/02/b0fabd6a0c967d5a846c087adea5b680.png) -打开 走完这个页面的流程就会得到(这会在你的 Github 创建新的仓库,建议自己先去新建个 Discussions) -![](https://s1.imagehub.cc/images/2024/02/02/b0fabd6a0c967d5a846c087adea5b680.png) - -![](https://s1.imagehub.cc/images/2024/02/02/d0c7b4e08a714b5c2b60421f58159c62.png) +![](https://s1.imagehub.cc/images/2024/02/02/d0c7b4e08a714b5c2b60421f58159c62.png) ```html - + ``` -复制将此代码,替换最上面 👆🏻comments.html 中高亮的代码 +复制将此代码,替换最上面👆🏻comments.html中高亮的代码 终端里`mkdocs server`一下 ## 最后 - 在你想插入评论的地方的元数据:`comments: true ` ``` @@ -158,14 +147,13 @@ hide: # - navigation # 显示右 # - toc #显示左 # - footer - # - feedback + # - feedback comments: true #默认不开启评论 --- ``` +## 效果 -## 效果 - -完美!快速相应 +完美!快速相应
    ![](https://s1.imagehub.cc/images/2024/02/02/0619f922f930e7649fb40405c7e49339.png) @@ -179,42 +167,27 @@ comments: true #默认不开启评论 去看它的官方配置文档很简单就配置好了 ```html - - - - - + + + + + + -
    - +
    + - +twikoo.init({ + envId: 'https://superb-salamander-e730b6.netlify.app/.netlify/functions/twikoo', // 腾讯云环境填 envId;Vercel 环境填地址(https://xxx.vercel.app) + el: '#tcomment', // 容器元素 + //region: 'ap-guangzhou', // 环境地域,默认为 ap-shanghai,腾讯云环境填 ap-shanghai 或 ap-guangzhou;Vercel 环境不填 + // path: location.pathname, // 用于区分不同文章的自定义 js 路径,如果您的文章路径不是 location.pathname,需传此参数 + //lang: 'zh-CN', // 用于手动设定评论区语言,支持的语言列表 https://github.com/twikoojs/twikoo/blob/main/src/client/utils/i18n/index.js + onCommentLoaded: function () { + console.log('评论加载完成'); + } +}) + ``` @@ -227,16 +200,16 @@ comments: true #默认不开启评论
    + } +}) + -我感觉 twikoo 也好看! +我感觉twikoo也好看! \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index a2d8ba3..38f6a15 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,16 +6,47 @@ hide: - feedback comments: false --- + + +
    Mkdocs-Wcowin博客主题
    - - -
    正在加载今日诗词.... @@ -135,14 +166,38 @@ comments: false 2. 18939533255 *** -推荐文章:material-book: + + + + +
    + +- :simple-materialformkdocs:{ .lg .middle } __Mkdocs教程__ + + --- + + - [利用Mkdocs部署静态网页至GitHub pages](blog/Mkdocs/mkdocs1.md) + - [Mkdocs部署配置说明(mkdocs.yml)](blog/Mkdocs/mkdocs2.md) + - [如何给MKdocs添加友链](blog/websitebeauty/linktech.md) + - [网站添加Mkdocs博客](blog/Mkdocs/mkdocsblog.md) + - [Blogger](blog/index.md) + + +- :simple-aboutdotme:{ .lg .middle } __关于__ + + --- + - [Mkdocs-Wcowin博客主题社区](https://support.qq.com/products/646913/){target=“_blank”} + - [留言板](liuyanban.md) + - [Blogger](blog/index.md) + [:octicons-arrow-right-24: 了解我](about/geren.md) + +
    @@ -179,4 +234,6 @@ comments: false - \ No newline at end of file + + + diff --git a/docs/stylesheets/customize.css b/docs/stylesheets/customize.css index 1c99dda..1d89341 100644 --- a/docs/stylesheets/customize.css +++ b/docs/stylesheets/customize.css @@ -34,12 +34,12 @@ } */ /* Grid Cards */ -/* .md-typeset .grid.cards > ul > li { +.md-typeset .grid.cards > ul > li { border-radius: var(--base-border-radius); } .md-typeset .grid.cards > ul > li:hover { box-shadow: 0 0 0.2rem #ffffff40; -} */ +} /* Markdown Button */ .md-typeset .md-button { @@ -91,3 +91,157 @@ .md-typeset table:not([class]) { border-radius: var(--base-border-radius); } + + + + + +.carousel { + width: 60%; + height: 100%; + + border-radius: 0.4rem; + overflow: hidden; + position: relative; + + /* 居中 */ + margin-left: auto; + margin-right: auto; + + border: 0.075rem solid #7b7b7b7a; + box-shadow: var(--md-shadow-z1); +} + +.carousel-container { + width: 100%; + height: 100%; + + position: relative; + left: 0; + + display: flex; + + /* 过渡动画 1s */ + transition: all 1s; +} + +.carousel-hover { + height: 100%; + width: 10%; + position: absolute; + top: 0; + + /* 子元素垂直居中 */ + display: flex; + flex-flow: column nowrap; + align-items: center; + justify-content: center; +} +.carousel-hover.left { + left: 0; +} +.carousel-hover.right { + right: 0; +} + +.carousel-hover button { + background-color: var(--md-accent-fg-color); + border-radius: 50%; + + cursor: pointer; + + opacity: 0; + transition: opacity 0.3s; +} +.carousel-hover button::after { + display: block; + height: 1.5rem; + width: 1.5rem; + + background-color: white; + content: ""; + mask-position: center; + -webkit-mask-position: center; +} +.carousel-hover.left button::after { + mask-image: var(--md-tabbed-icon--prev); + -webkit-mask-image: var(--md-tabbed-icon--prev); +} +.carousel-hover.right button::after { + mask-image: var(--md-tabbed-icon--next); + -webkit-mask-image: var(--md-tabbed-icon--next); +} + +/* hover 外层 */ +.carousel-hover:hover button { + opacity: 0.5; + transition: opacity 0.3s; +} +/* hover 内层 */ +.carousel-hover button:hover { + opacity: 0.8; + transition: opacity 0.3s; +} + +.carousel-container a { + width: 100%; + height: 100%; + + flex-shrink: 0; +} + +.carousel-container img { + width: 100%; + height: 100%; + + object-fit: cover; + display: block; +} + +.carousel-bottom { + position: absolute; + /* 宽度等同于内容宽度 */ + width: 100%; + padding: 20px; + + bottom: 0; + + display: flex; + justify-content: center; + /* 指示器间距 */ + gap: 10px; + + opacity: 0; + transition: opacity 0.3s; +} +.carousel-bottom:hover { + opacity: 0.8; + transition: opacity 0.3s; +} + +.carousel-bottom .indicator { + height: 5px; + width: 20px; + + background-color: var(--md-accent-fg-color); + + opacity: 0.5; + cursor: pointer; +} + +.carousel:hover .bottom .indicator { + opacity: 1; +} +.carousel:hover .shift .btn { + opacity: 1; +} + +@media screen and (max-width: 600px) { + .carousel { + width: 100%; + } + + .carousel-hover button { + opacity: 1; + } +} diff --git a/mkdocs.yml b/mkdocs.yml index 9dd8660..7930020 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -14,14 +14,18 @@ theme: favicon: img/apple-line.png # 网页icon palette: - #明暗按钮 + - media: "(prefers-color-scheme)" + toggle: + icon: material/link + name: 关闭自动模式 + #primary: blue grey - media: "(prefers-color-scheme: light)" scheme: default # 日间模式 primary: blue grey # 上方的 - accent: indigo # 链接等可交互元件的高亮色 + accent: blue # 链接等可交互元件的高亮色 # teal toggle: - icon: material/weather-night # 图标 + icon: material/toggle-switch # 图标 name: 切换至夜间模式 # 鼠标悬浮提示 - media: "(prefers-color-scheme: dark)" scheme: slate # 夜间模式 @@ -29,7 +33,7 @@ theme: accent: indigo # teal toggle: - icon: material/weather-sunny + icon: material/toggle-switch-off-outline name: 切换至日间模式 features: @@ -149,7 +153,7 @@ extra: plugins: - search #搜索配置 - - markdownextradata: {} + # - markdownextradata: {} - git-committers: enabled: !ENV [CI, false] repository: Wcowin/Mkdocs-Wcowin @@ -187,11 +191,6 @@ plugins: - tags: tags_file: tag.md #分类标签 - # 外部引用插件,一个 MkDocs 插件,它将 mkdocs.yml 额外变量注入到 markdown 模板中 - # https://github.com/rosscdh/mkdocs-markdownextradata-plugin - - markdownextradata: - data: ./docs/_data/ # 额外数据文件 - markdown_extensions: #详见https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/ 和 https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown/ @@ -243,7 +242,7 @@ extra_javascript: - https://polyfill.io/v3/polyfill.min.js?features=es6 #Latex支持 - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js #Latex支持 # - ckplayer/js/ckplayer.js #播放器配置 - - https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js #gitalk支持 + # - https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js #gitalk支持 - https://cdn.jsdelivr.net/npm/mermaid@10.0.2/dist/add-html-label-6e56ed67.min.js #忘了 extra_css: diff --git a/requirements.txt b/requirements.txt index 5967734..b1497f9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,35 @@ +# Copyright (c) 2016-2024 Martin Donath + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +# Requirements for core +jinja2~=3.0 +markdown~=3.2 +mkdocs~=1.5.3 +mkdocs-material-extensions~=1.3 +pygments~=2.16 +pymdown-extensions~=10.2 + +# Requirements for plugins +babel~=2.10 +colorama~=0.4 +paginate~=0.5 +regex>=2022.4 +requests~=2.26 mkdocs-markdownextradata-plugin \ No newline at end of file