Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.

Commit 88e2e7c

Browse files
authored
Merge pull request #620 from devopsdays/verbose-speaker-attributes
adjust how speaker bios and attributes show up
2 parents b64ad0a + 095ecab commit 88e2e7c

3 files changed

Lines changed: 89 additions & 32 deletions

File tree

REFERENCE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ The YYYY-CITY.yml file is the main configuration file for your event. This is wh
4242
| `event_twitter` | String | Yes | The twitter handle for your event such as "devopsdayschi" or "devopsdaysmsp". Exclude the "@" symbol. | "devopsdayschi" |
4343
| `description` | String | No | Overall description of your event. Quotation marks need to be escaped. | "It's time for more DevOpsDays at Ponyville!" |
4444
| `ga_tracking_id` | String | No | If you have your own Google Analytics tracking ID, enter it here. | "UA-74738648-1" |
45+
| `speakers_verbose` | String | No | Set this to "true" if you want verbose speaker attributes (URLs visible). | "true" |
4546

4647
### Date-related Fields
4748
All dates are in unquoted YYYY-MM-DD, like this: `variable: 2016-01-05`

layouts/speaker/single.html

Lines changed: 54 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,6 @@ <h2 class="speaker-page">{{ .Title }}</h2>
1111
<div class = "col-md-4 offset-md-1">
1212
<span class="speaker-page content-text">
1313
{{ .Content }}
14-
{{- if isset .Params "pronouns" -}}
15-
{{- if ne .Params.pronouns "" -}}
16-
My pronouns are {{ .Params.pronouns }}<br />
17-
{{- end -}}
18-
{{- end -}}
19-
{{- if isset .Params "twitter" -}}
20-
{{- if ne .Params.twitter "" -}}
21-
<a href = "https://twitter.com/{{ .Params.twitter }}"><i class="fa fa-twitter fa-2x" aria-hidden="true"></i></a>&nbsp;
22-
{{- end -}}
23-
{{- end -}}
24-
{{- if isset .Params "website" -}}
25-
{{- if ne .Params.website "" -}}
26-
<a href = "{{ .Params.website }}"><i class="fa fa-home fa-2x" aria-hidden="true"></i></a>&nbsp;
27-
{{- end -}}
28-
{{- end -}}
29-
{{- if isset .Params "facebook" -}}
30-
{{- if ne .Params.facebook "" -}}
31-
<a href = "{{ .Params.facebook }}"><i class="fa fa-facebook-official fa-2x" aria-hidden="true"></i></a>&nbsp;
32-
{{- end -}}
33-
{{- end -}}
34-
{{- if isset .Params "linkedin" -}}
35-
{{- if ne .Params.linkedin "" -}}
36-
<a href = "{{ .Params.linkedin }}"><i class="fa fa-linkedin fa-2x" aria-hidden="true"></i></a>&nbsp;
37-
{{- end -}}
38-
{{- end -}}
39-
{{- if isset .Params "github" -}}
40-
{{- if ne .Params.github "" -}}
41-
<a href = "https://github.com/{{ .Params.github }}"><i class="fa fa-github fa-2x" aria-hidden="true"></i></a>&nbsp;
42-
{{- end -}}
43-
{{- end -}}
4414
</span>
4515
<div class="speaker-bio-talks">
4616
<h3>{{ .Title }} at {{ $e.city }} {{$e.year}}</h3>
@@ -73,6 +43,60 @@ <h3>{{ .Title }} at {{ $e.city }} {{$e.year}}</h3>
7343
{{- else -}}
7444
<img src = {{ "img/speaker-default.jpg" | absURL }} class="img-fluid" alt="{{ .Title }}"/><br />
7545
{{- end -}}
46+
{{- if isset .Params "twitter" -}}
47+
{{- if ne .Params.twitter "" -}}
48+
<a href = "https://twitter.com/{{ .Params.twitter }}"><i class="fa fa-twitter fa-2x" aria-hidden="true"></i>
49+
{{- if $e.speakers_verbose -}}
50+
@{{ .Params.twitter }}<br />
51+
{{- end -}}
52+
</a>
53+
{{- end -}}
54+
{{- end -}}
55+
{{- if isset .Params "website" -}}
56+
{{- if ne .Params.website "" -}}
57+
<a href = "{{ .Params.website }}"><i class="fa fa-home fa-2x" aria-hidden="true"></i>&nbsp;
58+
{{- if $e.speakers_verbose -}}
59+
{{ .Params.website }}<br />
60+
{{- end -}}
61+
</a>
62+
{{- end -}}
63+
{{- end -}}
64+
{{- if isset .Params "facebook" -}}
65+
{{- if ne .Params.facebook "" -}}
66+
<a href = "{{ .Params.facebook }}"><i class="fa fa-facebook-official fa-2x" aria-hidden="true"></i>&nbsp;
67+
{{- if $e.speakers_verbose -}}
68+
{{ .Params.facebook }}<br />
69+
{{- end -}}
70+
</a>
71+
{{- end -}}
72+
{{- end -}}
73+
{{- if isset .Params "linkedin" -}}
74+
{{- if ne .Params.linkedin "" -}}
75+
<a href = "{{ .Params.linkedin }}"><i class="fa fa-linkedin fa-2x" aria-hidden="true"></i>&nbsp;
76+
{{- if $e.speakers_verbose -}}
77+
{{ .Params.linkedin }}<br />
78+
{{- end -}}
79+
</a>
80+
{{- end -}}
81+
{{- end -}}
82+
{{- if isset .Params "github" -}}
83+
{{- if ne .Params.github "" -}}
84+
<a href = "https://github.com/{{ .Params.github }}"><i class="fa fa-github fa-2x" aria-hidden="true"></i>&nbsp;
85+
{{- if $e.speakers_verbose -}}
86+
{{ .Params.github }}<br />
87+
{{- end -}}
88+
</a>
89+
{{- end -}}
90+
{{- end -}}
91+
{{- if isset .Params "pronouns" -}}
92+
{{- if ne .Params.pronouns "" -}}
93+
<a href = "https://pronoun.is/{{ .Params.pronouns }}"><i class="fa fa-user fa-2x" aria-hidden="true"></i>&nbsp;
94+
{{- if $e.speakers_verbose -}}
95+
https://pronoun.is/{{ .Params.pronouns }}<br />
96+
{{- end -}}
97+
</a>
98+
{{- end -}}
99+
{{- end -}}
76100
</div>
77101
</div>
78102
{{ partial "sponsors.html" . }}

