Skip to content

Commit

Permalink
Add social buttons back
Browse files Browse the repository at this point in the history
Signed-off-by: Celeste Horgan <[email protected]>
  • Loading branch information
celestehorgan committed Oct 20, 2020
1 parent c7b5598 commit 09b49ca
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
8 changes: 7 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ navbar = "cncf-color.png"
[[params.social]]
name = "Twitter"
color = "#00aced"
url = "https://twitter.com/CloudNativeFdn"
url = "https://twitter.com/inclusivenaming"
icon = "fab fa-twitter"

[[params.social]]
name = "GitHub"
color = "#000000"
url = "https://github.com/inclusivenaming"
icon = "fab fa-github"

[[params.fonts]]
name = "Open Sans"
sizes = [300, 400, 600, 700]
Expand Down
8 changes: 8 additions & 0 deletions layouts/partials/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,13 @@
</li>
{{ end }}
</ul>

<ul class="navbar-nav ml-3">
{{ with $social }}
<li class="navbar-item">
{{ partial "social-buttons.html" . }}
</li>
{{ end }}
</ul>
</div>
</div>
5 changes: 1 addition & 4 deletions layouts/partials/social-buttons.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

{{ range . }}
{{ $color := .color | default "white" }}
<a class="btn text-light" style="background-color: {{ .color }}">
<a class="btn text-light" title="{{ .name }}" style="background-color: {{ .color }}" href="{{ .url }}" target="_blank">
{{ with .icon }}
<span class="icon">
<i class="{{ . }}"></i>
</span>
{{ end }}
{{ with .name }}
{{ . }}
{{ end }}
</a>
{{ end }}

0 comments on commit 09b49ca

Please sign in to comment.