cannibalox / logseq-custom-files

logseq custom.js and custom.css utilities : resize query table columns, hide namespaces prefixes, better-sidebar......
MIT License
98 stars 17 forks source link

How to use the new features? #5

Closed bendzg closed 7 months ago

bendzg commented 1 year ago

I was wondering how to add the new features like the background image and properties for references.

cannibalox commented 1 year ago

these were just experiments to add a relevant data-refs-self attribute to properties : the logseq DOM is like this: ss_20230125_NUC8_ugzRHjhaHd the custom.js adds attributes with the name of the property key ss_20230125_NUC8_3b4woAfCE3

then it's easier to manipulate or style the page based on properties. For instance, the property bg-pic:: ![](link_to_image) lets you embed an image that will be displayed ad the page background : usage: add bg-pic:: ![](https://images.unsplash.com/photo-1521106581851-da5b6457f674?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwyNDYwNDl8MHwxfHNlYXJjaHwyfHxjYXZlfGVufDB8fHx8MTY3NDYwMjc2MA&ixlib=rb-4.0.3&q=80&w=1920) and it will show up as ss_Logseq_Indiana_Jones_and_the_Raiders_of_the_Lost_Ark_ 19_20230125_isdqZo6IVN it works well with the unsplash plugin, just make sure to edit the end of the url where it says 'w=400`, adjust it to the width of the page

that being said, I believe some plugins like awesome UI/styler also let you add banners and background images with a proper ui.