Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ install:

$content = (Get-Content ($buildRoot + '\exampleSite\config.toml')) -join "`n"

$content = $content -replace 'PathSeperator = "/"','PathSeperator = "\\"'
$content = $content -replace 'pathseperator = "/"','pathseperator = "\\"'

Write-Output "config.toml content changed to:`n----`n$($content)"

Expand Down
10 changes: 6 additions & 4 deletions layouts/event/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@
<!-- main content -->
{{ if eq .File.BaseFileName "welcome"}}
{{- partial "welcome.html" . -}}
{{ else }}
{{ .Content }}
{{ end }}
<!-- need to add else statement for the rest of the content types -->
{{ partial "sponsors.html" . }}


</div>
<!-- close the content -->
</div>{{ "<!-- close the content -->" | safeHTML }}


</div>{{ "<!-- whole big thing -->" | safeHTML }}

</div>
<!-- whole big thing -->


{{ end }}
57 changes: 31 additions & 26 deletions layouts/partials/sponsors.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,42 @@
{{ $event_slug := index $path 1 }}
{{ $e := (index $.Site.Data.events $event_slug) }}

{{- if $e.sponsors -}}
{{- range $index, $level := $e.sponsor_levels -}}
{{ $.Scratch.Set $level.id 0 }}

<div class="row">
<!--first sponsor row-->
<div class="col-md-12">
<h4>{{ $level.label }} Sponsors</h4>
{{- if ge (dateFormat "2006-01-02" $e.startdate) (dateFormat "2006-01-02" ($.Now.Format "2006-01-02")) -}}
{{- if ne $e.sponsors_accepted "no" -}}
{{- if or (not $level.max) (lt ($.Scratch.Get $level.id) $level.max) -}}
<a href = "/events/{{ $e.name }}/sponsor">
<i>Become a {{ $level.label }} Sponsor!</i>
</a>
{{- end -}}
{{- end -}}
{{- end -}}
{{- if $e.sponsor_levels -}}
{{- range $index, $level := $e.sponsor_levels -}}
{{ $.Scratch.Set $level.id 0 }}

<div class="row">
{{- range where $e.sponsors "level" $level.id -}}
{{ $s := (index $.Site.Data.sponsors .id) }}
{{ if isset $.Site.Data.sponsors .id }}
<div class = "col-lg-2 col-md-3 col-sm-6 col-xs-6">
<a href = "{{ $s.url }}"><img src = "/img/sponsors/{{ .id }}.png" alt = "{{ $s.name }}" title = "{{ $s.name }}" class="img-fluid"></a>
</div>
<div class="row cta-row">
<!--first sponsor row-->
<div class="col-md-12">
<h4>{{ $level.label }} Sponsors</h4>
{{- if ( $e.startdate) or (ge (dateFormat "2006-01-02" $e.startdate) (dateFormat "2006-01-02" ($.Now.Format "2006-01-02"))) -}}
{{- if ne $e.sponsors_accepted "no" -}}
{{- if or (not $level.max) (lt ($.Scratch.Get $level.id) $level.max) -}}
<a href = "/events/{{ $e.name }}/sponsor">
<i>Become a {{ $level.label }} Sponsor!</i>
</a>
{{ $.Scratch.Add $level.id 1 }}
{{- end -}}
{{- end -}}
{{- end -}}
</div>{{ "<!-- close sponsor type header div-->" | safeHTML}}
</div>{{ "<!-- close sponsor type header row-->" | safeHTML}}
{{- if $e.sponsors -}}
<div class="row sponsor-row">
{{- range where $e.sponsors "level" $level.id -}}
{{ $s := (index $.Site.Data.sponsors .id) }}

{{ if isset $.Site.Data.sponsors .id }}

<div class = "col-lg-2 col-md-3 col-sm-6 col-xs-6">
<a href = "{{ $s.url }}"><img src = "/img/sponsors/{{ .id }}.png" alt = "{{ $s.name }}" title = "{{ $s.name }}" class="img-fluid"></a>
</div>{{ "<!-- close individusal sponsor div-->" | safeHTML}}
{{- end -}}
</div>
</div>
</div>
{{- end -}}
</div>{{ "<!-- close sponsor content row -->" | safeHTML}}


{{- end -}}
{{- end -}}
{{- end -}}
47 changes: 30 additions & 17 deletions layouts/partials/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,45 @@

