Improve tooling

master
Dario Ernst 4 years ago
parent e74f350774
commit 340e173b94

@ -17,5 +17,5 @@ hugo:
mkdir -p pdf mkdir -p pdf
deploy: deploy:
scp -r public/* dario@ghostdub.de:~/www-data/rezepte/ rsync -aP public/ dario@ghostdub.de:~/www-data/rezepte/
scp pdf/*.pdf dario@ghostdub.de:~/www-data/rezepte/print/ rsync -aP pdf/*.pdf dario@ghostdub.de:~/www-data/rezepte/print/

@ -1,8 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<body> <body>
<div id="content"> <div id="content">
{{- block "main" . }}{{ end }} <input type="text" id="searchInput" onkeyup="filterElements()" placeholder="Search …">
</div> {{- block "main" . }}{{ end }}
</body> </div>
</body>
<script src="js/view.js"></script>
</html> </html>

@ -1,5 +0,0 @@
{{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}}
{{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink "imageLink" .Params.Recipe_image) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}

@ -1,7 +1,5 @@
{{ define "main" }} {{ define "main" }}
{{ range $index, $element := .Site.RegularPages }} {{/* Ranging over all the posts */}} {{ range $index, $element := .Site.RegularPages }} {{/* Ranging over all the posts */}}
<div class="column is-one-quarter"> {{ partial "summary.html" . }} {{/* pass in the element to the partial */}}
{{ partial "summary.html" . }} {{/* pass in the element to the partial */}} {{ end }}
</div>
{{ end }}
{{ end }} {{ end }}

@ -1 +1,4 @@
<a href="{{ .Permalink }}"><p class="title is-4 has-text-centered">{{ $.Title }} </a> (<a href="print/{{ .File.BaseFileName }}.pdf">PDF</a>)</p> <p class="recipe">
<a href="{{ .Permalink }}">{{ $.Title }} </a>
(<a href="print/{{ .File.BaseFileName }}.pdf">PDF</a>)
</p>

Loading…
Cancel
Save