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

Commit

Permalink
Add support for location_address field (#370)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
mattstratton authored Mar 5, 2017
1 parent b53788e commit 795241b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 7 deletions.
1 change: 1 addition & 0 deletions exampleSite/data/events/2017-ponyville.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cfp_date_end: 2016-12-30
cfp_date_announce: 2017-01-01
coordinates: "41.882219, -87.640530"
location: "Applejack House"
location_address: "350 West Mart Center Drive, Chicago, IL 60654"
newnav: "yes"
event_twitter: "mattstratton"
registration_open: "true"
Expand Down
1 change: 1 addition & 0 deletions exampleSite/utilities/examples/data/events/yyyy-city.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ event_logo: "logo.jpg"
coordinates: "" # The coordinates of your city. Get Latitude and Longitude of a Point: http://itouchmap.com/latlong.html
location: "yourlocation" # Defaults to city, but you can make it the venue name.
#
location_address: "" #Optional - use the street address of your venue. This will show up on the welcome page if set.

nav_elements: # List of pages you want to show up in the navigation of your page.
# - name: propose
Expand Down
14 changes: 10 additions & 4 deletions layouts/partials/events/event_metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,29 @@
"@context": "http://schema.org",
"@type": "ExhibitionEvent",
{{ if $e.description }}
"description": {{ $e.description }}
"description": "{{ $e.description | htmlEscape | htmlUnescape | safeHTML}}",
{{ else }}
"description": "The conference that brings development and operations together.",
{{ end }}
"name": "devopsdays {{ $e.city }} {{ $e.year }}",
"startDate": "{{ $e.startdate }}",
"endDate": "{{ $e.enddate }}",
"url": {{ $url }},
"image": {{ $image_url }},
"url": "{{ $url }}",
"image": "{{ $image_url }}",
"location": {
"@type": "Place",
{{ if eq $e.city $e.location }}
"name": "{{ $e.city }}",
{{ else }}
"name": "{{ $e.location }}, {{ $e.city }}",
{{ end }}
"address": "{{ $e.coordinates }}"
{{ if $e.location_address }}
{{ if ne $e.location_address "" }}
"address": "{{ $e.location_address }}"
{{ else }}
"address": "{{ $e.coordinates }}"
{{ end }}
{{ end }}
}
}
</script>
Expand Down
6 changes: 5 additions & 1 deletion layouts/partials/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ <h1 class = "welcome-page">devopsdays {{$e.city}}</h1>
<br />

{{if $e.location }}
<span>{{- $e.location -}}</span>
<span class = "welecome-page-masthead-venue">{{- $e.location -}}</span>
<br />
{{ if $e.location_address }}
<span><a href = "http://maps.google.com/?q={{$e.location_address}}" class = "welcome-page-masthead-link">{{ $e.location_address }}</a></span>
<br />
{{ end }}
{{ end }}

{{ if $e.description }}
Expand Down
2 changes: 1 addition & 1 deletion static/css/site.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/css/site.css.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions static/scss/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,11 @@ a:hover.welcome-page-masthead-link {
text-decoration: none;
}

.welecome-page-masthead-venue {
font-size: 1.2em;

}

.welcome-page-cta {
margin-left: 5px;
margin-right: 5px;
Expand Down

0 comments on commit 795241b

Please sign in to comment.