mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-07-15 23:19:48 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 208bb20e98 | |||
| 6edc1b7822 | |||
| e754eae5ae | |||
| cc016f3b16 |
@@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"description": "Skills shared by Baoyu for improving daily work efficiency",
|
"description": "Skills shared by Baoyu for improving daily work efficiency",
|
||||||
"version": "1.40.0"
|
"version": "1.41.0"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,16 @@
|
|||||||
|
|
||||||
English | [中文](./CHANGELOG.zh.md)
|
English | [中文](./CHANGELOG.zh.md)
|
||||||
|
|
||||||
|
## 1.41.0 - 2026-02-28
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- `baoyu-markdown-to-html`: rename themes (red→heritage, orange→warm), add 13 named color presets, serif-cjk font family, and per-theme style defaults
|
||||||
|
|
||||||
|
## 1.40.1 - 2026-02-28
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- `baoyu-image-gen`: clarify model resolution priority (EXTEND.md overrides env vars) and display current model with switch hints during generation
|
||||||
|
|
||||||
## 1.40.0 - 2026-02-28
|
## 1.40.0 - 2026-02-28
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -2,6 +2,16 @@
|
|||||||
|
|
||||||
[English](./CHANGELOG.md) | 中文
|
[English](./CHANGELOG.md) | 中文
|
||||||
|
|
||||||
|
## 1.41.0 - 2026-02-28
|
||||||
|
|
||||||
|
### 新功能
|
||||||
|
- `baoyu-markdown-to-html`:重命名主题(red→heritage、orange→warm),新增 13 个颜色预设、serif-cjk 字体、主题级样式默认值
|
||||||
|
|
||||||
|
## 1.40.1 - 2026-02-28
|
||||||
|
|
||||||
|
### 新功能
|
||||||
|
- `baoyu-image-gen`:明确模型解析优先级(EXTEND.md 优先于环境变量),生成图片时显示当前模型及切换方式
|
||||||
|
|
||||||
## 1.40.0 - 2026-02-28
|
## 1.40.0 - 2026-02-28
|
||||||
|
|
||||||
### 新功能
|
### 新功能
|
||||||
|
|||||||
@@ -110,14 +110,22 @@ npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image out.png --provi
|
|||||||
|
|
||||||
**Load Priority**: CLI args > EXTEND.md > env vars > `<cwd>/.baoyu-skills/.env` > `~/.baoyu-skills/.env`
|
**Load Priority**: CLI args > EXTEND.md > env vars > `<cwd>/.baoyu-skills/.env` > `~/.baoyu-skills/.env`
|
||||||
|
|
||||||
## Replicate Model Configuration
|
## Model Resolution
|
||||||
|
|
||||||
When using `--provider replicate`, the model can be configured in the following ways (highest priority first):
|
Model priority (highest → lowest), applies to all providers:
|
||||||
|
|
||||||
1. CLI flag: `--model <owner/name>`
|
1. CLI flag: `--model <id>`
|
||||||
2. EXTEND.md: `default_model.replicate`
|
2. EXTEND.md: `default_model.[provider]`
|
||||||
3. Env var: `REPLICATE_IMAGE_MODEL`
|
3. Env var: `<PROVIDER>_IMAGE_MODEL` (e.g., `GOOGLE_IMAGE_MODEL`)
|
||||||
4. Built-in default: `google/nano-banana-pro`
|
4. Built-in default
|
||||||
|
|
||||||
|
**EXTEND.md overrides env vars**. If both EXTEND.md `default_model.google: "gemini-3-pro-image-preview"` and env var `GOOGLE_IMAGE_MODEL=gemini-3.1-flash-image-preview` exist, EXTEND.md wins.
|
||||||
|
|
||||||
|
**Agent MUST display model info** before each generation:
|
||||||
|
- Show: `Using [provider] / [model]`
|
||||||
|
- Show switch hint: `Switch model: --model <id> | EXTEND.md default_model.[provider] | env <PROVIDER>_IMAGE_MODEL`
|
||||||
|
|
||||||
|
### Replicate Models
|
||||||
|
|
||||||
Supported model formats:
|
Supported model formats:
|
||||||
|
|
||||||
|
|||||||
@@ -92,8 +92,8 @@ test -f "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md" && grep -o 'default
|
|||||||
| `default` (Recommended) | 经典主题 - 传统排版,标题居中带底边,二级标题白字彩底 |
|
| `default` (Recommended) | 经典主题 - 传统排版,标题居中带底边,二级标题白字彩底 |
|
||||||
| `grace` | 优雅主题 - 文字阴影,圆角卡片,精致引用块 |
|
| `grace` | 优雅主题 - 文字阴影,圆角卡片,精致引用块 |
|
||||||
| `simple` | 简洁主题 - 现代极简风,不对称圆角,清爽留白 |
|
| `simple` | 简洁主题 - 现代极简风,不对称圆角,清爽留白 |
|
||||||
| `red` | 红色主题 - 红金配色,宋体排版,传统书法风格 |
|
| `heritage` | 传统主题 - 宋体排版,传统书法风格,默认红金配色 |
|
||||||
| `orange` | 橙色主题 - 暖色调现代风,宽松行距,圆角装饰 |
|
| `warm` | 温暖主题 - 暖色调现代风,宽松行距,圆角装饰 |
|
||||||
|
|
||||||
### Step 2: Convert
|
### Step 2: Convert
|
||||||
|
|
||||||
@@ -115,11 +115,32 @@ npx -y bun ${SKILL_DIR}/scripts/main.ts <markdown_file> [options]
|
|||||||
|
|
||||||
| Option | Description | Default |
|
| Option | Description | Default |
|
||||||
|--------|-------------|---------|
|
|--------|-------------|---------|
|
||||||
| `--theme <name>` | Theme name (default, grace, simple, red, orange) | default |
|
| `--theme <name>` | Theme name (default, grace, simple, heritage, warm) | default |
|
||||||
|
| `--color <name\|hex>` | Primary color: preset name or hex value | theme default |
|
||||||
|
| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |
|
||||||
|
| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |
|
||||||
| `--title <title>` | Override title from frontmatter | |
|
| `--title <title>` | Override title from frontmatter | |
|
||||||
| `--keep-title` | Keep the first heading in content | false (removed) |
|
| `--keep-title` | Keep the first heading in content | false (removed) |
|
||||||
| `--help` | Show help | |
|
| `--help` | Show help | |
|
||||||
|
|
||||||
|
**Color Presets:**
|
||||||
|
|
||||||
|
| Name | Hex | Label |
|
||||||
|
|------|-----|-------|
|
||||||
|
| blue | #0F4C81 | 经典蓝 |
|
||||||
|
| green | #009874 | 翡翠绿 |
|
||||||
|
| vermilion | #FA5151 | 活力橘 |
|
||||||
|
| yellow | #FECE00 | 柠檬黄 |
|
||||||
|
| purple | #92617E | 薰衣紫 |
|
||||||
|
| sky | #55C9EA | 天空蓝 |
|
||||||
|
| rose | #B76E79 | 玫瑰金 |
|
||||||
|
| olive | #556B2F | 橄榄绿 |
|
||||||
|
| black | #333333 | 石墨黑 |
|
||||||
|
| gray | #A9A9A9 | 雾烟灰 |
|
||||||
|
| pink | #FFB7C5 | 樱花粉 |
|
||||||
|
| red | #A93226 | 中国红 (heritage default) |
|
||||||
|
| orange | #D97757 | 暖橘 (warm default) |
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -129,6 +150,9 @@ npx -y bun ${SKILL_DIR}/scripts/main.ts article.md
|
|||||||
# With specific theme
|
# With specific theme
|
||||||
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --theme grace
|
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --theme grace
|
||||||
|
|
||||||
|
# Theme with custom color
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --theme heritage --color green
|
||||||
|
|
||||||
# Keep the first heading in content
|
# Keep the first heading in content
|
||||||
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --keep-title
|
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --keep-title
|
||||||
|
|
||||||
@@ -171,8 +195,8 @@ npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --title "My Article"
|
|||||||
| `default` | 经典主题 - 传统排版,标题居中带底边,二级标题白字彩底 |
|
| `default` | 经典主题 - 传统排版,标题居中带底边,二级标题白字彩底 |
|
||||||
| `grace` | 优雅主题 - 文字阴影,圆角卡片,精致引用块 (by @brzhang) |
|
| `grace` | 优雅主题 - 文字阴影,圆角卡片,精致引用块 (by @brzhang) |
|
||||||
| `simple` | 简洁主题 - 现代极简风,不对称圆角,清爽留白 (by @okooo5km) |
|
| `simple` | 简洁主题 - 现代极简风,不对称圆角,清爽留白 (by @okooo5km) |
|
||||||
| `red` | 红色主题 - 红金配色,宋体排版,传统书法风格 |
|
| `heritage` | 传统主题 - 宋体排版,传统书法风格,默认红金配色 |
|
||||||
| `orange` | 橙色主题 - 暖色调现代风,宽松行距,圆角装饰 |
|
| `warm` | 温暖主题 - 暖色调现代风,宽松行距,圆角装饰 |
|
||||||
|
|
||||||
## Supported Markdown Features
|
## Supported Markdown Features
|
||||||
|
|
||||||
|
|||||||
@@ -44,11 +44,28 @@ const FALLBACK_THEMES: ThemeName[] = ["default", "grace", "simple"];
|
|||||||
const FONT_FAMILY_MAP: Record<string, string> = {
|
const FONT_FAMILY_MAP: Record<string, string> = {
|
||||||
sans: `-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif`,
|
sans: `-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif`,
|
||||||
serif: `Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif`,
|
serif: `Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif`,
|
||||||
|
"serif-cjk": `"Source Han Serif SC", "Noto Serif CJK SC", "Source Han Serif CN", STSong, SimSun, serif`,
|
||||||
mono: `Menlo, Monaco, 'Courier New', monospace`,
|
mono: `Menlo, Monaco, 'Courier New', monospace`,
|
||||||
};
|
};
|
||||||
|
|
||||||
const FONT_SIZE_OPTIONS = ["14px", "15px", "16px", "17px", "18px"];
|
const FONT_SIZE_OPTIONS = ["14px", "15px", "16px", "17px", "18px"];
|
||||||
|
|
||||||
|
const COLOR_PRESETS: Record<string, string> = {
|
||||||
|
blue: "#0F4C81",
|
||||||
|
green: "#009874",
|
||||||
|
vermilion: "#FA5151",
|
||||||
|
yellow: "#FECE00",
|
||||||
|
purple: "#92617E",
|
||||||
|
sky: "#55C9EA",
|
||||||
|
rose: "#B76E79",
|
||||||
|
olive: "#556B2F",
|
||||||
|
black: "#333333",
|
||||||
|
gray: "#A9A9A9",
|
||||||
|
pink: "#FFB7C5",
|
||||||
|
red: "#A93226",
|
||||||
|
orange: "#D97757",
|
||||||
|
};
|
||||||
|
|
||||||
const CODE_BLOCK_THEMES = [
|
const CODE_BLOCK_THEMES = [
|
||||||
"1c-light", "a11y-dark", "a11y-light", "agate", "an-old-hope",
|
"1c-light", "a11y-dark", "a11y-light", "agate", "an-old-hope",
|
||||||
"androidstudio", "arduino-light", "arta", "ascetic",
|
"androidstudio", "arduino-light", "arta", "ascetic",
|
||||||
@@ -77,6 +94,8 @@ interface StyleConfig {
|
|||||||
fontSize: string;
|
fontSize: string;
|
||||||
foreground: string;
|
foreground: string;
|
||||||
blockquoteBackground: string;
|
blockquoteBackground: string;
|
||||||
|
accentColor: string;
|
||||||
|
containerBg: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_STYLE: StyleConfig = {
|
const DEFAULT_STYLE: StyleConfig = {
|
||||||
@@ -85,6 +104,26 @@ const DEFAULT_STYLE: StyleConfig = {
|
|||||||
fontSize: "16px",
|
fontSize: "16px",
|
||||||
foreground: "0 0% 3.9%",
|
foreground: "0 0% 3.9%",
|
||||||
blockquoteBackground: "#f7f7f7",
|
blockquoteBackground: "#f7f7f7",
|
||||||
|
accentColor: "#6B7280",
|
||||||
|
containerBg: "transparent",
|
||||||
|
};
|
||||||
|
|
||||||
|
const THEME_STYLE_DEFAULTS: Record<string, Partial<StyleConfig>> = {
|
||||||
|
heritage: {
|
||||||
|
primaryColor: COLOR_PRESETS.red,
|
||||||
|
accentColor: "#D4AC0D",
|
||||||
|
containerBg: "rgba(255, 251, 240, 1)",
|
||||||
|
fontFamily: FONT_FAMILY_MAP["serif-cjk"],
|
||||||
|
blockquoteBackground: "rgba(253, 237, 236, 1)",
|
||||||
|
},
|
||||||
|
warm: {
|
||||||
|
primaryColor: COLOR_PRESETS.orange,
|
||||||
|
accentColor: "#E4B1A0",
|
||||||
|
containerBg: "rgba(250, 249, 245, 1)",
|
||||||
|
fontFamily: FONT_FAMILY_MAP.sans,
|
||||||
|
fontSize: "15px",
|
||||||
|
blockquoteBackground: "rgba(255, 255, 255, 0.6)",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.entries(COMMON_LANGUAGES).forEach(([name, lang]) => {
|
Object.entries(COMMON_LANGUAGES).forEach(([name, lang]) => {
|
||||||
@@ -532,8 +571,8 @@ function printUsage(): void {
|
|||||||
"",
|
"",
|
||||||
"Options:",
|
"Options:",
|
||||||
` --theme <name> Theme (${THEME_NAMES.join(", ")})`,
|
` --theme <name> Theme (${THEME_NAMES.join(", ")})`,
|
||||||
` --color <hex> Primary color (default: ${DEFAULT_STYLE.primaryColor})`,
|
` --color <name|hex> Primary color: ${Object.keys(COLOR_PRESETS).join(", ")}, or hex`,
|
||||||
` --font-family <name> Font: sans, serif, mono, or CSS value`,
|
` --font-family <name> Font: ${Object.keys(FONT_FAMILY_MAP).join(", ")}, or CSS value`,
|
||||||
` --font-size <N> Font size: ${FONT_SIZE_OPTIONS.join(", ")} (default: 16px)`,
|
` --font-size <N> Font size: ${FONT_SIZE_OPTIONS.join(", ")} (default: 16px)`,
|
||||||
` --code-theme <name> Code highlight theme (default: github)`,
|
` --code-theme <name> Code highlight theme (default: github)`,
|
||||||
` --mac-code-block Show Mac-style code block header`,
|
` --mac-code-block Show Mac-style code block header`,
|
||||||
@@ -559,15 +598,19 @@ function resolveFontFamily(value: string): string {
|
|||||||
return FONT_FAMILY_MAP[value] ?? value;
|
return FONT_FAMILY_MAP[value] ?? value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resolveColor(value: string): string {
|
||||||
|
return COLOR_PRESETS[value] ?? value;
|
||||||
|
}
|
||||||
|
|
||||||
function parseArgs(argv: string[]): CliOptions | null {
|
function parseArgs(argv: string[]): CliOptions | null {
|
||||||
const ext = loadExtendConfig();
|
const ext = loadExtendConfig();
|
||||||
|
|
||||||
let inputPath = "";
|
let inputPath = "";
|
||||||
let theme: ThemeName = ext.default_theme ?? "default";
|
let theme: ThemeName = ext.default_theme ?? "default";
|
||||||
let keepTitle = ext.keep_title ?? false;
|
let keepTitle = ext.keep_title ?? false;
|
||||||
let primaryColor = ext.default_color ?? DEFAULT_STYLE.primaryColor;
|
let primaryColor: string | undefined = ext.default_color ? resolveColor(ext.default_color) : undefined;
|
||||||
let fontFamily = ext.default_font_family ? resolveFontFamily(ext.default_font_family) : DEFAULT_STYLE.fontFamily;
|
let fontFamily: string | undefined = ext.default_font_family ? resolveFontFamily(ext.default_font_family) : undefined;
|
||||||
let fontSize = ext.default_font_size ?? DEFAULT_STYLE.fontSize;
|
let fontSize: string | undefined = ext.default_font_size ?? undefined;
|
||||||
let codeTheme = ext.default_code_theme ?? "github";
|
let codeTheme = ext.default_code_theme ?? "github";
|
||||||
let isMacCodeBlock = ext.mac_code_block ?? true;
|
let isMacCodeBlock = ext.mac_code_block ?? true;
|
||||||
let isShowLineNumber = ext.show_line_number ?? false;
|
let isShowLineNumber = ext.show_line_number ?? false;
|
||||||
@@ -605,7 +648,7 @@ function parseArgs(argv: string[]): CliOptions | null {
|
|||||||
if (arg === "--color" || arg.startsWith("--color=")) {
|
if (arg === "--color" || arg.startsWith("--color=")) {
|
||||||
const val = parseArgValue(argv, i, "--color");
|
const val = parseArgValue(argv, i, "--color");
|
||||||
if (!val) { console.error("Missing value for --color"); return null; }
|
if (!val) { console.error("Missing value for --color"); return null; }
|
||||||
primaryColor = val;
|
primaryColor = resolveColor(val);
|
||||||
if (!arg.includes("=")) i += 1;
|
if (!arg.includes("=")) i += 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -678,9 +721,9 @@ interface CliOptions {
|
|||||||
inputPath: string;
|
inputPath: string;
|
||||||
theme: ThemeName;
|
theme: ThemeName;
|
||||||
keepTitle: boolean;
|
keepTitle: boolean;
|
||||||
primaryColor: string;
|
primaryColor?: string;
|
||||||
fontFamily: string;
|
fontFamily?: string;
|
||||||
fontSize: string;
|
fontSize?: string;
|
||||||
codeTheme: string;
|
codeTheme: string;
|
||||||
isMacCodeBlock: boolean;
|
isMacCodeBlock: boolean;
|
||||||
isShowLineNumber: boolean;
|
isShowLineNumber: boolean;
|
||||||
@@ -883,6 +926,8 @@ function buildCss(baseCss: string, themeCss: string, style: StyleConfig = DEFAUL
|
|||||||
--md-font-size: ${style.fontSize};
|
--md-font-size: ${style.fontSize};
|
||||||
--foreground: ${style.foreground};
|
--foreground: ${style.foreground};
|
||||||
--blockquote-background: ${style.blockquoteBackground};
|
--blockquote-background: ${style.blockquoteBackground};
|
||||||
|
--md-accent-color: ${style.accentColor};
|
||||||
|
--md-container-bg: ${style.containerBg};
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@@ -978,11 +1023,15 @@ function normalizeCssText(cssText: string, style: StyleConfig = DEFAULT_STYLE):
|
|||||||
.replace(/var\(--md-font-family\)/g, style.fontFamily)
|
.replace(/var\(--md-font-family\)/g, style.fontFamily)
|
||||||
.replace(/var\(--md-font-size\)/g, style.fontSize)
|
.replace(/var\(--md-font-size\)/g, style.fontSize)
|
||||||
.replace(/var\(--blockquote-background\)/g, style.blockquoteBackground)
|
.replace(/var\(--blockquote-background\)/g, style.blockquoteBackground)
|
||||||
|
.replace(/var\(--md-accent-color\)/g, style.accentColor)
|
||||||
|
.replace(/var\(--md-container-bg\)/g, style.containerBg)
|
||||||
.replace(/hsl\(var\(--foreground\)\)/g, "#3f3f3f")
|
.replace(/hsl\(var\(--foreground\)\)/g, "#3f3f3f")
|
||||||
.replace(/--md-primary-color:\s*[^;"']+;?/g, "")
|
.replace(/--md-primary-color:\s*[^;"']+;?/g, "")
|
||||||
.replace(/--md-font-family:\s*[^;"']+;?/g, "")
|
.replace(/--md-font-family:\s*[^;"']+;?/g, "")
|
||||||
.replace(/--md-font-size:\s*[^;"']+;?/g, "")
|
.replace(/--md-font-size:\s*[^;"']+;?/g, "")
|
||||||
.replace(/--blockquote-background:\s*[^;"']+;?/g, "")
|
.replace(/--blockquote-background:\s*[^;"']+;?/g, "")
|
||||||
|
.replace(/--md-accent-color:\s*[^;"']+;?/g, "")
|
||||||
|
.replace(/--md-container-bg:\s*[^;"']+;?/g, "")
|
||||||
.replace(/--foreground:\s*[^;"']+;?/g, "");
|
.replace(/--foreground:\s*[^;"']+;?/g, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1038,11 +1087,13 @@ async function main(): Promise<void> {
|
|||||||
options.inputPath.replace(/\.md$/i, ".html")
|
options.inputPath.replace(/\.md$/i, ".html")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const themeDefaults = THEME_STYLE_DEFAULTS[options.theme] ?? {};
|
||||||
const style: StyleConfig = {
|
const style: StyleConfig = {
|
||||||
...DEFAULT_STYLE,
|
...DEFAULT_STYLE,
|
||||||
primaryColor: options.primaryColor,
|
...themeDefaults,
|
||||||
fontFamily: options.fontFamily,
|
...(options.primaryColor !== undefined ? { primaryColor: options.primaryColor } : {}),
|
||||||
fontSize: options.fontSize,
|
...(options.fontFamily !== undefined ? { fontFamily: options.fontFamily } : {}),
|
||||||
|
...(options.fontSize !== undefined ? { fontSize: options.fontSize } : {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
const { baseCss, themeCss } = loadThemeCss(options.theme);
|
const { baseCss, themeCss } = loadThemeCss(options.theme);
|
||||||
|
|||||||
+30
-30
@@ -1,23 +1,23 @@
|
|||||||
/**
|
/**
|
||||||
* MD 红色主题
|
* MD 传统主题 (heritage)
|
||||||
* 传统书法风格,红金配色,宋体排版
|
* 传统书法风格,宋体排版,默认红金配色
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ==================== 容器字体覆盖 ==================== */
|
/* ==================== 容器样式覆盖 ==================== */
|
||||||
section,
|
section,
|
||||||
container {
|
container {
|
||||||
font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Source Han Serif CN", STSong, SimSun, serif;
|
font-family: var(--md-font-family);
|
||||||
font-size: 16px;
|
font-size: var(--md-font-size);
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
background-color: rgba(255, 251, 240, 1);
|
background-color: var(--md-container-bg);
|
||||||
border: 4px solid rgba(169, 50, 38, 1);
|
border: 4px solid var(--md-primary-color);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#output {
|
#output {
|
||||||
font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Source Han Serif CN", STSong, SimSun, serif;
|
font-family: var(--md-font-family);
|
||||||
font-size: 16px;
|
font-size: var(--md-font-size);
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,9 +25,9 @@ container {
|
|||||||
h1 {
|
h1 {
|
||||||
display: table;
|
display: table;
|
||||||
padding: 0 1em;
|
padding: 0 1em;
|
||||||
border-bottom: 2px solid #A93226;
|
border-bottom: 2px solid var(--md-primary-color);
|
||||||
margin: 30px auto 20px;
|
margin: 30px auto 20px;
|
||||||
color: #A93226;
|
color: var(--md-primary-color);
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -40,7 +40,7 @@ h2 {
|
|||||||
padding: 6px 20px;
|
padding: 6px 20px;
|
||||||
margin: 30px auto 20px;
|
margin: 30px auto 20px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
background-color: #A93226;
|
background-color: var(--md-primary-color);
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -52,9 +52,9 @@ h2 {
|
|||||||
/* ==================== 三级标题 ==================== */
|
/* ==================== 三级标题 ==================== */
|
||||||
h3 {
|
h3 {
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
border-left: 3px solid #A93226;
|
border-left: 3px solid var(--md-primary-color);
|
||||||
margin: 20px 8px 10px 0;
|
margin: 20px 8px 10px 0;
|
||||||
color: #A93226;
|
color: var(--md-primary-color);
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
@@ -63,7 +63,7 @@ h3 {
|
|||||||
/* ==================== 四级标题 ==================== */
|
/* ==================== 四级标题 ==================== */
|
||||||
h4 {
|
h4 {
|
||||||
margin: 10px 8px;
|
margin: 10px 8px;
|
||||||
color: #D4AC0D;
|
color: var(--md-accent-color);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ h6 {
|
|||||||
p {
|
p {
|
||||||
margin: 16px 0;
|
margin: 16px 0;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
color: #2C2C2C;
|
color: hsl(var(--foreground));
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,15 +96,15 @@ p {
|
|||||||
blockquote {
|
blockquote {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
padding: 15px 12px;
|
padding: 15px 12px;
|
||||||
border-left: 2px solid rgba(169, 50, 38, 0.8);
|
border-left: 2px solid color-mix(in srgb, var(--md-primary-color) 80%, transparent);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
color: #5D4037;
|
color: hsl(var(--foreground));
|
||||||
background-color: rgba(253, 237, 236, 1);
|
background-color: var(--blockquote-background);
|
||||||
margin: 12px 0;
|
margin: 12px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
blockquote > p {
|
blockquote > p {
|
||||||
color: #5D4037;
|
color: hsl(var(--foreground));
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@@ -113,14 +113,14 @@ blockquote > p {
|
|||||||
pre.code__pre,
|
pre.code__pre,
|
||||||
.hljs.code__pre {
|
.hljs.code__pre {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
border: 1px solid #D4AC0D;
|
border: 1px solid var(--md-accent-color);
|
||||||
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
|
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 图片 ==================== */
|
/* ==================== 图片 ==================== */
|
||||||
img {
|
img {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid #D4AC0D;
|
border: 1px solid var(--md-accent-color);
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ ul {
|
|||||||
|
|
||||||
li {
|
li {
|
||||||
margin: 0.2em 0;
|
margin: 0.2em 0;
|
||||||
color: #2C2C2C;
|
color: hsl(var(--foreground));
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,35 +149,35 @@ li {
|
|||||||
hr {
|
hr {
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 2px 0 0;
|
border-width: 2px 0 0;
|
||||||
border-color: #D4AC0D;
|
border-color: var(--md-accent-color);
|
||||||
margin: 40px 0;
|
margin: 40px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 强调 ==================== */
|
/* ==================== 强调 ==================== */
|
||||||
strong {
|
strong {
|
||||||
color: #A93226;
|
color: var(--md-primary-color);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 标记高亮 ==================== */
|
/* ==================== 标记高亮 ==================== */
|
||||||
.markup-highlight {
|
.markup-highlight {
|
||||||
background-color: #FADBD8;
|
background-color: color-mix(in srgb, var(--md-primary-color) 15%, white);
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
color: #A93226;
|
color: var(--md-primary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.markup-underline {
|
.markup-underline {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
text-decoration-color: #D4AC0D;
|
text-decoration-color: var(--md-accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 链接 ==================== */
|
/* ==================== 链接 ==================== */
|
||||||
a {
|
a {
|
||||||
color: #A93226;
|
color: var(--md-primary-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 表格 ==================== */
|
/* ==================== 表格 ==================== */
|
||||||
th {
|
th {
|
||||||
background: rgba(169, 50, 38, 0.1);
|
background: color-mix(in srgb, var(--md-primary-color) 10%, transparent);
|
||||||
}
|
}
|
||||||
+28
-28
@@ -1,23 +1,23 @@
|
|||||||
/**
|
/**
|
||||||
* MD 橙色主题
|
* MD 温暖主题 (warm)
|
||||||
* 暖色调现代风,橙色主色,宽松行距
|
* 暖色调现代风,默认橙色主色,宽松行距
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ==================== 容器样式覆盖 ==================== */
|
/* ==================== 容器样式覆盖 ==================== */
|
||||||
section,
|
section,
|
||||||
container {
|
container {
|
||||||
font-family: PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;
|
font-family: var(--md-font-family);
|
||||||
font-size: 15px;
|
font-size: var(--md-font-size);
|
||||||
line-height: 2;
|
line-height: 2;
|
||||||
background-color: rgba(250, 249, 245, 1);
|
background-color: var(--md-container-bg);
|
||||||
border: 1px solid rgba(255, 255, 255, 0.01);
|
border: 1px solid rgba(255, 255, 255, 0.01);
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
padding: 12px 12px;
|
padding: 12px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#output {
|
#output {
|
||||||
font-family: PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;
|
font-family: var(--md-font-family);
|
||||||
font-size: 15px;
|
font-size: var(--md-font-size);
|
||||||
line-height: 2;
|
line-height: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,8 +26,8 @@ h1 {
|
|||||||
display: table;
|
display: table;
|
||||||
padding: 0.3em 1em;
|
padding: 0.3em 1em;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
background: #D97757;
|
background: var(--md-primary-color);
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -41,16 +41,16 @@ h2 {
|
|||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
margin: 0 auto 20px;
|
margin: 0 auto 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: #D97757;
|
color: var(--md-primary-color);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-bottom: 2px solid #E4B1A0;
|
border-bottom: 2px solid var(--md-accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 三级标题 ==================== */
|
/* ==================== 三级标题 ==================== */
|
||||||
h3 {
|
h3 {
|
||||||
margin: 0 8px 10px;
|
margin: 0 8px 10px;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@ h3 {
|
|||||||
/* ==================== 四级标题 ==================== */
|
/* ==================== 四级标题 ==================== */
|
||||||
h4 {
|
h4 {
|
||||||
margin: 0 8px 10px;
|
margin: 0 8px 10px;
|
||||||
color: #D97757;
|
color: var(--md-primary-color);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ h5 {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 8px 10px;
|
margin: 0 8px 10px;
|
||||||
padding: 4px 10px;
|
padding: 4px 10px;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
background: rgba(255, 255, 255, 0.7);
|
background: rgba(255, 255, 255, 0.7);
|
||||||
border: 1px solid rgb(189, 224, 254);
|
border: 1px solid rgb(189, 224, 254);
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
@@ -79,7 +79,7 @@ h5 {
|
|||||||
/* ==================== 六级标题 ==================== */
|
/* ==================== 六级标题 ==================== */
|
||||||
h6 {
|
h6 {
|
||||||
margin: 0 8px 10px;
|
margin: 0 8px 10px;
|
||||||
color: #D97757;
|
color: var(--md-primary-color);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ h6 {
|
|||||||
/* ==================== 段落 ==================== */
|
/* ==================== 段落 ==================== */
|
||||||
p {
|
p {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
line-height: 2;
|
line-height: 2;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
@@ -97,15 +97,15 @@ p {
|
|||||||
blockquote {
|
blockquote {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
padding: 15px 12px;
|
padding: 15px 12px;
|
||||||
border-left: 7px solid rgba(228, 177, 160, 1);
|
border-left: 7px solid var(--md-accent-color);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
background-color: rgba(255, 255, 255, 0.6);
|
background-color: var(--blockquote-background);
|
||||||
margin: 12px 0;
|
margin: 12px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
blockquote > p {
|
blockquote > p {
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@@ -139,7 +139,7 @@ ul {
|
|||||||
|
|
||||||
li {
|
li {
|
||||||
margin: 0.2em 0;
|
margin: 0.2em 0;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,35 +147,35 @@ li {
|
|||||||
hr {
|
hr {
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px 0 0;
|
border-width: 1px 0 0;
|
||||||
border-color: #D97757;
|
border-color: var(--md-primary-color);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 强调 ==================== */
|
/* ==================== 强调 ==================== */
|
||||||
strong {
|
strong {
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 标记高亮 ==================== */
|
/* ==================== 标记高亮 ==================== */
|
||||||
.markup-highlight {
|
.markup-highlight {
|
||||||
background-color: #3B3B3B;
|
background-color: hsl(var(--foreground));
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
color: #FAF9F5;
|
color: var(--md-container-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.markup-underline {
|
.markup-underline {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
text-decoration-color: #E4B1A0;
|
text-decoration-color: var(--md-accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 链接 ==================== */
|
/* ==================== 链接 ==================== */
|
||||||
a {
|
a {
|
||||||
color: #D97757;
|
color: var(--md-primary-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 表格 ==================== */
|
/* ==================== 表格 ==================== */
|
||||||
th {
|
th {
|
||||||
background: rgba(217, 119, 87, 0.1);
|
background: color-mix(in srgb, var(--md-primary-color) 10%, transparent);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user