Skip to content

Commit

Permalink
Ensure css and layout of usage notes in overview pages matches census…
Browse files Browse the repository at this point in the history
… pages
  • Loading branch information
jakeandandrews committed Feb 20, 2025
1 parent 6cc99af commit 63818b1
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion assets/templates/partials/static/id-datestamp.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
</dd>
</div>
{{ end }}
</dl>
</dl>
19 changes: 10 additions & 9 deletions assets/templates/partials/static/usage-notes.tmpl
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<li>
<div id="id-license" class="section__content--markdown margin-right--0">
<h2 class="font-size--32 line-height--40 font-weight-700 padding-top--0 padding-left-sm--2 padding-left-md--3">Usage information</h2>
{{ range .UsageNotes }}
<h3 class="font-size--24 line-height--32 font-weight-700">{{.Title}}</h2>
<p>{{.Note | markdown}}</p>
{{ end }}
</div>
</li>
<section id="usage-notes" aria-label="{{ localise "NotesAndUsage" .Language 1 }}">
<h2 class="ons-u-mt-xl ons-u-pb-no ons-u-pt-no" id="usage-notes">
{{ localise "NotesAndUsage" .Language 1 }}
</h2>
{{ range .UsageNotes }}
<h3 class="font-size--24 line-height--32 font-weight-700">{{.Title}}</h2>
<p>{{.Note | markdown}}</p>
{{ end }}
</section>

2 changes: 1 addition & 1 deletion assets/templates/static.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
{{ template "partials/static/contact-details" . }}
{{ end }}
{{ if .UsageNotes}}
{{ template "partials/static/usage-notes" .}}
{{ template "partials/static/usage-notes" . }}
{{ end }}
{{ template "partials/census/protecting-personal-data" . }}
{{ if .DatasetLandingPage.HasOtherVersions }}
Expand Down
1 change: 0 additions & 1 deletion handlers/filterable_landing_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ func filterableLanding(w http.ResponseWriter, req *http.Request, dc DatasetClien
pop,
)


rend.BuildPage(w, m, "static")
} else {
m := mapper.CreateFilterableLandingPage(
Expand Down
44 changes: 22 additions & 22 deletions model/static/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,31 @@ type Page struct {
ShowCensusBranding bool `json:"show_census_branding"`
Publisher publisher.Publisher `json:"publisher,omitempty"`
UsageNotes []UsageNote `json:"usage_notes"`
}
}

// StaticOverviewPage contains properties related to the static dataset
type DatasetLandingPage struct {
HasOtherVersions bool `json:"has_other_versions"`
HasDownloads bool `json:"has_downloads"`
LatestVersionURL string `json:"latest_version_url"`
Dimensions []sharedModel.Dimension `json:"dimensions"`
ShareDetails ShareDetails
Description []string `json:"description"`
IsCustom bool `json:"is_custom"`
IsFlexibleForm bool `json:"is_flexible_form"`
DatasetURL string `json:"dataset_url"`
Panels []Panel `json:"panels"`
QualityStatements []Panel `json:"quality_statements"`
SDC []Panel `json:"sdc"`
HasSDC bool `json:"has_sdc"`
RelatedContentItems []RelatedContentItem `json:"related_content_items"`
IsMultivariate bool `json:"is_multivariate"`
ShowXLSXInfo bool `json:"show_xlsx_info"`
OSRLogo osrlogo.OSRLogo `json:"osr_logo"`
EnableFeedbackAPI bool `json:"enable_feedback_api"`
FeedbackAPIURL string `json:"feedback_api_url"`
ImproveResults model.Collapsible
Version sharedModel.Version `json:"version"`
HasOtherVersions bool `json:"has_other_versions"`
HasDownloads bool `json:"has_downloads"`
LatestVersionURL string `json:"latest_version_url"`
Dimensions []sharedModel.Dimension `json:"dimensions"`
ShareDetails ShareDetails
Description []string `json:"description"`
IsCustom bool `json:"is_custom"`
IsFlexibleForm bool `json:"is_flexible_form"`
DatasetURL string `json:"dataset_url"`
Panels []Panel `json:"panels"`
QualityStatements []Panel `json:"quality_statements"`
SDC []Panel `json:"sdc"`
HasSDC bool `json:"has_sdc"`
RelatedContentItems []RelatedContentItem `json:"related_content_items"`
IsMultivariate bool `json:"is_multivariate"`
ShowXLSXInfo bool `json:"show_xlsx_info"`
OSRLogo osrlogo.OSRLogo `json:"osr_logo"`
EnableFeedbackAPI bool `json:"enable_feedback_api"`
FeedbackAPIURL string `json:"feedback_api_url"`
ImproveResults model.Collapsible
Version sharedModel.Version `json:"version"`
}

// UsageNote represents data for a single usage note
Expand Down

0 comments on commit 63818b1

Please sign in to comment.