@gramlot/gramlot-examples 0.3.0 → 0.3.1

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 CHANGED
@@ -12,7 +12,7 @@ npm install @gramlot/gramlot-examples
12
12
  [![PyPI](https://img.shields.io/pypi/v/gramlot-examples)](https://pypi.org/project/gramlot-examples/)
13
13
  [![npm](https://img.shields.io/npm/v/@gramlot/gramlot-examples)](https://www.npmjs.com/package/@gramlot/gramlot-examples)
14
14
 
15
- Current release: 0.3.0.
15
+ Current release: 0.3.1.
16
16
 
17
17
  [Documentation and learning sequence](https://gramlot-examples.readthedocs.io/en/latest/)
18
18
  include every lesson, its Python and JavaScript source, and the gallery guide.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gramlot/gramlot-examples",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Gramlot example pages, the gallery page and its catalogue.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -2,6 +2,7 @@
2
2
  import {IndexPage} from '@gramlot/gramlot/page';
3
3
  export class GalleryPage extends IndexPage {
4
4
  static title = 'Gramlot examples';
5
+ static serverlessDownloadUrl = null;
5
6
  static installable = true;
6
7
  static appIcon = '/assets/branding/app-icon.png';
7
8
  static shellId = 'gallery';
@@ -23,6 +24,11 @@ export class GalleryPage extends IndexPage {
23
24
  }
24
25
  groupPanel(pane, group) { pane.div(group.readme, {id: `readme-${group.key}`}); }
25
26
  footer(footer) {
27
+ if (this.constructor.serverlessDownloadUrl) {
28
+ footer.a('↓ Serverless ZIP', {href: this.constructor.serverlessDownloadUrl,
29
+ download: 'gramlot-gallery-serverless.zip', class: 'gallery-download',
30
+ title: 'Download the offline gallery; unzip and open index.html'});
31
+ }
26
32
  footer.html_button('⚙', {type: 'button', id: 'gallery-settings-toggle', class: 'gallery-settings-toggle',
27
33
  title: 'Settings', aria_label: 'Settings', popovertarget: 'gallery-settings'});
28
34
  const settings = footer.div({id: 'gallery-settings', popover: 'auto', aria_labelledby: 'gallery-settings-title'});
@@ -83,3 +83,5 @@
83
83
  .gallery-preview-modes button[aria-pressed=true]{color:var(--gramlot-action);border-block-end-color:currentColor}
84
84
  .gallery-preview-stage{min-block-size:0;min-inline-size:0;overflow:hidden;background:var(--gramlot-surface-subtle);display:flex;justify-content:center}
85
85
  .gallery-preview-stage[data-preview-mode=mobile] iframe{inline-size:390px;max-inline-size:100%;flex:none;border-inline:1px solid var(--gramlot-border)}
86
+
87
+ .gallery-download { font-size: .8rem; color: inherit; white-space: nowrap; padding-inline: .3rem; }