@port60/template-kit 0.4.1 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@port60/template-kit",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Build Port60 site templates locally: scaffold, live-preview, validate against the platform contract, and package for studio upload. AI-agent ready — every scaffold ships AGENTS.md and validate emits machine-readable JSON.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -70,6 +70,9 @@ platform accepts it; if it fails here, the upload will fail identically.
70
70
  behaviourally.
71
71
  - "Looks" = named one-click bundles of knob values in \`manifest.looks\`.
72
72
  - Fonts: only families from the platform font catalogue, declared with the weights you use.
73
+ - \`manifest.imagery.hero\` (optional but recommended): declare the photo shape YOUR hero
74
+ composes best with (\`idealAspect\`, \`minWidth\`, a one-line \`note\`) — the charity's editor
75
+ measures their actual upload against it and advises. Advice, never enforcement.
73
76
 
74
77
  ## Which contract this is
75
78
 
@@ -0,0 +1,23 @@
1
+ {
2
+ "description": "Platform imagery envelopes — ADVICE, never enforcement. Entity images (events, courses, articles) render on SEVERAL surfaces at once (cards, carousel slides, detail banners), including platform-owned components, so their guidance is platform-level: the envelope every surface can live with. Template-composed slots (the home hero) are different — their ideal is the TEMPLATE's own design call, declared per-template in manifest.imagery and surfaced beside the upload. Editors measure the actual upload against the relevant guidance and advise; the charity always decides.",
3
+ "entityImages": {
4
+ "eventPromo": {
5
+ "idealAspect": "3:2",
6
+ "aspectRange": ["4:3", "16:9"],
7
+ "minWidth": 1600,
8
+ "note": "One photo, several surfaces: the events card, the home carousel slide, and the event page banner — each crops differently, so keep the subject centred and avoid text baked into the image."
9
+ },
10
+ "courseImage": {
11
+ "idealAspect": "3:2",
12
+ "aspectRange": ["4:3", "16:9"],
13
+ "minWidth": 1600,
14
+ "note": "Renders as the course card and the course page opener — subject centred, no baked-in text."
15
+ },
16
+ "articleCover": {
17
+ "idealAspect": "16:9",
18
+ "aspectRange": ["3:2", "2:1"],
19
+ "minWidth": 1600,
20
+ "note": "The article card thumbnail and the article page cover — wide editorial shots sit best."
21
+ }
22
+ }
23
+ }
@@ -78,6 +78,35 @@
78
78
  }
79
79
  }
80
80
  },
81
+ "imagery": {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "description": "The template's OWN image advice, surfaced beside uploads in the charity's editor — a design statement (what shape suits THIS composition), advisory only, never enforced. Entity images (events, courses, articles) are platform-scoped instead: see the contract's imagery.json envelopes.",
85
+ "properties": {
86
+ "hero": {
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": ["idealAspect", "minWidth"],
90
+ "properties": {
91
+ "idealAspect": {
92
+ "type": "string",
93
+ "pattern": "^\\d+:\\d+$",
94
+ "description": "The aspect this hero composes best with, e.g. \"16:9\"."
95
+ },
96
+ "minWidth": {
97
+ "type": "integer",
98
+ "minimum": 800,
99
+ "description": "Below this pixel width the photo may look soft full-bleed."
100
+ },
101
+ "note": {
102
+ "type": "string",
103
+ "maxLength": 240,
104
+ "description": "One human line of advice, e.g. how panoramas or portraits behave in this hero."
105
+ }
106
+ }
107
+ }
108
+ }
109
+ },
81
110
  "fonts": {
82
111
  "type": "array",
83
112
  "items": {
@@ -152,3 +152,11 @@ body { font-family: ' IBM Plex Sans Arabic', var(--p60s-siteFont, 'Inter'), ui-s
152
152
  .lq-vista-copy { position: static; padding: 1.8rem 0 0; }
153
153
  .lq-vista-sizer { min-height: 160px; }
154
154
  }
155
+
156
+ /* Vista + form (1.5.2): the widget rides the seam — grid pulled up over the band (under the
157
+ 280px floor), gradient filling where the image ends; narrow screens stack back underneath. */
158
+ .lq-homehero--vista-form { padding-bottom: 2.6rem; }
159
+ .lq-vista-overlap { position: relative; z-index: 1; margin-top: -240px; align-items: start; }
160
+ @media (max-width: 899px) {
161
+ .lq-vista-overlap { margin-top: 0; padding-top: 1.6rem; }
162
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starter",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "format": "port60-liquid@1",
5
5
  "label": "Starter",
6
6
  "description": "The reference template for the Port60 dialect — the developer docs' worked example and the base to copy when building your own. 1.1.0 adds the layout slot: the template owns the header, navigation and footer chrome.",
@@ -40,5 +40,12 @@
40
40
  }
41
41
  ]
42
42
  },
43
- "changelog": "Vista polish: your headline and buttons now sit ON the photograph (the treatment keeps them readable) instead of stacking below it — the hero no longer doubles in height."
43
+ "changelog": "Declares image advice: the ideal photo shape for this hero, shown beside the upload in your editor.",
44
+ "imagery": {
45
+ "hero": {
46
+ "idealAspect": "16:9",
47
+ "minWidth": 1600,
48
+ "note": "Landscape around 16:9 fills the hero cleanly; panoramas suit the whole-photo framing."
49
+ }
50
+ }
44
51
  }
@@ -31,6 +31,7 @@
31
31
  {% endif %}
32
32
  {% assign heroFraming = section.photoFraming | default: 'fill' %}
33
33
  {% if heroCount > 0 and heroFraming == 'whole' %}
34
+ {% if section.givingStyle == 'button' %}
34
35
  <section class="lq-homehero lq-homehero--vista{% if heroCount > 1 %} lq-homehero--carousel{% endif %}">
35
36
  <div class="lq-vista">
36
37
  <img class="lq-vista-sizer" src="{{ section.images.first.imageUrl }}" alt="{{ section.images.first.alt }}" style="object-position: {{ heroFocus }}" fetchpriority="high" decoding="async">
@@ -41,24 +42,37 @@
41
42
  <h1>{{ section.title | default: brand.tagline | default: brand.name }}</h1>
42
43
  {% if section.lead %}<p class="lq-homehero-lead">{{ section.lead }}</p>{% endif %}
43
44
  <div class="lq-homehero-actions">
44
- {% if section.givingStyle == 'button' %}
45
45
  <a class="button button-primary" href="{{ section.primaryHref | default: '/donate' }}">{{ section.primaryLabel | default: 'Donate now' }}</a>
46
- {% else %}
47
- <a class="button button-primary" href="#donate">{{ section.primaryLabel | default: 'Donate now' }}</a>
48
- {% endif %}
49
46
  <a class="button" href="{{ section.secondaryHref | default: '/about' }}">{{ section.secondaryLabel | default: 'Our story' }}</a>
50
47
  </div>
51
48
  </div>
52
49
  </div>
53
50
  </div>
54
- {% unless section.givingStyle == 'button' %}
55
- <div class="container lq-vista-widget">
51
+ </section>
52
+ {% else %}
53
+ {% comment %} Form mode: the grid pulls up over the band — copy on the photo, the widget riding
54
+ the seam onto the gradient below (never a stacked strip). {% endcomment %}
55
+ <section class="lq-homehero lq-homehero--vista lq-homehero--vista-form{% if heroCount > 1 %} lq-homehero--carousel{% endif %}">
56
+ <div class="lq-vista">
57
+ <img class="lq-vista-sizer" src="{{ section.images.first.imageUrl }}" alt="{{ section.images.first.alt }}" style="object-position: {{ heroFocus }}" fetchpriority="high" decoding="async">
58
+ {% if heroCount > 1 %}{% island 'hero_carousel' %}{% else %}<div class="lq-vista-scrim" aria-hidden="true"></div>{% endif %}
59
+ </div>
60
+ <div class="container lq-homehero-inner lq-vista-overlap">
61
+ <div>
62
+ <p class="lq-kicker">{{ section.eyebrow | default: brand.name }}</p>
63
+ <h1>{{ section.title | default: brand.tagline | default: brand.name }}</h1>
64
+ {% if section.lead %}<p class="lq-homehero-lead">{{ section.lead }}</p>{% endif %}
65
+ <div class="lq-homehero-actions">
66
+ <a class="button button-primary" href="#donate">{{ section.primaryLabel | default: 'Donate now' }}</a>
67
+ <a class="button" href="{{ section.secondaryHref | default: '/about' }}">{{ section.secondaryLabel | default: 'Our story' }}</a>
68
+ </div>
69
+ </div>
56
70
  <aside id="donate">
57
71
  {% island 'donation_widget' %}
58
72
  </aside>
59
73
  </div>
60
- {% endunless %}
61
74
  </section>
75
+ {% endif %}
62
76
  {% else %}
63
77
  <section class="lq-homehero{% if heroPhoto %} lq-homehero--photo{% endif %}{% if heroCount > 1 %} lq-homehero--carousel{% endif %}"{% if heroPhoto %} style="background-image: url('{{ heroPhoto }}'); background-position: {{ heroFocus }}"{% endif %}>
64
78
  {% if heroCount > 1 %}{% island 'hero_carousel' %}{% endif %}