Skip to content

Commit

Permalink
Added offsite nav links. Fixes devopsdays#76
Browse files Browse the repository at this point in the history
This fundamentally changes the structure of the navigation links in the event configuration file. See the sample data file for an example. The "old" style data file is still functional for backwards compatibility.
  • Loading branch information
mattstratton committed Apr 13, 2016
1 parent c26d2cf commit 5559e01
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
12 changes: 11 additions & 1 deletion data/events/2016-chicago.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ cfp_date_end: 2016-06-01
cfp_date_announce: 2016-07-01
coordinates: "41.882219, -87.640530"
location: "Summit West"
navigationelements: ["welcome", "contact", "location", "program", "propose", "proposals", "conduct", "sponsor"]
newnav: "yes"
# navigationelements: ["welcome", "contact", "location", "program", "propose", "proposals", "conduct", "sponsor"]
nav_elements:
- name: welcome
- name: contact
- name: location
- name: program
- name: propose
- name: conduct
- name: sponsor

team: ["Jerry Cattell", "Brian Devlin", "Michael Lanyon", "Aaron Lindstrom", "Chris Read", "Kevin Reedy", "Sasha Rosenbaum", "Matt Stratton"]
organizer_email: "organizers-chicago-2016@devopsdays.org"
proposal_email: "proposals-chicago-2016@devopsdays.org"
Expand Down
15 changes: 13 additions & 2 deletions themes/devopsdays-legacy/layouts/event/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@ <h1> {{ $e.city }} {{ $e.year }} - {{ title .Title }} </h1>
<!-- Main navigation -->
<div class="submenu">
<h3>
{{ range $navigation := $e.navigationelements}}
<a href="/events/{{ $event_slug }}/{{ $navigation}}">{{ $navigation }}</a>&nbsp;
{{ if $e.nav_elements }}
{{ range $e.nav_elements }}
{{ if .url }}
<a href="{{ .url}}">{{ .name }}</a>&nbsp;
{{ else }}
<a href="/events/{{ $event_slug }}/{{ .name }}">{{ .name }}</a>&nbsp;
{{ end }}
{{ end }}
{{ else }}
{{ range $navigation := $e.navigationelements}}
<a href="/events/{{ $event_slug }}/{{ $navigation}}">{{ $navigation }}</a>&nbsp;
{{ end }}
{{ end }}
</h3>
</div>
<!-- end main navigation -->

{{ .Content }}
</div>
Expand Down
11 changes: 10 additions & 1 deletion yyyy-city.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ cfp_date_end: 2016-06-01
cfp_date_announce: 2016-07-01
coordinates: "41.882219, -87.640530" # The corrodinates of your venue. Get Latitude and Longitude of a Point: http://itouchmap.com/latlong.html
location: "location" # The name of your location
navigationelements: ["welcome", "contact", "location", "program", "propose", "proposals", "registration", "conduct", "sponsor"] # List of pages you want to show up in the navigation of your page. Remove any that aren't relevent yet.
"sponsor"] # List of pages you want to show up in the navigation of your page. Remove any that aren't relevent yet.
nav_elements: # List of pages you want to show up in the navigation of your page. Remove any that aren't relevent yet.
- name: welcome
- name: contact
- name: location
- name: program
- name: propose
url: http://mycfp.com # The url setting is optional, and only if you want the navigation to link off-site
- name: conduct
- name: sponsor
team: ["John Doe", "Jane Smith", "Sally Fields"]
organizer_email: "organizers-city-year@devopsdays.org" # Put your organizer email address here
proposal_email: "proposals-city-year@devopsdays.org" # Put your proposal email address here
Expand Down

0 comments on commit 5559e01

Please sign in to comment.