chore(forkawesome): update forkawesome css

This commit is contained in:
Dillon
2020-02-17 21:02:27 +08:00
parent 30747ca190
commit 933e32c4e4
22 changed files with 845 additions and 335 deletions

View File

@@ -25,4 +25,4 @@
{{- $REout = `↩︎` -}}
{{- $content = replaceRE $REin $REout $content -}}
{{- return $content -}}
{{- $content | safeHTML -}}

View File

@@ -0,0 +1,3 @@
<a href="{{ index . `href` }}" rel="me noopener noreffer" target="_blank" title="{{ index . `title` }}">
{{- partial "function/icon.html" . -}}
</a>

View File

@@ -0,0 +1,23 @@
{{- $type := index . "type" | default "fa" }}
{{- $classList := split (index . "class") " " }}
{{- $scratch := index . "scratch" }}
{{- /* Font Awesome */ -}}
{{- if eq $type "fa" -}}
<i class="{{ delimit $classList ` ` }}"></i>
{{- /* Fork Awesome */ -}}
{{- else if eq $type "fo" -}}
{{- $newClassList := slice -}}
{{- range $classList -}}
{{- if eq . "fa" -}}
{{- $newClassList = $newClassList | append "fo" -}}
{{- else -}}
{{- $newClassList = $newClassList | append (replaceRE `^fa\-(.+)$` `fo-$1` .) -}}
{{- end -}}
{{- end -}}
<i class="{{ delimit $newClassList ` ` }}"></i>
{{- $scratch.Set "forkawesome" true -}}
{{- /* Others */ -}}
{{- else -}}
<span class="{{ delimit $classList ` ` }}"></span>
{{- $scratch.Set "iconfont" true -}}
{{- end -}}

View File

@@ -1,3 +1,3 @@
{{- /* Lazyload */ -}}
{{- $res := resources.Get "svg/loading.svg" | minify -}}
<img src="{{ $res.RelPermalink | safeURL }}" data-sizes="auto" data-src="{{ . | safeURL }}" alt="featured image" class="lazyload">
<img src="{{ $res.RelPermalink | safeURL }}" data-sizes="auto" data-src="{{ index . `src` | safeURL }}" alt="{{ index . `alt` }}" title="{{ index . `title` | default (index . `alt`) }}" class="lazyload">

View File

@@ -37,11 +37,6 @@
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{- end -}}
{{- /* Fork Awesome https://forkaweso.me/ */ -}}
{{- $options := dict "targetPath" "css/lib/forkawesome/fork-awesome.min.css" "outputStyle" "compressed" "enableSourceMap" true -}}
{{- $res := resources.Get "css/lib/forkawesome/fork-awesome.scss"| toCSS $options -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{- /* Animate.css https://github.com/daneden/animate.css */ -}}
{{- with $CDN.animateCSS -}}
{{- . | safeHTML -}}

View File

@@ -13,7 +13,9 @@
{{- .Pre | safeHTML }}{{ .Name -}}
</a>
{{- end -}}
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title="{{ T "switchTheme" }}"></i></a>
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
<i class="fas fa-adjust fa-rotate-180 fa-fw"></i>
</a>
</div>
</div>
</header>
@@ -38,7 +40,9 @@
{{- .Name | safeHTML -}}
</a>
{{- end -}}
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title="{{ T "switchTheme" }}"></i></a>
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
<i class="fas fa-adjust fa-rotate-180 fa-fw"></i>
</a>
</div>
</div>
</header>

View File

@@ -19,11 +19,7 @@
{{- . | safeHTML -}}
</div>
<div id={{ $id }} class="typeit"></div>
{{- with $.Scratch.Get "typeitMap" -}}
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id) | merge .) -}}
{{- else -}}
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id)) -}}
{{- end -}}
{{- $.Scratch.SetInMap "typeitMap" $id (slice $id) -}}
{{- else -}}
{{- . | safeHTML -}}
{{- end -}}

View File

