@port60/template-kit 0.20.1 → 0.20.2
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.20.
|
|
3
|
+
"version": "0.20.2",
|
|
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": {
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"name": "search",
|
|
192
192
|
"label": "Site search",
|
|
193
193
|
"status": "available",
|
|
194
|
-
"description": "
|
|
194
|
+
"description": "The site's search box: a typeahead over the platform's search index (articles, events, services, campaigns, appeals, volunteering and public documents; published and live rows only, never member, payment, private media or admin data). Suggestions are the things themselves, grouped by kind, each a direct link, with a matched-text line when the hit was in the body; Enter or the last row goes to the platform's /search results page. An accessible combobox: the active suggestion carries is-active. Where the box sits is the template's decision.",
|
|
195
195
|
"params": [],
|
|
196
196
|
"stylingApi": [
|
|
197
197
|
".site-search",
|
|
@@ -205,7 +205,11 @@
|
|
|
205
205
|
".site-search-kind",
|
|
206
206
|
".site-search-link",
|
|
207
207
|
".site-search-summary",
|
|
208
|
-
".site-search-empty"
|
|
208
|
+
".site-search-empty",
|
|
209
|
+
".site-search-title",
|
|
210
|
+
".site-search-context",
|
|
211
|
+
".site-search-more",
|
|
212
|
+
".site-search-corrected"
|
|
209
213
|
]
|
|
210
214
|
},
|
|
211
215
|
{
|
|
@@ -4732,3 +4732,216 @@ textarea.p60-form-control {
|
|
|
4732
4732
|
justify-content: center;
|
|
4733
4733
|
text-align: center;
|
|
4734
4734
|
}
|
|
4735
|
+
|
|
4736
|
+
/* ---- Site search (docs/search.md) ----
|
|
4737
|
+
The typeahead island (a template places it; the platform styles the box and its suggestions)
|
|
4738
|
+
and the platform's /search results page. Suggestions are a listbox under the box: the kind
|
|
4739
|
+
label, the title, a date or place, and the matched-text line with the hit words emphasised. */
|
|
4740
|
+
.site-search {
|
|
4741
|
+
position: relative;
|
|
4742
|
+
}
|
|
4743
|
+
.site-search-form {
|
|
4744
|
+
margin: 0;
|
|
4745
|
+
}
|
|
4746
|
+
.site-search-label {
|
|
4747
|
+
position: absolute;
|
|
4748
|
+
width: 1px;
|
|
4749
|
+
height: 1px;
|
|
4750
|
+
overflow: hidden;
|
|
4751
|
+
clip: rect(0 0 0 0);
|
|
4752
|
+
white-space: nowrap;
|
|
4753
|
+
}
|
|
4754
|
+
.site-search-fields {
|
|
4755
|
+
display: flex;
|
|
4756
|
+
align-items: center;
|
|
4757
|
+
gap: 0.4rem;
|
|
4758
|
+
}
|
|
4759
|
+
.site-search-input {
|
|
4760
|
+
min-width: 12rem;
|
|
4761
|
+
padding: 0.55rem 0.95rem;
|
|
4762
|
+
border-radius: 999px;
|
|
4763
|
+
}
|
|
4764
|
+
.site-search-submit {
|
|
4765
|
+
padding: 0.55rem 0.95rem;
|
|
4766
|
+
border: 1px solid var(--line);
|
|
4767
|
+
border-radius: 999px;
|
|
4768
|
+
background: var(--surface);
|
|
4769
|
+
color: var(--ink);
|
|
4770
|
+
font-weight: 600;
|
|
4771
|
+
cursor: pointer;
|
|
4772
|
+
}
|
|
4773
|
+
.site-search-submit:hover {
|
|
4774
|
+
background: var(--bg-tint);
|
|
4775
|
+
}
|
|
4776
|
+
.site-search-results {
|
|
4777
|
+
position: absolute;
|
|
4778
|
+
top: 100%;
|
|
4779
|
+
left: 0;
|
|
4780
|
+
z-index: 70;
|
|
4781
|
+
min-width: min(26rem, calc(100vw - 2rem));
|
|
4782
|
+
max-height: 70vh;
|
|
4783
|
+
overflow: auto;
|
|
4784
|
+
margin: 0.35rem 0 0;
|
|
4785
|
+
padding: 0.4rem;
|
|
4786
|
+
list-style: none;
|
|
4787
|
+
background: var(--surface);
|
|
4788
|
+
border: 1px solid var(--line);
|
|
4789
|
+
border-radius: 14px;
|
|
4790
|
+
box-shadow: var(--shadow);
|
|
4791
|
+
text-align: left;
|
|
4792
|
+
}
|
|
4793
|
+
.site-search-link {
|
|
4794
|
+
display: grid;
|
|
4795
|
+
grid-template-columns: auto 1fr;
|
|
4796
|
+
column-gap: 0.6rem;
|
|
4797
|
+
row-gap: 0.15rem;
|
|
4798
|
+
align-items: baseline;
|
|
4799
|
+
padding: 0.55rem 0.65rem;
|
|
4800
|
+
border-radius: 10px;
|
|
4801
|
+
color: var(--ink);
|
|
4802
|
+
font-weight: 500;
|
|
4803
|
+
}
|
|
4804
|
+
.site-search-result.is-active .site-search-link,
|
|
4805
|
+
.site-search-link:hover {
|
|
4806
|
+
background: var(--bg-tint);
|
|
4807
|
+
}
|
|
4808
|
+
.site-search-kind {
|
|
4809
|
+
font-size: 0.72rem;
|
|
4810
|
+
font-weight: 700;
|
|
4811
|
+
letter-spacing: 0.04em;
|
|
4812
|
+
text-transform: uppercase;
|
|
4813
|
+
color: var(--muted);
|
|
4814
|
+
}
|
|
4815
|
+
.site-search-title {
|
|
4816
|
+
font-weight: 600;
|
|
4817
|
+
}
|
|
4818
|
+
.site-search-context,
|
|
4819
|
+
.site-search-summary {
|
|
4820
|
+
grid-column: 2;
|
|
4821
|
+
font-size: 0.85rem;
|
|
4822
|
+
font-weight: 400;
|
|
4823
|
+
color: var(--muted);
|
|
4824
|
+
}
|
|
4825
|
+
.site-search-summary mark {
|
|
4826
|
+
background: transparent;
|
|
4827
|
+
color: var(--ink);
|
|
4828
|
+
font-weight: 700;
|
|
4829
|
+
}
|
|
4830
|
+
.site-search-more .site-search-link {
|
|
4831
|
+
grid-template-columns: 1fr;
|
|
4832
|
+
color: var(--primary);
|
|
4833
|
+
font-weight: 600;
|
|
4834
|
+
}
|
|
4835
|
+
.site-search-empty,
|
|
4836
|
+
.site-search-corrected {
|
|
4837
|
+
position: absolute;
|
|
4838
|
+
top: 100%;
|
|
4839
|
+
left: 0;
|
|
4840
|
+
z-index: 70;
|
|
4841
|
+
min-width: min(26rem, calc(100vw - 2rem));
|
|
4842
|
+
margin: 0.35rem 0 0;
|
|
4843
|
+
padding: 0.65rem 0.8rem;
|
|
4844
|
+
background: var(--surface);
|
|
4845
|
+
border: 1px solid var(--line);
|
|
4846
|
+
border-radius: 14px;
|
|
4847
|
+
box-shadow: var(--shadow);
|
|
4848
|
+
font-size: 0.9rem;
|
|
4849
|
+
color: var(--muted);
|
|
4850
|
+
text-align: left;
|
|
4851
|
+
}
|
|
4852
|
+
.site-search-corrected {
|
|
4853
|
+
top: auto;
|
|
4854
|
+
bottom: 100%;
|
|
4855
|
+
margin: 0 0 0.35rem;
|
|
4856
|
+
}
|
|
4857
|
+
/* In the primary nav the box stays compact and grows on focus; Enter searches, so the button rests. */
|
|
4858
|
+
.site-nav .site-search {
|
|
4859
|
+
margin-inline-start: 0.35rem;
|
|
4860
|
+
}
|
|
4861
|
+
.site-nav .site-search-input {
|
|
4862
|
+
width: 9rem;
|
|
4863
|
+
min-width: 0;
|
|
4864
|
+
padding: 0.45rem 0.85rem;
|
|
4865
|
+
font-size: 0.92rem;
|
|
4866
|
+
transition: width 0.16s ease;
|
|
4867
|
+
}
|
|
4868
|
+
.site-nav .site-search-input:focus {
|
|
4869
|
+
width: 12.5rem;
|
|
4870
|
+
}
|
|
4871
|
+
.site-nav .site-search-submit {
|
|
4872
|
+
display: none;
|
|
4873
|
+
}
|
|
4874
|
+
.site-nav .site-search-results,
|
|
4875
|
+
.site-nav .site-search-empty,
|
|
4876
|
+
.site-nav .site-search-corrected {
|
|
4877
|
+
right: 0;
|
|
4878
|
+
left: auto;
|
|
4879
|
+
}
|
|
4880
|
+
@media (max-width: 860px) {
|
|
4881
|
+
.site-nav .site-search {
|
|
4882
|
+
margin: 0.5rem 0;
|
|
4883
|
+
}
|
|
4884
|
+
.site-nav .site-search-input,
|
|
4885
|
+
.site-nav .site-search-input:focus {
|
|
4886
|
+
width: 100%;
|
|
4887
|
+
}
|
|
4888
|
+
.site-nav .site-search-results,
|
|
4889
|
+
.site-nav .site-search-empty,
|
|
4890
|
+
.site-nav .site-search-corrected {
|
|
4891
|
+
position: static;
|
|
4892
|
+
min-width: 0;
|
|
4893
|
+
box-shadow: none;
|
|
4894
|
+
}
|
|
4895
|
+
}
|
|
4896
|
+
|
|
4897
|
+
/* The results page: breadcrumb rows, full width like every page body. */
|
|
4898
|
+
.search-hits {
|
|
4899
|
+
margin: 1rem 0 0;
|
|
4900
|
+
padding: 0;
|
|
4901
|
+
list-style: none;
|
|
4902
|
+
}
|
|
4903
|
+
.search-hit {
|
|
4904
|
+
padding: 1rem 0;
|
|
4905
|
+
border-bottom: 1px solid var(--line);
|
|
4906
|
+
}
|
|
4907
|
+
.search-hit-crumb {
|
|
4908
|
+
display: block;
|
|
4909
|
+
font-size: 0.8rem;
|
|
4910
|
+
font-weight: 700;
|
|
4911
|
+
letter-spacing: 0.04em;
|
|
4912
|
+
text-transform: uppercase;
|
|
4913
|
+
color: var(--muted);
|
|
4914
|
+
}
|
|
4915
|
+
.search-hit-title {
|
|
4916
|
+
display: inline-block;
|
|
4917
|
+
margin-top: 0.2rem;
|
|
4918
|
+
font-size: 1.15rem;
|
|
4919
|
+
font-weight: 600;
|
|
4920
|
+
color: var(--primary);
|
|
4921
|
+
}
|
|
4922
|
+
.search-hit-title:hover {
|
|
4923
|
+
text-decoration: underline;
|
|
4924
|
+
}
|
|
4925
|
+
.search-hit-snippet {
|
|
4926
|
+
margin: 0.35rem 0 0;
|
|
4927
|
+
color: var(--muted);
|
|
4928
|
+
}
|
|
4929
|
+
.search-hit-snippet mark {
|
|
4930
|
+
background: transparent;
|
|
4931
|
+
color: var(--ink);
|
|
4932
|
+
font-weight: 700;
|
|
4933
|
+
}
|
|
4934
|
+
.search-corrected,
|
|
4935
|
+
.search-empty {
|
|
4936
|
+
color: var(--muted);
|
|
4937
|
+
}
|
|
4938
|
+
.search-filters {
|
|
4939
|
+
margin-top: 1rem;
|
|
4940
|
+
}
|
|
4941
|
+
.search-page-box {
|
|
4942
|
+
max-width: 40rem;
|
|
4943
|
+
margin: 1rem 0 1.5rem;
|
|
4944
|
+
}
|
|
4945
|
+
.search-page-box .site-search-input {
|
|
4946
|
+
flex: 1 1 auto;
|
|
4947
|
+
}
|