<div class="row">
<div class="col-xs-12 col-md-8">
<h2>DevOpsDays {{ $e.city }}</h2> {{- dateFormat "January 2" $e.startdate -}} - {{- dateFormat "2, 2006" $e.enddate -}}
{{ if $e.city }}
<h2>DevOpsDays {{ $e.city }}</h2>
{{ end }}
{{ if $e.startdate }}
{{- dateFormat "January 2" $e.startdate -}} - {{- dateFormat "2, 2006" $e.enddate -}}
{{ end }}
<br />
<span>{{- $e.location -}}</span>
<br />
{{- $.Scratch.Set "past-counter" 0 -}}
{{- range sort $.Site.Data.events "startdate" -}}
{{- if .startdate -}} <!-- for some reason, it bails on the city Chicago, and also Paris -->
{{- if eq (lower .city) (lower $e.city) -}}
{{- if ne .startdate $e.startdate -}}
<i>Past {{ $e.city }} Events</i><br />
{{- $.Scratch.Set "past-counter" 1 -}}
{{if $e.location }}
<span>{{- $e.location -}}</span>
<br />
{{ end }}
{{if $e.city }}
{{- $.Scratch.Set "past-counter" 0 -}}
{{- range sort $.Site.Data.events "startdate" -}}
{{- if .startdate -}} <!-- for some reason, it bails on the city Chicago, and also Paris -->
{{- if eq (lower .city) (lower $e.city) -}}
{{- if ne .startdate $e.startdate -}}
<i>Past {{ $e.city }} Events</i><br />
{{- $.Scratch.Set "past-counter" 1 -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if eq (lower .city) (lower $e.city)}}
{{- if ne .startdate $e.startdate -}}
<a href = "/events/{{ .name }}">{{ dateFormat "2006" .startdate }}</a> <br />
{{- if eq (lower .city) (lower $e.city)}}
{{- if ne .startdate $e.startdate -}}
<a href = "/events/{{ .name }}">{{ dateFormat "2006" .startdate }}</a> <br />
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
<br />
<br />
{{ end }}
<button type="button" class="btn btn-default">Register</button>
<button type="button" class="btn btn-default">Follow</button>
</div>
<div class="col-xs-12 col-md-4">
{{ .Content }}
</div>

</div>
<div class="row">
<div class="col-md-12">
{{ .Content }}
</div>
</div>
20 changes: 20 additions & 0 deletions layouts/shortcodes/cfp_dates.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ $path := split .Page.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}
{{ $e := (index .Page.Site.Data.events $event_slug) }}

{{ if and ($e.cfp_date_start) ($e.cfp_date_end) ($e.cfp_date_announce)}}

{{ $cfp_date_start := $e.cfp_date_start }}
{{ $cfp_date_end := $e.cfp_date_end }}
{{ $cfp_date_announce := $e.cfp_date_announce }}

<center>
<b>Call for proposals opens {{ dateFormat "Monday, Jan 2, 2006" $cfp_date_start }}.</b><br>
<b>Call for proposals closes {{ dateFormat "Monday, Jan 2, 2006" $cfp_date_end }}.</b><br>
Selected proposals will be announced on {{ dateFormat "Monday, Jan 2, 2006" $cfp_date_announce }}.
</center>
{{ else }}
<center>
<b>Call for proposals is TBD</b>
</center>
{{ end }}
4 changes: 4 additions & 0 deletions layouts/shortcodes/email_organizers.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ $path := split .Page.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}
{{ $e := (index .Page.Site.Data.events $event_slug) }}
<a href='mailto:{{ $e.organizer_email }}?subject={{ .Get "subject"}}'>{{ $e.organizer_email }}</a>
5 changes: 5 additions & 0 deletions layouts/shortcodes/email_proposals.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ $path := split .Page.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}
{{ $e := (index .Page.Site.Data.events $event_slug) }}

<a href='mailto:{{ $e.proposal_email }}?subject={{ .Get "subject"}}'>{{ $e.proposal_email }}</a>
11 changes: 11 additions & 0 deletions layouts/shortcodes/event_end.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{ $path := split .Page.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}
{{ $e := (index .Page.Site.Data.events $event_slug) }}
{{ $enddate := $e.enddate}}

{{ if $e.enddate }}
{{ $enddate := $e.enddate}}
{{ dateFormat "Monday, Jan 2, 2006" $enddate }}
{{ else }}
TBD
{{ end }}
4 changes: 4 additions & 0 deletions layouts/shortcodes/event_link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ $path := split .Page.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}

<a href = "/events/{{ $event_slug }}/{{ .Get "page" }}">{{ .Get "text" }}</a>
4 changes: 4 additions & 0 deletions layouts/shortcodes/event_location.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ $path := split .Page.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}
{{ $e := (index .Page.Site.Data.events $event_slug) }}
<a href = "/events/{{ $event_slug }}/location">{{ $e.location }}</a>
5 changes: 5 additions & 0 deletions layouts/shortcodes/event_logo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ $path := split .Page.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}
{{ $e := (index .Page.Site.Data.events $event_slug) }}

<img alt="DevOpsDays {{ $e.city }} {{ $e.year }}" src="/events/{{ $event_slug }}/logo.png" style="max-width: 90%; margin:5%;"/>
39 changes: 39 additions & 0 deletions layouts/shortcodes/event_map.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{ $path := split .Page.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}
{{ $e := (index .Page.Site.Data.events $event_slug) }}

