Skip to content

Commit

Permalink
增加可选性、增加文件夹配色
Browse files Browse the repository at this point in the history
  • Loading branch information
chenbihao committed Oct 13, 2024
1 parent e1586df commit b3f9774
Show file tree
Hide file tree
Showing 6 changed files with 712 additions and 156 deletions.
318 changes: 318 additions & 0 deletions Dark Clarity Theme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,318 @@
#教程 #obsidian #theme

# h1 Heading 标题
## h2 Heading 标题
### h3 Heading 标题
#### h4 Heading 标题
##### h5 Heading 标题
###### h6 Heading 标题

这是 ==高亮== **加粗** 文本



使用 [煮豆黑体](https://github.com/Buernia/Zhudou-Sans) 并且开启 蝌蚪形逗号(ss02),~~balabala 划掉~~

↓ 开启 ss02 避免无法辨别 :“中文‘单双’引号”。
![](images/无法识别.png)

↓ 添加图片边框避免无法识别图片边界
![Minion|50](https://octodex.github.com/images/minion.png)



**副配色**

#教程 #obsidian #theme

Blockquotes 区块引用:

> Blockquotes 去掉斜体,使字体更加清晰易辨识
>
>> ...by usin
> > > ...or with spaces between arrows...
[欢迎](欢迎.md) [[未创建]] [链接文本](https://github.com/chenbihao/) https://github.com/chenbihao/










## Images 图像

![Minion|50](https://octodex.github.com/images/minion.png)
![Stormtroopocat|50](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")



![[styleSetting.png]]
## query

```query
Inline
```
## Code 代码

### Inline 内联

`code code code`

### Indented code 缩进代码

// Some comments
line 1 of code
line 2 of code
line 3 of code

### Block code

```
Sample text here...
```

**jetbrains IDE** 相关配送示例(截取片段):

### java

```java
/* Block comment */
import java.util.Date;
import static AnInterface.CONSTANT;

/**
* Doc comment here for <code>SomeClass</code>
* @param T type parameter
*/
@Annotation (name=value)
public class SomeClass<T extends Runnable> { // some comment
private T field = null;
private double unusedField = 12345.67890;
private UnknownType anotherString = "Another\nStrin\g";
public static int staticField = 0;
protected final int protectedField = 0;
final int packagePrivateField = 0;

/**
* Semantic highlighting:
* Color#1 SC1.1 SC1.2 SC1.3 SC1.4 Color#2 SC2.1 SC2.2 SC2.3 SC2.4 Color#3
* @param param1
*/
public SomeClass(AnInterface param1,
int param2,
int param3) {
int reassignedValue = this.staticField + param2 + param3;
long localVar1, localVar2, localVar3, localVar4;
reassignedValue ++;
field.run();
new SomeClass() {
{
int a = localVar;
}
};
}
}
enum AnEnum { CONST1, CONST2 }
interface AnInterface {
int CONSTANT = 2;
void method();
}
abstract class SomeAbstractClass {
protected int instanceField = staticField;
}
```

### go

```go
/*
* Go highlight sample
*/
//go:build (linux || windows) && arm
// +build linux,arm windows,arm

// Package main
package main

import "fmt"
import alias "fmt"

//go:generate go tool yacc -o gopher.go -p parser gopher.y

/*
Semantic highlighting:
*/
type (
PublicInterface interface {
PublicFunc() int
privateFunc() int
}
demoInt int
T struct {
FirstName string `json:"first_name" arbitrary text`
}
)

const (
PublicConst = 1
privateConst = 2
)

func variableFunc(demo1 int, demo2 demoInt) {
demo1 = 3
a := PublicStruct{}
a.PublicFunc()
if demo1, demo2 := privateFunc(); demo1 != 3 {
_ = demo1
return
}
f := func() int {
return 1
}
variableFunc(1, 2)
println("builtin function")
}
func main() {
const LocalConst = 1
fmt.Println("demo\n\xA")
alias.Println("demo")
variableFunc(1, 2)
var d, c *int = nil, nil
}
```

### sql

```sql
-- DDL section
create table crm.product (
id numeric primary key,
title varchar(255) character set utf8
);
-- DML section
insert into product
values (1, 'Product1');

select count(*) from crm.product;
select id as ProductID, title as ProductName
from crm.product where id = :id;

\set content `cat data.txt`
```

### xml

```xml
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE index>
<!-- Some xml example -->
<index version="1.0" xmlns:pf="http://test">
<name>Main Index</name>
<indexitem text="rename" target="refactoring.rename"/>
<indexitem text="move" target="refactoring.move"/>
<indexitem text="migrate" target="refactoring.migrate"/>
<indexitem text="usage search" target="find.findUsages"/>
<indexitem>Matched tag name</indexitem>
<someTextWithEntityRefs>&amp; &#x00B7;</someTextWithEntityRefs>
<withCData><![CDATA[
<object class="MyClass" key="constant">
</object>
]]>
</withCData>
<indexitem text="project" target="project.management"/>
<custom-tag>hello</custom-tag>
<pf:foo pf:bar="bar"/>
</index>
```

### json

```json
{
// Line comments are not included in standard but nonetheless allowed.
/* As well as block comments. */
"the only keywords are": [true, false, null],
"strings with": {
"no escapes": "pseudopolinomiality"
"valid escapes": "C-style\r\n and unicode\u0021",
"illegal escapes": "\0377\x\"
},
"some numbers": [
42,
-0.0e-0,
6.626e-34
]
}
```

### http

```http
@variable_name = 123 variable value 456\u2026
###
# Line comments started with hash symbol are allowed
// As well as comments started with two slashes
POST http://127.0.0.1:8080/add-value
Content-Type: application/json
{
"name-key": "new-name",
"content-key": "content"
}
### First separator's content is treaded as request name
### Other request separators can contain comments
POST http://{{host}}:8080/update-value?id={{item-id}} HTTP/2
Content-Type: application/json
X-Request-Id: {{$random.integer(10, 1000)}}
< ./input-file.json
```



##








































29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# README

## Dark Clarity Theme

**Dark Clarity**,一款 obsidian 的主题。
Expand All @@ -6,9 +8,14 @@

主要以 **高辨识度**、且 h1~h6 标题 **有主题色** 为主。

[Dark Moss](https://github.com/sergey900553/obsidian_githublike_theme) 部分内容为基底进行调整,并**兼容浅色**模式。
[Dark Moss](https://github.com/sergey900553/obsidian_githublike_theme) 部分内容为基底进行调整,并且进行了多处优化:

- 多款配色选择
- 浅色模式时的配色
- 优化辨识度(粗体明显、图片边框、引用块去斜体)
- 更多可选的优化功能

支持 Style Setting 插件,可自主选择 `主题配色``副配色``代码配色`
### 相关配置

#### 多款主题配色

Expand All @@ -25,13 +32,19 @@

#### 代码配色

- jetbrains dark 同款配色(idea、goland)
- jetbrains 同款配色(IDEA/GoLand)

#### 可选优化功能

- 左边栏横向滚动
- 左边栏文件夹配色

## 展示

### 支持 Style Setting 配置

可选空,则主题不生效
**更多配置详见应用内 Style Setting 配置**


![](images/styleSetting.png)

Expand All @@ -45,6 +58,10 @@

![](images/左边栏滚动.gif)

### 左边栏文件夹配色(可选)

![](images/左边栏文件夹配色.png)

## 主题配色

### 主配色
Expand Down Expand Up @@ -119,3 +136,7 @@
不安装影响不大,煮豆黑体是为了兼容蝌蚪符号,详见下图的符号:

![基于darkMoss调整](images/基于darkMoss调整.png)

### 希望加入配色

提 issue,并把对应的 H1~H6 的颜色代码贴上来哦~ 如果配色优秀将添加进主题中~
Binary file modified images/styleSetting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/左边栏文件夹配色.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Dark Clarity",
"author": "chenbihao",
"authorUrl": "https://github.com/chenbihao",
"version": "1.0.3",
"version": "1.0.4",
"repo": "chenbihao/obsidian-theme-dark-clarity",
"screenshot": "screenshot.png",
"modes": ["dark", "light"]
Expand Down
Loading

0 comments on commit b3f9774

Please sign in to comment.