diff options
| author | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-09-26 22:06:05 -0400 |
|---|---|---|
| committer | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-09-26 22:06:05 -0400 |
| commit | e19ebe26ecd117a77c8fdda2e7667fca42160e1d (patch) | |
| tree | 75e6b341b7b53edda19bcc0e55f6263dec2a0e94 /layouts/partials/social.html | |
| parent | 6416a7cb1adb60c7dd142abb0204f3751ab36a1f (diff) | |
stuff
Diffstat (limited to 'layouts/partials/social.html')
| -rw-r--r-- | layouts/partials/social.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/layouts/partials/social.html b/layouts/partials/social.html new file mode 100644 index 0000000..03645ad --- /dev/null +++ b/layouts/partials/social.html | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | {{ $social := .social }} | ||
| 2 | {{ $username := .username }} | ||
| 3 | |||
| 4 | {{ $url := "" }} | ||
| 5 | |||
| 6 | {{ if eq $social "github" }} | ||
| 7 | {{ $url = printf "https://github.com/%s" $username }} | ||
| 8 | {{ else if eq $social "linkedin" }} | ||
| 9 | {{ $url = printf "https://www.linkedin.com/in/%s" $username }} | ||
| 10 | {{ else }} | ||
| 11 | {{ $url = "#" }} | ||
| 12 | {{ end }} | ||
| 13 | |||
| 14 | <a href="{{ $url }}" target="_blank"> | ||
| 15 | {{ title $social }} | ||
| 16 | </a> \ No newline at end of file | ||
