🍱 Add support for more social icons

This commit is contained in:
James Panther
2021-08-13 16:35:32 +10:00
parent 478ec87dab
commit d0ddf5f8c5
30 changed files with 78 additions and 57 deletions
+16 -38
View File
@@ -8,43 +8,21 @@
{{ . }}
</div>
{{ end }}
<div class="flex text-lg text-gray-400 dark:text-gray-500">
{{ with .Site.Author.twitter }}
<a
class="mr-2 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ . }}"
target="_blank"
title="Twitter"
>{{ partial "icon.html" "twitter-brands" }}</a
>
{{ end }}
{{ with .Site.Author.github }}
<a
class="mr-2 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ . }}"
target="_blank"
title="GitHub"
>{{ partial "icon.html" "github-brands" }}</a
>
{{ end }}
{{ with .Site.Author.keybase }}
<a
class="mr-2 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ . }}"
target="_blank"
title="Keybase"
>{{ partial "icon.html" "keybase-brands" }}</a
>
{{ end }}
{{ with .Site.Author.linkedin }}
<a
class="mr-2 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ . }}"
target="_blank"
title="Linkedin"
>{{ partial "icon.html" "linkedin-brands" }}</a
>
{{ end }}
</div>
{{ with .Site.Author.links }}
<div class="flex text-lg text-gray-400 dark:text-gray-500">
{{ range $links := . }}
{{ range $name, $url := $links }}
<a
class="mr-2 hover:text-primary-700 dark:hover:text-primary-400"
href="{{ $url }}"
target="_blank"
alt="{{ $name | title }}"
rel="me"
>{{ partial "icon.html" $name }}</a
>
{{ end }}
{{ end }}
</div>
{{ end }}
</div>
</div>
+5 -5
View File
@@ -54,11 +54,11 @@
{{ hugo.Generator }}
{{/* Me */}}
{{ with .Site.Author.name }}<meta name="author" content="{{ . }}" />{{ end }}
{{ with .Site.Author.email }}<link href="mailto:{{ . }}" rel="me" />{{ end }}
{{ with .Site.Author.twitter }}<link href="{{ . }}" rel="me" />{{ end }}
{{ with .Site.Author.keybase }}<link href="{{ . }}" rel="me" />{{ end }}
{{ with .Site.Author.github }}<link href="{{ . }}" rel="me" />{{ end }}
{{ with .Site.Author.linkedin }}<link href="{{ . }}" rel="me" />{{ end }}
{{ with .Site.Author.links }}
{{ range $links := . }}
{{ range $name, $url := $links }}<link href="{{ $url }}" rel="me" />{{ end }}
{{ end }}
{{ end }}
{{/* Analytics */}}
{{ partialCached "analytics.html" .Site }}
{{/* Extend head - eg. for custom analytics scripts, etc. */}}
+1 -1
View File
@@ -1,6 +1,6 @@
<div class="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900">
<span class="pr-3 text-primary-400">
{{ partial "icon.html" "exclamation-triangle-solid" }}
{{ partial "icon.html" "exclamation-triangle" }}
</span>
<span class="no-prose dark:text-gray-300">
{{- .Inner | markdownify -}}