Coder Social home page Coder Social logo

unickcheng / logseq-developer-theme Goto Github PK

View Code? Open in Web Editor NEW
39.0 1.0 3.0 4.19 MB

A more developer-friendly minimalist theme. For more theme styles see: https://github.com/logseq/awesome-logseq

Home Page: https://docs.unickcheng.cc/#/page/logseq-developer-theme

License: MIT License

SCSS 100.00%
logseq logseq-themes scss

logseq-developer-theme's Introduction

logseq-developer-theme

Release download release logseq-dev-theme logseq

UPDATE 2023-05-31

Many users have reported that the bullet lines are misaligned. Here is a solution: configure the following code in logseq/custom.css. For more details, please refer to logseq-dev-theme#95.

.ls-block[haschild] > div > .block-content-wrapper::before {
    /* Adjust the variable value of "left", such as -21px. */
    left: -21px;
}

.ls-block > div > div.items-center::before {
    /* Adjust the variable value of "right", such as 10px. */
    right: 10px !important;
}


中文版

logseq-developer-theme is a secondary development of the logseq-dev-theme theme as an upstream, and you can easily see the @import reference in main.scss . You can clearly compare the differences between logseq-dev-theme and logseq-developer-theme via respective website 1 2, for more information see this article.

logseq-developer-theme will not be made into logseq-dev-theme 2.0, just because logseq-dev-theme allows me to focus more on the desired css style, therefore, this project is not a fork, but a reference via @import.

For the record, I don't have any experience in front-end development, but the best method to start learning is with a project. Although scss is not very complicated, the code I wrote was really ugly. So I will keep improving the code and you can also remind me at issues or pull request.

✨Features

  • enhance code block style , especially color
  • support some tags highlighting, such as #docs, #bug, #feat, etc
  • adapt Chinese font style
  • support user-defined theme colors
  • support download in plugin marketplace #297
  • supports use in offline mode
  • supports custom pdf color

🎉Usage

Quick Start

Using the jsDelivr CDN to get theme styles , simply add the following code to your custom.css.

@import url("https://cdn.jsdelivr.net/gh/unickcheng/logseq-developer-theme@release/custom.css");

⚠️ Please note that the jsDelivr CDN provides a faster service, but may not be able to refresh the latest version in time 3

Download from Plugin Marketplace(Recommend)

If you can't download it from the plugin marketplace, you can download it from GitHub Release , unzip it, and then import it into logseq

📌 Starting with version 1.0.0, GitHub Release or Plugin Marketplace downloads are supported for offline use. Because it will download fonts and other dependencies together to the local ~/.logseq/plugins directory.

Demo(may be outdated)

Custom theme styles

Starting with version 0.4.0, you can also customize the theme colors 😎

@import url("https://cdn.jsdelivr.net/gh/unickcheng/logseq-developer-theme@release/custom.css");

.dark-theme,
html[data-theme=dark] {
    --ls-custom-theme-color: #6096BA;
    --ls-primary-background-color: #272C35;
    --ls-secondary-background-color: #313942;

    --ls-code-color: #fff;
    --ls-code-language-color: gray;
    --ls-code-background-color: #34343c;
    --ls-code-selected-background-color: #32445A;

    --ls-bullet-threading-background-color: #34343c;
    --ls-task-done-text-color: gray;
}

@import url("https://cdn.jsdelivr.net/gh/unickcheng/logseq-developer-theme@release/custom.css");
.white-theme,
html[data-theme=light] {
    --ls-custom-theme-color: rgb(224, 80, 27);
    --ls-primary-background-color: #ffC017;
    --ls-secondary-background-color: #ffcf4d;

    --ls-code-color: gray;
    --ls-code-language-color: gray;
    --ls-code-background-color: #fff;
    --ls-code-selected-background-color: #C0E6FD;

    --ls-bullet-threading-background-color: #ffcf4d;
    --ls-task-done-text-color: gray;
}

For more custom colors see custom-color

Label enhancement

Considering factors such as possible conflicts with your original text and multiple tags affecting the readability of the content, only a few of the tags in the above image are currently set to be enhanced. If you need, you can set them in custom.css, see #4

