quartz/quartz
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
..
cli fix: content-disposition inline should apply to all resource types (closes #728) 2024-01-28 22:12:01 -08:00
components fix(type): annotate event for nav (#761) 2024-01-29 21:55:10 -08:00
plugins feat: Feature/custom callout icon (#727) 2024-01-30 22:10:13 -08:00
processors refactor: move emit from callback to helper file function (#704) 2024-01-18 10:56:14 -08:00
static Revert "feat: Making Quartz available offline by making it a PWA (#465)" 2023-09-20 13:52:45 -07:00
styles feat: Feature/custom callout icon (#727) 2024-01-30 22:10:13 -08:00
util fix(div): update class name to remove weird space afterwards (#763) 2024-01-29 21:51:13 -08:00
bootstrap-cli.mjs cleanup: rework cli to allow invoking create and build outside of cli (#428) 2023-08-27 15:59:51 -07:00
bootstrap-worker.mjs
build.ts cleanup: Move rebuild function outside startServing function (#715) 2024-01-23 10:55:37 -08:00
cfg.ts feat: support selfhost umami (#764) 2024-01-30 09:58:09 -08:00
worker.ts base path refactor to better support subpath hosting 2023-08-19 15:52:25 -07:00