Typora系列之自定義主題


Custom Themes(自定義主題)

Change Themes(更換主題)

Typora has 5~6 built-in themes. Changing writing theme can be done by selecting theme under the theme menu bar. You could also download, install, modify or write your own custom theme to stylize Typora.

Typora有5-6個內置主題。可通過選擇theme菜單欄下的主題來更換書寫主題。你也能在Typora官網下載、安裝主題,或對主題進行修改,或編寫你自己的主題去裝飾Typora。

Typora use CSS to stylish all contents, each theme under theme menu is one .css files under "typora's theme folder". So, briefly speaking, you could add/modify themes by adding/modifying correspond css files under "typora's theme folder".

Typora使用CSS修飾所有內容的樣式,每個主題都是主題菜單欄下的一個.css文件,這些文件在Typora的'theme'文件夾下。所以,明確地說,你能通過添加/修改typora主題文件夾下的相應的css文件來添加/修改主題。

Get Typora Themes(獲取Typora主題)

We have an office website Typora Theme Gallery for designers/developers to share their custom themes with others. You could download theme from there.

我們有一個官網Typora Theme Gallery 讓設計者/開發者去分享他們的自定義主題。你能從這里下載主題。

Install Custom Themes(安裝自定義主題)

  1. Open Theme Folder. (see instructions below)
    打開主題文件夾。(參考下方教程)
  2. Copy or move .css file and related resources, like fonts or images, into the newly opened folder.
    復制或移動.css文件和相關資源(例如字體或圖片)到之前打開的文件夾(指主題文件夾)內。
  3. Restart typora, then select it from Themes menu.
    重啟typora,然后從Theme菜單中選擇該主題。

Open Theme Folder(打開主題文件夾)

macOS

Open preference panel by cmd+`, then click "Open Theme Folder"

通過cmd+打開偏好設置(preference)面板,然后點擊打開主題文件夾

Windows/Linux

Open preference panel from FilePreference from menubar, then click "Open Theme Folder":

從菜單欄的文件偏好設置打開偏好面板,然后點擊“打開主題文件夾”:

Modify Current Styles(修改當前樣式)

Sometimes, you may just want to change font family for all themes, for change font-color for headings for a specific themes. In this case, you do not need to copy/modify a whole exiting css file, just Add Custom CSS is enough. In brief:

有時,你可能只想為所有主題更改字體系列,為某特定主題的標題更改字體顏色。若是這樣,你無需復制/修改一整份已存在的css文件,僅需添加自定義 CSS就夠了。簡言之:

  • Create & write a base.user.css under theme folder, the css rules inside it will be applied to all themes.

    在主題文件夾下,創建&編寫一份名為base.user.css的css文件,該文件中的css規則將被應用到所有主題中。

  • Create & write a {theme-css-name}.user.css under theme folder, the css rules inside it will only be applied to theme file {theme-css-name}.css.
    在主題文件夾下,創建&編寫一份名為{theme-css-name}.user.css的css文件,該文件中的css規則將只被應用到{theme-css-name}.css主題文件中。

Please note that the built-in CSS theme files will get overwritten completely on typora version up, so, write your custom css into *.user.css, instead of the existing files, will prevent your modifications from being lost after update.

請注意:內置CSS主題文件將隨着typora版本更新而被重寫,因此,在*.user.css文件內編寫自定義CSS,替代在已存在的文件內編寫,可避免在軟件更新后你的修改丟失的問題。

Write My Own Theme(編寫你自己的主題)

Please refer to Write Custom Theme for Typora.

請參考 Write Custom Theme for Typora.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM