This commit is contained in:
aote777 2024-03-05 16:31:31 +08:00
parent 6e45919a38
commit 1f1da0f654
3 changed files with 63 additions and 58 deletions

View File

@ -1,13 +1,17 @@
# anki-md-template # anki-md-template
> **核心代码在`demo.html`中** > **核心代码在`demo.html`中** > **不想手动创建模板,可以直接导入我上传好的牌组(./markdown.apkg),就会自动导入卡片模板了**
> **不想手动创建模板,可以直接导入我上传好的牌组(markdown.apkg),就会自动导入卡片模板了**
* 可以解析`markdown`语法的`anki`模板。cdn引入(使用的字节的公共库,根据自己的网络情况替换),无需任何本地媒体文件。 # 可以解析`markdown`语法的`anki`卡片模板。
> cdn 引入所需资源(使用的字节的公共库,根据自己的网络情况替换),无需任何本地媒体文件。
> 跟着复制代码就完事了 , 或者直接导入现成的牌组获取
👇 这个是具体操作步骤。只看这里的操作步骤就好 卡片模板代码已 GitHub 上为准(是最新的)。 👇 这个是具体操作步骤。只看这里的操作步骤就好 卡片模板代码已 GitHub 上为准(是最新的)。
`https://www.jianshu.com/p/57b84a7a3c75` `https://www.jianshu.com/p/57b84a7a3c75` <a href="https://www.jianshu.com/p/57b84a7a3c75" target="_blank">跳转\_blank</a>
👇 目前的功能(有什么改进可以在 issue 里提 有能力可以自行修改提 pr
👇目前的功能有什么改进可以在issue里提
- [x] 代码自动高亮 - [x] 代码自动高亮
- [x] 全部样式风格采用`github-markdown-css` css 样式文件修改成自动识别系统主题(是否是暗黑模式) 以前的版本可以修改一下 cdn 地址 - [x] 全部样式风格采用`github-markdown-css` css 样式文件修改成自动识别系统主题(是否是暗黑模式) 以前的版本可以修改一下 cdn 地址
@ -18,23 +22,23 @@
- [x] 已经更新支持 自动识别系统主题 自动切换 md 渲染卡片的白天或者夜间模式 - [x] 已经更新支持 自动识别系统主题 自动切换 md 渲染卡片的白天或者夜间模式
* 关于图片现在的我的两种处理方式 - [x] 图片直接截图或者保存 cv 就行
1. 第一个我就是直接用qq截图然后`ctrl v`进去,anki会自动帮我们创建一个`<img />`导入 可以和我们的md解析共存
2. 第二个就是用markdown的语法`![]()`来用base64加密保存图片,(因为链接会被anki自动识别导入)
**对于图片我的最终方案是 直接使用qq截图或者下载的图片直接复制进去,原因是图片使用base64太长了严重干扰笔记的编辑**
****** - [x] pr 提了个 html 字符反转义合上去了 不需要可以自行去掉
---
**缺陷** **缺陷**
1.~~代码段中输入的空格会被 markdown 转义 直接输出 nbsp;~~ (修复) 1.~~代码段中输入的空格会被 markdown 转义 直接输出 nbsp;~~ (修复)
***** ---
**cdn 仓库(~~慢的可以自己换成国内的 cdn 仓库~~换成字节的 cdn 库了国内速度挺快)** **cdn 仓库(~~慢的可以自己换成国内的 cdn 仓库~~换成字节的 cdn 库了国内速度挺快)**
> 如果不生效了 可能是网络的问题,因为是采用cdn的形式 加载script标签 不是本地的形式 ****
> 可以反复刷新 或者 切换网络尝试修复一下
#### 如果样式或者解析失效
可能是网络的问题,因为是采用 cdn 加载资源 不是本地
可以反复刷新 或者 切换网络尝试修复一下
或者把梯子关了(或者自己设置规则) 因为默认用的是字节的cdn库

Binary file not shown.

View File

@ -17,7 +17,6 @@
} }
} }
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document /* Document
@ -200,7 +199,8 @@ textarea {
*/ */
button, button,
input { /* 1 */ input {
/* 1 */
overflow: visible; overflow: visible;
} }
@ -210,7 +210,8 @@ input { /* 1 */
*/ */
button, button,
select { /* 1 */ select {
/* 1 */
text-transform: none; text-transform: none;
} }
@ -219,9 +220,9 @@ select { /* 1 */
*/ */
button, button,
[type="button"], [type='button'],
[type="reset"], [type='reset'],
[type="submit"] { [type='submit'] {
-webkit-appearance: button; -webkit-appearance: button;
} }
@ -230,9 +231,9 @@ button,
*/ */
button::-moz-focus-inner, button::-moz-focus-inner,
[type="button"]::-moz-focus-inner, [type='button']::-moz-focus-inner,
[type="reset"]::-moz-focus-inner, [type='reset']::-moz-focus-inner,
[type="submit"]::-moz-focus-inner { [type='submit']::-moz-focus-inner {
border-style: none; border-style: none;
padding: 0; padding: 0;
} }
@ -242,9 +243,9 @@ button::-moz-focus-inner,
*/ */
button:-moz-focusring, button:-moz-focusring,
[type="button"]:-moz-focusring, [type='button']:-moz-focusring,
[type="reset"]:-moz-focusring, [type='reset']:-moz-focusring,
[type="submit"]:-moz-focusring { [type='submit']:-moz-focusring {
outline: 1px dotted ButtonText; outline: 1px dotted ButtonText;
} }
@ -293,8 +294,8 @@ textarea {
* 2. Remove the padding in IE 10. * 2. Remove the padding in IE 10.
*/ */
[type="checkbox"], [type='checkbox'],
[type="radio"] { [type='radio'] {
box-sizing: border-box; /* 1 */ box-sizing: border-box; /* 1 */
padding: 0; /* 2 */ padding: 0; /* 2 */
} }
@ -303,8 +304,8 @@ textarea {
* Correct the cursor style of increment and decrement buttons in Chrome. * Correct the cursor style of increment and decrement buttons in Chrome.
*/ */
[type="number"]::-webkit-inner-spin-button, [type='number']::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button { [type='number']::-webkit-outer-spin-button {
height: auto; height: auto;
} }
@ -313,7 +314,7 @@ textarea {
* 2. Correct the outline style in Safari. * 2. Correct the outline style in Safari.
*/ */
[type="search"] { [type='search'] {
-webkit-appearance: textfield; /* 1 */ -webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */ outline-offset: -2px; /* 2 */
} }
@ -322,7 +323,7 @@ textarea {
* Remove the inner padding in Chrome and Safari on macOS. * Remove the inner padding in Chrome and Safari on macOS.
*/ */
[type="search"]::-webkit-search-decoration { [type='search']::-webkit-search-decoration {
-webkit-appearance: none; -webkit-appearance: none;
} }