noatpad / obsidian-banners

An Obsidian plugin that adds banners to your notes
MIT License
616 stars 39 forks source link

[BETA] Allow icon next to the inline title #123

Closed Mara-Li closed 11 months ago

Mara-Li commented 11 months ago

Hello! I tried without success in CSS, so… I want to have the icon next to the inline title, like Make.MD does:

Screen from Make.MD : image

Actually: image

noatpad commented 11 months ago

This should already be possible with the banner_icon and the banner_header field! Is this that (and if so, maybe it's a theme conflict?) or are you injecting the icon in there somehow?

Mara-Li commented 11 months ago

Yeah but, I don't want to use the banner header, as I have already in-line title... It will create redondance + need to set the properties manually? :<

noatpad commented 11 months ago

For that, you can set banner_header to a Checkmark property and checked (though in the next beta release, it will be an empty string/text value because of #121), that'll automatically set the header to be the filename like how Obsidian's inline titles work.

The reason why banner_header exists is because I can't easily nor reliably edit elements in Obsidian's native inline title elements, and that's due to what Obsidian runs behind the scenes. So the banner_header is sorta like a replacement to it, but works closely with banners and icons

Mara-Li commented 11 months ago

Oh I see! Thank you for the explanation (in #121 :)) I will trigger a default in my template settings

Aeases commented 11 months ago

just out of curiosity, would it be possible to use css to put a emoji icon right before the Inline title with the ::before pseudo element?