Skip to content

Commit

Permalink
change some size
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Apr 21, 2024
1 parent 776db9f commit 971c8a2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion quartz/components/ExplorerNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodePro
</svg>
) : null}
{/* render <a> tag if folderBehavior is "link", otherwise render <button> with collapse click event */}
<div key={node.name} data-folderpath={folderPath}>
<div key={node.name} data-folderpath={folderPath} data-isroot={isRoot}>
{folderBehavior === "link" ? (
<a
href={resolveRelative(fileData.slug!, folderPath as SimpleSlug)}
Expand Down
30 changes: 22 additions & 8 deletions quartz/components/styles/explorer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ button#explorer {
color: var(--dark);
opacity: 0.75;
pointer-events: all;
font-size: 1.2rem;
}
}
}
Expand All @@ -86,12 +85,19 @@ svg {
align-items: center;
user-select: none;

& a.folder-title[data-isroot="true"] {
font-size: 1.1rem;
}

& div > a {
color: var(--secondary);
font-family: var(--headerFont);
font-weight: $semiBoldWeight;
line-height: 1.5rem;
display: inline-block;
&.folder-title {
font-size: 0.9rem;
}
}

& div > a:hover {
Expand Down Expand Up @@ -135,6 +141,9 @@ svg {
width: 1em;
z-index: 99;
}
&[data-hasicon="true"][data-isroot="true"] {
left: 1.3rem;
}
}

li:has(> .folder-outer:not(.open)) > .folder-container > svg {
Expand Down Expand Up @@ -190,11 +199,16 @@ li:has(> .folder-outer:not(.open)) > .folder-container > svg {
// margin-left: -1.5rem;
// }

.folder-container[data-haschildren="true"]
.folder-title[data-hasicon="true"]:not([data-isroot="true"]) {
margin-left: -1.5rem;
}

.folder-container[data-haschildren="false"] {
margin-left: -0.2rem;
.folder-container {
&[data-haschildren="true"] {
.folder-title[data-hasicon="true"]:not([data-isroot="true"]) {
margin-left: -1.5rem;
}
&:has(.folder-title[data-hasicon="false"][data-isroot="false"]) {
margin-left: -0.2rem;
}
}
&[data-haschildren="false"] {
margin-left: -0.2rem;
}
}
2 changes: 1 addition & 1 deletion quartz/styles/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ a {
width: $sidePanelWidth;
margin-top: $topSpacing;
box-sizing: border-box;
padding: 0 4rem;
padding: 0 1rem;
position: fixed;
@media all and (max-width: $fullPageWidth) {
position: initial;
Expand Down

0 comments on commit 971c8a2

Please sign in to comment.