Skip to content

Commit

Permalink
Merge pull request #29 from PDOK/table-fixes
Browse files Browse the repository at this point in the history
Fix table layout on landing page and api page + add lastUpdatedBy field
  • Loading branch information
rkettelerij authored Jun 13, 2023
2 parents baad52a + b4150be commit 9fa5840
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 11 deletions.
7 changes: 6 additions & 1 deletion assets/css/gokoala.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,19 @@ footer {
background-color: var(--bs-blue);
}

/* tables */
.table-sm td p {
margin: 0;
padding: 0;
}
.table-sm>:not(caption)>*>* {
padding: 0.10rem;
}

/* toggles */
.toggle-content {
display: none;
}

.toggle-content.is-visible {
display: table-row;
}
14 changes: 8 additions & 6 deletions engine/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type Config struct {
Thumbnail *string `yaml:"thumbnail"`
Keywords []string `yaml:"keywords"`
LastUpdated *string `yaml:"lastUpdated"`
LastUpdatedBy string `yaml:"lastUpdatedBy"`
License License `yaml:"license" validate:"required"`
Support *string `yaml:"support"`
DatasetDetails []DatasetDetail `yaml:"datasetDetails"`
Expand Down Expand Up @@ -141,12 +142,13 @@ type GeoSpatialCollection struct {
}

type GeoSpatialCollectionMetadata struct {
Title *string `yaml:"title"`
Description *string `yaml:"description"`
Thumbnail *string `yaml:"thumbnail"`
Keywords []string `yaml:"keywords"`
LastUpdated *string `yaml:"lastUpdated"`
Extent *Extent `yaml:"extent"`
Title *string `yaml:"title"`
Description *string `yaml:"description"`
Thumbnail *string `yaml:"thumbnail"`
Keywords []string `yaml:"keywords"`
LastUpdated *string `yaml:"lastUpdated"`
LastUpdatedBy string `yaml:"lastUpdatedBy"`
Extent *Extent `yaml:"extent"`
}

type CollectionEntry3dGeoVolumes struct {
Expand Down
4 changes: 2 additions & 2 deletions ogc/common/core/templates/api.go.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ <h1 class="title">{{ .Config.Title }} - API specificatie</h1>
<div class="row">
<div class="col-md-12">
{{ markdown .Config.Abstract }}
<table class="table table-borderless table-sm">
<table class="table table-borderless table-sm w-50">
<tbody>
<tr>
<td class="w-10">
<td class="w-25">
<b>Licentie</b>
</td>
<td>
Expand Down
3 changes: 2 additions & 1 deletion ogc/common/core/templates/landing-page.go.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ <h1 class="title">{{ .Config.Title }}</h1>
<div class="col-md-12">
{{ end }}
{{ markdown .Config.Abstract }}
<table class="table table-borderless table-sm w-75">
<table class="table table-borderless table-sm w-100">
<caption class="visually-hidden">Dataset details</caption>
<tbody>
{{ if .Config.Keywords }}
<tr>
Expand Down
12 changes: 11 additions & 1 deletion ogc/common/geospatial/templates/collections.go.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,22 @@ <h5 class="card-header">
{{/* <li class="list-group-item text-muted"><b>Schema</b>: TODO link to collection schema</li> */}}
{{ if and $coll.Metadata $coll.Metadata.LastUpdated }}
<li class="list-group-item text-muted">
{{ if and $coll.Metadata $coll.Metadata.LastUpdatedBy }}
<strong>Bijgewerkt door {{ $coll.Metadata.LastUpdatedBy }} op</strong>:
{{ else if $cfg.LastUpdatedBy }}
<strong>Bijgewerkt door {{ $cfg.LastUpdatedBy }} op</strong>:
{{ else }}
<strong>Bijgewerkt op</strong>:
{{ end }}
{{ toDate "2006-01-02T15:04:05Z07:00" $coll.Metadata.LastUpdated | date "2006-01-02" }}
</li>
{{ else if $cfg.LastUpdated }}
<li class="list-group-item text-muted">
<li class="list-group-item text-muted"> }}
{{ if $cfg.LastUpdatedBy }}
<strong>Bijgewerkt door {{ $cfg.LastUpdatedBy }} op</strong>:
{{ else }}
<strong>Bijgewerkt op</strong>:
{{ end }}
{{ toDate "2006-01-02T15:04:05Z07:00" $cfg.LastUpdated | date "2006-01-02" }}
</li>
{{ end }}
Expand Down

0 comments on commit 9fa5840

Please sign in to comment.