{{ $coords := split $e.coordinates "," }}
{{ $lat := index $coords 0 }}
{{ $lng := index $coords 1 }}

lat is {{ $lat }}
long is {{ $lng }}

<link href="/css/googlemaps.css" rel="stylesheet">

<div id="map_canvas" style="width: 550px; height: 265px"></div>

<script type="text/javascript" language="javascript">
function initMap() {
var mapDiv = document.getElementById("map_canvas");
var position = new google.maps.LatLng({{ $lat }}, {{ $lng }});

var map = new google.maps.Map(mapDiv, {
center: position,
zoom: 14,
mapTypeID: google.maps.MapTypeId.ROADMAP
});

var marker = new google.maps.Marker({
position: position,
map: map,
title: "{{ $e.location }}",
});
}

window.onload = function() {
initMap();
};
</script>

<script type="text/javascript" src="https://maps-api-ssl.google.com/maps/api/js?key=AIzaSyC1bvNK9qFJGEhoWNbQuojmJJ1Tg0DoOew"></script>
11 changes: 11 additions & 0 deletions layouts/shortcodes/event_start.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{ $path := split .Page.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}
{{ $e := (index .Page.Site.Data.events $event_slug) }}
{{ $startdate := $e.startdate}}

{{ if $e.startdate }}
{{ $startdate := $e.startdate}}
{{ dateFormat "Monday, Jan 2, 2006" $startdate }}
{{ else }}
TBD
{{ end }}
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>
7 changes: 7 additions & 0 deletions layouts/shortcodes/list_core.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<em>Active</em><br>
Bridget Kromhout (lead), Kris Buytaert, Jennifer Davis, Bernd Erk, Matthew Jones, Dan Maher, Mike Rosado, Matt Stratton (web team lead), John Willis<br>
<br>
<em>Historic</em><br>
Patrick Debois (founder), Damon Edwards, Anthony Goddard, Lindsay Holmwood, Gildas Le Nadan, Stephen Nelson-Smith, Andrew Clay Shafer, Julian Simpson, Christian Trabold, John Vincent, James Wickett
<br>
<br>
24 changes: 24 additions & 0 deletions layouts/shortcodes/list_organizers.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{ $path := split .Page.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}
{{ $e := (index .Page.Site.Data.events $event_slug) }}

<ul>
{{ if $e.team_members }}
{{ range $e.team_members }}
<li>
{{ .name }}
{{ if .twitter }}
{{ $twitter := replace .twitter "@" "" }}
- <a href="http://twitter.com/{{ $twitter }}">@{{ $twitter }}</a>
{{ end }}
{{ if .employer }}
- <em>{{ .employer }}</em>
{{ end}}
</li>
{{ end }}
{{ else }}
{{ range $event_organizers := $e.team }}
<li>{{ $event_organizers }}</li>
{{ end }}
{{ end }}
</ul>
1 change: 1 addition & 0 deletions layouts/shortcodes/privacy_policy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="//www.iubenda.com/privacy-policy/7898537" class="iubenda-white iub-body-embed iubenda-embed" title="Privacy Policy">Privacy Policy</a><script type="text/javascript">(function (w,d) {var loader = function () {var s = d.createElement("script"), tag = d.getElementsByTagName("script")[0]; s.src = "//cdn.iubenda.com/iubenda.js"; tag.parentNode.insertBefore(s,tag);}; if(w.addEventListener){w.addEventListener("load", loader, false);}else if(w.attachEvent){w.attachEvent("onload", loader);}else{w.onload = loader;}})(window, document);</script>
19 changes: 19 additions & 0 deletions layouts/shortcodes/program_entry.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- this div is repeated for each timeslot -->
{{ $path := split .Page.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}
{{ $e := (index $.Site.Data.events $event_slug) }}
{{ $city_slug := substr $e.name 5 }}

<div class = "row">
<div class = "col-md-4">
<time>{{ .Get "time" }}</time>
</div>
<div class = "col-md-6 box">
{{ .Get "title" }}
{{ with .Get "presenter" }}
{{ $fname := . }}
{{ $s := index $.Site.Data.speakers (print (chomp $e.year)) $city_slug . }}
-- <a href="/events/{{ $event_slug }}/program/{{ $fname }}">{{ $s.name }}</a>
{{end}}
</div>
</div> <!-- end timeslot div -->
4 changes: 4 additions & 0 deletions layouts/shortcodes/program_link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ $path := split .Page.Source.File.Path "/" }}
{{ $event_slug := index $path 1 }}

<a href = "/events/{{ $event_slug }}/program/{{ .Get "speaker" }}">{{ .Get "title" }}</a>