From e562c4b589c3198197d36fb5428ba55e22e26ae6 Mon Sep 17 00:00:00 2001 From: yanglbme Date: Fri, 23 Apr 2021 17:41:47 +0800 Subject: [PATCH] feat: support dark mode --- .github/workflows/branch-merge.yml | 17 --------------- .github/workflows/compress.yml | 35 ++++++++++++++++++++++++++++++ README.md | 18 +++++++-------- index.html | 33 ++++++++++++++++++++-------- 4 files changed, 68 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/branch-merge.yml create mode 100644 .github/workflows/compress.yml diff --git a/.github/workflows/branch-merge.yml b/.github/workflows/branch-merge.yml deleted file mode 100644 index e4c405f..0000000 --- a/.github/workflows/branch-merge.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Merge Branch - -on: - push: - branches: [imgbot] - -jobs: - merge-branch: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: everlytic/branch-merge@1.1.0 - with: - github_token: ${{ github.token }} - source_ref: ${{ github.ref }} - target_branch: main - commit_message_template: "[Automated] Merged {source_ref} into {target_branch}" diff --git a/.github/workflows/compress.yml b/.github/workflows/compress.yml new file mode 100644 index 0000000..9ce8527 --- /dev/null +++ b/.github/workflows/compress.yml @@ -0,0 +1,35 @@ +name: Compress + +on: + push: + branches: [main] + paths: + - "**.jpg" + - "**.jpeg" + - "**.png" + - "**.webp" + +jobs: + compress: + runs-on: ubuntu-latest + if: github.repository == 'doocs/source-code-hunter' + steps: + - name: Checkout Branch + uses: actions/checkout@v2 + + - name: Compress Images + uses: calibreapp/image-actions@master + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + compressOnly: true + + - name: Commit Files + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -m "[Automated] Optimize images" -a + + - name: Push Changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 4d2d8fb..e210a06 100644 --- a/README.md +++ b/README.md @@ -317,15 +317,15 @@ GitHub 技术社区 [Doocs](https://github.com/doocs),致力于打造一个内容完整、持续成长的互联网开发者学习生态圈!以下是 Doocs 的一些优秀项目,欢迎各位开发者朋友持续保持关注。 -| # | 项目名称 | 项目描述 | -| --- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -| 1 | [advanced-java](https://github.com/doocs/advanced-java) | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识。 | -| 2 | [leetcode](https://github.com/doocs/leetcode) | 多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解。 | -| 3 | [source-code-hunter](https://github.com/doocs/source-code-hunter) | 互联网常用组件框架源码分析。 | -| 4 | [jvm](https://github.com/doocs/jvm) | Java 虚拟机底层原理知识总结。 | -| 5 | [coding-interview](https://github.com/doocs/coding-interview) | 代码面试题集,包括《剑指 Offer》、《编程之美》等。 | -| 6 | [md](https://github.com/doocs/md) | 一款高度简洁的微信 Markdown 编辑器。 | -| 7 | [technical-books](https://github.com/doocs/technical-books) | 值得一看的技术书籍列表。 | +| # | 项目 | 描述 | 热度 | +| --- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | +| 1 | [advanced-java](https://github.com/doocs/advanced-java) | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识。 | ![](https://badgen.net/github/stars/doocs/advanced-java)
![](https://badgen.net/github/forks/doocs/advanced-java) | +| 2 | [leetcode](https://github.com/doocs/leetcode) | 多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解。 | ![](https://badgen.net/github/stars/doocs/leetcode)
![](https://badgen.net/github/forks/doocs/leetcode) | +| 3 | [source-code-hunter](https://github.com/doocs/source-code-hunter) | 互联网常用组件框架源码分析。 | ![](https://badgen.net/github/stars/doocs/source-code-hunter)
![](https://badgen.net/github/forks/doocs/source-code-hunter) | +| 4 | [jvm](https://github.com/doocs/jvm) | Java 虚拟机底层原理知识总结。 | ![](https://badgen.net/github/stars/doocs/jvm)
![](https://badgen.net/github/forks/doocs/jvm) | +| 5 | [coding-interview](https://github.com/doocs/coding-interview) | 代码面试题集,包括《剑指 Offer》、《编程之美》等。 | ![](https://badgen.net/github/stars/doocs/coding-interview)
![](https://badgen.net/github/forks/doocs/coding-interview) | +| 6 | [md](https://github.com/doocs/md) | 一款高度简洁的微信 Markdown 编辑器。 | ![](https://badgen.net/github/stars/doocs/md)
![](https://badgen.net/github/forks/doocs/md) | +| 7 | [technical-books](https://github.com/doocs/technical-books) | 值得一看的技术书籍列表。 | ![](https://badgen.net/github/stars/doocs/technical-books)
![](https://badgen.net/github/forks/doocs/technical-books) | ## 贡献者 diff --git a/index.html b/index.html index 1f55007..fefb1cd 100644 --- a/index.html +++ b/index.html @@ -10,9 +10,14 @@ - + + @@ -50,10 +55,20 @@ maxLevel: 3, auto2top: true, search: ["/"], - darkMode: { - light: { - toggleBtnBg: "#42b983", + darklightTheme: { + defaultTheme: 'light', + siteFont: 'Source Sans Pro,Helvetica Neue,Arial,sans-serif', + codeFontFamily: 'Roboto Mono, Monaco, courier, monospace', + bodyFontSize: '15px', + dark: { + background: '#191919', + highlightColor: '#e96900', + codeBackgroundColor: '#202020', + codeTextColor: '#b4b4b4', }, + light: { + highlightColor: '#e96900', + } }, plugins: [ function (hook) { @@ -78,11 +93,11 @@ - - - - - + + + + + \ No newline at end of file