Skip to content

Commit

Permalink
Merge pull request #148 from devopsdays/mattstratton/fix-bottom-footer
Browse files Browse the repository at this point in the history
Rework the past and future bottom footers
  • Loading branch information
mattstratton committed Apr 15, 2016
2 parents 07030f1 + 90a7a4d commit f0575af
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 53 deletions.
17 changes: 3 additions & 14 deletions themes/devopsdays-legacy/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,12 @@ <h1>Upcoming devopsdays events</h1>
{{ partial "upcoming_headline.html" . }}
{{ partial "map.html" .}}
</div>
<div class="span-8 last">
{{ partial "twitterfeed.html" . }}
</div>

<div style="padding-top:18px;" class="span-18">
<h1>Past</h1>
</div>
<div style="padding-top:18px;" class="span-5 last">
<h1>Future</h1>
</div>
<div class="span-8 last twitter-sidebar">
{{ partial "twitterfeed.html" . }}
</div>

<div class="span-18">
{{ partial "past.html" . }}
</div>
<div class="span-5 last">
{{ partial "future.html" . }}
</div>
</div>

{{ partial "footer.html" . }}
1 change: 1 addition & 0 deletions themes/devopsdays-legacy/layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
</div>
{{ partial "footer_scripts" . }}

</body>
Expand Down
51 changes: 28 additions & 23 deletions themes/devopsdays-legacy/layouts/partials/future.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
<div style="height:550px;" id="quicklinks">
<table>
<tr>
<td>
<strong>2016</strong><br/>
<a href="/events/2016-vancouver/">Vancouver - Apr 15 & 16</a><br/>
<a href="/events/2016-london/">London - Apr 19 & 20</a><br/>
<a href="/events/2016-denver/">Denver - Apr 21 & 22</a><br/>
<a href="/events/2016-atlanta/">Atlanta - Apr</a><br/>
<a href="/events/2016-kiel/">Kiel - May 12 & 13</a><br/>
<a href="/events/2016-seattle/">Seattle - May 12 & 13</a><br/>
<a href="/events/2016-toronto/">Toronto - May 26 & 27</a><br/>
<a href="/events/2016-washington-dc/">Washington, DC - Jun 8 & 9</a><br/>
<a href="/events/2016-minneapolis/">Minneapolis - Jul 20 & 21</a><br/>
<a href="/events/2016-edinburgh/">Edinburgh - Jul</a><br/>
<a href="/events/2016-saltlakecity/">Salt Lake City</a><br/>
<a href="/events/2016-philadelphia/">Philadelphia</a><br/>
<a href="/events/2016-portland/">Portland - Aug 9 & 10</a><br/>
<a href="/events/2016-istanbul/">Istanbul</a><br/>
</td>
</tr>
</table>
</div>
<div class="span-6 last">
<div style=" padding-top:18px;" class="span-5 last">
<h1>Future</h1>
</div>

<div class="span-6 last">
<div style="height:700px;" id="quicklinks">
<table>
<tr>
<div style="display:table-cell; vertical-align:top">
<div style="margin:1px;">
<strong>2016</strong> <!--lazy hardcoding! -->
<br/>

{{ range $.Site.Data.events }}
{{ if eq .status "current" }}
<a href="/events/{{ .friendly}}">{{ .city }}: {{ dateFormat "Jan 2" .startdate }} - {{ dateFormat "Jan 2" .enddate }}</a>
<br />
{{ end }}
{{ end }}
</div>
</div>

</tr>
</table>
</div>
</div>
</div>
47 changes: 31 additions & 16 deletions themes/devopsdays-legacy/layouts/partials/past.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<div style="height:550px;" id="quicklinks">
<!-- The following blocks of comments explains how this list is generated with Hugo.
If you read this post generation, it will make no sense. see pre generated sources -->

Expand All @@ -17,21 +16,37 @@
{{ end }}
{{ end }}

<!-- Now scan through all the years that were marked as active in order to print the headline -->
{{ range ($.Scratch.GetSortedMapValues "active_years") }}
<div style="display:table-cell; vertical-align:top">
<div style="margin:2px;">
<strong>{{ . }}</strong><br/>
<div class="span-17 ">
<div style=" padding-top:18px;" class="span-7 last">
<h1>Past </h1>
</div>

<!-- Finally, scan throug the scratch with the ID of that year and print all the events sorted by startdate
Chomping here in order to convert int to string -->
{{ range ($.Scratch.GetSortedMapValues (chomp .)) }}
{{ $city := (index $.Site.Data.events . "city") }}
{{ $friendly := (index $.Site.Data.events . "friendly") }}
<a href="/events/{{ $friendly }}/">{{ $city }}</a><br/>
{{ end }}
<div class="span-17 ">
<div style="height:700px;" id="quicklinks">
<table>
<tr>
<!-- Now scan through all the years that were marked as active in order to print the headline -->
{{ range ($.Scratch.GetSortedMapValues "active_years") }}
<div style="display:table-cell; vertical-align:top">
<div style="margin:1px;">
<strong>{{ . }}</strong>
<br/>

<!-- Finally, scan throug the scratch with the ID of that year and print all the events sorted by startdate
Chomping here in order to convert int to string -->
{{ range ($.Scratch.GetSortedMapValues (chomp .)) }}
{{ $city := (index $.Site.Data.events . "city") }}
{{ $year := (index $.Site.Data.events . "year") }}
{{ $friendly := (index $.Site.Data.events . "friendly") }}
<a href="/events/{{ $friendly }}/">{{ $city }} {{ $year }}</a>
<br/>
{{ end }}
</div>
</div>
{{ end }}

</tr>
</table>
</div>
</div>
</div>
</div>
{{ end }}
</div>
3 changes: 3 additions & 0 deletions themes/devopsdays-legacy/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@
.sponsor-cta {
clear: both;
}
.twitter-sidebar {
overflow: hidden;
}

0 comments on commit f0575af

Please sign in to comment.