Skip to content

Commit

Permalink
adjust icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Feb 15, 2024
1 parent fc95b90 commit b3d3735
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
35 changes: 19 additions & 16 deletions quartz/components/ExplorerNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,22 +209,25 @@ export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodePro
{node.name !== "" && (
// Node with entire folder
// Render svg button + folder name, then children
<div class="folder-container">
<svg
xmlns="http://www.w3.org/2000/svg"
width="12"
height="12"
viewBox="5 8 14 8"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="folder-icon"
data-hasicon={hasIcon}
>
<polyline points="6 9 12 15 18 9" />
</svg>

<div class="folder-container" data-haschildren={node.children.length > 0}>
{node.children.length > 0 ? (
<svg
xmlns="http://www.w3.org/2000/svg"
width="12"
height="12"
viewBox="5 8 14 8"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="folder-icon"
data-hasicon={hasIcon}
>
<polyline points="6 9 12 15 18 9" />
</svg>
) : null}
<NodesIcons iconAsSVG={iconAsSVG} hasIcon={hasIcon} nodeType="folder" />
{/* render <a> tag if folderBehavior is "link", otherwise render <button> with collapse click event */}
<div key={node.name} data-folderpath={folderPath}>
Expand Down
4 changes: 2 additions & 2 deletions quartz/components/styles/explorer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ li:has(> .folder-outer:not(.open)) > .folder-container > svg {
.file-title-icon > svg {
width: 1em;
height: 1em;
// margin-right: 5px;
// vertical-align: -2px;
margin-right: 5px;
vertical-align: -2px;
}

// .folder-title-icon {
Expand Down
4 changes: 4 additions & 0 deletions quartz/styles/custom/file_icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
.article-title[data-hasicon="true"] > h1 {
margin: 0;
}

.folder-container[data-haschildren="false"] {
padding-left: 1.1rem;
}

0 comments on commit b3d3735

Please sign in to comment.