include signature JSON database dynamically on subpage

lektura
max.mehl 2017-03-23 16:21:31 +01:00
parent dbd030e77a
commit e903f14867
4 changed files with 90 additions and 1 deletions

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
{{ $data := index .Site.Data .Site.Language.Lang }}
<html lang="en-US">
<head>
{{ partial "head.html" . }}
</head>
<body id="page-top">
{{ partial "navpage.html" . }}
{{ partial "page-signatures.html" . }}
{{ partial "language.html" . }}
{{ partial "legal.html" . }}
{{ partial "sharecolumn.html" . }}
{{ partial "js.html" . }}
</body>
</html>

View File

@ -7,7 +7,7 @@
<body id="page-top">
{{ partial "navpage.html" . }}
{{ partial "404.html" . }}
{{ partial "page-signatures.html" . }}
{{ partial "language.html" . }}

View File

@ -0,0 +1,42 @@
[
{
"id": 0,
"name": "Max",
"email": "mail@example.com",
"country": "Deutschland",
"zip": "86367",
"perm": "yes",
"code": "630691407558d1cc36a6abb",
"confirmed": "yes"
},
{
"id": 1,
"name": "Cooler Name",
"email": "tech@web.de",
"country": "Schweiz",
"zip": "4404",
"perm": "yes",
"code": "759321396558d1cc8bb57fe",
"confirmed": "yes"
},
{
"id": 2,
"name": "Hengst",
"email": "test@test.com",
"country": "",
"zip": "",
"perm": "yes",
"code": "691034870458d1cd0fdfb2f",
"confirmed": "yes"
},
{
"id": 3,
"name": "Richard Bruce Kopp",
"email": "kopp@test.de",
"country": "Germany ",
"zip": "71522",
"perm": "yes",
"code": "557271457758d1ff356910f",
"confirmed": "no"
}
]

View File

@ -0,0 +1,27 @@
{{ "<!-- SUBPAGE SIGNATURES -->" | safeHTML }}
<header>
<div class="header-content">
<div class="header-content-inner">
<div class="col-lg-8 col-lg-offset-2 text-center">
<table class="signatures">
<tbody>
<tr>
<th>Name</th>
<th>Country</th>
<th>Zip Code</th>
</tr>
{{ range $.Site.Data.signatures }}
{{ range . }}
<tr>
<td>{{ .name }}</td>
<td>{{ .country }}</td>
<td>{{ .zip }}</td>
</tr>
{{end}}
{{ end }}
</tbody>
</table>
</div>
</div>
</div>
</header>