Giter Site home page Giter Site logo

Comments (4)

blinkfox avatar blinkfox commented on July 30, 2024

@czhiling 你好,我看了下LostKeys的主题,它13级标题前面显示的其实是标题的级别,我也大概实现了一下,但是这种个性化的需求,我就不会提交代码了。我告诉你直接在哪里改吧。

你可以在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;
}

显示效果如下:

Typora Heading Style

from typora-vue-theme.

czhiling avatar czhiling commented on July 30, 2024

非常感谢!

我刚刚发现LostKeys Dark和LostKeys实现的不一样。你上面说的是LostKeys Dark的方法。

image

如何实现附件图(lostKeys)中这一种呢?

from typora-vue-theme.

blinkfox avatar blinkfox commented on July 30, 2024

@czhiling 我看和尝试了LostKeys的主题,其中也没有你所提的显示章节的功能吧,不过我还是实现了你的功能,改动代码稍微有些多,我提交push到了heading分支中,你下载这个分支的代码,将vue.css文件覆盖替换即可。

我参照Word文档中的方式来做的,H1标题是整个文档的主标题,是没有章节信息的,从H2标题开始才是文章的第一节,H3标题是文章的第二节,H4标题是文章的第三节。显示效果如下:

Heading效果

from typora-vue-theme.

czhiling avatar czhiling commented on July 30, 2024

非常感谢!可能是LostKey现在更新了,我还是过去的版本。我试了,就是希望的效果!

image

from typora-vue-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.