@port60/template-kit 0.20.3 → 0.21.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.
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "starter",
3
- "version": "1.13.0",
3
+ "version": "1.14.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.",
7
7
  "supports": {
8
+ "navigationHighlights": false,
9
+ "fieldMarkers": true,
8
10
  "pages": [
9
11
  "home",
10
12
  "about"
@@ -37,6 +39,44 @@
37
39
  "volunteer"
38
40
  ]
39
41
  },
42
+ "compositions": {
43
+ "home": [
44
+ {
45
+ "type": "homeHero",
46
+ "role": "core"
47
+ },
48
+ {
49
+ "type": "campaigns",
50
+ "role": "recommended"
51
+ },
52
+ {
53
+ "type": "impactMap",
54
+ "role": "optional"
55
+ },
56
+ {
57
+ "type": "cta",
58
+ "role": "recommended"
59
+ }
60
+ ],
61
+ "about": [
62
+ {
63
+ "type": "hero",
64
+ "role": "core"
65
+ },
66
+ {
67
+ "type": "values",
68
+ "role": "recommended"
69
+ },
70
+ {
71
+ "type": "people",
72
+ "role": "optional"
73
+ },
74
+ {
75
+ "type": "cta",
76
+ "role": "recommended"
77
+ }
78
+ ]
79
+ },
40
80
  "settings": {
41
81
  "schema": [
42
82
  {
@@ -54,7 +94,7 @@
54
94
  }
55
95
  ]
56
96
  },
