Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can we customize headers? #4

Open
ShinsuSenju opened this issue Jan 1, 2024 · 1 comment
Open

How can we customize headers? #4

ShinsuSenju opened this issue Jan 1, 2024 · 1 comment
Assignees
Labels
Question Further information is requested

Comments

@ShinsuSenju
Copy link

Like how does files get categorised in public others and private?

@CorellanStoma CorellanStoma self-assigned this Jan 1, 2024
@CorellanStoma CorellanStoma added the Question Further information is requested label Jan 1, 2024
@CorellanStoma
Copy link
Member

CorellanStoma commented Jan 1, 2024

The folders are sorted with numbers from 0-9, with the numbers I define a simple order for the main folders. The headers are simply pushed in between with CSS.

addon-folder-headers.css:

If you want to change the number of headers or the order you have to adjust the addon-folder-headers.css, Header 2 looks like this for example:

.nav-folder.mod-root > .nav-folder-children > .nav-folder:nth-child(4)::after {
  content: var(--folder-header-2);
  background: var(--folder-header-2-background, var(--bg1));
  color: var(--folder-header-2-color, var(--text-muted));
  position: relative;
}

.nav-files-container:hover > .nav-folder.mod-root > .nav-folder-children > .nav-folder:nth-child(4)::after {
  background: var(--folder-header-2-background-hover);
  color: var(--folder-header-2-color-hover);
}

There you only have to change the number of the child or remove some lines if you want to have fewer header lines.

addon-folder-hide-numbers.css:

If you have adjusted the folder names, you also have to adjust the addon-folder-hide-numbers.css where only the data-path names are adjusted.

[data-path="1 Notes"] .tree-item-inner::first-letter,
[data-path="2 Bookmarks"] .tree-item-inner::first-letter,
[data-path="3 Tasks"] .tree-item-inner::first-letter,
[data-path="4 Personal"] .tree-item-inner::first-letter,
[data-path="5 Study"] .tree-item-inner::first-letter,
[data-path="6 Work"] .tree-item-inner::first-letter,
[data-path="7 Knowledge"] .tree-item-inner::first-letter,
[data-path="8 Resources"] .tree-item-inner::first-letter,
[data-path="9 Templates"] .tree-item-inner::first-letter {
    color: transparent;
    font-size: 0px;
}

After saving the CSS files, the changes should be visible.

@CorellanStoma CorellanStoma pinned this issue Jan 1, 2024
@CorellanStoma CorellanStoma changed the title How do we folder headers? How can we customize headers? Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants