Start adding offers

This commit is contained in:
Patrick Neff 2019-01-08 07:01:47 +01:00
parent 1eec9fdf76
commit 3c2a147f43
10 changed files with 109 additions and 4 deletions

View File

@ -0,0 +1,15 @@
+++
title = "Angebote"
date = "2019-01-08T06:58:56+01:00"
draft = true
type = "offer"
keywords = []
price = 1234.56
discount = 0
[[resources]]
title = "Angebote #:counter"
src = "bilder/**.jpg"
[resources.params]
alt = "Bild von Angebote"
+++

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 KiB

View File

@ -0,0 +1,17 @@
+++
title = "Grabmal #1234"
date = "2019-01-08T06:27:20+01:00"
draft = true
type = "angebote"
keywords = []
price = 1234.00
discountPrice = 1000.00
productID = 1234
[[resources]]
title = "Grabmal 1234 #:counter"
src = "bilder/**.jpg"
[resources.params]
alt = "Bild von 1234"
featured = true
+++

View File

@ -0,0 +1,15 @@
+++
title = "Grabmal"
date = "2019-01-08T06:59:01+01:00"
draft = true
type = "offer"
keywords = []
price = 1234.56
discount = 0
[[resources]]
title = "Grabmal #:counter"
src = "bilder/**.jpg"
[resources.params]
alt = "Bild von Grabmal"
+++

View File

@ -0,0 +1,15 @@
+++
title = "{{ replace .Name "-" " " | title }}"
date = "{{ .Date }}"
draft = true
type = "offer"
keywords = []
price = 1234.56
discount = 0
[[resources]]
title = "{{ replace .Name "-" " " | title }} #:counter"
src = "bilder/**.jpg"
[resources.params]
alt = "Bild von {{ replace .Name "-" " " | title }}"
+++

View File

@ -0,0 +1,11 @@
<li class="padding">
<figure class="gallery">
{{- partial "img.html" (dict "ctx" . "image" (index (.Resources.ByType "image") 0) "class" "gallery" "showTitle" true "showDescription" true) -}}
<figcaption>
Preis: {{ .Params.price | float }} €
{{ with .Params.discountPrice }}
Angebotspreis: {{ . | float }} €
{{ end }}
</figcaption>
</figure>
</li>

View File

@ -0,0 +1,21 @@
{{- define "title" -}}
{{ .Title }} &bull; {{ .Site.Title }}
{{- end -}}
{{ define "main" }}
<main id="list">
<h1 class="padding">{{ .Title }}</h1>
{{- with .Content -}}
<div class="content flex column">
<div class="padding">
{{ . }}
</div>
</div>
{{- end -}}
<ul class="list-unstyled flex row">
{{- range .Pages -}}
{{- .Render "li" -}}
{{- end -}}
</ul>
</main>
{{ end }}

View File

@ -0,0 +1,11 @@
{{- define "title" -}}
{{ .Title }} &bull; {{ .Site.Title }}
{{- end -}}
{{- define "main" -}}
<main id="single">
<article>
{{- partial "single.html" . -}}
</article>
</main>
{{- end -}}

View File

@ -4,10 +4,10 @@
<section class="flex row"> <section class="flex row">
<div id="index-short-contact"> <div id="index-short-contact">
<div class="phone"> <div class="phone">
<i class="fa fa-phone"></i>: {{ (index .Site.Data.contact.contact 0).telephone }} <i class="fa fa-phone"></i>: {{ (index .Site.Data.kontakt.kontakt 0).telephone }}
</div> </div>
<div class="mail"> <div class="mail">
{{- $email := (index .Site.Data.contact.contact 0).email }} {{- $email := (index .Site.Data.kontakt.kontakt 0).email }}
<i class="fa fa-envelope"></i>: <a href="mailto:{{ $email }}">{{ $email }}</a> <i class="fa fa-envelope"></i>: <a href="mailto:{{ $email }}">{{ $email }}</a>
</div> </div>
<div class="social"> <div class="social">
@ -55,7 +55,7 @@
</div> </div>
<div class="flex row"> <div class="flex row">
{{- $site := . }} {{- $site := . }}
{{- range .Site.Data.contact.contact -}} {{- range .Site.Data.kontakt.kontakt -}}
{{- partial "address.html" (dict "address" . "ctx" $site) -}} {{- partial "address.html" (dict "address" . "ctx" $site) -}}
{{- end -}} {{- end -}}
</div> </div>

View File

@ -10,7 +10,7 @@
</div> </div>
<div class="flex row"> <div class="flex row">
{{- $site := . }} {{- $site := . }}
{{- range .Site.Data.contact.contact -}} {{- range .Site.Data.kontakt.kontakt -}}
{{- partial "address.html" (dict "address" . "ctx" $site) -}} {{- partial "address.html" (dict "address" . "ctx" $site) -}}
{{- end -}} {{- end -}}
</div> </div>