Skip to content

Commit a6ab459

Browse files
SilverRainZDeepSeek
andcommitted
feat(styles): add nord theme
Co-authored-by: DeepSeek <service@deepseek.com>
1 parent 600b93a commit a6ab459

3 files changed

Lines changed: 408 additions & 0 deletions

File tree

styles/nord.go

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
package styles
2+
3+
import "charm.land/glamour/v2/ansi"
4+
5+
// NordStyleConfig is the nord style.
6+
var NordStyleConfig = ansi.StyleConfig{
7+
Document: ansi.StyleBlock{
8+
StylePrimitive: ansi.StylePrimitive{
9+
BlockPrefix: "\n",
10+
BlockSuffix: "\n",
11+
Color: stringPtr("#d8dee9"),
12+
},
13+
Margin: uintPtr(defaultMargin),
14+
},
15+
BlockQuote: ansi.StyleBlock{
16+
StylePrimitive: ansi.StylePrimitive{
17+
Color: stringPtr("#4c566a"),
18+
},
19+
Indent: uintPtr(1),
20+
IndentToken: stringPtr("│ "),
21+
},
22+
List: ansi.StyleList{
23+
StyleBlock: ansi.StyleBlock{
24+
StylePrimitive: ansi.StylePrimitive{
25+
Color: stringPtr("#d8dee9"),
26+
},
27+
},
28+
LevelIndent: defaultListIndent,
29+
},
30+
Heading: ansi.StyleBlock{
31+
StylePrimitive: ansi.StylePrimitive{
32+
BlockSuffix: "\n",
33+
Color: stringPtr("#88c0d0"),
34+
Bold: boolPtr(true),
35+
},
36+
},
37+
H1: ansi.StyleBlock{
38+
StylePrimitive: ansi.StylePrimitive{
39+
Prefix: "# ",
40+
},
41+
},
42+
H2: ansi.StyleBlock{
43+
StylePrimitive: ansi.StylePrimitive{
44+
Prefix: "## ",
45+
},
46+
},
47+
H3: ansi.StyleBlock{
48+
StylePrimitive: ansi.StylePrimitive{
49+
Prefix: "### ",
50+
},
51+
},
52+
H4: ansi.StyleBlock{
53+
StylePrimitive: ansi.StylePrimitive{
54+
Prefix: "#### ",
55+
},
56+
},
57+
H5: ansi.StyleBlock{
58+
StylePrimitive: ansi.StylePrimitive{
59+
Prefix: "##### ",
60+
},
61+
},
62+
H6: ansi.StyleBlock{
63+
StylePrimitive: ansi.StylePrimitive{
64+
Prefix: "###### ",
65+
},
66+
},
67+
Strikethrough: ansi.StylePrimitive{
68+
CrossedOut: boolPtr(true),
69+
},
70+
Emph: ansi.StylePrimitive{
71+
Color: stringPtr("#d08770"),
72+
Italic: boolPtr(true),
73+
},
74+
Strong: ansi.StylePrimitive{
75+
Color: stringPtr("#ebcb8b"),
76+
Bold: boolPtr(true),
77+
},
78+
HorizontalRule: ansi.StylePrimitive{
79+
Color: stringPtr("#4c566a"),
80+
Format: "\n--------\n",
81+
},
82+
Item: ansi.StylePrimitive{
83+
BlockPrefix: "• ",
84+
Color: stringPtr("#88c0d0"),
85+
},
86+
Enumeration: ansi.StylePrimitive{
87+
BlockPrefix: ". ",
88+
Color: stringPtr("#8fbcbb"),
89+
},
90+
Task: ansi.StyleTask{
91+
StylePrimitive: ansi.StylePrimitive{},
92+
Ticked: "[✓] ",
93+
Unticked: "[ ] ",
94+
},
95+
Link: ansi.StylePrimitive{
96+
Color: stringPtr("#81a1c1"),
97+
Underline: boolPtr(true),
98+
},
99+
LinkText: ansi.StylePrimitive{
100+
Color: stringPtr("#8fbcbb"),
101+
},
102+
Image: ansi.StylePrimitive{
103+
Color: stringPtr("#81a1c1"),
104+
Underline: boolPtr(true),
105+
},
106+
ImageText: ansi.StylePrimitive{
107+
Color: stringPtr("#8fbcbb"),
108+
Format: "Image: {{.text}} →",
109+
},
110+
Code: ansi.StyleBlock{
111+
StylePrimitive: ansi.StylePrimitive{
112+
Color: stringPtr("#a3be8c"),
113+
},
114+
},
115+
CodeBlock: ansi.StyleCodeBlock{
116+
StyleBlock: ansi.StyleBlock{
117+
StylePrimitive: ansi.StylePrimitive{
118+
Color: stringPtr("#d8dee9"),
119+
},
120+
Margin: uintPtr(defaultMargin),
121+
},
122+
Chroma: &ansi.Chroma{
123+
Text: ansi.StylePrimitive{
124+
Color: stringPtr("#d8dee9"),
125+
},
126+
Error: ansi.StylePrimitive{
127+
Color: stringPtr("#d8dee9"),
128+
BackgroundColor: stringPtr("#bf616a"),
129+
},
130+
Comment: ansi.StylePrimitive{
131+
Color: stringPtr("#4c566a"),
132+
},
133+
CommentPreproc: ansi.StylePrimitive{
134+
Color: stringPtr("#b48ead"),
135+
},
136+
Keyword: ansi.StylePrimitive{
137+
Color: stringPtr("#81a1c1"),
138+
},
139+
KeywordReserved: ansi.StylePrimitive{
140+
Color: stringPtr("#81a1c1"),
141+
},
142+
KeywordNamespace: ansi.StylePrimitive{
143+
Color: stringPtr("#81a1c1"),
144+
},
145+
KeywordType: ansi.StylePrimitive{
146+
Color: stringPtr("#8fbcbb"),
147+
},
148+
Operator: ansi.StylePrimitive{
149+
Color: stringPtr("#81a1c1"),
150+
},
151+
Punctuation: ansi.StylePrimitive{
152+
Color: stringPtr("#d8dee9"),
153+
},
154+
Name: ansi.StylePrimitive{
155+
Color: stringPtr("#d8dee9"),
156+
},
157+
NameBuiltin: ansi.StylePrimitive{
158+
Color: stringPtr("#8fbcbb"),
159+
},
160+
NameTag: ansi.StylePrimitive{
161+
Color: stringPtr("#81a1c1"),
162+
},
163+
NameAttribute: ansi.StylePrimitive{
164+
Color: stringPtr("#a3be8c"),
165+
},
166+
NameClass: ansi.StylePrimitive{
167+
Color: stringPtr("#8fbcbb"),
168+
},
169+
NameConstant: ansi.StylePrimitive{
170+
Color: stringPtr("#b48ead"),
171+
},
172+
NameDecorator: ansi.StylePrimitive{
173+
Color: stringPtr("#d08770"),
174+
},
175+
NameFunction: ansi.StylePrimitive{
176+
Color: stringPtr("#88c0d0"),
177+
},
178+
LiteralNumber: ansi.StylePrimitive{
179+
Color: stringPtr("#b48ead"),
180+
},
181+
LiteralString: ansi.StylePrimitive{
182+
Color: stringPtr("#a3be8c"),
183+
},
184+
LiteralStringEscape: ansi.StylePrimitive{
185+
Color: stringPtr("#ebcb8b"),
186+
},
187+
GenericDeleted: ansi.StylePrimitive{
188+
Color: stringPtr("#bf616a"),
189+
},
190+
GenericEmph: ansi.StylePrimitive{
191+
Color: stringPtr("#d08770"),
192+
Italic: boolPtr(true),
193+
},
194+
GenericInserted: ansi.StylePrimitive{
195+
Color: stringPtr("#a3be8c"),
196+
},
197+
GenericStrong: ansi.StylePrimitive{
198+
Color: stringPtr("#ebcb8b"),
199+
Bold: boolPtr(true),
200+
},
201+
GenericSubheading: ansi.StylePrimitive{
202+
Color: stringPtr("#88c0d0"),
203+
},
204+
Background: ansi.StylePrimitive{
205+
BackgroundColor: stringPtr("#2e3440"),
206+
},
207+
},
208+
},
209+
Table: ansi.StyleTable{
210+
StyleBlock: ansi.StyleBlock{
211+
StylePrimitive: ansi.StylePrimitive{},
212+
},
213+
},
214+
DefinitionDescription: ansi.StylePrimitive{
215+
BlockPrefix: "\n🠶 ",
216+
},
217+
}

0 commit comments

Comments
 (0)