rizaldy.club/quartz/plugins/transformers
LUCASTUCIOUS 072ee64127
feat: Feature/custom callout icon (#727)
* Add icons as masks

To handle a simple way to add custom icons, i made it pure css. Icon are now a mask for the callout-icon div, so they always follow the --color form the current callout.

Now to add a custom icon, you simply add

```css
.callout {
  &[data-callout="custom"] {
    --color: #customcolor;
    --border: #custombordercolor;
    --bg: #custombg;
    --callout-icon: url('data:image/svg+xml; utf8, <custom formatted svg>');

  }
```

to custom.scss

* remove now unused code

* Make callouts an enum

* docs: update instructions for custom callouts

* Prettier & run format

* dynamic matching

For maintainability, make dynamic mathching. If we or Obsidian want to support more callouts, we simply add it to the enum

* callout mapping const

Getting ride of the enum entierly as it's not worth here?

* fix callout icon styling

* Add forgotten icons

* Rebase

* harmonize callout icon and fold icon

* fix docs + prettier

* Update docs/features/callouts.md

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Update quartz/plugins/transformers/ofm.ts

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

* Suggestions fix

* remove unecessary rules

* comment is always nice

* Update docs/features/callouts.md

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2024-01-30 22:10:13 -08:00
..
description.ts fix: escape encoding for titles in rss 2023-09-06 21:47:59 -07:00
frontmatter.ts fix: revert parsing dates in frontmatter 2024-01-28 21:27:16 -08:00
gfm.ts feat(icon): update content for gfm links (#751) 2024-01-28 23:38:59 -08:00
index.ts feat: plugin for remark-breaks (#467) 2023-09-10 23:11:42 -07:00
lastmod.ts fix: revert parsing dates in frontmatter 2024-01-28 21:27:16 -08:00
latex.ts deps: bump everything (closes #635) (#636) 2023-12-18 09:48:40 -08:00
linebreaks.ts feat: plugin for remark-breaks (#467) 2023-09-10 23:11:42 -07:00
links.ts feat: External link icons (#697) 2024-01-15 23:55:32 -08:00
ofm.ts feat: Feature/custom callout icon (#727) 2024-01-30 22:10:13 -08:00
oxhugofm.ts feat: add transformations for latex in oxhugofm (#510) 2023-09-29 11:35:26 -07:00
syntax.ts deps: bump everything (closes #635) (#636) 2023-12-18 09:48:40 -08:00
toc.ts feat: scrub link formatting from toc entries 2023-11-15 20:13:28 -08:00