Skip to content

Commit

Permalink
Merge pull request devopsdays#71 from devopsdays/add-date-shortcode
Browse files Browse the repository at this point in the history
add some shortcodes for event data
  • Loading branch information
mattstratton committed Mar 7, 2016
2 parents 38d1fe8 + d2068dd commit b2957df
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 7 deletions.
14 changes: 7 additions & 7 deletions content/events/2016-chicago/welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ aliases = ["/events/2016-chicago"]

+++

## Tuesday, August 30 and Wednesday, August 31
## {{< event_start >}} - {{< event_end >}}

Welcome! The group that brought you DevOpsDays Chicago 2015 is back together and planning the 2016 event. We're encouraged by the feedback from last year's event and are determined to bring an improved experience and continue the DevOps conversation this August in Chicago.

<div style="text-align:center;">
<img alt="DevOpsDays Chicago 2016" src="./logo.png"/>
{{< event_logo >}}
</div>

<table>
<tr>
<td><b>Date</b></td>
<td><%= render(:partial => "/#{@eventhome}/_target_date") -%></td>
<td>{{< event_start >}} - {{< event_end >}}
</tr>
<tr>
<td><b>Location</b></td>
Expand All @@ -38,16 +38,16 @@ Welcome! The group that brought you DevOpsDays Chicago 2015 is back together an
-->
<tr>
<td><b>Sponsors</b></td>
<td><a href="/sponsor/">Sponsor the event!</a> It's a great way to attract new talent and promote your organization.</td>
<td><a href="sponsor/">Sponsor the event!</a> It's a great way to attract new talent and promote your organization.</td>
</tr>
<tr>
<td><b>Contact</b></td>
<td><a href="/contact/">Get in touch with the Organizers</a>.</td>
<td><a href="contact/">Get in touch with the Organizers</a>.</td>
</tr>
<tr>
<td></td>
<td><a href="https://twitter.com/devopsdaysChi" class="twitter-follow-button" data-show-count="false">Follow @devopsdaysChi</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<td>
{{< event_twitter devopsdayschi >}}
</td>
</tr>
</table>
Expand Down
4 changes: 4 additions & 0 deletions layouts/shortcodes/event_end.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ $event := .Page.Params.event}}
{{ $e := (index $.Page.Site.Data.events $event) }}
{{ $enddate := $e.enddate}}
{{ dateFormat "Monday, Jan 2, 2006" $enddate }}
Empty file.
6 changes: 6 additions & 0 deletions layouts/shortcodes/event_logo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{ $event := .Page.Params.event}}
{{ $e := (index $.Page.Site.Data.events $event) }}
{{ $city := $e.city}}

{{ $cityyear := $e.year }}
<img alt="DevOpsDays {{ $city }} {{ $cityyear }}" src="/img/events/{{ $cityyear }}-{{lower $city }}/logo.png"/>
4 changes: 4 additions & 0 deletions layouts/shortcodes/event_start.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ $event := .Page.Params.event}}
{{ $e := (index $.Page.Site.Data.events $event) }}
{{ $startdate := $e.startdate}}
{{ dateFormat "Monday, Jan 2, 2006" $startdate }}
2 changes: 2 additions & 0 deletions layouts/shortcodes/event_twitter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<a href="https://twitter.com/{{ index .Params 0 }}" class="twitter-follow-button" data-show-count="false">Follow @{{ index .Params 0 }}</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
Binary file added static/img/events/2016-chicago/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/sponsors/arresteddevops.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b2957df

Please sign in to comment.