site: cut the template's own labels out of the pages
Point 7 of the page-wording review. The pages no longer show their data structure as headings, and they no longer explain their own conventions. - Level 1 is one screen: claim, status badge, three figures, the technology row, and one sentence carrying one link. Measured in headless Chrome at 1440x900: 1404-1845 px tall before, exactly 900 px (no scroll) after, on all six area pages. - DocPage: no kicker line, no visible level label, no "Evidence for this page" heading or instruction note, no "Drill-downs" list, no "Status <word> - sentence" footer. The artefact table starts at level 2, under the heading "Artefacts"; the history timeline is level 2 only. - Landing page: "Start here" link text gone, "How to read this site" panel gone, the footer's status-label explainer gone. - Content, presentation only, no claim softened: the leading H1 that duplicated the page title removed from all 41 documents; level 1 bodies reduced to the constraint as ordinary prose plus the way in; "**Status: ...**" prefixes removed from the artefact stubs; "## Drill-downs" and "## Period and confidence" removed from the level 2 pages, with the cross-area links moved into the prose. - The six level 1 claims are now sentences with a subject, and use commas instead of middots. Same facts, no new ones. Not in this commit: the 35 level 2 and 3 claims still use the compact CV style. That is a voice decision for Sam, not a wording tidy-up. make validate: 41 documents, 0 violations. go test ./...: pass. (cherry picked from commit 03009f80fc7815ad7719412e125df9297a6e653f)
This commit is contained in:
@@ -257,7 +257,6 @@ func (s *Site) Home() templates.HomeView {
|
||||
// Doc builds the view for one document at any depth.
|
||||
func (s *Site) Doc(d *content.Document) templates.DocView {
|
||||
area, _ := content.AreaByKey(d.Area)
|
||||
levelLabel := templates.LevelLabel(d.Level)
|
||||
|
||||
view := templates.DocView{
|
||||
Layout: s.Layout(LayoutOpts{
|
||||
@@ -267,16 +266,14 @@ func (s *Site) Doc(d *content.Document) templates.DocView {
|
||||
Crumbs: s.crumbs(d),
|
||||
Binding: s.RouteBinding(),
|
||||
}),
|
||||
Doc: d,
|
||||
AreaTitle: area.Title,
|
||||
Role: area.Role,
|
||||
Body: templates.MarkdownBody(d.HTML),
|
||||
Metrics: make([]templates.MetricView, 0, len(d.Metrics)),
|
||||
Tech: d.Tech,
|
||||
Evidence: s.evidence(d),
|
||||
Backlinks: s.backlinks(d),
|
||||
SubPages: s.subPages(d),
|
||||
LevelLabel: levelLabel,
|
||||
Doc: d,
|
||||
Role: area.Role,
|
||||
Body: templates.MarkdownBody(d.HTML),
|
||||
Metrics: make([]templates.MetricView, 0, len(d.Metrics)),
|
||||
Tech: d.Tech,
|
||||
Evidence: s.evidence(d),
|
||||
Backlinks: s.backlinks(d),
|
||||
SubPages: s.subPages(d),
|
||||
}
|
||||
for _, m := range d.Metrics {
|
||||
view.Metrics = append(view.Metrics, templates.MetricView{Label: m.Label, Value: content.MetricValue(m.Value)})
|
||||
@@ -334,7 +331,7 @@ func (s *Site) evidence(d *content.Document) []templates.LinkView {
|
||||
func (s *Site) backlinks(d *content.Document) []templates.LinkView {
|
||||
out := make([]templates.LinkView, 0, len(d.Backlinks))
|
||||
for _, b := range d.Backlinks {
|
||||
out = append(out, templates.LinkView{Label: b.Title, Href: b.URL, Kind: templates.LevelLabel(b.Level)})
|
||||
out = append(out, templates.LinkView{Label: b.Title, Href: b.URL})
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user