Skip to content

Commit 2b5ab82

Browse files
committed
last changes
1 parent f4436a1 commit 2b5ab82

File tree

3 files changed

+69
-31
lines changed

3 files changed

+69
-31
lines changed

quartz/quartz/components/ExplorerNode.tsx

+49-20
Original file line numberDiff line numberDiff line change
@@ -177,31 +177,46 @@ export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodePro
177177
<>
178178
{node.file ? (
179179
// Single file node
180-
<li key={node.file.slug}>
181-
<a href={resolveRelative(fileData.slug!, node.file.slug!)} data-for={node.file.slug}>
182-
{node.displayName}
183-
</a>
184-
</li>
180+
<>
181+
{node.displayName === "Readme" && (
182+
<div
183+
style={{
184+
border: "none",
185+
borderTop: "0.1px solid white",
186+
opacity: 0.2,
187+
marginBottom: "20px",
188+
}}
189+
/>
190+
)}
191+
<li key={node.file.slug}>
192+
<a href={resolveRelative(fileData.slug!, node.file.slug!)} data-for={node.file.slug}>
193+
{node.displayName}
194+
</a>
195+
<svg
196+
xmlns="http://www.w3.org/2000/svg"
197+
width="12"
198+
height="12"
199+
viewBox="5 8 14 8"
200+
fill="none"
201+
stroke="grey"
202+
stroke-width="2"
203+
stroke-linecap="round"
204+
stroke-linejoin="round"
205+
class="folder-icon-fixed"
206+
>
207+
<polyline points="6 9 12 15 18 9"></polyline>
208+
</svg>
209+
</li>
210+
</>
185211
) : (
186212
<li>
187213
{node.name !== "" && (
188214
// Node with entire folder
189215
// Render svg button + folder name, then children
190-
<div class="folder-container">
191-
<svg
192-
xmlns="http://www.w3.org/2000/svg"
193-
width="12"
194-
height="12"
195-
viewBox="5 8 14 8"
196-
fill="none"
197-
stroke="currentColor"
198-
stroke-width="2"
199-
stroke-linecap="round"
200-
stroke-linejoin="round"
201-
class="folder-icon"
202-
>
203-
<polyline points="6 9 12 15 18 9"></polyline>
204-
</svg>
216+
<div
217+
style={node.displayName === "Explore" ? { marginBottom: "10px" } : {}}
218+
class="folder-container"
219+
>
205220
{/* render <a> tag if folderBehavior is "link", otherwise render <button> with collapse click event */}
206221
<div key={node.name} data-folderpath={folderPath}>
207222
{folderBehavior === "link" ? (
@@ -218,6 +233,20 @@ export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodePro
218233
</button>
219234
)}
220235
</div>
236+
<svg
237+
xmlns="http://www.w3.org/2000/svg"
238+
width="12"
239+
height="12"
240+
viewBox="5 8 14 8"
241+
fill="none"
242+
stroke="currentColor"
243+
stroke-width="2"
244+
stroke-linecap="round"
245+
stroke-linejoin="round"
246+
class="folder-icon"
247+
>
248+
<polyline points="6 9 12 15 18 9"></polyline>
249+
</svg>
221250
</div>
222251
)}
223252
{/* Recursively render children of folder */}

quartz/quartz/components/Head.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default (() => {
2020

2121
return (
2222
<head>
23-
<title>{title}</title>
23+
<title>{title} | Pubky Core</title>
2424
<meta charSet="utf-8" />
2525
{cfg.theme.cdnCaching && cfg.theme.fontOrigin === "googleFonts" && (
2626
<>

quartz/quartz/components/styles/explorer.scss

+19-10
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ button#explorer {
3838
grid-template-rows: 1fr;
3939
}
4040

41-
.folder-outer>ul {
41+
.folder-outer > ul {
4242
overflow: hidden;
4343
}
4444

@@ -49,7 +49,7 @@ button#explorer {
4949
transition: max-height 0.35s ease;
5050
margin-top: 0rem;
5151

52-
&.collapsed>.overflow::after {
52+
&.collapsed > .overflow::after {
5353
opacity: 0;
5454
}
5555

@@ -70,7 +70,7 @@ button#explorer {
7070
transform 0.35s ease,
7171
opacity 0.2s ease;
7272

73-
& li>a {
73+
& li > a {
7474
color: var(--dark);
7575
opacity: 0.5;
7676
pointer-events: all;
@@ -81,7 +81,7 @@ button#explorer {
8181
svg {
8282
pointer-events: all;
8383

84-
&>polyline {
84+
& > polyline {
8585
pointer-events: none;
8686
}
8787
}
@@ -92,7 +92,7 @@ svg {
9292
align-items: center;
9393
user-select: none;
9494

95-
& div>a {
95+
& div > a {
9696
color: var(--secondary);
9797
font-family: var(--headerFont);
9898
font-size: 0.95rem;
@@ -101,11 +101,11 @@ svg {
101101
display: inline-block;
102102
}
103103

104-
& div>a:hover {
104+
& div > a:hover {
105105
color: var(--tertiary);
106106
}
107107

108-
& div>button {
108+
& div > button {
109109
color: var(--dark);
110110
background-color: transparent;
111111
border: none;
@@ -132,14 +132,23 @@ svg {
132132
}
133133

134134
.folder-icon {
135-
margin-right: 5px;
135+
margin-left: 0.5rem;
136136
color: var(--secondary);
137137
cursor: pointer;
138138
transition: transform 0.3s ease;
139139
backface-visibility: visible;
140140
}
141141

142-
li:has(> .folder-outer:not(.open))>.folder-container>svg {
142+
.folder-icon-fixed {
143+
margin-left: 0.5rem;
144+
color: var(--secondary);
145+
cursor: pointer;
146+
transition: transform 0.3s ease;
147+
backface-visibility: visible;
148+
transform: rotate(-90deg);
149+
}
150+
151+
li:has(> .folder-outer:not(.open)) > .folder-container > svg {
143152
transform: rotate(-90deg);
144153
}
145154

@@ -156,4 +165,4 @@ li:has(> .folder-outer:not(.open))>.folder-container>svg {
156165
height: 4px;
157166
// remove default margin from li
158167
margin: 0;
159-
}
168+
}

0 commit comments

Comments
 (0)