visualci-gallery 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/dist/gallery.iife.js +1157 -390
- package/dist/hydrate.d.ts +9 -2
- package/dist/hydrate.js +235 -3
- package/dist/index.d.ts +2 -2
- package/dist/model.d.ts +39 -0
- package/dist/model.js +52 -3
- package/dist/preload.d.ts +149 -0
- package/dist/preload.js +319 -0
- package/dist/render.js +21 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ A screenshots page from a VisualCI [public gallery](https://visualci.com/docs/ga
|
|
|
4
4
|
dependencies. The markup is the [gallery contract](../contract/SPEC.md), so a page a server rendered (the Astro
|
|
5
5
|
component, the Ruby gem, the Python package) hydrates the same way.
|
|
6
6
|
|
|
7
|
+
The guide, with a script tag, a bundler and rendering at build time: https://visualci.com/docs/gallery/js/
|
|
8
|
+
|
|
7
9
|
## In the browser
|
|
8
10
|
|
|
9
11
|
```html
|
|
@@ -38,15 +40,18 @@ page.
|
|
|
38
40
|
`title` (default "Screenshots"; `null` for no heading), `headingLevel` (2), `id` ("vg", for two galleries on one
|
|
39
41
|
page), `screens` (`{key: {title, caption}}`), `order` (screen keys), `groups` (`{name: {title, size, fit}}`: `size` for shots whose names give no width, `fit: "contain"` to show a group whole, such as an app's windows), `groupOrder`,
|
|
40
42
|
`credit` (true), `layout` ("grid", or "strip": one row that scrolls sideways), `themeSwitch` (true; false follows
|
|
41
|
-
`<html data-theme>`), `seeAll` (`{href, text}`)
|
|
43
|
+
`<html data-theme>`), `seeAll` (`{href, text}`), `preload` (true: preloads the images a reader is likely to look at
|
|
44
|
+
next; false turns it off; `{fold, count, bytes, parallel}` sets its caps, the rest keeping their defaults 250, 500,
|
|
45
|
+
50000000, 4). `load` and `mount` also take `manifest`, `timeout`, `attempts` and
|
|
42
46
|
`fetch`. [SPEC.md](../contract/SPEC.md) has the details, including how screenshot names pair
|
|
43
47
|
(`<screen>-<light|dark>[-<width>]` or `<screen>/<width>-<light|dark>`).
|
|
44
48
|
|
|
45
49
|
## Styling
|
|
46
50
|
|
|
47
51
|
`gallery.css` is the default look. Set the `--vg-*` variables (`--vg-ink`, `--vg-muted`, `--vg-paper`,
|
|
48
|
-
`--vg-paper-2`, `--vg-rule`, `--vg-accent`, the radii, `--vg-shadow`, sizes and type) on `.vg`
|
|
49
|
-
your
|
|
52
|
+
`--vg-paper-2`, `--vg-rule`, `--vg-accent`, the radii, `--vg-shadow`, sizes and type) to match your site, on `.vg`
|
|
53
|
+
or any element around it. `gallery.css` declares its defaults on the root with no specificity, so your values win
|
|
54
|
+
whichever stylesheet loads first.
|
|
50
55
|
|
|
51
56
|
## Development
|
|
52
57
|
|