Skip to content

Commit

Permalink
Closes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydan2 committed Nov 23, 2019
1 parent 0069aa9 commit be2abaf
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 25 deletions.
163 changes: 163 additions & 0 deletions data/social.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
#credit beautifulhugo https://github.com/halogenica/beautifulhugo/blob/master/data/beautifulhugo/social.toml

[[social_icons]]
id = "email"
url = "mailto:%s"
title = "Email me"
icon = "fas fa-envelope"

[[social_icons]]
id = "facebook"
url = "https://www.facebook.com/%s"
title = "Facebook"
icon = "fab fa-facebook"

[[social_icons]]
id = "github"
url = "https://github.com/%s"
title = "GitHub"
icon = "fab fa-github"

[[social_icons]]
id = "gitlab"
url = "https://gitlab.com/%s"
title = "GitLab"
icon = "fab fa-gitlab"

[[social_icons]]
id = "bitbucket"
url = "https://bitbucket.org/%s"
title = "Bitbucket"
icon = "fab fa-bitbucket"

[[social_icons]]
id = "twitter"
url = "https://twitter.com/%s"
title = "Twitter"
icon = "fab fa-twitter"

[[social_icons]]
id = "slack"
url = "https://%s.slack.com/"
title = "Slack"
icon = "fab fa-slack"

[[social_icons]]
id = "reddit"
url = "https://reddit.com/u/%s"
title = "Reddit"
icon = "fab fa-reddit-alien"

[[social_icons]]
id = "linkedin"
url = "https://linkedin.com/in/%s"
title = "LinkedIn"
icon = "fab fa-linkedin"

[[social_icons]]
id = "xing"
url = "https://www.xing.com/profile/%s"
title = "Xing"
icon = "fab fa-xing"

[[social_icons]]
id = "stackoverflow"
url = "https://stackoverflow.com/%s"
title = "StackOverflow"
icon = "fab fa-stack-overflow"

[[social_icons]]
id = "snapchat"
url = "https://www.snapchat.com/add/%s"
title = "Snapchat"
icon = "fab fa-snapchat-ghost"

[[social_icons]]
id = "instagram"
url = "https://www.instagram.com/%s"
title = "Instagram"
icon = "fab fa-instagram"

[[social_icons]]
id = "youtube"
url = "https://www.youtube.com/%s"
title = "Youtube"
icon = "fab fa-youtube"

[[social_icons]]
id = "soundcloud"
url = "https://soundcloud.com/%s"
title = "SoundCloud"
icon = "fab fa-soundcloud"

[[social_icons]]
id = "spotify"
url = "https://open.spotify.com/user/%s"
title = "Spotify"
icon = "fab fa-spotify"

[[social_icons]]
id = "bandcamp"
url = "https://%s.bandcamp.com/"
title = "Bandcamp"
icon = "fab fa-bandcamp"

[[social_icons]]
id = "itchio"
url = "https://itch.io/profile/%s"
title = "Itch.io"
icon = "fas fa-gamepad"

[[social_icons]]
id = "keybase"
url = "https://keybase.io/%s"
title = "Keybase"
icon = "fab fa-keybase"

[[social_icons]]
id = "vk"
url = "https://vk.com/%s"
title = "VK"
icon = "fab fa-vk"

[[social_icons]]
id = "paypal"
url = "https://paypal.me/%s"
title = "PayPal"
icon = "fab fa-paypal"

[[social_icons]]
id = "telegram"
url = "https://telegram.me/%s"
title = "Telegram"
icon = "fab fa-telegram"

[[social_icons]]
id = "500px"
url = "https://500px.com/%s"
title = "500px"
icon = "fab fa-500px"

[[social_icons]]
id = "codepen"
url = "https://codepen.io/%s"
title = "CodePen"
icon = "fab fa-codepen"

[[social_icons]]
id = "kaggle"
url = "https://www.kaggle.com/%s"
title = "kaggle"
icon = "fab fa-kaggle"

[[social_icons]]
id = "mastodon"
url = "https://%s"
title = "Mastodon"
icon = "fab fa-mastodon"

[[social_icons]]
id = "weibo"
url = "https://weibo.com/%s"
title = "Weibo"
icon = "fab fa-weibo"
13 changes: 7 additions & 6 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ enableEmoji = true
pygmentsCodeFences = true

[author]
name = ""
name = "Example"
github = "funkydan2"
gitlab = ""
linkedin = ""
facebook = ""
#gitlab = "username"
#linkedin = "username"
#facebook = "username"
twitter = "ds_says"
instagram = ""
stackoverflow = ""
#instagram = "username"
#stackoverflow = "username"
#youtube = "user/username" # or channel/channelname

[params]
tagline = "A Hugo theme for creative and technical writing"
Expand Down
32 changes: 13 additions & 19 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,19 @@ <h1>
</h1>

<ul id="social-media">
{{ range .Site.Languages -}}
{{ if ne .LanguageName $.Site.Language.LanguageName }}
<li><a href="/{{ .Lang }}">{{ .LanguageName }}</a></li>
{{ end }}
{{ end }}
{{ if .Site.Author.twitter }}
<li><a href="https://twitter.com/{{ .Site.Author.twitter }}"><i class="fab fa-twitter fa-lg" aria-hidden="true"></i></a></li>
{{ end }} {{ if .Site.Author.linkedin }}
<li><a href="https://www.linkedin.com/in/{{ .Site.Author.linkedin }}"><i class="fab fa-linkedin fa-lg" aria-hidden="true"></i></a></li>
{{ end }} {{ if .Site.Author.github }}
<li><a href="https://github.com/{{ .Site.Author.github }}"><i class="fab fa-github fa-lg" aria-hidden="true"></i></a></li>
{{ end }} {{ if .Site.Author.gitlab }}
<li><a href="https://gitlab.com/{{ .Site.Author.gitlab }}"><i class="fab fa-gitlab fa-lg" aria-hidden="true"></i></a></li>
{{ end }} {{ if .Site.Author.facebook }}
<li><a href="https://www.facebook.com/{{ .Site.Author.facebook }}"><i class="fab fa-facebook fa-lg" aria-hidden="true"></i></a></li>
{{ end }} {{ if .Site.Author.instagram }}
<li><a href="https://instagram.com/{{ .Site.Author.instagram }}"><i class="fab fa-instagram fa-lg" aria-hidden="true"></i></a></li>
{{ end }} {{ if .Site.Author.stackoverflow }}
<li><a href="https://stackoverflow.com/users/{{ .Site.Author.stackoverflow }}"><i class="fab fa-stack-overflow fa-lg" aria-hidden="true"></i></a></li>
{{- range .Site.Languages -}}
{{ if ne .LanguageName $.Site.Language.LanguageName }}
<li><a href="/{{ .Lang }}">{{ .LanguageName }}</a></li>
{{ end }}
{{- end -}}
{{- range .Site.Data.social.social_icons -}}
{{- if isset $.Site.Author .id }}
<li>
<a href="{{ printf .url (index $.Site.Author .id) }}" title="{{ .title }}">
<i class="{{ .icon }} fa-lg"></i>
</a>
</li>
{{- end -}}
{{ end }}
</ul>
{{ with .Site.Params.tagline }}
Expand Down

0 comments on commit be2abaf

Please sign in to comment.