layouts/talk/single.html

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,42 @@ <h4 class="talk-page"><a href = "{{ (printf "events/%s/speakers/%s" $e.name ($.S
128128
</a></h4>
129129
{{- if isset .Params "twitter" -}}
130130
{{- if ne .Params.twitter "" -}}
131-
<a href = "https://twitter.com/{{ .Params.twitter }}"><i class="fa fa-twitter fa-2x" aria-hidden="true"></i></a>&nbsp;
131+
<a href = "https://twitter.com/{{ .Params.twitter }}"><i class="fa fa-twitter fa-2x" aria-hidden="true"></i>&nbsp;</a>
132132
{{- end -}}
133133
{{- end -}}
134-
<span class="talk-page content-text">{{ .Content }}</span>
134+
{{- if isset .Params "website" -}}
135+
{{- if ne .Params.website "" -}}
136+
<a href = "{{ .Params.website }}"><i class="fa fa-home fa-2x" aria-hidden="true"></i>&nbsp;</a>
137+
{{- end -}}
138+
{{- end -}}
139+
{{- if isset .Params "facebook" -}}
140+
{{- if ne .Params.facebook "" -}}
141+
<a href = "{{ .Params.facebook }}"><i class="fa fa-facebook-official fa-2x" aria-hidden="true"></i>&nbsp;</a>
142+
{{- end -}}
143+
{{- end -}}
144+
{{- if isset .Params "linkedin" -}}
145+
{{- if ne .Params.linkedin "" -}}
146+
<a href = "{{ .Params.linkedin }}"><i class="fa fa-linkedin fa-2x" aria-hidden="true"></i>&nbsp;</a>
147+
{{- end -}}
148+
{{- end -}}
149+
{{- if isset .Params "github" -}}
150+
{{- if ne .Params.github "" -}}
151+
<a href = "https://github.com/{{ .Params.github }}"><i class="fa fa-github fa-2x" aria-hidden="true"></i>&nbsp;</a>
152+
{{- end -}}
153+
{{- end -}}
154+
{{- if isset .Params "pronouns" -}}
155+
{{- if ne .Params.pronouns "" -}}
156+
<a href = "https://pronoun.is/{{ .Params.pronouns }}"><i class="fa fa-user fa-2x" aria-hidden="true"></i>&nbsp;</a>
157+
{{- end -}}
158+
{{- end -}}
159+
<br />
160+
<span class="talk-page content-text">
161+
{{- if ge (countrunes .Content ) 200 -}}
162+
{{ .Content | markdownify | truncate 200 " "}}<a href = "{{ .Permalink | absURL }}">...</a>
163+
{{- else -}}
164+
{{ .Content | markdownify }}
165+
{{- end -}}
166+
</span>
135167
{{- end -}}
136168

137169
{{- end -}}

0 commit comments

Comments
 (0)