-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcustom.css
More file actions
220 lines (193 loc) · 5.56 KB
/
Copy pathcustom.css
File metadata and controls
220 lines (193 loc) · 5.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
/* Raffel Docs Custom Styles */
/* Cover page */
section.cover {
background: linear-gradient(135deg, #1e1b4b 0%, #0f0a1e 100%) !important;
}
section.cover.show {
background: linear-gradient(135deg, #1e1b4b 0%, #0f0a1e 100%) !important;
}
/* Cover page code block */
section.cover pre {
text-align: left !important;
background: rgba(0, 0, 0, 0.3) !important;
border-radius: 8px !important;
padding: 1rem !important;
margin: 1.5rem auto !important;
max-width: 500px !important;
}
/* Fix sidebar toggle (hamburger menu) position */
.sidebar-toggle {
position: fixed !important;
top: 1rem !important;
left: 1rem !important;
bottom: auto !important;
width: 40px !important;
height: 40px !important;
z-index: 999 !important;
}
/* Desktop: the sidebar is always visible, so the hamburger (☰) only overlaps
the "Search docs" input. Hide it while the sidebar is open; it reappears
when the sidebar is collapsed (body.close) so it can be reopened. */
@media screen and (min-width: 769px) {
body:not(.close) .sidebar-toggle {
display: none !important;
}
}
/* Mobile: when the menu is open, the cover page must not overlap the sidebar.
The cover (section.cover.show) renders full-viewport on top of the fixed
sidebar, making the menu unreadable/unclickable. Hide it while the menu is
open and keep the sidebar above everything. */
@media screen and (max-width: 768px) {
body.close section.cover {
display: none !important;
}
body.close .sidebar {
z-index: 100 !important;
}
}
/* Scroll conflict fix (desktop): before the sidebar becomes sticky it still
has a fixed height + overflow-y:auto, so scrolling over it captures the
wheel and the page stays put while moving from the cover into the docs.
While not sticky, let the sidebar grow with its content so the whole page
scrolls as one. Once sticky (fixed), it regains its own independent scroll. */
@media screen and (min-width: 769px) {
body:not(.sticky) .sidebar {
height: auto !important;
overflow-y: visible !important;
}
}
.sidebar {
overscroll-behavior: contain;
}
/* GitHub corner: the octocat link is external, so the global
a[target="_blank"]::after arrow (" ↗") leaks outside the triangle.
Suppress it — the octocat already signals it's a GitHub link — and pin
the corner flush to the top-right. */
.github-corner {
top: 0 !important;
right: 0 !important;
}
.github-corner::after {
content: none !important;
}
/* Dark/Light theme toggle: it sat on top of the "words | min" reading-count
span (float:right at the top of the content). Move it to a free spot — to
the left of the GitHub corner and above the count. left:auto is required
because the plugin sets left:10px on mobile, which would otherwise win over
right and pin the toggle onto the hamburger (☰). */
#docsify-darklight-theme {
position: fixed !important;
top: 14px !important;
left: auto !important;
z-index: 2 !important;
}
@media screen and (min-width: 769px) {
#docsify-darklight-theme {
right: 100px !important;
}
}
@media screen and (max-width: 768px) {
/* On mobile the top-right holds the GitHub corner and the content's
reading-count sits high and wide. Park the toggle next to the hamburger
(☰) in the top-left instead, where there's free space. */
#docsify-darklight-theme {
left: 64px !important;
right: auto !important;
top: 16px !important;
}
}
/* Hide reading time that may leak */
.markdown-section .reading-time,
.content .reading-time {
display: none !important;
}
/* Hide app nav */
body.ready .app-nav {
display: none !important;
}
/* Card grid for landing page */
.grid-3 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin: 2rem 0;
}
.card {
display: block;
padding: 1.5rem;
border-radius: 8px;
background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
border: 1px solid rgba(139, 92, 246, 0.2);
text-decoration: none;
color: inherit;
transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
text-decoration: none;
}
.card h4 {
margin: 0 0 0.5rem 0;
color: var(--theme-color, #8b5cf6);
}
.card p {
margin: 0;
font-size: 0.9rem;
opacity: 0.8;
}
/* Sidebar category labels */
.sidebar-nav li small {
font-size: 0.7rem;
opacity: 0.6;
margin-left: 0.5rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
/* Code blocks */
.markdown-section pre {
border-radius: 6px;
padding: 1rem;
}
.markdown-section code {
font-family: 'JetBrains Mono', 'SF Mono', monospace;
font-size: 0.9em;
}
/* Tables */
.markdown-section table {
border-collapse: collapse;
width: 100%;
}
.markdown-section table th {
background: rgba(139, 92, 246, 0.1);
font-weight: 600;
}
.markdown-section table th,
.markdown-section table td {
padding: 0.75rem 1rem;
border: 1px solid rgba(139, 92, 246, 0.15);
}
/* Dark mode table */
body.dark .markdown-section table th {
background: rgba(255, 255, 255, 0.05);
}
body.dark .markdown-section table th,
body.dark .markdown-section table td {
border-color: rgba(255, 255, 255, 0.1);
}
/* Inline code in tables */
.markdown-section td code {
white-space: nowrap;
background: rgba(139, 92, 246, 0.1);
padding: 0.1rem 0.4rem;
border-radius: 3px;
font-size: 0.85em;
}
/* Blockquotes as callouts */
.markdown-section blockquote {
border-left: 4px solid var(--theme-color, #8b5cf6);
background: rgba(139, 92, 246, 0.05);
padding: 1rem 1.5rem;
margin: 1.5rem 0;
border-radius: 0 6px 6px 0;
}