mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 03:26:22 +00:00
6c8023463d
* feat(popover): Add support for images * fix: run prettier * feat(popover): use switch logic for content types & adjust styles * feat(popover): Add content type data tag for popover-inner class
1 KiB
1 KiB
title |
---|
Popover Previews |
Like Wikipedia, when you hover over a link in Quartz, there is a popup of a page preview that you can scroll to see the entire content. Links to headers will also scroll the popup to show that specific header in view.
By default, Quartz only fetches previews for pages inside your vault due to CORS. It does this by selecting all HTML elements with the popover-hint
class. For most pages, this includes the page title, page metadata like words and time to read, tags, and the actual page content.
When creating components, you can include this popover-hint
class to also include it in the popover.
Similar to Obsidian, quartz layout.png can also be viewed as popups.
Configuration
- Remove popovers: set the
enablePopovers
field inquartz.config.ts
to befalse
. - Style:
quartz/components/styles/popover.scss
- Script:
quartz/components/scripts/popover.inline.ts