@port60/template-kit 0.2.0 → 0.3.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.2.0",
3
+ "version": "0.3.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": {
@@ -240,6 +240,19 @@
240
240
  "kind": "text",
241
241
  "required": false,
242
242
  "description": "Accessible description; empty renders as decorative (alt=\"\")."
243
+ },
244
+ {
245
+ "name": "focus",
246
+ "kind": "select",
247
+ "required": false,
248
+ "options": [
249
+ "centre",
250
+ "top",
251
+ "bottom",
252
+ "left",
253
+ "right"
254
+ ],
255
+ "description": "Which part of the photograph survives the fill-crop (templates render photos cover-style, so an aspect mismatch crops — this picks the slice that stays). Maps to background-position/object-position; absent means centre."
243
256
  }
244
257
  ]
245
258
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starter",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
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,5 @@
40
40
  }
41
41
  ]
42
42
  },
43
- "changelog": "Home hero with hero photographs: a treated single image or a rotating set, toned into the palette — the reference implementation of supports.heroImagery."
43
+ "changelog": "Per-photo focus: choose which part of a hero photograph survives the fill-crop (centre/top/bottom/left/right) — panoramas and portraits stop cropping blind."
44
44
  }
@@ -17,7 +17,16 @@
17
17
  {% elsif heroCount == 0 %}
18
18
  {% assign heroPhoto = section.imageUrl %}
19
19
  {% endif %}
20
- <section class="lq-homehero{% if heroPhoto %} lq-homehero--photo{% endif %}{% if heroCount > 1 %} lq-homehero--carousel{% endif %}"{% if heroPhoto %} style="background-image: url('{{ heroPhoto }}')"{% endif %}>
20
+ {% assign heroFocus = 'center' %}
21
+ {% if heroCount > 0 %}
22
+ {% case section.images.first.focus %}
23
+ {% when 'top' %}{% assign heroFocus = 'center top' %}
24
+ {% when 'bottom' %}{% assign heroFocus = 'center bottom' %}
25
+ {% when 'left' %}{% assign heroFocus = 'left center' %}
26
+ {% when 'right' %}{% assign heroFocus = 'right center' %}
27
+ {% endcase %}
28
+ {% endif %}
29
+ <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 %}>
21
30
  {% if heroCount > 1 %}{% island 'hero_carousel' %}{% endif %}
22
31
  <div class="container lq-homehero-inner">
23
32
  <div>