commit afd875faae0b720d6be470ca729e6da52703a71c Author: wangdl Date: Sat May 30 18:04:22 2026 +0800 Initial commit: SVG icons (Tabler outline) + README diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b717010 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +*.bak +*.tmp diff --git a/icons/README.md b/icons/README.md new file mode 100644 index 0000000..0c333e5 --- /dev/null +++ b/icons/README.md @@ -0,0 +1,112 @@ +# 知习图标系统 + +## 图标来源 + +[Tabler Icons](https://tabler.io/icons) — MIT 协议,4800+ 统一风格的 SVG 图标。 + +- 规格:24×24 viewBox,2px 描边,round linecap/linejoin +- 路径:`https://raw.githubusercontent.com/tabler/tabler-icons/main/icons/outline/{name}.svg` +- 可在线搜索:https://tabler.io/icons + +## 目录结构 + +``` +shared-assets/icons/ ← SVG 真理源(跨平台共享) +├── README.md +├── icon-settings.svg ← tabler/settings +├── icon-search.svg ← tabler/search +├── icon-plus.svg ← tabler/plus +├── icon-trash.svg ← tabler/trash +├── icon-check.svg ← tabler/check +├── icon-chevron-left.svg ← tabler/chevron-left +├── icon-chevron-right.svg ← tabler/chevron-right +├── icon-cloud.svg ← tabler/cloud +├── icon-bell-on.svg ← tabler/bell +├── icon-bell-off.svg ← tabler/bell-off +├── icon-sun.svg ← tabler/sun +├── icon-moon.svg ← tabler/moon +├── icon-logout.svg ← tabler/logout +├── icon-camera.svg ← tabler/camera +├── icon-play.svg ← tabler/player-play +├── icon-pause.svg ← tabler/player-pause +├── icon-download.svg ← tabler/download +├── icon-upload.svg ← tabler/upload +├── icon-folder.svg ← tabler/folder +├── icon-flame.svg ← tabler/flame +├── icon-calendar.svg ← tabler/calendar +├── icon-sparkles.svg ← tabler/sparkles +├── icon-brain.svg ← tabler/brain +├── icon-books.svg ← tabler/books +├── icon-xmark.svg ← tabler/x +├── icon-warning.svg ← tabler/alert-triangle +├── icon-lightbulb.svg ← tabler/bulb +├── icon-file.svg ← tabler/file-text +├── icon-pin.svg ← tabler/pin +├── icon-mic.svg ← tabler/microphone +├── icon-question.svg ← tabler/question-mark +├── icon-storage.svg ← tabler/database +├── icon-language.svg ← tabler/language +├── icon-privacy.svg ← tabler/shield-check +├── icon-agreement.svg ← tabler/file-check +├── icon-goal.svg ← tabler/target +├── icon-help.svg ← tabler/help +├── icon-method.svg ← tabler/book +├── icon-library.svg ← tabler/bookmarks +├── icon-list.svg ← tabler/list +├── icon-clock.svg ← tabler/clock +├── icon-refresh.svg ← tabler/refresh +├── icon-pencil.svg ← tabler/pencil +├── icon-notifications.svg ← tabler/bell(铃铛副本) +├── tab-learn.svg ← 自定义(学习 Tab) +├── tab-learn-active.svg ← 自定义(学习 Tab 激活态) +├── tab-library.svg ← 自定义(知识库 Tab) +├── tab-library-active.svg ← 自定义(知识库 Tab 激活态) +├── tab-analysis.svg ← 自定义(分析 Tab) +├── tab-analysis-active.svg ← 自定义(分析 Tab 激活态) +├── tab-profile.svg ← 自定义(我的 Tab) +└── tab-profile-active.svg ← 自定义(我的 Tab 激活态) + +ios-projects/.../Assets.xcassets/Icons/ ← iOS 编译资源 +└── 每个 SVG 对应一个 .imageset 文件夹 +``` + +## 新增图标步骤 + +1. 在 https://tabler.io/icons 搜索图标名 +2. 下载 SVG: + ```bash + curl -O https://raw.githubusercontent.com/tabler/tabler-icons/main/icons/outline/{name}.svg + ``` +3. 改名放入 `shared-assets/icons/`: + ```bash + cp {name}.svg shared-assets/icons/icon-{用途}.svg + ``` +4. 创建 iOS imageset: + ```bash + mkdir -p ios-projects/.../Assets.xcassets/Icons/icon-{用途}.imageset + cp shared-assets/icons/icon-{用途}.svg ios-projects/.../Assets.xcassets/Icons/icon-{用途}.imageset/ + ``` +5. Contents.json 模板(每新建一个就复制改文件名): + ```json + {"images":[{"filename":"icon-{用途}.svg","idiom":"universal"}],"info":{"author":"xcode","version":1},"properties":{"template-rendering-intent":"template","preserves-vector-representation":true}} + ``` +6. 在代码中使用: + ```swift + Image("icon-{用途}").resizable().scaledToFit().frame(width: 20, height: 20) + ``` + +## 渲染模式 + +所有图标使用 `template-rendering-intent: template`,颜色由代码中的 `.foregroundColor()` 控制,无需修改 SVG 本身的颜色。 + +**图标风格**:全部使用线性/描边图标(outline/linear),不使用实心填充(solid/fill)图标。Tabler Icons 的 outline 变体天然符合此规范;Apple SF Symbols 需使用非 `.fill` 变体(如 `mic` 而非 `mic.fill`)。 + +## 跨平台 + +| 平台 | 格式 | 路径 | +|------|------|------| +| iOS | SVG → Asset Catalog .imageset | `ios-projects/.../Assets.xcassets/Icons/` | +| Android | SVG → VectorDrawable XML | `android-projects/.../res/drawable/` | +| Web | npm import | `import { IconName } from '@tabler/icons-react'` | + +所有平台从 `shared-assets/icons/` 取同一份 SVG 源文件。 diff --git a/icons/icon-agreement.svg b/icons/icon-agreement.svg new file mode 100644 index 0000000..daa0493 --- /dev/null +++ b/icons/icon-agreement.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/icons/icon-bell-off.svg b/icons/icon-bell-off.svg new file mode 100644 index 0000000..f2ce005 --- /dev/null +++ b/icons/icon-bell-off.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/icons/icon-bell-on.svg b/icons/icon-bell-on.svg new file mode 100644 index 0000000..9cef578 --- /dev/null +++ b/icons/icon-bell-on.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-books.svg b/icons/icon-books.svg new file mode 100644 index 0000000..07c8bd8 --- /dev/null +++ b/icons/icon-books.svg @@ -0,0 +1,25 @@ + + + + + + + + + + diff --git a/icons/icon-brain.svg b/icons/icon-brain.svg new file mode 100644 index 0000000..d56ee50 --- /dev/null +++ b/icons/icon-brain.svg @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/icons/icon-calendar.svg b/icons/icon-calendar.svg new file mode 100644 index 0000000..2899a08 --- /dev/null +++ b/icons/icon-calendar.svg @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/icons/icon-camera.svg b/icons/icon-camera.svg new file mode 100644 index 0000000..c9ec5d1 --- /dev/null +++ b/icons/icon-camera.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-check.svg b/icons/icon-check.svg new file mode 100644 index 0000000..366b892 --- /dev/null +++ b/icons/icon-check.svg @@ -0,0 +1,19 @@ + + + + diff --git a/icons/icon-chevron-left.svg b/icons/icon-chevron-left.svg new file mode 100644 index 0000000..5127b68 --- /dev/null +++ b/icons/icon-chevron-left.svg @@ -0,0 +1,19 @@ + + + + diff --git a/icons/icon-chevron-right.svg b/icons/icon-chevron-right.svg new file mode 100644 index 0000000..a3cef4a --- /dev/null +++ b/icons/icon-chevron-right.svg @@ -0,0 +1,19 @@ + + + + diff --git a/icons/icon-clock.svg b/icons/icon-clock.svg new file mode 100644 index 0000000..2da696b --- /dev/null +++ b/icons/icon-clock.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-cloud.svg b/icons/icon-cloud.svg new file mode 100644 index 0000000..a416e83 --- /dev/null +++ b/icons/icon-cloud.svg @@ -0,0 +1,19 @@ + + + + diff --git a/icons/icon-download.svg b/icons/icon-download.svg new file mode 100644 index 0000000..43f3318 --- /dev/null +++ b/icons/icon-download.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/icons/icon-file.svg b/icons/icon-file.svg new file mode 100644 index 0000000..a119efe --- /dev/null +++ b/icons/icon-file.svg @@ -0,0 +1,23 @@ + + + + + + + + diff --git a/icons/icon-flame.svg b/icons/icon-flame.svg new file mode 100644 index 0000000..e7677e6 --- /dev/null +++ b/icons/icon-flame.svg @@ -0,0 +1,19 @@ + + + + diff --git a/icons/icon-folder.svg b/icons/icon-folder.svg new file mode 100644 index 0000000..32d051b --- /dev/null +++ b/icons/icon-folder.svg @@ -0,0 +1,19 @@ + + + + diff --git a/icons/icon-goal.svg b/icons/icon-goal.svg new file mode 100644 index 0000000..dacc019 --- /dev/null +++ b/icons/icon-goal.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/icons/icon-help.svg b/icons/icon-help.svg new file mode 100644 index 0000000..11f069a --- /dev/null +++ b/icons/icon-help.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/icons/icon-language.svg b/icons/icon-language.svg new file mode 100644 index 0000000..b012e06 --- /dev/null +++ b/icons/icon-language.svg @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/icons/icon-library.svg b/icons/icon-library.svg new file mode 100644 index 0000000..de9b8ef --- /dev/null +++ b/icons/icon-library.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-lightbulb.svg b/icons/icon-lightbulb.svg new file mode 100644 index 0000000..60d4eef --- /dev/null +++ b/icons/icon-lightbulb.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/icons/icon-list.svg b/icons/icon-list.svg new file mode 100644 index 0000000..f4ecae7 --- /dev/null +++ b/icons/icon-list.svg @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/icons/icon-logout.svg b/icons/icon-logout.svg new file mode 100644 index 0000000..243507a --- /dev/null +++ b/icons/icon-logout.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/icons/icon-method.svg b/icons/icon-method.svg new file mode 100644 index 0000000..9c3049b --- /dev/null +++ b/icons/icon-method.svg @@ -0,0 +1,23 @@ + + + + + + + + diff --git a/icons/icon-mic.svg b/icons/icon-mic.svg new file mode 100644 index 0000000..745338a --- /dev/null +++ b/icons/icon-mic.svg @@ -0,0 +1,22 @@ + + + + + + + diff --git a/icons/icon-moon.svg b/icons/icon-moon.svg new file mode 100644 index 0000000..c954150 --- /dev/null +++ b/icons/icon-moon.svg @@ -0,0 +1,19 @@ + + + + diff --git a/icons/icon-notifications.svg b/icons/icon-notifications.svg new file mode 100644 index 0000000..9cef578 --- /dev/null +++ b/icons/icon-notifications.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-pause.svg b/icons/icon-pause.svg new file mode 100644 index 0000000..b492b97 --- /dev/null +++ b/icons/icon-pause.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-pencil.svg b/icons/icon-pencil.svg new file mode 100644 index 0000000..98e7905 --- /dev/null +++ b/icons/icon-pencil.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-pin.svg b/icons/icon-pin.svg new file mode 100644 index 0000000..49c3c72 --- /dev/null +++ b/icons/icon-pin.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/icons/icon-play.svg b/icons/icon-play.svg new file mode 100644 index 0000000..0186a34 --- /dev/null +++ b/icons/icon-play.svg @@ -0,0 +1,19 @@ + + + + diff --git a/icons/icon-plus.svg b/icons/icon-plus.svg new file mode 100644 index 0000000..d86b39c --- /dev/null +++ b/icons/icon-plus.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-privacy.svg b/icons/icon-privacy.svg new file mode 100644 index 0000000..ce2051c --- /dev/null +++ b/icons/icon-privacy.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-question.svg b/icons/icon-question.svg new file mode 100644 index 0000000..1beb0fb --- /dev/null +++ b/icons/icon-question.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-refresh.svg b/icons/icon-refresh.svg new file mode 100644 index 0000000..6dac269 --- /dev/null +++ b/icons/icon-refresh.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-search.svg b/icons/icon-search.svg new file mode 100644 index 0000000..c320ddb --- /dev/null +++ b/icons/icon-search.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-settings.svg b/icons/icon-settings.svg new file mode 100644 index 0000000..074df38 --- /dev/null +++ b/icons/icon-settings.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-sparkles.svg b/icons/icon-sparkles.svg new file mode 100644 index 0000000..25bcdbf --- /dev/null +++ b/icons/icon-sparkles.svg @@ -0,0 +1,19 @@ + + + + diff --git a/icons/icon-storage.svg b/icons/icon-storage.svg new file mode 100644 index 0000000..2292e4c --- /dev/null +++ b/icons/icon-storage.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/icons/icon-sun.svg b/icons/icon-sun.svg new file mode 100644 index 0000000..b8fd727 --- /dev/null +++ b/icons/icon-sun.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/icon-trash.svg b/icons/icon-trash.svg new file mode 100644 index 0000000..6a4f025 --- /dev/null +++ b/icons/icon-trash.svg @@ -0,0 +1,23 @@ + + + + + + + + diff --git a/icons/icon-upload.svg b/icons/icon-upload.svg new file mode 100644 index 0000000..3912146 --- /dev/null +++ b/icons/icon-upload.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/icons/icon-warning.svg b/icons/icon-warning.svg new file mode 100644 index 0000000..0f02913 --- /dev/null +++ b/icons/icon-warning.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/icons/icon-xmark.svg b/icons/icon-xmark.svg new file mode 100644 index 0000000..40a873c --- /dev/null +++ b/icons/icon-xmark.svg @@ -0,0 +1,20 @@ + + + + + diff --git a/icons/tab-analysis-active.svg b/icons/tab-analysis-active.svg new file mode 100644 index 0000000..dbb9732 --- /dev/null +++ b/icons/tab-analysis-active.svg @@ -0,0 +1 @@ + diff --git a/icons/tab-analysis.svg b/icons/tab-analysis.svg new file mode 100644 index 0000000..43b3b40 --- /dev/null +++ b/icons/tab-analysis.svg @@ -0,0 +1 @@ + diff --git a/icons/tab-learn-active.svg b/icons/tab-learn-active.svg new file mode 100644 index 0000000..1ea99cf --- /dev/null +++ b/icons/tab-learn-active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/tab-learn.svg b/icons/tab-learn.svg new file mode 100644 index 0000000..d430c3b --- /dev/null +++ b/icons/tab-learn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/tab-library-active.svg b/icons/tab-library-active.svg new file mode 100644 index 0000000..b2f452d --- /dev/null +++ b/icons/tab-library-active.svg @@ -0,0 +1 @@ + diff --git a/icons/tab-library.svg b/icons/tab-library.svg new file mode 100644 index 0000000..420362e --- /dev/null +++ b/icons/tab-library.svg @@ -0,0 +1 @@ + diff --git a/icons/tab-profile-active.svg b/icons/tab-profile-active.svg new file mode 100644 index 0000000..215039f --- /dev/null +++ b/icons/tab-profile-active.svg @@ -0,0 +1 @@ + diff --git a/icons/tab-profile.svg b/icons/tab-profile.svg new file mode 100644 index 0000000..d08e9a6 --- /dev/null +++ b/icons/tab-profile.svg @@ -0,0 +1 @@ +