Commit graph

15 commits

Author SHA1 Message Date
Jacky Zhao
06e3f8b93d fix(style): introduce semiBoldWeight and various improvements to reduce CLS 2024-02-17 10:34:51 -08:00
Jacky Zhao
260498a96b fix(style): prevent callout icon from shrinking on long titles (closes #792) 2024-02-02 10:23:24 -08:00
Jacky Zhao
2b57a68e1f fix: font weight consistency 2024-02-02 00:53:09 -08:00
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
LUCASTUCIOUS
d5b40279bd
feat: Enable custom callout (#724)
* Enable custom callout

make a callout custom defaulted to a note one.

* Add a comment

* remove comment from quartz/plugins/transformers/ofm.ts

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

* Update quartz/plugins/transformers/ofm.ts

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

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2024-01-24 23:54:24 -08:00
Jacky Zhao
74c3ebb7bd style: fix mulitline callout styling 2023-08-26 10:48:34 -07:00
Jacky Zhao
c89f8b1a9a fix nested callout folding 2023-08-12 21:16:43 -07:00
Jacky Zhao
c55d54f068 enable rich text in callout title 2023-08-12 10:16:55 -07:00
Jacky Zhao
533d68e642 most of creating components, increase legibility of bold in article and callouts 2023-08-07 23:56:50 -07:00
Jacky Zhao
7db2eda76c run prettier 2023-07-22 17:27:41 -07:00
Jacky Zhao
92ca787092 fix default callout state 2023-07-04 18:26:11 -07:00
Jacky Zhao
cb89cce183 basic left,right layout 2023-06-17 14:36:06 -07:00
Jacky Zhao
b587782450 collapsible callout 2023-06-17 13:08:06 -07:00
Jacky Zhao
4d3579ca98 darkmode scripts 2023-06-06 19:48:37 -07:00
Jacky Zhao
700036e84c callouts 2023-06-05 22:14:17 -07:00