mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-26 04:40:31 +00:00
代码结构调整
This commit is contained in:
7
CONTRIBUTING.md
Normal file
7
CONTRIBUTING.md
Normal file
@@ -0,0 +1,7 @@
|
||||
| 目录 | 说明 |
|
||||
| ----------------- | ---------------------------- |
|
||||
| styles | 元素 GitHub 风格 |
|
||||
| styles/components | 具体页面的元素单独风格 |
|
||||
| styles/public | 适用大部分页面的元素默认风格 |
|
||||
| themes | 颜色主题 |
|
||||
| themes/\<theme> | 具体颜色主题自己的颜色或风格 |
|
||||
2
build.js
2
build.js
@@ -11,7 +11,7 @@ async function generateTheme(themePath) {
|
||||
|
||||
fs.mkdirSync("dist", { recursive: true });
|
||||
for (const theme of data.gitea.themes) {
|
||||
const inputFile = `src/themes/theme-github-${theme}.scss`;
|
||||
const inputFile = `src/themes/${theme}.scss`;
|
||||
const outputFile = `dist/theme-github-${theme}.css`;
|
||||
const result = await sass.compileAsync(inputFile, { sourceMap: false, style: "compressed" });
|
||||
fs.writeFileSync(outputFile, result.css);
|
||||
|
||||
2
build.ts
2
build.ts
@@ -20,7 +20,7 @@ async function generateTheme(themePath: string) {
|
||||
|
||||
await Deno.mkdir("dist", { recursive: true });
|
||||
for (const theme of data.gitea.themes) {
|
||||
const inputFile = `src/themes/theme-github-${theme}.scss`;
|
||||
const inputFile = `src/themes/${theme}.scss`;
|
||||
const outputFile = `dist/theme-github-${theme}.css`;
|
||||
const result = await sass.compileAsync(inputFile, { sourceMap: false, style: "compressed" });
|
||||
await Deno.writeTextFile(outputFile, result.css);
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
/* Made by Luting ^-^ */
|
||||
@use "public";
|
||||
@use "components";
|
||||
3
src/styles.scss
Normal file
3
src/styles.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
/* Made by Luting ^-^ */
|
||||
@use "styles/public";
|
||||
@use "styles/components";
|
||||
4
src/themes/dark.scss
Normal file
4
src/themes/dark.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
// Made by Luting ^-^
|
||||
@use "../styles";
|
||||
@use "dark/github-dark.css"; // GitHub 变量(仅主题内部使用的变量)
|
||||
@use "dark/gitea-dark.css"; // Gitea 变量(元素默认使用的变量)
|
||||
@@ -1,4 +0,0 @@
|
||||
// Made by Luting ^-^
|
||||
@use "../sass/theme-github";
|
||||
@use "../styles/dark/github-dark.css"; // GitHub 变量(仅主题内部使用的变量)
|
||||
@use "../styles/dark/gitea-dark.css"; // Gitea 变量(元素默认使用的变量)
|
||||
Reference in New Issue
Block a user