-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from devopsdays/mattstratton/add-event-site-p…
- Loading branch information
Showing
4 changed files
with
63 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,9 @@ | ||
{{ partial "header.html" . }} | ||
|
||
{{/* | ||
This section is what creates the query to get at all the site data. If you need this somewhere, you can just copy | ||
it and paste it. Need to figure out if a partial would expose the variables/elements/array created herein. It could be done in a partial (need to include the trailing .) but I don't think it would work in shortcodes, which is where we need it the most - mattstratton | ||
*/}} | ||
{{ partial "event_header.html" . }} | ||
|
||
{{ $path := split $.Source.File.Path "/" }} | ||
{{ $event_slug := index $path 1 }} | ||
{{ $e := (index $.Site.Data.events $event_slug) }} | ||
|
||
{{/* end site data query */}} | ||
|
||
<div class = "container-fluid"> | ||
<div class="row"> | ||
<div class="col-md-8"> | ||
<h1> {{ $e.city }} {{ $e.year }} - {{ title .Title }} </h1> | ||
<!-- Main navigation --> | ||
<div class="submenu"> | ||
<h3> | ||
{{ if $e.nav_elements }} | ||
{{ range $e.nav_elements }} | ||
{{ if .url }} | ||
<a href="{{ .url}}">{{ .name }}</a> | ||
{{ else }} | ||
<a href="/events/{{ $event_slug }}/{{ .name }}">{{ .name }}</a> | ||
{{ end }} | ||
{{ end }} | ||
{{ else }} | ||
{{ range $navigation := $e.navigationelements}} | ||
<a href="/events/{{ $event_slug }}/{{ $navigation}}">{{ $navigation }}</a> | ||
{{ end }} | ||
{{ end }} | ||
</h3> | ||
</div> | ||
<!-- end main navigation --> | ||
|
||
{{ .Content }} | ||
</div> | ||
<div class="col-md-4"> | ||
<!-- sponsor code begin --> | ||
{{ $sponsors := $e.sponsors }} | ||
{{ range $e.sponsor_levels }} | ||
<h2>{{ .label }} Sponsors</h2> | ||
{{ range where $sponsors "level" .id }} | ||
{{ $s := (index $.Site.Data.sponsors .id) }} | ||
{{ if isset $.Site.Data.sponsors .id }} | ||
<a href = "{{ $s.url }}"><img alt = "{{ .id }}" src = "/img/sponsors/{{ .id }}.png" class="img-responsive company-logo" width = "95px"></a> | ||
{{ end }} | ||
{{ end }} | ||
<div class = "sponsor-cta"> | ||
<a href = "/events/{{ $e.friendly }}/sponsor">Become a {{ .label }} Sponsor!</a> | ||
</div> | ||
{{ end }} | ||
|
||
<!-- sponsor code end --> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
{{ partial "footer.html" . }} | ||
{{ partial "event_footer.html" . }} |
30 changes: 30 additions & 0 deletions
30
themes/devopsdays-legacy/layouts/partials/event_footer.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{{ $path := split $.Source.File.Path "/" }} | ||
{{ $event_slug := index $path 1 }} | ||
{{ $e := (index $.Site.Data.events $event_slug) }} | ||
|
||
</div> | ||
|
||
|
||
|
||
<div class="col-md-4"> | ||
<!-- sponsor code begin --> | ||
{{ $sponsors := $e.sponsors }} | ||
{{ range $e.sponsor_levels }} | ||
<h2>{{ .label }} Sponsors</h2> | ||
{{ range where $sponsors "level" .id }} | ||
{{ $s := (index $.Site.Data.sponsors .id) }} | ||
{{ if isset $.Site.Data.sponsors .id }} | ||
<a href = "{{ $s.url }}"><img alt = "{{ .id }}" src = "/img/sponsors/{{ .id }}.png" class="img-responsive company-logo" width = "95px"></a> | ||
{{ end }} | ||
{{ end }} | ||
<div class = "sponsor-cta"> | ||
<a href = "/events/{{ $e.friendly }}/sponsor">Become a {{ .label }} Sponsor!</a> | ||
</div> | ||
{{ end }} | ||
|
||
<!-- sponsor code end --> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
{{ partial "footer.html" . }} |
27 changes: 27 additions & 0 deletions
27
themes/devopsdays-legacy/layouts/partials/event_header.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{ partial "header.html" . }} | ||
|
||
<!-- put the event partial header here --> | ||
|
||
{{/* | ||
This section is what creates the query to get at all the site data. If you need this somewhere, you can just copy | ||
it and paste it. Need to figure out if a partial would expose the variables/elements/array created herein. It could be done in a partial (need to include the trailing .) but I don't think it would work in shortcodes, which is where we need it the most - mattstratton | ||
*/}} | ||
|
||
{{ $path := split $.Source.File.Path "/" }} | ||
{{ $event_slug := index $path 1 }} | ||
{{ $e := (index $.Site.Data.events $event_slug) }} | ||
|
||
{{/* end site data query */}} | ||
|
||
<div class = "container-fluid"> | ||
<div class="row"> | ||
<div class="col-md-8"> | ||
<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> | ||
{{ end }} | ||
</h3> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters