mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Hide collapse icon code
This commit is contained in:
parent
0bb2dd5a91
commit
671b8416bc
2 changed files with 28 additions and 17 deletions
|
|
@ -403,6 +403,7 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
const folderNote = getFolderNote(this, file.path);
|
||||
if (!folderNote) {
|
||||
this.removeCSSClassFromEL(file?.path, 'has-folder-note');
|
||||
this.removeCSSClassFromEL(file?.path, 'only-has-folder-note');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -412,9 +413,13 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
if (excludedFolder?.disableFolderNote) {
|
||||
this.removeCSSClassFromEL(folderNote.path, 'is-folder-note');
|
||||
this.removeCSSClassFromEL(file.path, 'has-folder-note');
|
||||
this.removeCSSClassFromEL(file?.path, 'only-has-folder-note');
|
||||
} else {
|
||||
this.addCSSClassToTitleEL(folderNote.path, 'is-folder-note');
|
||||
this.addCSSClassToTitleEL(file.path, 'has-folder-note');
|
||||
if (file.children.length == 1) {
|
||||
this.addCSSClassToTitleEL(file.path, 'only-has-folder-note');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
40
styles.css
40
styles.css
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
body:not(.is-grabbing) .tree-item-self.fn-is-active:hover,
|
||||
.tree-item-self.fn-is-active {
|
||||
color: var(--nav-item-color-active);
|
||||
background-color: var(--nav-item-background-active);
|
||||
font-weight: var(--nav-item-weight-active);
|
||||
color: var(--nav-item-color-active);
|
||||
background-color: var(--nav-item-background-active);
|
||||
font-weight: var(--nav-item-weight-active);
|
||||
}
|
||||
|
||||
.has-folder-note .nav-folder-title-content:hover,
|
||||
|
|
@ -180,30 +180,30 @@ body:not(.is-grabbing) .tree-item-self.fn-is-active:hover,
|
|||
|
||||
/* Setting tab style */
|
||||
.fn-settings-tab-bar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.fn-settings-tab {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--size-4-2);
|
||||
padding: 10px;
|
||||
border: 1px solid var(--background-modifier-border)
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--size-4-2);
|
||||
padding: 10px;
|
||||
border: 1px solid var(--background-modifier-border)
|
||||
}
|
||||
|
||||
.fn-settings-tab-active {
|
||||
background-color: var(--color-accent);
|
||||
color: var(--text-on-accent);
|
||||
background-color: var(--color-accent);
|
||||
color: var(--text-on-accent);
|
||||
}
|
||||
|
||||
.fn-settings-tab-name {
|
||||
font-weight: bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.fn-settings-tab-icon {
|
||||
display: flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* File explorer & path styles */
|
||||
|
|
@ -222,7 +222,7 @@ body:not(.is-grabbing) .tree-item-self.fn-is-active:hover,
|
|||
text-underline-offset: 2px;
|
||||
}
|
||||
|
||||
.folder-note-bold .has-folder-note .nav-folder-title-content,
|
||||
.folder-note-bold .has-folder-note .nav-folder-title-content,
|
||||
.folder-note-bold-path .has-folder-note.view-header-breadcrumb {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
@ -230,4 +230,10 @@ body:not(.is-grabbing) .tree-item-self.fn-is-active:hover,
|
|||
.folder-note-cursive .has-folder-note .nav-folder-title-content,
|
||||
.folder-note-cursive-path .has-folder-note.view-header-breadcrumb {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
|
||||
.only-has-folder-note .tree-item-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue