Comments (4)
@czhiling 你好,我看了下LostKeys
的主题,它1
到3
级标题前面显示的其实是标题的级别,我也大概实现了一下,但是这种个性化的需求,我就不会提交代码了。我告诉你直接在哪里改吧。
你可以在vue.css
文件里面第391
行之后的空白处插入如下的css
代码(你也可以根据自己的需求修改下面的css
样式),重启Typora
或者切换主题,即可看到效果,css
代码如下:
h1::before {
content: '#1';
margin-top: 0.6rem;
}
h2::before {
content: '#2';
margin-top: 0.4rem;
}
h3::before {
content: '#3';
margin-top: 0.1rem;
}
h1::before,
h2::before,
h3::before {
color: #42B983;
position: absolute;
left: -2.1rem;
font-weight: 400;
font-size: 1.2rem;
}
显示效果如下:
from typora-vue-theme.
非常感谢!
我刚刚发现LostKeys Dark和LostKeys实现的不一样。你上面说的是LostKeys Dark的方法。
如何实现附件图(lostKeys)中这一种呢?
from typora-vue-theme.
@czhiling 我看和尝试了LostKeys
的主题,其中也没有你所提的显示章节的功能吧,不过我还是实现了你的功能,改动代码稍微有些多,我提交push
到了heading
分支中,你下载这个分支的代码,将vue.css
文件覆盖替换即可。
我参照Word
文档中的方式来做的,H1
标题是整个文档的主标题,是没有章节信息的,从H2
标题开始才是文章的第一节,H3
标题是文章的第二节,H4
标题是文章的第三节。显示效果如下:
from typora-vue-theme.
非常感谢!可能是LostKey现在更新了,我还是过去的版本。我试了,就是希望的效果!
from typora-vue-theme.
Related Issues (20)
- invalid Issues
- 黑暗模式下表格会出现滚动条
- 默认的dark白色字体非常刺眼 HOT 1
- 专注模式下颜色逻辑貌似反了
- 如何让代码块中的代码字体不加粗 HOT 5
- 引用块颜色提示 HOT 2
- 任务列表的样式不对 HOT 5
- mermaid处于编辑状态时,下方文本内容上移 HOT 1
- vue-dark中的偏好设置文字颜色过于灰暗,无法与背景区分,导致看不清字。 HOT 1
- 有序列表样式似乎有问题,有时候不显示 HOT 23
- 关于标题的小建议 HOT 1
- 请教一下,如何拉宽文章显示的比例?谢谢 HOT 2
- vue的代码快的样式是这样的,请教一下,怎么修改成这样的样式? HOT 5
- 超链接没有下划线 HOT 1
- [Feature Request] [Typora Windows] Dark theme for the menu
- 建议作者可以做一下图片的个性化适配设置
- 请问如何修改正文字体大小
- 某些时候,有序列表标号展示有问题
- 暗色主题导出PDF时代码块字体有问题
- 加粗字体和六级标题样式区分不开
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typora-vue-theme.