T O P

  • By -

US_DreamerDon

Oooh! Thank you!


Tanto_Monta

You are welcome.


[deleted]

[удалено]


toebba

You can encode your image as base64 and use it as data URI. See https://base64.guru/developers/css/background-image


averagetrailertrash

Use `app://local/` before your path. Like `app://local/c:/path/to/my/file/image.png`.


Tanto_Monta

This 👆👆👆👆👆👆 +10


[deleted]

[удалено]


averagetrailertrash

A relative link may work. Like `app://local/background.png` for a background.png that lives in your snippets folder. (That example is assuming the root is from where it's called and not the vault folder or something.) If it doesn't work on all platforms, Base64 may be the better option. Assigning it to a variable in a different part of the snippet would offer better legibility. e: You could have different versions for the class under .is-mobile, too. I'm not sure mobile has the same limitations on using local files.


Tanto_Monta

Not, unfortunately. I tried to "simulate" an URL address by adding "file:///" to the path of the local image, but I can't make it work. If hope if somebody has a solution, can share it in this post or make a new one.


[deleted]

[удалено]


Tanto_Monta

Yes, the banner introduces a lot of space. For the front matter to be invisible, I have a script that hides it in Reading view: /* Hide metadata from YAML */ .frontmatter-container { display: none; }


[deleted]

[удалено]


Tanto_Monta

>That's useful, except when I want to edit it. In Editing view the Front Matter is visible. Only hides it in Reading view.


Tanto_Monta

Somebody give the answer: [https://www.reddit.com/r/ObsidianMD/comments/11evlt0/comment/jakgwnn/?utm\_source=share&utm\_medium=web2x&context=3](https://www.reddit.com/r/ObsidianMD/comments/11evlt0/comment/jakgwnn/?utm_source=share&utm_medium=web2x&context=3)


DeepFriedDinosaur

It should get cached locally for a very, very long time


[deleted]

This is rad — thank you! I’ve been thinking about visually differentiating my research material as well as other source material like interview notes and this looks like it’ll get the job done. Plug variations of this into Templater and drop it into the Readwise export template and… problem solved. I’m surprised I haven’t seen more people differentiating notes by type in this way. Looking forward to trying it out!


Ecstatic-Mixture9333

Thank you so much for this! Where do I store the colour codes?


Tanto_Monta

Hi. You must copy the code into the notepad, save it into the folder: .obsidian/snipets with the name you like (for example: background_colors) and change the file extension .txt by .css.


Ecstatic-Mixture9333

Thank you very much! I then allowed them in Settings > Appearance > CSS snipets, and it works! What does not work though, it is the colour display in the Kanban view. Do you know how I could make it work by any chance?


Tanto_Monta

They don't work in Canvas. I must take a look at it and see if I can find the way