Skip to content

Commit 3b4a0e6

Browse files
committed
Added thumbnail image for polygon and updated CHANGELOG
1 parent 8d37860 commit 3b4a0e6

File tree

9 files changed

+56
-13
lines changed

9 files changed

+56
-13
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77
# the repository to which to push the release version
88
# usually a fork of typst/packages (https://github.com/typst/packages/)
99
# that you have push privileges to
10-
REGISTRY_REPO: author/typst-packages
10+
REGISTRY_REPO: nandac/typst-packages
1111
# the path within that repo where the "<name>/<version>" directory should be put
1212
# for the Typst package registry, keep this as is
1313
PATH_PREFIX: packages/preview

CHANGELOG.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626

2727
### Security
2828

29-
## [0.1.0] - 2025-01-01
29+
## [0.1.0] - 2025-06-06
3030

3131
### Added
3232

3333
<!-- Describe the feature set of the initial release here -->
34-
-
35-
-
36-
-
34+
- Initial version of this package
3735

3836
<!--
3937
Below are the target URLs for each version

Justfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ doc:
1111
typst compile docs/manual.typ docs/manual.pdf
1212
typst compile docs/thumbnail.typ thumbnail-light.svg
1313
typst compile --input theme=dark docs/thumbnail.typ thumbnail-dark.svg
14+
typst compile docs/thumbnail-2.typ thumbnail-2-light.svg
15+
typst compile --input theme=dark docs/thumbnail-2.typ thumbnail-2-dark.svg
1416

1517
# run test suite
1618
test *args:

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,23 @@ The following examples demonstrate the usage of the `css-colors` package in vari
104104
```typ
105105
#import "@preview/css-colors:0.1.0": *
106106
107-
(a) saddlebrown: #box(width: 30mm, height: 1em, fill: css("saddlebrown"))
108-
109-
(b) SaddleBrown: #box(width: 30mm, height: 1em, fill: css("SaddleBrown"))
110-
111107
#align(center)[
112108
#polygon.regular(
113109
fill: css("darkgoldenrod").lighten(60%),
114110
stroke: (paint: css("darkgoldenrod"), thickness: 4pt, cap: "round"),
115-
size: 80mm,
111+
size: 60mm,
116112
vertices: 6,
117113
)
118114
]
119115
```
120116

117+
<picture>
118+
<source media="(prefers-color-scheme: dark)" srcset="./thumbnail-2-dark.svg">
119+
<img src="./thumbnail-2-light.svg" alt="">
120+
</picture>
121+
121122
For additional examples, detailed explanations and the actual PDF output refer to the project manual.
122123

123124
## Acknowledgments
124125

125-
We would like to thank the Typst community on Discord for giving invaluable support during the development of this package.
126+
I would like to thank the Typst community on [Discord](https://discord.com/channels/1054443721975922748/1069937650125000807) for giving invaluable support during the development of this package.

docs/manual.pdf

-15 Bytes
Binary file not shown.

docs/manual.typ

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ The following examples demonstrate the usage of the `css-colors` package in vari
154154

155155
#rect(width: 100%, height: auto, fill: css("darkorchid"))
156156

157-
+ CSS color names are case-insensitive so both `saddlebrown` and `SaddleBrown` are valid.
157+
+ CSS color names can be specified in lowercase or CamelCase so both `saddlebrown` and `SaddleBrown` are valid.
158158

159159
```typ
160160
#import "@preview/css-colors:0.1.0": *
@@ -201,7 +201,7 @@ The following examples demonstrate the usage of the `css-colors` package in vari
201201
#polygon.regular(
202202
fill: css("darkgoldenrod").lighten(60%),
203203
stroke: (paint: css("darkgoldenrod"), thickness: 4pt, cap: "round"),
204-
size: 80mm,
204+
size: 60mm,
205205
vertices: 6,
206206
)
207207
]

docs/thumbnail-2.typ

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#import "@preview/css-colors:0.1.0": *
2+
3+
#set page(height: auto, margin: 5mm, fill: none)
4+
5+
// style thumbnail for light and dark theme
6+
#let theme = sys.inputs.at("theme", default: "light")
7+
#set text(white) if theme == "dark"
8+
9+
#align(center)[
10+
#polygon.regular(
11+
fill: css("darkgoldenrod").lighten(60%),
12+
stroke: (paint: css("darkgoldenrod"), thickness: 4pt, cap: "round"),
13+
size: 60mm,
14+
vertices: 6,
15+
)
16+
]

thumbnail-2-dark.svg

Lines changed: 13 additions & 0 deletions
Loading

thumbnail-2-light.svg

Lines changed: 13 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)