Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.

Commit 795241b

Browse files
authored
Add support for location_address field (#370)
* Fix layout of structured medatadata Signed-off-by: Matt Stratton <matt.stratton@gmail.com> * Add support for location_address field This change, when implemented, adds an additional data field for the street address of the venue. If set, this displays on the welcome page, and it is also used in the structured metadata. Signed-off-by: Matt Stratton <matt.stratton@gmail.com>
1 parent b53788e commit 795241b

7 files changed

Lines changed: 24 additions & 7 deletions

File tree

exampleSite/data/events/2017-ponyville.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cfp_date_end: 2016-12-30
99
cfp_date_announce: 2017-01-01
1010
coordinates: "41.882219, -87.640530"
1111
location: "Applejack House"
12+
location_address: "350 West Mart Center Drive, Chicago, IL 60654"
1213
newnav: "yes"
1314
event_twitter: "mattstratton"
1415
registration_open: "true"

exampleSite/utilities/examples/data/events/yyyy-city.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ event_logo: "logo.jpg"
2626
coordinates: "" # The coordinates of your city. Get Latitude and Longitude of a Point: http://itouchmap.com/latlong.html
2727
location: "yourlocation" # Defaults to city, but you can make it the venue name.
2828
#
29+
location_address: "" #Optional - use the street address of your venue. This will show up on the welcome page if set.
2930

3031
nav_elements: # List of pages you want to show up in the navigation of your page.
3132
# - name: propose

layouts/partials/events/event_metadata.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,29 @@
2121
"@context": "http://schema.org",
2222
"@type": "ExhibitionEvent",
2323
{{ if $e.description }}
24-
"description": {{ $e.description }}
24+
"description": "{{ $e.description | htmlEscape | htmlUnescape | safeHTML}}",
2525
{{ else }}
2626
"description": "The conference that brings development and operations together.",
2727
{{ end }}
2828
"name": "devopsdays {{ $e.city }} {{ $e.year }}",
2929
"startDate": "{{ $e.startdate }}",
3030
"endDate": "{{ $e.enddate }}",
31-
"url": {{ $url }},
32-
"image": {{ $image_url }},
31+
"url": "{{ $url }}",
32+
"image": "{{ $image_url }}",
3333
"location": {
3434
"@type": "Place",
3535
{{ if eq $e.city $e.location }}
3636
"name": "{{ $e.city }}",
3737
{{ else }}
3838
"name": "{{ $e.location }}, {{ $e.city }}",
3939
{{ end }}
40-
"address": "{{ $e.coordinates }}"
40+
{{ if $e.location_address }}
41+
{{ if ne $e.location_address "" }}
42+
"address": "{{ $e.location_address }}"
43+
{{ else }}
44+
"address": "{{ $e.coordinates }}"
45+
{{ end }}
46+
{{ end }}
4147
}
4248
}
4349
</script>

layouts/partials/welcome.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ <h1 class = "welcome-page">devopsdays {{$e.city}}</h1>
2323
<br />
2424

2525
{{if $e.location }}
26-
<span>{{- $e.location -}}</span>
26+
<span class = "welecome-page-masthead-venue">{{- $e.location -}}</span>
2727
<br />
28+
{{ if $e.location_address }}
29+
<span><a href = "http://maps.google.com/?q={{$e.location_address}}" class = "welcome-page-masthead-link">{{ $e.location_address }}</a></span>
30+
<br />
31+
{{ end }}
2832
{{ end }}
2933

3034
{{ if $e.description }}

static/css/site.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/css/site.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/scss/custom.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,11 @@ a:hover.welcome-page-masthead-link {
483483
text-decoration: none;
484484
}
485485

486+
.welecome-page-masthead-venue {
487+
font-size: 1.2em;
488+
489+
}
490+
486491
.welcome-page-cta {
487492
margin-left: 5px;
488493
margin-right: 5px;

0 commit comments

Comments
 (0)