🚀 Local development

step 1 > Verify the local environment

node -v
npm -v
git -v

step 2 > Install dependencies

# > step 1 download source code
git clone https://github.com/UNICKCHENG/logseq-developer-theme.git
cd logseq-developer-theme
# > step 2 installing dependencies
npm install

step 3 > Modify package.json

  • please modify value of localPath to the address of your logseq graph documentation
{
	...
    "config": {
        "localPath": "C:\\Users\\hi\\LocalStation\\BLOG\\docs"
    },
	...
}

⚠️ The purpose here is to make it easier to compile the SCSS output directly to ../logseq/custom.css

step 4 > Running

# windows
npm run dev:win

# Mac or Linux
npm run dev

✍️Changelog

You can see more information at logseq-developer-theme

💖 Credits

Footnotes

  1. https://pengx17.github.io/knowledge-garden/

  2. https://docs.unickcheng.cc

  3. https://blog.juanertu.com/archives/cbcd1946

logseq-developer-theme's People

Contributors

dependabot[bot] avatar unickcheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

logseq-developer-theme's Issues

建議加上 inline code block 的顏色

Inline code block 像這樣 目前文字並沒有任何高亮,因此很難一眼看出它是 code block,希望可以針對它加上文字及/或背景的高亮。

Compare to dev theme

Hiey there!
What are the differences between this version and dev theme?
Also please adf screenshots to the readme to make it easier for users to discover your theme

fix: ios border-radious Invalid

  • release version: latest
  • os: ios

I've tried adding the following code to _code.scss, but it still doesn't seem to work on iphone and ipad

@mixin bordeRadius() {
    -webkit-border-radius: 10px !important; // Safari 3-4, iOS 1-3.2, Android 1.6-
    -moz-border-radius: 10px !important;    // Firefox 1-3.6 
    -khtml-border-radius: 10px !important;  // Konqueror
    border-radius: 10px !important;         // Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+
}

.CodeMirror, 
.CodeMirror-scroll .CodeMirror-sizer ,
.CodeMirror-code .CodeMirror-linenumber {
    font-family: var(--ct-code-font-family);
    box-shadow: none;
    text-shadow: none !important;
    @include bordeRadius();
}

// 背景样式
.CodeMirror-scroll .CodeMirror-sizer,
.cm-s-solarized.cm-s-dark {
    background: var(--ls-code-background-color) !important;
    color: var(--ls-code-color) !important;
    @include bordeRadius();
    }
//  序号样式
.CodeMirror, .CodeMirror-scroll .CodeMirror-gutters,
.CodeMirror-code .CodeMirror-linenumber,
.cm-s-solarized.cm-s-dark .CodeMirror-gutters {
    color: var(--ls-third-theme-color) ;
    background: var(--ls-code-background-color) !important;
    @include bordeRadius();
}

Extra attempts: it seems that many people have mentioned overflow: hidden, but this brings me to a new problem with some div being hidden

Screenshots

4109E3C1-EC4D-4363-8C86-A2E839E2B59D

fix: pdf style is not working

version

  • logseq: 0.9.2
  • logseq-developer-theme: 1.2.5

image
image

TODO

  • Fix the pdf style that fails in logseq v0.9.2
  • Optimization of separate windows for pdf

非常棒的主题,请问暗色模式和亮色模式某些样式不统一是BUG吗?

我在 custom.css 设置了字体和大小

body {
 --ls-font-family: 'PingFang','Roboto','fira sans', 'segoe UI Emoji', 'sarasa ui sc', sans-serif !important;
  font-size:.9em;
}

但是好像在暗色模式和暗色模式下有些样式不统一,如图:
image
image

  • 亮色模式下的标题依然是主题默认的中文字体,但暗色模式下就是自己设置的字体
  • 亮色模式下的 admontionblock 样式和暗色模式不同
  • 亮色模式下代码块有圆角,暗色模式下没有(但readme.md的演示图中的暗色模式有圆角)
    请问这些都需要自己手动调整css吗?

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.