@@ -1,304 +1,425 @@
{{- /* 001: Github */ -}}
{{- with .Site.Params.Social.Github -}}
<a href="https://github.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-github-alt fa-fw" title="Github"></i>
</a>
{{- $options := dict "href" (printf "https://github.com/%s" .) "title" "GitHub" -}}
{{- $options = dict "class" "fab fa-github-alt fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- /* 002: LinkedIn */ -}}
{{- with .Site.Params.Social.LinkedIn -}}
<a href="https://linkedin.com/in/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-linkedin fa-fw" title="LinkedIn"></i>
</a>
{{- $options := dict "href" (printf "https://linkedin.com/in/%s" .) "title" "LinkedIn" -}}
{{- $options = dict "class" "fab fa-linkedin fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- /* 003: Twitter */ -}}
{{- with .Site.Params.Social.Twitter -}}
<a href="https://twitter.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-twitter fa-fw" title="Twitter"></i>
</a>
{{- $options := dict "href" (printf "https://twitter.com/%s" .) "title" "Twitter" -}}
{{- $options = dict "class" "fab fa-twitter fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- /* 004: Instagram */ -}}
{{- with .Site.Params.Social.Instagram -}}
<a href="https://www.instagram.com/{{ . }}/" rel="me noopener noreffer" target="_blank">
<i class="fab fa-instagram fa-fw" title="Instagram"></i>
</a>
{{- $options := dict "href" (printf "https://www.instagram.com/%s" .) "title" "Instagram" -}}
{{- $options = dict "class" "fab fa-instagram fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Facebook}}
<a href="https://facebook.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-facebook fa-fw" title="Facebook"></i>
</a>
{{- /* 005: Facebook */ -}}
{{- with .Site.Params.Social.Facebook -}}
{{- $options := dict "href" (printf "https://facebook.com/%s" .) "title" "Facebook" -}}
{{- $options = dict "class" "fab fa-facebook fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Telegram}}
<a href="https://t.me/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-telegram-plane fa-fw" title="Telegram"></i>
</a>
{{- /* 006: Telegram */ -}}
{{- with .Site.Params.Social.Telegram -}}
{{- $options := dict "href" (printf "https://t.me/%s" .) "title" "Telegram" -}}
{{- $options = dict "class" "fab fa-telegram-plane fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Medium}}
<a href="https://medium.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-medium fa-fw" title="Medium"></i>
</a>
{{- /* 007: Medium */ -}}
{{- with .Site.Params.Social.Medium -}}
{{- $options := dict "href" (printf "https://medium.com/%s" .) "title" "Medium" -}}
{{- $options = dict "class" "fab fa-medium fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Gitlab}}
<a href="https://gitlab.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-gitlab fa-fw" title="Gitlab"></i>
</a>
{{- /* 008: Medium */ -}}
{{- with .Site.Params.Social.Gitlab -}}
{{- $options := dict "href" (printf "https://gitlab.com/%s" .) "title" "GitLab" -}}
{{- $options = dict "class" "fab fa-gitlab fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Youtubelegacy}}
<a href="https://www.youtube.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
</a>
{{- /* 009: YouTube Legacy */ -}}
{{- with .Site.Params.Social.Youtubelegacy -}}
{{- $options := dict "href" (printf "https://www.youtube.com/user/%s" .) "title" "YouTube" -}}
{{- $options = dict "class" "fab fa-youtube fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Youtubecustom}}
<a href="https://www.youtube.com/c/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
</a>
{{- /* 010: YouTube Custom */ -}}
{{- with .Site.Params.Social.Youtubecustom -}}
{{- $options := dict "href" (printf "https://www.youtube.com/c/%s" .) "title" "YouTube" -}}
{{- $options = dict "class" "fab fa-youtube fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Youtubechannel}}
<a href="https://www.youtube.com/channel/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
</a>
{{- /* 011: Youtube Channel */ -}}
{{- with .Site.Params.Social.Youtubechannel -}}
{{- $options := dict "href" (printf "https://www.youtube.com/channel/%s" .) "title" "YouTube" -}}
{{- $options = dict "class" "fab fa-youtube fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Tumblr}}
<a href="https://{{ . }}.tumblr.com" rel="me noopener noreffer" target="_blank">
<i class="fab fa-tumblr fa-fw" title="Tumblr"></i>
</a>
{{- /* 012: Tumblr */ -}}
{{- with .Site.Params.Social.Tumblr -}}
{{- $options := dict "href" (printf "https://%s.tumblr.com" .) "title" "Tumblr" -}}
{{- $options = dict "class" "fab fa-tumblr fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Quora}}
<a href="https://www.quora.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-quora fa-fw" title="Quora"></i>
</a>
{{- /* 013: Tumblr */ -}}
{{- with .Site.Params.Social.Quora -}}
{{- $options := dict "href" (printf "https://www.quora.com/profile/%s" .) "title" "Quora" -}}
{{- $options = dict "class" "fab fa-quora fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Keybase}}
<a href="https://keybase.io/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-keybase fa-fw" title="Keybase"></i>
</a>
{{- /* 014: Keybase */ -}}
{{- with .Site.Params.Social.Keybase -}}
{{- $options := dict "href" (printf "https://keybase.io/%s" .) "title" "Keybase" -}}
{{- $options = dict "class" "fab fa-keybase fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Pinterest}}
<a href="https://www.pinterest.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-pinterest fa-fw" title="Pinterest"></i>
</a>
{{- /* 015: Pinterest */ -}}
{{- with .Site.Params.Social.Pinterest -}}
{{- $options := dict "href" (printf "https://www.pinterest.com/%s" .) "title" "Pinterest" -}}
{{- $options = dict "class" "fab fa-pinterest fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Reddit}}
<a href="https://www.reddit.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-reddit fa-fw" title="Reddit"></i>
</a>
{{- /* 016: Reddit */ -}}
{{- with .Site.Params.Social.Reddit -}}
{{- $options := dict "href" (printf "https://www.reddit.com/user/%s" .) "title" "Reddit" -}}
{{- $options = dict "class" "fab fa-reddit fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Codepen}}
<a href="https://codepen.io/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-codepen fa-fw" title="Codepen"></i>
</a>
{{- /* 017: CodePen */ -}}
{{- with .Site.Params.Social.Codepen -}}
{{- $options := dict "href" (printf "https://codepen.io/%s" .) "title" "CodePen" -}}
{{- $options = dict "class" "fab fa-codepen fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.FreeCodeCamp}}
<a href="https://freecodecamp.org/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-free-code-camp fa-fw"></i>
</a>
{{- /* 018: freeCodeCamp */ -}}
{{- with .Site.Params.Social.FreeCodeCamp -}}
{{- $options := dict "href" (printf "https://freecodecamp.org/%s" .) "title" "freeCodeCamp" -}}
{{- $options = dict "class" "fab fa-free-code-camp fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Bitbucket}}
<a href="https://bitbucket.org/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-bitbucket fa-fw" title="Bitbucket"></i>
</a>
{{- /* 019: Bitbucket */ -}}
{{- with .Site.Params.Social.Bitbucket -}}
{{- $options := dict "href" (printf "https://bitbucket.org/%s" .) "title" "Bitbucket" -}}
{{- $options = dict "class" "fab fa-bitbucket fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Stackoverflow}}
<a href="https://stackoverflow.com/users/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-stack-overflow fa-fw" title="Stackoverflow"></i>
</a>
{{- /* 020: Stack Overflow */ -}}
{{- with .Site.Params.Social.Stackoverflow -}}
{{- $options := dict "href" (printf "https://stackoverflow.com/users/%s" .) "title" "Stack Overflow" -}}
{{- $options = dict "class" "fab fa-stack-overflow fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Weibo}}
<a href="https://weibo.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-weibo fa-fw" title="Weibo"></i>
</a>
{{- /* 021: 微博 */ -}}
{{- with .Site.Params.Social.Weibo -}}
{{- $options := dict "href" (printf "https://weibo.com/%s" .) "title" "微博" -}}
{{- $options = dict "class" "fab fa-weibo fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Odnoklassniki}}
<a href="https://ok.ru/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-odnoklassniki fa-fw" title="Odnoklassniki"></i>
</a>
{{- /* 022: OK.RU */ -}}
{{- with .Site.Params.Social.Odnoklassniki -}}
{{- $options := dict "href" (printf "https://ok.ru/%s" .) "title" "OK.RU" -}}
{{- $options = dict "class" "fab fa-odnoklassniki fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.VKontakte}}
<a href="https://vk.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-vk fa-fw" title="VKontakte"></i>
</a>
{{- /* 023: VKontakte */ -}}
{{- with .Site.Params.Social.VKontakte -}}
{{- $options := dict "href" (printf "https://vk.com/%s" .) "title" "VKontakte" -}}
{{- $options = dict "class" "fab fa-vk fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Flickr}}
<a href="https://www.flickr.com/photos/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-flickr fa-fw" title="Flickr"></i>
</a>
{{- /* 024: Flickr */ -}}
{{- with .Site.Params.Social.Flickr -}}
{{- $options := dict "href" (printf "https://www.flickr.com/photos/%s" .) "title" "Flickr" -}}
{{- $options = dict "class" "fab fa-flickr fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Xing}}
<a href="https://www.xing.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-xing fa-fw" title="Xing"></i>
</a>
{{- /* 025: Xing */ -}}
{{- with .Site.Params.Social.Xing -}}
{{- $options := dict "href" (printf "https://www.xing.com/profile/%s" .) "title" "Xing" -}}
{{- $options = dict "class" "fab fa-xing fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Snapchat}}
<a href="https://www.snapchat.com/add/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-snapchat fa-fw" title="Snapchat"></i>
</a>
{{- /* 026: Snapchat */ -}}
{{- with .Site.Params.Social.Snapchat -}}
{{- $options := dict "href" (printf "https://www.snapchat.com/add/%s" .) "title" "Snapchat" -}}
{{- $options = dict "class" "fab fa-snapchat fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Soundcloud}}
<a href="https://soundcloud.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-soundcloud fa-fw" title="Soundcloud"></i>
</a>
{{- /* 027: SoundCloud */ -}}
{{- with .Site.Params.Social.Soundcloud -}}
{{- $options := dict "href" (printf "https://soundcloud.com/%s" .) "title" "SoundCloud" -}}
{{- $options = dict "class" "fab fa-soundcloud fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Spotify}}
<a href="https://open.spotify.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-spotify fa-fw" title="Spotify"></i>
</a>
{{- /* 028: Spotify */ -}}
{{- with .Site.Params.Social.Spotify -}}
{{- $options := dict "href" (printf "https://open.spotify.com/user/%s" .) "title" "Spotify" -}}
{{- $options = dict "class" "fab fa-spotify fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Bandcamp}}
<a href="https://{{ . }}.bandcamp.com/" rel="me noopener noreffer" target="_blank">
<i class="fab fa-bandcamp fa-fw" title="Bandcamp"></i>
</a>
{{- /* 029: Bandcamp */ -}}
{{- with .Site.Params.Social.Bandcamp -}}
{{- $options := dict "href" (printf "https://%s.bandcamp.com/" .) "title" "Bandcamp" -}}
{{- $options = dict "class" "fab fa-bandcamp fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Paypal}}
<a href="https://paypal.me/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-paypal fa-fw" title="Paypal"></i>
</a>
{{- /* 030: PayPal */ -}}
{{- with .Site.Params.Social.Paypal -}}
{{- $options := dict "href" (printf "https://paypal.me/%s" .) "title" "PayPal" -}}
{{- $options = dict "class" "fab fa-paypal fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Fivehundredpx}}
<a href="https://500px.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-500px fa-fw" title="Fivehundredpx"></i>
</a>
{{- /* 031: 500px */ -}}
{{- with .Site.Params.Social.Fivehundredpx -}}
{{- $options := dict "href" (printf "https://500px.com/%s" .) "title" "500px" -}}
{{- $options = dict "class" "fab fa-500px fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Mix}}
<a href="https://mix.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-mix fa-fw" title="Mix"></i>
</a>
{{- /* 032: Mix */ -}}
{{- with .Site.Params.Social.Mix -}}
{{- $options := dict "href" (printf "https://mix.com/%s" .) "title" "Mix" -}}
{{- $options = dict "class" "fab fa-mix fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Goodreads}}
<a href="https://www.goodreads.com/user/show/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-goodreads fa-fw" title="Goodreads"></i>
</a>
{{- /* 033: Goodreads */ -}}
{{- with .Site.Params.Social.Goodreads -}}
{{- $options := dict "href" (printf "https://www.goodreads.com/user/show/%s" .) "title" "Goodreads" -}}
{{- $options = dict "class" "fab fa-goodreads fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Lastfm}}
<a href="https://www.last.fm/user/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-POP_lastfm fa-fw" title="Lastfm"></i>
</a>
{{- /* 034: Last.fm */ -}}
{{- with .Site.Params.Social.Lastfm -}}
{{- $options := dict "href" (printf "https://www.last.fm/user/%s" .) "title" "Last.fm" -}}
{{- $options = dict "class" "fab fa-lastfm fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Foursquare}}
<a href="https://foursquare.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-foursquare fa-fw" title="Foursquare"></i>
</a>
{{- /* 035: Foursquare */ -}}
{{- with .Site.Params.Social.Foursquare -}}
{{- $options := dict "href" (printf "https://foursquare.com/%s" .) "title" "Foursquare" -}}
{{- $options = dict "class" "fab fa-foursquare fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Hackernews}}
<a href="https://news.ycombinator.com/user?id={{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-hacker-news fa-fw" title="Hackernews"></i>
</a>
{{- /* 036: Hacker News */ -}}
{{- with .Site.Params.Social.Hackernews -}}
{{- $options := dict "href" (printf "https://news.ycombinator.com/user?id=%s" .) "title" "Hacker News" -}}
{{- $options = dict "class" "fab fa-hacker-news fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Kickstarter}}
<a href="https://kickstarter.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-kickstarter fa-fw" title="Kickstarter"></i>
</a>
{{- /* 037: Kickstarter */ -}}
{{- with .Site.Params.Social.Kickstarter -}}
{{- $options := dict "href" (printf "https://kickstarter.com/profile/%s" .) "title" "Kickstarter" -}}
{{- $options = dict "class" "fab fa-kickstarter fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Patreon}}
<a href="https://patreon.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-patreon fa-fw" title="Patreon"></i>
</a>
{{- /* 038: Patreon */ -}}
{{- with .Site.Params.Social.Patreon -}}
{{- $options := dict "href" (printf "https://patreon.com/%s" .) "title" "Patreon" -}}
{{- $options = dict "class" "fab fa-patreon fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Steam}}
<a href="https://steamcommunity.com/id/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-steam fa-fw" title="Steam"></i>
</a>
{{- /* 039: Steam */ -}}
{{- with .Site.Params.Social.Steam -}}
{{- $options := dict "href" (printf "https://steamcommunity.com/id/%s" .) "title" "Steam" -}}
{{- $options = dict "class" "fab fa-steam fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Twitch}}
<a href="https://www.twitch.tv/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-twitch fa-fw" title="Twitch"></i>
</a>
{{- /* 040: Twitch */ -}}
{{- with .Site.Params.Social.Twitch -}}
{{- $options := dict "href" (printf "https://www.twitch.tv/%s" .) "title" "Twitch" -}}
{{- $options = dict "class" "fab fa-twitch fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Strava}}
<a href="https://www.strava.com/athletes/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-strava fa-fw" title="Strava"></i>
</a>
{{- /* 041: Strava */ -}}
{{- with .Site.Params.Social.Strava -}}
{{- $options := dict "href" (printf "https://www.strava.com/athletes/%s" .) "title" "Strava" -}}
{{- $options = dict "class" "fab fa-strava fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Skype}}
<a href="skype:{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-skype fa-fw" title="Skype"></i>
</a>
{{- /* 042: Skype */ -}}
{{- with .Site.Params.Social.Skype -}}
{{- $options := dict "href" (printf "skype:%s" .) "title" "Skype" -}}
{{- $options = dict "class" "fab fa-skype fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Whatsapp}}
<a href="https://wa.me/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-whatsapp fa-fw" title="Whatsapp"></i>
</a>
{{- /* 043: WhatsApp */ -}}
{{- with .Site.Params.Social.Whatsapp -}}
{{- $options := dict "href" (printf "https://wa.me/%s" .) "title" "WhatsApp" -}}
{{- $options = dict "class" "fab fa-whatsapp fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Zhihu}}
<a href="https://www.zhihu.com/people/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-zhihu fa-fw" title="Zhihu"></i>
</a>
{{- /* 044: 知乎 */ -}}
{{- with .Site.Params.Social.Zhihu -}}
{{- $options := dict "href" (printf "https://www.zhihu.com/people/%s" .) "title" "知乎" -}}
{{- $options = dict "class" "fab fa-zhihu fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Angellist}}
<a href="https://angel.co/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-angellist fa-fw" title="Angellist"></i>
</a>
{{- /* 045: Angellist */ -}}
{{- with .Site.Params.Social.Angellist -}}
{{- $options := dict "href" (printf "https://angel.co/%s" .) "title" "Angellist" -}}
{{- $options = dict "class" "fab fa-angellist fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Slideshare}}
<a href="https://slideshare.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-slideshare fa-fw" title="Slideshare"></i>
</a>
{{- /* 046: SlideShare */ -}}
{{- with .Site.Params.Social.Slideshare -}}
{{- $options := dict "href" (printf "https://slideshare.com/%s" .) "title" "SlideShare" -}}
{{- $options = dict "class" "fab fa-slideshare fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Jsfiddle}}
<a href="https://jsfiddle.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-jsfiddle fa-fw" title="Jsfiddle"></i>
</a>
{{- /* 047: JSFiddle */ -}}
{{- with .Site.Params.Social.Jsfiddle -}}
{{- $options := dict "href" (printf "https://jsfiddle.com/%s" .) "title" "JSFiddle" -}}
{{- $options = dict "class" "fab fa-jsfiddle fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Deviantart}}
<a href="https://{{ . }}.deviantart.com/" rel="me noopener noreffer" target="_blank">
<i class="fab fa-deviantart fa-fw" title="Deviantart"></i>
</a>
{{- /* 048: DeviantArt */ -}}
{{- with .Site.Params.Social.Deviantart -}}
{{- $options := dict "href" (printf "https://%s.deviantart.com/" .) "title" "DeviantArt" -}}
{{- $options = dict "class" "fab fa-deviantart fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Behance}}
<a href="https://behance.net/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-behance fa-fw" title="Behance"></i>
</a>
{{- /* 049: Behance */ -}}
{{- with .Site.Params.Social.Behance -}}
{{- $options := dict "href" (printf "https://behance.net/%s" .) "title" "Behance" -}}
{{- $options = dict "class" "fab fa-behance fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Dribble}}
<a href="https://dribbble.com/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-dribbble fa-fw" title="Dribble"></i>
</a>
{{- /* 050: Dribbble */ -}}
{{- with .Site.Params.Social.Dribble -}}
{{- $options := dict "href" (printf "https://dribbble.com/%s" .) "title" "Dribbble" -}}
{{- $options = dict "class" "fab fa-dribbble fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Wordpress}}
<a href="https://{{ . }}.wordpress.com" rel="me noopener noreffer" target="_blank">
<i class="fab fa-wordpress fa-fw" title="Wordpress"></i>
</a>
{{- /* 051: WordPress */ -}}
{{- with .Site.Params.Social.Wordpress -}}
{{- $options := dict "href" (printf "https://%s.wordpress.com/" .) "title" "WordPress" -}}
{{- $options = dict "class" "fab fa-wordpress fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Vine}}
<a href="https://vine.co/" rel="me noopener noreffer" target="_blank">
<i class="fab fa-vine fa-fw" title="Vine"></i>
</a>
{{- /* 052: Vine */ -}}
{{- with .Site.Params.Social.Vine -}}
{{- $options := dict "href" (printf "https://vine.co/%s" .) "title" "Vine" -}}
{{- $options = dict "class" "fab fa-vine fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Googlescholar}}
<a href="https://scholar.google.com/citations?{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-Googlescholar fa-fw" title="Googlescholar"></i>
</a>
{{- /* 053: Google Scholar */ -}}
{{- with .Site.Params.Social.Googlescholar -}}
{{- $options := dict "href" (printf "https://scholar.google.com/citations?%s" .) "title" "Google Scholar" -}}
{{- $options = dict "class" "fab fa-google fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Researchgate}}
<a href="https://www.researchgate.net/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-researchgate fa-fw" title="Researchgate"></i>
</a>
{{- /* 054: ResearchGate */ -}}
{{- with .Site.Params.Social.Researchgate -}}
{{- $options := dict "href" (printf "https://www.researchgate.net/profile/%s" .) "title" "ResearchGate" -}}
{{- $options = dict "class" "fab fa-researchgate fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Mastodon}}
{{- /* 055: Mastodon */ -}}
{{- with .Site.Params.Social.Mastodon -}}
{{- $MastodonPrefix := $.Site.Params.Social.MastodonPrefix | default "https://mastodon.social/" -}}
<a href="{{ $MastodonPrefix | safeURL }}{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-mastodon fa-fw" title="Mastodon"></i>
</a>
{{- $options := dict "href" $MastodonPrefix "title" "Mastodon" -}}
{{- $options = dict "class" "fab fa-mastodon fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Devto}}
<a href="https://dev.to/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-dev fa-fw" title="Dev.To"></i>
</a>
{{- /* 054: Dev.To */ -}}
{{- with .Site.Params.Social.Devto -}}
{{- $options := dict "href" (printf "https://dev.to/%s" .) "title" "Dev.To" -}}
{{- $options = dict "class" "fab fa-dev fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Gitea}}
<a href="{{ . | safeURL }}" rel="me noopener noreffer" target="_blank">
<i class="fo fo-gitea fo-fw" title="Gitea"></i>
</a>
{{- /* 055: Gitea */ -}}
{{- with .Site.Params.Social.Gitea -}}
{{- $options := dict "href" . "title" "Gitea" -}}
{{- $options = dict "class" "fa fa-gitea fa-fw" "type" "fo" "scratch" $.Scratch | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.XMPP}}
<a href="xmpp:{{ . }}" rel="me noopener noreffer">
<i class="fo fo-xmpp fo-fw" title="XMPP"></i>
</a>
{{- /* 056: XMPP */ -}}
{{- with .Site.Params.Social.XMPP -}}
{{- $options := dict "href" (printf "xmpp:%s" .) "title" "XMPP" -}}
{{- $options = dict "class" "fa fa-xmpp fa-fw" "type" "fo" "scratch" $.Scratch | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Matrix}}
<a href="https://matrix.to/#/{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fo fo-matrix-org fo-fw" title="Matrix"></i>
</a>
{{- /* 057: Matrix */ -}}
{{- with .Site.Params.Social.Matrix -}}
{{- $options := dict "href" (printf "https://matrix.to/#/%s" .) "title" "Matrix" -}}
{{- $options = dict "class" "fa fa-matrix-org fa-fw" "type" "fo" "scratch" $.Scratch | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Email}}
<a href="mailto:{{ . }}" rel="me noopener noreffer">
<i class="far fa-envelope fa-fw" title="Email"></i>
</a>
{{- /* 058: Email */ -}}
{{- with .Site.Params.Social.Email -}}
{{- $options := dict "href" (printf "mailto:%s" .) "title" "Email" -}}
{{- $options = dict "class" "far fa-envelope fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}
{{- with .Site.Params.Social.Custom}}
{{- /* Custom */ -}}
{{- with .Site.Params.Social.Custom -}}
{{- . | safeHTML -}}
{{- end -}}

View File

@@ -1,71 +1,71 @@
{{- if .Params.share.enable | default .Site.Params.share.enable | eq true -}}
{{- /* Share on Twitter */ -}}
{{- /* 001: Twitter */ -}}
{{- if .Params.Share.Twitter | default .Site.Params.Share.Twitter | eq true -}}
<a href="//twitter.com/share?url={{ .Permalink }}&amp;text={{ .Title }}&amp;via={{ .Site.Params.Social.Twitter }}" target="_blank" title="{{ T "share" }} Twitter">
<i class="fab fa-twitter fa-fw"></i>
{{- partial "function/icon.html" (dict "class" "fab fa-twitter fa-fw") -}}
</a>
{{- end -}}
{{- /* Share on Facebook */ -}}
{{- /* 002: Facebook */ -}}
{{- if .Params.Share.Facebook | default .Site.Params.Share.Facebook | eq true -}}
<a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="{{ T "share" }} Facebook">
<i class="fab fa-facebook-square fa-fw"></i>
{{- partial "function/icon.html" (dict "class" "fab fa-facebook-square fa-fw") -}}
</a>
{{- end -}}
{{- /* Share on Reddit */ -}}
{{- /* 003: Reddit */ -}}
{{- if .Params.Share.Reddit | default .Site.Params.Share.Reddit | eq true -}}
<a href="//reddit.com/submit?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="{{ T "share" }} Reddit">
<i class="fab fa-reddit fa-fw"></i>
{{- partial "function/icon.html" (dict "class" "fab fa-reddit fa-fw") -}}
</a>
{{- end -}}
{{- /* Share on Linkedin */ -}}
{{- /* 004: Linkedin */ -}}
{{- if .Params.Share.Linkedin | default .Site.Params.Share.Linkedin | eq true -}}
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="{{ T "share" }} LinkedIn">
<i class="fab fa-linkedin fa-fw"></i>
{{- partial "function/icon.html" (dict "class" "fab fa-linkedin fa-fw") -}}
</a>
{{- end -}}
{{- /* Share on Pinterest */ -}}
{{- /* 005: Pinterest */ -}}
{{- if .Params.Share.Pinterest | default .Site.Params.Share.Pinterest | eq true -}}
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="{{ T "share" }} Pinterest">
<i class="fab fa-pinterest fa-fw"></i>
{{- partial "function/icon.html" (dict "class" "fab fa-pinterest fa-fw") -}}
</a>
{{- end -}}
{{- /* Share on Hacker News */ -}}
{{- /* 006: Hacker News */ -}}
{{- if .Params.Share.Hackernews | default .Site.Params.Share.Hackernews | eq true -}}
<a href="//news.ycombinator.com/submitlink?u={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="{{ T "share" }} Hacker News">
<i class="fab fa-y-combinator fa-fw"></i>
{{- partial "function/icon.html" (dict "class" "fab fa-hacker-news fa-fw") -}}
</a>
{{- end -}}
{{- /* Share on Mix */ -}}
{{- /* 007: Mix */ -}}
{{- if .Params.Share.Mix | default .Site.Params.Share.Mix | eq true -}}
<a href="//mix.com/add?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="{{ T "share" }} Mix">
<i class="fab fa-mix fa-fw"></i>
{{- partial "function/icon.html" (dict "class" "fab fa-mix fa-fw") -}}
</a>
{{- end -}}
{{- /* Share on Tumblr */ -}}
{{- /* 008: Tumblr */ -}}
{{- if .Params.Share.Tumblr | default .Site.Params.Share.Tumblr | eq true -}}
<a href="//www.tumblr.com/widgets/share/tool?canonicalUrl={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="{{ T "share" }} Tumblr">
<i class="fab fa-tumblr fa-fw"></i>
{{- partial "function/icon.html" (dict "class" "fab fa-tumblr fa-fw") -}}
</a>
{{- end -}}
{{- /* Share on VKontakte */ -}}
{{- /* 009: VKontakte */ -}}
{{- if .Params.Share.VKontakte | default .Site.Params.Share.VKontakte | eq true -}}
<a href="//vk.com/share.php?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="{{ T "share" }} VKontakte ">
<i class="fab fa-vk fa-fw"></i>
{{- partial "function/icon.html" (dict "class" "fab fa-vk fa-fw") -}}
</a>
{{- end -}}
{{- /* Share on Weibo */ -}}
{{- /* 010: 微博 */ -}}
{{- if .Params.Share.Weibo | default .Site.Params.Share.Weibo | eq true -}}
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&amp;appkey=&amp;title={{ .Title }}{{ with $.Params.featuredImage }}&amp;pic={{ . }}{{- end -}}" target="_blank" title="{{ T "share" }} Weibo">
<i class="fab fa-weibo fa-fw"></i>
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&amp;appkey=&amp;title={{ .Title }}{{ with $.Params.featuredImage }}&amp;pic={{ . }}{{- end -}}" target="_blank" title="{{ T "share" }} 微博">
{{- partial "function/icon.html" (dict "class" "fab fa-weibo fa-fw") -}}
</a>
{{- end -}}
{{- end -}}

View File

@@ -1,8 +1,8 @@
{{- $CDN := .Scratch.Get "CDN" -}}
{{- /* Google analytics async */ -}}
{{- if .Scratch.Get "production" | and .Site.GoogleAnalytics -}}
{{- template "_internal/google_analytics_async.html" . -}}
{{- /* Fork Awesome https://forkaweso.me/ */ -}}
{{- if .Scratch.Get "forkawesome" -}}
{{- slice "css/lib/forkawesome/fork-awesome.scss" | .Scratch.Add "linkLocal" -}}
{{- end -}}
{{- /* lazysizes https://github.com/aFarkas/lazysizes */ -}}
@@ -178,3 +178,8 @@
{{- /* Theme script */ -}}
<script src=/js/theme.min.js></script>
{{- /* Google analytics async */ -}}
{{- if .Scratch.Get "production" | and .Site.GoogleAnalytics -}}
{{- template "_internal/google_analytics_async.html" . -}}
{{- end -}}