Commit 656a26e2 authored by Jamie Tanna's avatar Jamie Tanna

Allow embedding of an h-card in an event's p-location

It turns out that this was a bit of an oversight of mine - as called out
by Chris Emerson on Twitter, I hadn't named Ludorati cafe as our
destination.

Then, looking through the Microformats wiki, it appears that to embed
the details of a place (i.e. add a `p-name`) you need an `h-card`.

If we're doing that, we should be re-using the params from `.adr` and
`.geo`, instead of duplicating them into our `card` namespace.
parent f103ac95
......@@ -14,7 +14,28 @@
<time class="dt-end" datetime="{{ dateFormat "2006-01-02 15:04" .Params.end }}">
{{ dateFormat "Mon, 02 Jan 2006 15:04:05 MST" .Params.End }}
</time>
{{ if .Params.Adr }}
{{ if .Params.card }}
<span class="p-location h-card">
at
{{ if .Params.card.url }}
<a href="{{ .Params.card.url }}" class="u-url p-name">{{ .Params.card.name }}</a>
{{ else }}
<span class="p-name">{{ .Params.card.name }}</span>
{{ end }}
{{ if .Params.Adr }}
<span class="p-street-address">{{ .Params.adr.street_address }}</span>
<span class="p-locality">{{ .Params.adr.locality }}</span>
<span class="p-country-name">{{ .Params.adr.country_name }}</span>
<span class="p-postal-code">{{ .Params.adr.postal_code }}</span>
{{ end }}
{{ if .Params.Geo }}
<span class="p-latitude">{{ .Params.geo.latitude }}</span>
<span class="p-longitude">{{ .Params.geo.longitude }}</span>
{{ end }}
</span>
{{ else if .Params.Adr }}
at
<span class="p-location h-adr">
<span class="p-street-address">{{ .Params.adr.street_address }}</span>
......@@ -22,8 +43,7 @@
<span class="p-country-name">{{ .Params.adr.country_name }}</span>
<span class="p-postal-code">{{ .Params.adr.postal_code }}</span>
</span>
{{ end }}
{{ if .Params.Geo }}
{{ else if .Params.Geo }}
at
<span class="p-location h-geo">
<span class="p-latitude">{{ .Params.geo.latitude }}</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment