Skip to content

Commit

Permalink
feat: #1 代码块优化,项目结构重构
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Feb 24, 2023
1 parent 14e3cf0 commit 27dc8ae
Show file tree
Hide file tree
Showing 11 changed files with 153 additions and 43 deletions.
48 changes: 25 additions & 23 deletions src/blog-theme.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/blog-theme.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/blog-theme.sass
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/ or visit www.terwer.space if you need additional information or have any
/ questions.
/
@import "./styles/common/webfont.css"
@import "./styles/common/common.sass"

\:root
Expand Down
2 changes: 1 addition & 1 deletion src/styles/app/BlogApp.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
6 changes: 3 additions & 3 deletions src/zhi-theme.sass
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
/ or visit www.terwer.space if you need additional information or have any
/ questions.
/
@import "./styles/zhi/widgets/webfont.css"
@import "./styles/zhi/widgets/code-block.css"

@import "./styles/common/webfont.css"
@import "./styles/common/common.sass"

@import "./styles/zhi/widgets/code-block.css"

\:root
--b3-font-family: #{$font-family-mono}
--b3-font-family-code: var(--b3-font-family)
Expand Down
88 changes: 83 additions & 5 deletions theme.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions theme.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions theme.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*!
/ Copyright (c) 2023, Terwer . All rights reserved.
/ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
/
/ This code is free software; you can redistribute it and/or modify it
/ under the terms of the GNU General Public License version 2 only, as
/ published by the Free Software Foundation. Terwer designates this
/ particular file as subject to the "Classpath" exception as provided
/ by Terwer in the LICENSE file that accompanied this code.
/
/ This code is distributed in the hope that it will be useful, but WITHOUT
/ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
/ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
/ version 2 for more details (a copy is included in the LICENSE file that
/ accompanied this code).
/
/ You should have received a copy of the GNU General Public License version
/ 2 along with this work; if not, write to the Free Software Foundation,
/ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
/
/ Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com
/ or visit www.terwer.space if you need additional information or have any
/ questions.
/
/* 思源笔记启动会自动加载此文件 */

@import "./src/zhi-theme.sass"
8 changes: 4 additions & 4 deletions vite.cjs.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export default defineConfig({
} else {
return path.basename(id)
}
}
}
}
}
},
},
},
},
})
7 changes: 1 addition & 6 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,12 @@ export default defineConfig({
rollupOptions: {
input: {
appEntry: "index.html",
themeStyle: "src/zhi-theme.sass"
},
output: {
format: "esm",
chunkFileNames: "chunk/[name]-[hash].js",
assetFileNames: (asset) => {
if (asset.name == "zhi-theme.css") {
return "[name].[ext]"
} else {
return "static/[name]-[hash].[ext]"
}
return "static/[name]-[hash].[ext]"
},
manualChunks(id) {
if (id.indexOf("node_modules") > -1) {
Expand Down

0 comments on commit 27dc8ae

Please sign in to comment.