mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 20:15:25 +00:00
feat(profile): support [[params.social]] links to homepage sections
Enables using email icon to link to contact form. Close #754
This commit is contained in:
1 parent
bbfd7e9439
commit
fa5de9234d
3 files changed
+14
-6
No files matched your search
@@ -247,12 +247,12 @@ enableGitInfo = false
|
||||
[[params.social]]
|
||||
icon = "envelope"
|
||||
icon_pack = "fas"
|
||||
link = "mailto:test@example.org"
|
||||
link = "#contact" # For a direct email link, use "mailto:test@example.org".
|
||||
|
||||
[[params.social]]
|
||||
icon = "twitter"
|
||||
icon_pack = "fab"
|
||||
link = "//twitter.com/GeorgeCushen"
|
||||
link = "https://twitter.com/GeorgeCushen"
|
||||
|
||||
[[params.social]]
|
||||
icon = "google-scholar"
|
||||
@@ -262,7 +262,7 @@ enableGitInfo = false
|
||||
[[params.social]]
|
||||
icon = "github"
|
||||
icon_pack = "fab"
|
||||
link = "//github.com/gcushen"
|
||||
link = "https://github.com/gcushen"
|
||||
|
||||
# Link to a PDF of your resume/CV from the About widget.
|
||||
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below.
|
||||
|
||||
@@ -22,10 +22,14 @@
|
||||
{{ $pack := or .icon_pack "fas" }}
|
||||
{{ $pack_prefix := $pack }}
|
||||
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
|
||||
{{ $pack_prefix = "fa" }}
|
||||
{{ $pack_prefix = "fa" }}
|
||||
{{ end }}
|
||||
{{ $target := "target=\"_blank\" rel=\"noopener\"" }}
|
||||
{{ if not (urls.Parse .link).Scheme }}
|
||||
{{ $target = "" }}
|
||||
{{ end }}
|
||||
<li>
|
||||
<a itemprop="sameAs" href="{{ .link | safeURL }}" target="_blank" rel="noopener">
|
||||
<a itemprop="sameAs" href="{{ .link | relLangURL | safeURL }}" {{ $target | safeHTMLAttr }}>
|
||||
<i class="{{ $pack }} {{ $pack_prefix }}-{{ .icon }}"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -43,8 +43,12 @@
|
||||
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
|
||||
{{ $pack_prefix = "fa" }}
|
||||
{{ end }}
|
||||
{{ $target := "target=\"_blank\" rel=\"noopener\"" }}
|
||||
{{ if not (urls.Parse .link).Scheme }}
|
||||
{{ $target = "" }}
|
||||
{{ end }}
|
||||
<li>
|
||||
<a itemprop="sameAs" href="{{ .link | safeURL }}" target="_blank" rel="noopener">
|
||||
<a itemprop="sameAs" href="{{ .link | relLangURL | safeURL }}" {{ $target | safeHTMLAttr }}>
|
||||
<i class="{{ $pack }} {{ $pack_prefix }}-{{ .icon }} big-icon"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in new issue
Block a user