57
- "changelog": "Places the site search box in the header: a typeahead across events, articles, services, campaigns, appeals, volunteering and documents, with the results page at /search.",
97
+ "changelog": "Marks which node shows which field (data-p60-field), so the editor puts the caret on the page itself instead of in a side panel.",
58
98
  "imagery": {
59
99
  "hero": {
60
100
  "idealAspect": "16:9",
@@ -7,8 +7,8 @@
7
7
  {% if site.content.campaigns.size > 0 %}
8
8
  <section class="lq-site.content.campaigns">
9
9
  <div class="container">
10
- <h2>{{ section.heading | default: campaignsLabel }}</h2>
11
- {% if section.text %}<p>{{ section.text }}</p>{% endif %}
10
+ <h2 data-p60-field="heading">{{ section.heading | default: campaignsLabel }}</h2>
11
+ {% if section.text %}<p data-p60-field="text">{{ section.text }}</p>{% endif %}
12
12
  <ul class="lq-campaign-list">
13
13
  {% for campaign in site.content.campaigns %}
14
14
  <li class="lq-campaign">
@@ -1,8 +1,8 @@
1
1
  <section class="lq-cta">
2
2
  <div class="container lq-cta-grid">
3
3
  <div>
4
- <h2>{{ section.heading }}</h2>
5
- {% if section.text %}<p>{{ section.text }}</p>{% endif %}
4
+ <h2 data-p60-field="heading">{{ section.heading }}</h2>
5
+ {% if section.text %}<p data-p60-field="text">{{ section.text }}</p>{% endif %}
6
6
  <a class="button button-primary" href="{{ section.buttonHref }}">{{ section.buttonLabel }}</a>
7
7
  </div>
8
8
  <div class="lq-cta-widget">
@@ -1,7 +1,14 @@
1
+ {% comment %}
2
+ FIELD MARKERS (supports.fieldMarkers): data-p60-field says which node shows which field, and the
3
+ editor puts the caret there instead of in a side panel. Two rules. The address is the field's
4
+ name inside this section's own content. The marked node holds that field and nothing else, so
5
+ wrap the value in a span when there is punctuation or other copy beside it (people.liquid shows
6
+ one). Marking is optional and additive: an unmarked template is edited in the panel as before.
7
+ {% endcomment %}
1
8
  <section class="lq-hero">
2
9
  <div class="container">
3
- {% if section.eyebrow %}<p class="lq-kicker">{{ section.eyebrow }}</p>{% endif %}
4
- <h1>{{ section.title }}</h1>
10
+ {% if section.eyebrow %}<p class="lq-kicker" data-p60-field="eyebrow">{{ section.eyebrow }}</p>{% endif %}
11
+ <h1 data-p60-field="title">{{ section.title }}</h1>
5
12
  <div class="lq-hero-body">{{ section.bodyHtml | raw }}</div>
6
13
  </div>
7
14
  </section>
@@ -38,9 +38,9 @@
38
38
  {% if heroCount > 1 %}{% island 'hero_carousel' %}{% else %}<div class="lq-vista-scrim" aria-hidden="true"></div>{% endif %}
39
39
  <div class="lq-vista-copy">
40
40
  <div class="container">
41
- <p class="lq-kicker">{{ section.eyebrow | default: site.brand.name }}</p>
42
- <h1>{{ section.title | default: site.brand.tagline | default: site.brand.name }}</h1>
43
- {% if section.lead %}<p class="lq-homehero-lead">{{ section.lead }}</p>{% endif %}
41
+ <p class="lq-kicker" data-p60-field="eyebrow">{{ section.eyebrow | default: site.brand.name }}</p>
42
+ <h1 data-p60-field="title">{{ section.title | default: site.brand.tagline | default: site.brand.name }}</h1>
43
+ {% if section.lead %}<p class="lq-homehero-lead" data-p60-field="lead">{{ section.lead }}</p>{% endif %}
44
44
  <div class="lq-homehero-actions">
45
45
  <a class="button button-primary" href="{{ section.primaryHref | default: '/donate' }}">{{ section.primaryLabel | default: 'Donate now' }}</a>
46
46
  <a class="button" href="{{ section.secondaryHref | default: '/about' }}">{{ section.secondaryLabel | default: 'Our story' }}</a>
@@ -59,9 +59,9 @@
59
59
  </div>
60
60
  <div class="container lq-homehero-inner lq-vista-overlap">
61
61
  <div>
62
- <p class="lq-kicker">{{ section.eyebrow | default: site.brand.name }}</p>
63
- <h1>{{ section.title | default: site.brand.tagline | default: site.brand.name }}</h1>
64
- {% if section.lead %}<p class="lq-homehero-lead">{{ section.lead }}</p>{% endif %}
62
+ <p class="lq-kicker" data-p60-field="eyebrow">{{ section.eyebrow | default: site.brand.name }}</p>
63
+ <h1 data-p60-field="title">{{ section.title | default: site.brand.tagline | default: site.brand.name }}</h1>
64
+ {% if section.lead %}<p class="lq-homehero-lead" data-p60-field="lead">{{ section.lead }}</p>{% endif %}
65
65
  <div class="lq-homehero-actions">
66
66
  {% if section.action or section.primaryLabel %}<a class="button button-primary" href="{{ section.primaryHref | default: section.action.href | default: '#donate' }}">{{ section.primaryLabel | default: section.action.label | default: 'Donate now' }}</a>{% endif %}
67
67
  <a class="button" href="{{ section.secondaryHref | default: '/about' }}">{{ section.secondaryLabel | default: 'Our story' }}</a>
@@ -94,9 +94,9 @@
94
94
  {% endif %}
95
95
  <div class="container lq-homehero-inner">
96
96
  <div>
97
- <p class="lq-kicker">{{ section.eyebrow | default: site.brand.name }}</p>
98
- <h1>{{ section.title | default: site.brand.tagline | default: site.brand.name }}</h1>
99
- {% if section.lead %}<p class="lq-homehero-lead">{{ section.lead }}</p>{% endif %}
97
+ <p class="lq-kicker" data-p60-field="eyebrow">{{ section.eyebrow | default: site.brand.name }}</p>
98
+ <h1 data-p60-field="title">{{ section.title | default: site.brand.tagline | default: site.brand.name }}</h1>
99
+ {% if section.lead %}<p class="lq-homehero-lead" data-p60-field="lead">{{ section.lead }}</p>{% endif %}
100
100
  <div class="lq-homehero-actions">
101
101
  {% if section.actionStyle == 'button' or section.givingStyle == 'button' %}
102
102
  {% if section.action or section.primaryLabel %}<a class="button button-primary" href="{{ section.primaryHref | default: section.action.href | default: '/donate' }}">{{ section.primaryLabel | default: section.action.label | default: 'Donate now' }}</a>{% endif %}
@@ -7,18 +7,19 @@
7
7
  <div class="container">
8
8
  {% if section.eyebrow or section.heading or section.text %}
9
9
  <div class="lq-section-head">
10
- {% if section.eyebrow %}<p class="lq-kicker">{{ section.eyebrow }}</p>{% endif %}
11
- {% if section.heading %}<h2>{{ section.heading }}</h2>{% endif %}
12
- {% if section.text %}<p class="lq-muted">{{ section.text }}</p>{% endif %}
10
+ {% if section.eyebrow %}<p class="lq-kicker" data-p60-field="eyebrow">{{ section.eyebrow }}</p>{% endif %}
11
+ {% if section.heading %}<h2 data-p60-field="heading">{{ section.heading }}</h2>{% endif %}
12
+ {% if section.text %}<p class="lq-muted" data-p60-field="text">{{ section.text }}</p>{% endif %}
13
13
  </div>
14
14
  {% endif %}
15
15
  <div class="lq-people">
16
16
  {% for person in section.items %}
17
17
  <article class="lq-person">
18
18
  {% if person.imageUrl %}<img class="lq-person-photo" src="{{ person.imageUrl }}" alt="" loading="lazy">{% endif %}
19
- <h3>{{ person.name }}</h3>
20
- <p class="lq-person-role">{{ person.role }}</p>
21
- {% if person.statement %}<p class="lq-person-statement">“{{ person.statement }}”</p>{% endif %}
19
+ <h3 data-p60-field="items.{{ forloop.index0 }}.name">{{ person.name }}</h3>
20
+ <p class="lq-person-role" data-p60-field="items.{{ forloop.index0 }}.role">{{ person.role }}</p>
21
+ {%- comment -%} The quotation marks are ours, so the marker goes on a span holding the statement alone. {%- endcomment -%}
22
+ {% if person.statement %}<p class="lq-person-statement">“<span data-p60-field="items.{{ forloop.index0 }}.statement">{{ person.statement }}</span>”</p>{% endif %}
22
23
  </article>
23
24
  {% endfor %}
24
25
  </div>
@@ -1,6 +1,6 @@
1
1
  <section class="lq-values">
2
2
  <div class="container">
3
- <h2>{{ section.heading | default: "What guides us" }}</h2>
3
+ <h2 data-p60-field="heading">{{ section.heading | default: "What guides us" }}</h2>
4
4
  {% comment %}
5
5
  data-p60-reveal-group: the engine stamps --p60-reveal-index on each child and adds
6
6
  is-revealed when the rail scrolls into view, the stagger and motion are OURS, in theme.css,
@@ -10,8 +10,8 @@
10
10
  {% for item in section.items %}
11
11
  <li>
12
12
  <span class="lq-value-dot"></span>
13
- <h3>{{ item.title }}</h3>
14
- <p>{{ item.description }}</p>
13
+ <h3 data-p60-field="items.{{ forloop.index0 }}.title">{{ item.title }}</h3>
14
+ <p data-p60-field="items.{{ forloop.index0 }}.description">{{ item.description }}</p>
15
15
  </li>
16
16
  {% endfor %}
17
17
  </ol>