Skip to content

Commit

Permalink
Added User Sessions to top menu
Browse files Browse the repository at this point in the history
Made participants images to show in colour
refactored participant's sessions mappings
  • Loading branch information
DinisCruz committed Apr 8, 2018
1 parent 98f77f7 commit c0a83bd
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ public
node_modules
*~
.DS_Store
.idea
16 changes: 11 additions & 5 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,25 @@ paginate = 10
name = "Tracks"
identifier = "tracks"
pre = "<i class='fa fa-road'></i>&nbsp;"
weight = 11
weight = 1
url = "/tracks/"
[[menu.main]]
name = "Working Sessions"
identifier = "working-sessions"
pre = "<i class='fa fa-road'></i>&nbsp;"
weight = 12
weight = 2
url = "/working-sessions/"
[[menu.main]]
name = "User Sessions"
identifier = "user-sessions"
pre = "<i class='fa fa-road'></i>&nbsp;"
weight = 3
url = "/user-sessions/"
[[menu.main]]
name = "Participants"
identifier = "participants"
pre = "<i class='fa fa-road'></i>&nbsp;"
weight = 13
weight = 4
url = "/participant/"
[[menu.main]]
name = "Venue"
Expand Down Expand Up @@ -59,13 +65,13 @@ paginate = 10
name = "About"
identifier = "about"
pre = "<i class='fa fa-road'></i>&nbsp;"
weight = 4
weight = 12
url = "/about/"
[[menu.main]]
name = "Tickets"
identifier = "tickets"
pre = "<i class='fa fa-ticket'></i>&nbsp;"
weight = 2
weight = 50
url = "/tickets/"


Expand Down
8 changes: 8 additions & 0 deletions content/user-sessions/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title : User Sessions
type : user-session
hide : true
layout : index
---

In addition to [Working Sessions](/working-sessions) this year we are also introducing the concept of User Sessions
2 changes: 1 addition & 1 deletion layouts/partials/participant/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="participant-item">
<a href="{{ .Permalink }}">
{{ if .Params.image }}
<img src="{{ .Params.image }}" class="img img-responsive img-circle black-and-white" alt="{{ .Title }}" />
<img src="{{ .Params.image }}" class="img img-responsive img-circle _black-and-white" alt="{{ .Title }}" />
{{ else }}
<img src="/img/blocks/400x400.png" class="img img-responsive img-circle" alt="400x400 placeholder" />
{{ end }}
Expand Down
12 changes: 12 additions & 0 deletions layouts/partials/participant/session-row.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- range .this.Site.Pages}}

{{if in (index .Params $.field) $.name}}
<tr>
<th><a href="{{.Permalink}}">{{.Params.title}}</a></th>
<td>{{ .Params.type }}</td>
{{ with (eq $.field "organizers") }}<td> <span class="label label-primary">organiser</span> </td> {{ end }}
{{ with (eq $.field "participants") }}<td> <span class="label label-success">participant</span> </td> {{ end }}
</tr>
{{end }}
{{ end }}

26 changes: 2 additions & 24 deletions layouts/partials/participant/sessions.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,6 @@ <h3> Participating in:</h3>
{{ $name := .Params.title}}

<table class="table">
<!--<thead>-->
<!--<th> Name </th>-->
<!--<th> Type </th>-->
<!--<th> </th>-->
<!--</thead>-->

{{- range .Site.Pages}}

{{- if in .Params.organizers $name }}
<tr>
<th><a href="{{.Permalink}}">{{.Params.title}}</a></th>
<td>{{ .Params.type }}</td>
<td> <span class="label label-primary">organiser</span> </td>
</tr>
{{ end }}

{{ if in .Params.participants $name }}
<tr>
<th><a href="{{.Permalink}}">{{.Params.title}}</a></th>
<td>{{ .Params.type }}</td>
<td> <span class="label label-success">participant</span> </td>
</tr>
{{ end }}
{{ end }}
{{ partial "participant/session-row.html" (dict "this" . "name" .Params.title "field" "organizers") }}
{{ partial "participant/session-row.html" (dict "this" . "name" .Params.title "field" "participants") }}
</table>
10 changes: 10 additions & 0 deletions layouts/user-session/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ define "content" }}
{{ .Content }}

<h2>Current User Sessions</h2>


{{ $sessions := where .Site.Pages ".Params.type" "user-session"}}
{{ partial "sessions/simple-table.html" $sessions }}

{{ end }}
9 changes: 9 additions & 0 deletions layouts/user-session/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ define "content" }}

{{ .Content }}

<hr/>

<a href="/user-sessions"> Back to list of all User Sessions</a>
<hr>
{{ end }}
10 changes: 2 additions & 8 deletions layouts/working-session/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{ define "content" }}
{{ .Content }}

See also the planned <a href="/user-sessions">User Sessions</a>

<h2>Summit Working Sessions</h2>

<p>
Expand All @@ -10,14 +12,6 @@ <h2>Summit Working Sessions</h2>
{{ $sessions := where (where .Site.Pages ".Params.type" "working-session") ".Params.when" "ne" "pre-summit"}}
{{ partial "sessions/simple-table.html" $sessions }}

<h2>User Sessions</h2>

<p>This year we are introducing User Sessions</p>

{{ $sessions := where .Site.Pages ".Params.type" "user-session"}}
{{ partial "sessions/simple-table.html" $sessions }}


<h2>Pre-Summit Working Sessions</h2>

<p>
Expand Down
3 changes: 3 additions & 0 deletions layouts/working-session/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@

{{ .Content }}

<hr/>
<a href="/working-sessions"> Back to list of all Working Sessions</a>
<hr/>
{{ end }}

0 comments on commit c0a83bd

Please sign in to comment.