Coder Social home page Coder Social logo

tyopratheme-githubbaseczc's Introduction

(1) TyopraTheme-GithubBaseCZC

这是基于Typora自带的Github主题修改得到的个人制定化主题!   

(2) 主要修改步骤

找到 typora 安装路径:C:\Users\...\Typora\themes

然后复制czc-github-base,放入文件夹中,

再找C:\Program Files\Typora\resources\appsrc\window目录,进入这个目录,

为了方便恢复,我们新建一个frame backup文件夹用于备份,

复制原本的frame.js文件放入备份,为了方便软件配合everthing搜索,

进入frame backup文件夹,新建空文本,取名 Typora Frame Marker.txt

返回C:\Program Files\Typora\resources\appsrc\window 目录,

使用当前项目给定的frame.js文件替换项目原本的frame.js文件

     

(3) 代码修改细节

实时渲染部分的代码

case o.blockquote:
if (f(this).indexOf("【警告】") != -1){
    return "<blockquote " + p(this) + " class='blockquote-jinggao' >"
        + f(this) + "</blockquote>";
} else if (f(this).indexOf("【说明】") != -1) {
    return "<blockquote " + p(this) + " class='blockquote-tuijian' >"
        + f(this) + "</blockquote>";
} else if (f(this).indexOf("【注意】") != -1) {
    return "<blockquote " + p(this) + " class='blockquote-weixian' >"
        + f(this) + "</blockquote>";
} else {
    return "<blockquote " + p(this) + " >" +
        f(this) + "</blockquote>";
}

导出文件部分的代码

case a.blockquote:
if (T(e, n).indexOf("【警告】") != -1) {
    return "<blockquote class='blockquote-jinggao'>"
        + T(e, n) + "</blockquote>";
} else if (T(e, n).indexOf("【说明】") != -1) {
    return "<blockquote class='blockquote-tuijian'>"
        + T(e, n) + "</blockquote>";
} else if (T(e, n).indexOf("【注意】") != -1) {
    return "<blockquote class='blockquote-weixian'>"
        + T(e, n) + "</blockquote>";
} else {
    return "<blockquote class='test'>"
        + T(e, n) + "</blockquote>";
}

前置图标部分的代码

case o.paragraph:
if (f(this).indexOf("【警告】") != -1) {
    return "<p " + p(this)
        + " class='md-end-block md-p'>"
        + "<span data-emoji=\"⚡\" class=\"md-emoji-span\"></span>"
        + f(this) + "</p>";
} else if (f(this).indexOf("【说明】") != -1) {
    return "<p "
        + p(this) + " class='md-end-block md-p'>"
        + "<span data-emoji=\"🔎\" class=\"md-emoji-span\"></span>"
        + f(this) + "</p>";
} else if (f(this).indexOf("【注意】") != -1) {
    return "<p "
        + p(this) + " class='md-end-block md-p'>"
        + "<span data-emoji=\"👻\" class=\"md-emoji-span\"></span>"
        + f(this) + "</p>";
} else {
    return "<p "
        + p(this) + " class='md-end-block md-p'>"
        + f(this) + "</p>";
}

    

(4) 老版本Typora下载链接

链接:https://pan.baidu.com/s/1gdQrCpGA1_217tdtzZsAdg 提取码:845s

tyopratheme-githubbaseczc's People

Contributors

volmodaoist avatar

Watchers

 avatar

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.