Once upon a time, I thought it was kind of cool to prefix my page names with emoji. Those who have seen early demo videos, will remember me using a for books, and for people.
Obviously, this still works, but Iāve been thinking of other ways to tweak the visuals of page links and pages.
Let me dump a concept of how this may work and see what you all think:
Although Iām not 100% convinced of how to do this, the best one I have so far is to āabuseā template hooks for this purpose. It could look as follows:
Youād create a template e.g. named āBook styleā with the following frontmatter:
tags: template
hooks.pageStyle:
where: ātags = ābookāā
icon: š
linkColor: red
linkBgColor: green
pageBgColor: yellow
As a result, any link to a page that was tagged with ābookā (see the where attribute) would now be decorated:
It would be prefixed with a book emoji
Its link color would be red
Its link background color would be green
The pages itself would use yellow as a background color. And the icon would also appear in the page title.
Thoughts?
What I like:
Building on the concept of āhooksā into the SB UI
Reusing the āwhereā attribute that is also used for Live Template Widgets to decide whether these widgets should appear in a particular page or not.
Extensible: I just threw the āiconā, ālinkColorā and ālinkBgColorā in here as examples, but if weād come up with other ways to decorate pages ā different fonts for the page. This would be easy to add.
My concern:
Iām abusing templates for whatās really not a template, but a type of configuration. The body of this ātemplateā would be ignored. Soā¦ itās kinda weird.
I am a Silverbullet old-timer so I have 100+ pages with icons, between daily/weekly pages, people, projects, etc.
I cannot wait for this implementation to be available and clean my files (I would love them to have no special characters in the filename, as it will make it much easier to work with from the terminal and/or other tools).
I would suggest to move all this to STYLES, it feels a more logical place to me than a template.
Another way would be to create a style-type page, maybe DECORATIONS and refer to it from the SETTINGS page.
Lastly, Iād love the icon: parameter to have flexibility. Example:
icon: "š§ "
(notice the space)
This would give us the option to have the same user experience as right now, i.e, customize it at will
Iāve updated the original post a bit probably while you were replying. Centralizing it in one page is an option, but what I like about the template approach is that it would also be natural to distribute these via Libraries this way and they can be split out and grouped with other templates. Like a meeting page template, a meeting snippet template and now a meeting style template.
I see the point with your āiconā with the space thing. I was contemplating of calling this āprefixā or something to allow any prefix text. Whether itās emoji or something else. Butā¦ I can only really see the use case of emoji, not free form text. And if thatās the only thing youād put there, deciding on a space there or not. Not sure.
Why wouldnāt you be able to centralize STYLE into a Library?
I believe we can link to it in āSETTINGSā regardless of where it is in the space, no?
I do like the sharing approach, maybe we can merge both ideas.
If not, I obviously would go for your approach too.
As for the prefix, I just used the āspaceā as an example but others may have other needs. I am very simple, an icon works for me though, I just want a bit of space between it and the title