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
9 changes: 6 additions & 3 deletions exampleSite/content/page/speaking.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
+++
date = "2015-11-29T00:00:00-06:00"
title = "speaking at devopsdays"
type = "cfp"
Categories = []
Description = ""
Tags = []
Date = "2017-01-31T13:04:25-05:00"
Title = "Speaking at devopsdays"
type = "speaking"

+++

Expand Down
2 changes: 2 additions & 0 deletions layouts/partials/footer_scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
{{ partial "map.html" . }}
{{ end }}
<script src="/js/devopsdays-min.js"></script>
<script src="/js/bootstrap-sortable.js"></script>
<script src="/js/moment.min.js"></script>
<!-- <script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC1bvNK9qFJGEhoWNbQuojmJJ1Tg0DoOew&callback=initMap">
</script> -->
27 changes: 27 additions & 0 deletions layouts/partials/speaking.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

<!-- <div class="table-responsive"> -->


{{ $.Scratch.Add "events" "<table class = 'table sortable table-condensed'><thead><tr><th>City</th><th>&nbsp;&nbsp;CFP Closes</th><th>&nbsp;&nbsp;&nbsp;&nbsp;Event Starts</th></tr></thead><tbody>" }}
{{ range sort $.Site.Data.events "startdate" }}

{{ if .cfp_date_end }}
{{ if ge (dateFormat "2006-01-02" .cfp_date_end) (dateFormat "2006-01-02" ($.Now.Format "2006-01-02")) }}
{{ $.Scratch.Add "events" "<tr><td><a href = '/events/" }}
{{ $.Scratch.Add "events" .name }}
{{ $.Scratch.Add "events" "/welcome' class = 'speaking'>" }}
{{ $.Scratch.Add "events" .city }}
{{ $.Scratch.Add "events" "</a></td><td data-dateformat='YYYY-MM-DD'>&nbsp;&nbsp;" }}
{{ $.Scratch.Add "events" .cfp_date_end}}
{{ $.Scratch.Add "events" "</td><td data-dateformat='YYYY-MM-DD'>&nbsp;&nbsp;&nbsp;&nbsp;" }}
{{ $.Scratch.Add "events" .startdate}}
{{ $.Scratch.Add "events" "</td></tr>" }}
{{ end }} {{/* end: date is now or afterwards */}}

{{ end }} {{/* end: if .cfp_date_end */}}
{{ end }} {{/* end: range sort $.Site.Data.events "startdate" */}}
{{ $.Scratch.Add "events" "</tbody></table>" }}


{{ $.Scratch.Get "events" | safeHTML}}

11 changes: 11 additions & 0 deletions layouts/speaking/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{ define "main" }}

<h1>{{ .Title }}</h1>

<div>
{{ .Content }}
</div>

{{ partial "speaking.html" . }}

{{ end }}
110 changes: 110 additions & 0 deletions static/css/bootstrap-sortable.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/**
* adding sorting ability to HTML tables with Bootstrap styling
* @summary HTML tables sorting ability
* @version 2.0.0
* @requires tinysort, moment.js, jQuery
* @license MIT
* @author Matus Brlit (drvic10k)
* @copyright Matus Brlit (drvic10k), bootstrap-sortable contributors
*/

table.sortable span.sign {
display: block;
position: absolute;
top: 50%;
right: 5px;
font-size: 12px;
margin-top: -10px;
color: #bfbfc1;
}

table.sortable th:after {
display: block;
position: absolute;
top: 50%;
right: 5px;
font-size: 12px;
margin-top: -10px;
color: #bfbfc1;
}

table.sortable th.arrow:after {
content: '';
}

table.sortable span.arrow, span.reversed, th.arrow.down:after, th.reversedarrow.down:after, th.arrow.up:after, th.reversedarrow.up:after {
border-style: solid;
border-width: 5px;
font-size: 0;
border-color: #ccc transparent transparent transparent;
line-height: 0;
height: 0;
width: 0;
margin-top: -2px;
}

table.sortable span.arrow.up, th.arrow.up:after {
border-color: transparent transparent #ccc transparent;
margin-top: -7px;
}

table.sortable span.reversed, th.reversedarrow.down:after {
border-color: transparent transparent #ccc transparent;
margin-top: -7px;
}

table.sortable span.reversed.up, th.reversedarrow.up:after {
border-color: #ccc transparent transparent transparent;
margin-top: -2px;
}

table.sortable span.az:before, th.az.down:after {
content: "a .. z";
}

table.sortable span.az.up:before, th.az.up:after {
content: "z .. a";
}

table.sortable th.az.nosort:after, th.AZ.nosort:after, th._19.nosort:after, th.month.nosort:after {
content: "..";
}

table.sortable span.AZ:before, th.AZ.down:after {
content: "A .. Z";
}

table.sortable span.AZ.up:before, th.AZ.up:after {
content: "Z .. A";
}

table.sortable span._19:before, th._19.down:after {
content: "1 .. 9";
}

table.sortable span._19.up:before, th._19.up:after {
content: "9 .. 1";
}

table.sortable span.month:before, th.month.down:after {
content: "jan .. dec";
}

table.sortable span.month.up:before, th.month.up:after {
content: "dec .. jan";
}

table.sortable>thead th:not([data-defaultsort=disabled]) {
cursor: pointer;
position: relative;
top: 0;
left: 0;
}

table.sortable>thead th:hover:not([data-defaultsort=disabled]) {
background: #efefef;
}

table.sortable>thead th div.mozilla {
position: relative;
}
Loading