Erimus-Koo / theme_typora_docsify

A theme that present SAME STYLE in Typora and Docsify.
47 stars 5 forks source link

感谢作者提供这个主题,有两个问题请教您 #4

Open QiHsMing opened 2 years ago

QiHsMing commented 2 years ago

您好,我在docsify用您的主题时遇到两个问题: 1.我觉得正文的宽度比较窄, 请问怎么更改正文的宽度? 2.关于代码块高亮,好像对C/C++、python代码块 不太支持,其他html、CSS代码块支持的挺不错的,请问关于这个问题有什么更好的方法支持呢?

QiHsMing commented 2 years ago

image 关于代码块高亮我已经找到方法了。

https://www.wenjiangs.com/doc/docsifyjs-language-highlight

Erimus-Koo commented 2 years ago

你搜一个max-width的地方,值是40em还是多少来着。em可以认为是一个近似中文字宽的值,你改成自己想要的就好了。

Erimus-Koo commented 2 years ago

设计上限制宽度是一个排版的惯例,比较容易找到下一行的行首,也能一定程度避免写出中文长句。

QiHsMing commented 2 years ago

好的,感谢大佬👍

zhoumiCode commented 2 years ago

@Erimus-Koo 感谢提供这个主题非常的ok image 有办法去掉这个0.0.1这个几级标题提示吗? 本人比较习惯用H4,但是0.0.1看起来就不太舒服

zhoumiCode commented 2 years ago

我关闭这些就达到了我想要的效果,不知是否正确。

`

write h2::before,

.markdown-section h2::before { counter-increment: h2; content: counter(h2) "."; }

write h3::before,

.markdown-section h3::before { counter-increment: h3; content: counter(h2) "." counter(h3); }

write h4::before,

.markdown-section h4::before { counter-increment: h4; content: counter(h2) "." counter(h3) "." counter(h4); }

write h5::before,

.markdown-section h5::before { counter-increment: h5; content: none; }

write h6::before,

.markdown-section h6::before { counter-increment: h6; content: none; } `

Erimus-Koo commented 2 years ago

我关闭这些就达到了我想要的效果,不知是否正确。

#write h2::before, .markdown-section h2::before { counter-increment: h2; content: counter(h2) "."; } #write h3::before, .markdown-section h3::before { counter-increment: h3; content: counter(h2) "." counter(h3); } #write h4::before, .markdown-section h4::before { counter-increment: h4; content: counter(h2) "." counter(h3) "." counter(h4); } #write h5::before, .markdown-section h5::before { counter-increment: h5; content: none; } #write h6::before, .markdown-section h6::before { counter-increment: h6; content: none; }

差不多找到有h4的地方,把它后面大括号里的删一下就行了。

content: counter(h2) "." counter(h3) "." counter(h4);

另外我以前也是跳级用标题的,后来改了。因为不少平台有跟据标题生成大纲的功能,跳级可能有问题。

最近用obsidian,也有插件linter自动防跳级。