feat: update style and exampleSite files

This commit is contained in:
Dillon
2019-08-27 01:15:00 +08:00
parent 45c9281131
commit 42d50ae53c
58 changed files with 477 additions and 257 deletions

View File

@@ -12,7 +12,7 @@
{{ $REout = "<figure><img src=/images/loading.svg data-src=$1 data-sizes=auto alt=$2 title=$3 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `:\(([\w- ]+?)\):` }}
{{ $REout = `<i class="inline-icon $1"></i>` }}
{{ $REout = `<i class="$1 fa-fw"></i>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}

View File

@@ -18,15 +18,15 @@
</h1>
<div class="post-meta">
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle"></i>{{ $author }}&nbsp;</a>
{{ T "publish" }}<span class="post-time">&nbsp;<time datetime={{ $publish_date }}>{{ $publish_date }}</time>&nbsp;</span>
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle fa-fw"></i>{{ $author }}&nbsp;</a>
{{ T "publish" }}&nbsp;<time datetime={{ $publish_date }}>{{ $publish_date }}</time>&nbsp;
{{ with .Params.categories -}}
<span class="post-category">
{{ T "included" }}
{{ range . }}
{{- $name := . -}}
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
<i class="far fa-folder"></i><a href="{{ .Permalink }}">{{ $name }}</a>
<i class="far fa-folder fa-fw"></i><a href="{{ .Permalink }}">{{ $name }}</a>
{{ end -}}
{{ end }}
</span>
@@ -38,7 +38,7 @@
{{ else }}
{{ $summary := .Summary }}
{{ $REin := `:\(([\w- ]+?)\):` }}
{{ $REout := `<i class="inline-icon $1"></i>` }}
{{ $REout := `<i class="$1 fa-fw"></i>` }}
{{ $summary = replaceRE $REin $REout $summary }}
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
@@ -51,7 +51,7 @@
{{ with .Params.tags }}
<div class="post-tags">
{{ range . }}
&nbsp;&nbsp;<span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag"></i>{{ . }}</a></span>
&nbsp;&nbsp;<span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i>{{ . }}</a></span>
{{ end }}
</div>
{{ end }}

View File

@@ -1,21 +1,24 @@
<footer class="footer">
<div class="copyright">
<span>{{ (printf (T "powered") `<a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreffer">Hugo</a>`) | safeHTML }}&nbsp;|&nbsp;{{ T "theme" }}<a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="external nofollow noopener noreffer">LoveIt<i class="far fa-heart"></i></a></span>
<br />
<i class="far fa-copyright"></i>
{{- with .Site.Params.since -}}
<span itemprop="copyrightYear">{{ if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year }}</span>
{{- else -}}
<span itemprop="copyrightYear">{{ now.Year }}</span>
{{- end -}}
{{- with .Site.Author.name -}}
<span class="author" itemprop="copyrightHolder">&nbsp;<a href="{{ $.Site.BaseURL }}">{{ . }}</a></span>
{{- end -}}
{{- with .Site.Params.icp -}}
<span class="icp">&nbsp;|&nbsp;{{ . | safeHTML }}</span>
{{- end -}}
{{- with .Site.Params.license -}}
<span class="license">&nbsp;|&nbsp;{{ . | safeHTML }}</span>
{{- end -}}
<div class="copyright-line">
{{ (printf (T "powered") `<a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreffer">Hugo</a>`) | safeHTML }}&nbsp;|&nbsp;{{ T "theme" }}<a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="external nofollow noopener noreffer">LoveIt<i class="far fa-heart fa-fw"></i></a>
</div>
<div class="copyright-line">
<i class="far fa-copyright fa-fw"></i>
{{- with .Site.Params.since -}}
<span itemprop="copyrightYear">{{ if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year }}</span>
{{- else -}}
<span itemprop="copyrightYear">{{ now.Year }}</span>
{{- end -}}
{{- with .Site.Author.name -}}
<span class="author" itemprop="copyrightHolder">&nbsp;<a href="{{ $.Site.BaseURL }}">{{ . }}</a></span>
{{- end -}}
{{- with .Site.Params.icp -}}
<span class="icp">&nbsp;|&nbsp;{{ . | safeHTML }}</span>
{{- end -}}
{{- with .Site.Params.license -}}
<span class="license">&nbsp;|&nbsp;{{ . | safeHTML }}</span>
{{- end -}}
</div>
</div>
</footer>

View File

@@ -8,14 +8,14 @@
{{ range .Site.Menus.main }}
<a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
{{ end }}
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180"></i></a>
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw"></i></a>
</div>
</div>
</nav>
<nav class="navbar-mobile">
<div class="navbar-container">
<div class="navbar-header">
<div><a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180"></i></a><a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a></div>
<div><a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw"></i></a><a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a></div>
<div class="menu-toggle" id="menu-toggle">
<span></span><span></span><span></span>
</div>

View File

@@ -1,165 +1,165 @@
{{ with .Site.Params.Social.Github }}
<a href="https://github.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-github-alt"></i></a>
<a href="https://github.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-github-alt fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.LinkedIn }}
<a href="https://linkedin.com/in/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-linkedin"></i></a>
<a href="https://linkedin.com/in/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-linkedin fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Twitter }}
<a href="https://twitter.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-twitter"></i></a>
<a href="https://twitter.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-twitter fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Instagram }}
<a href="https://www.instagram.com/{{.}}/" rel="me noopener noreffer" target="_blank"><i class="fab fa-instagram"></i></a>
<a href="https://www.instagram.com/{{.}}/" rel="me noopener noreffer" target="_blank"><i class="fab fa-instagram fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Facebook}}
<a href="https://facebook.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-facebook"></i></a>
<a href="https://facebook.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-facebook fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Telegram}}
<a href="https://t.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-telegram-plane"></i></a>
<a href="https://t.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-telegram-plane fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Medium}}
<a href="https://medium.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-medium"></i></a>
<a href="https://medium.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-medium fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Gitlab}}
<a href="https://gitlab.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-gitlab"></i></a>
<a href="https://gitlab.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-gitlab fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Youtubelegacy}}
<a href="https://www.youtube.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube"></i></a>
<a href="https://www.youtube.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Youtubecustom}}
<a href="https://www.youtube.com/c/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube"></i></a>
<a href="https://www.youtube.com/c/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Youtubechannel}}
<a href="https://www.youtube.com/channel/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube"></i></a>
<a href="https://www.youtube.com/channel/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-youtube fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Tumblr}}
<a href="https://{{.}}.tumblr.com" rel="me noopener noreffer" target="_blank"><i class="fab fa-tumblr"></i></a>
<a href="https://{{.}}.tumblr.com" rel="me noopener noreffer" target="_blank"><i class="fab fa-tumblr fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Quora}}
<a href="https://www.quora.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-quora"></i></a>
<a href="https://www.quora.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-quora fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Keybase}}
<a href="https://keybase.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-keybase"></i></a>
<a href="https://keybase.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-keybase fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Pinterest}}
<a href="https://www.pinterest.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-pinterest"></i></a>
<a href="https://www.pinterest.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-pinterest fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Reddit}}
<a href="https://www.reddit.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-reddit"></i></a>
<a href="https://www.reddit.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-reddit fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Codepen}}
<a href="https://codepen.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-codepen"></i></a>
<a href="https://codepen.io/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-codepen fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Bitbucket}}
<a href="https://bitbucket.org/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-bitbucket"></i></a>
<a href="https://bitbucket.org/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-bitbucket fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Stackoverflow}}
<a href="https://stackoverflow.com/users/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-stack-overflow"></i></a>
<a href="https://stackoverflow.com/users/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-stack-overflow fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Weibo}}
<a href="https://weibo.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-weibo"></i></a>
<a href="https://weibo.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-weibo fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Odnoklassniki}}
<a href="https://ok.ru/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-odnoklassniki"></i></a>
<a href="https://ok.ru/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-odnoklassniki fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.VKontakte}}
<a href="https://vk.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-vk"></i></a>
<a href="https://vk.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-vk fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Flickr}}
<a href="https://www.flickr.com/photos/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-flickr"></i></a>
<a href="https://www.flickr.com/photos/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-flickr fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Xing}}
<a href="https://www.xing.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-xing"></i></a>
<a href="https://www.xing.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-xing fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Snapchat}}
<a href="https://www.snapchat.com/add/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-snapchat"></i></a>
<a href="https://www.snapchat.com/add/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-snapchat fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Soundcloud}}
<a href="https://soundcloud.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-soundcloud"></i></a>
<a href="https://soundcloud.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-soundcloud fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Spotify}}
<a href="https://open.spotify.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-spotify"></i></a>
<a href="https://open.spotify.com/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-spotify fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Bandcamp}}
<a href="https://{{.}}.bandcamp.com/" rel="me noopener noreffer" target="_blank"><i class="fab fa-bandcamp"></i></a>
<a href="https://{{.}}.bandcamp.com/" rel="me noopener noreffer" target="_blank"><i class="fab fa-bandcamp fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Paypal}}
<a href="https://paypal.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-paypal"></i></a>
<a href="https://paypal.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-paypal fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Fivehundredpx}}
<a href="https://500px.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-500px"></i></a>
<a href="https://500px.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-500px fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Mix}}
<a href="https://mix.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-mix"></i></a>
<a href="https://mix.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-mix fa-fw"></i></a>
{{ 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"></i></a>
<a href="https://www.goodreads.com/user/show/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-goodreads fa-fw"></i></a>
{{ 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"></i></a>
<a href="https://www.last.fm/user/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-POP_lastfm fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Foursquare}}
<a href="https://foursquare.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-foursquare"></i></a>
<a href="https://foursquare.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-foursquare fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Hackernews}}
<a href="https://news.ycombinator.com/user?id={{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-ycombinator"></i></a>
<a href="https://news.ycombinator.com/user?id={{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-ycombinator fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Kickstarter}}
<a href="https://kickstarter.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-kickstarter"></i></a>
<a href="https://kickstarter.com/profile/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-kickstarter fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Patreon}}
<a href="https://patreon.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-patreon"></i></a>
<a href="https://patreon.com/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-patreon fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Steam}}
<a href="https://steamcommunity.com/id/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-steam"></i></a>
<a href="https://steamcommunity.com/id/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-steam fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Twitch}}
<a href="https://www.twitch.tv/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-twitch"></i></a>
<a href="https://www.twitch.tv/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-twitch fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Strava}}
<a href="https://www.strava.com/athletes/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-strava"></i></a>
<a href="https://www.strava.com/athletes/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-strava fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Skype}}
<a href="skype:{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-skype"></i></a>
<a href="skype:{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-skype fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Whatsapp}}
<a href="https://wa.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-whatsapp"></i></a>
<a href="https://wa.me/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-whatsapp fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Zhihu}}
<a href="https://www.zhihu.com/people/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-zhihu"></i></a>
<a href="https://www.zhihu.com/people/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-zhihu fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Angellist}}
<a href="https://angel.co/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-angellist"></i></a>
<a href="https://angel.co/{{.}}" rel="me noopener noreffer" target="_blank"><i class="fab fa-angellist fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Slideshare}}
<a href="https://slideshare.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-slideshare"></i></a>
<a href="https://slideshare.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-slideshare fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Jsfiddle}}
<a href="https://jsfiddle.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-jsfiddle"></i></a>
<a href="https://jsfiddle.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-jsfiddle fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Deviantart}}
<a href="https://{{ . }}.deviantart.com/" rel="me noopener noreffer" target="_blank"><i class="fab fa-deviantart"></i></a>
<a href="https://{{ . }}.deviantart.com/" rel="me noopener noreffer" target="_blank"><i class="fab fa-deviantart fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Behance}}
<a href="https://behance.net/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-behance"></i></a>
<a href="https://behance.net/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-behance fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Dribble}}
<a href="https://dribbble.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-dribbble"></i></a>
<a href="https://dribbble.com/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-dribbble fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Wordpress}}
<a href="https://{{ . }}.wordpress.com" rel="me noopener noreffer" target="_blank"><i class="fab fa-wordpress"></i></a>
<a href="https://{{ . }}.wordpress.com" rel="me noopener noreffer" target="_blank"><i class="fab fa-wordpress fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Vine}}
<a href="https://vine.co/" rel="me noopener noreffer" target="_blank"><i class="fab fa-vine"></i></a>
<a href="https://vine.co/" rel="me noopener noreffer" target="_blank"><i class="fab fa-vine fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Googlescholar}}
<a href="https://scholar.google.com/citations?{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-Googlescholar"></i></a>
<a href="https://scholar.google.com/citations?{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-Googlescholar fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Researchgate}}
<a href="https://www.researchgate.net/profile/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-researchgate"></i></a>
<a href="https://www.researchgate.net/profile/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-researchgate fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Mastodon}}
<a href="https://mastodon.social/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-mastodon"></i></a>
<a href="https://mastodon.social/{{ . }}" rel="me noopener noreffer" target="_blank"><i class="fab fa-mastodon fa-fw"></i></a>
{{ end }}
{{ with .Site.Params.Social.Email}}
<a href="mailto:{{.}}" rel="me noopener noreffer"><i class="far fa-envelope" target="_blank"></i></a>
<a href="mailto:{{.}}" rel="me noopener noreffer"><i class="far fa-envelope" target="_blank fa-fw"></i></a>
{{ end }}

View File

@@ -27,12 +27,12 @@
</div>
</div>
<div class="post-tags">
<div class="post-info-more">
<section>
{{ with .Params.tags }}
{{ range . }}
<span class="tag">
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag"></i>{{.}}</a>
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i>{{ . }}</a>
</span>
{{ end }}
{{ end }}
@@ -44,10 +44,10 @@
<div class="post-nav">
{{ if .PrevInSection }}
<a href="{{.PrevInSection.Permalink}}" class="prev" rel="prev" title="{{ .PrevInSection.Title}}"><i class="fas fa-angle-left"></i>{{ .PrevInSection.Title}}</a>
<a href="{{ .PrevInSection.Permalink }}" class="prev" rel="prev" title="{{ .PrevInSection.Title }}"><i class="fas fa-angle-left fa-fw"></i>{{ .PrevInSection.Title }}</a>
{{ end }}
{{ if .NextInSection }}
<a href="{{.NextInSection.Permalink}}" class="next" rel="next" title="{{.NextInSection.Title}}">{{.NextInSection.Title}}&nbsp;<i class="fas fa-angle-right"></i></a>
<a href="{{ .NextInSection.Permalink }}" class="next" rel="next" title="{{ .NextInSection.Title }}">{{ .NextInSection.Title }}<i class="fas fa-angle-right fa-fw"></i></a>
{{ end }}
</div>
</div>

View File

@@ -1,52 +1,52 @@
{{ if or (eq .Params.share.enable false) (eq .Site.Params.share.enable false) | not }}
{{ if or .Params.Share.Twitter (and .Site.Params.Share.Twitter (ne .Params.Share.Twitter false)) }}
<a href="//twitter.com/share?url={{ .Permalink }}&amp;text={{ .Title }}&amp;via={{ .Site.Params.Social.Twitter }}" target="_blank" title="Share on Twitter">
<i class="fab fa-twitter"></i>
<i class="fab fa-twitter fa-fw"></i>
</a>
{{ end }}
{{ if or .Params.Share.Facebook (and .Site.Params.Share.Facebook (ne .Params.Share.Facebook false)) }}
<a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="Share on Facebook">
<i class="fab fa-facebook-square"></i>
<i class="fab fa-facebook-square fa-fw"></i>
</a>
{{ end }}
{{ if or .Params.Share.Reddit (and .Site.Params.Share.Reddit (ne .Params.Share.Reddit false)) }}
<a href="//reddit.com/submit?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="Share on Reddit">
<i class="fab fa-reddit"></i>
<i class="fab fa-reddit fa-fw"></i>
</a>
{{ end }}
{{ if or .Params.Share.Linkedin (and .Site.Params.Share.Linkedin (ne .Params.Share.Linkedin false)) }}
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="Share on LinkedIn">
<i class="fab fa-linkedin"></i>
<i class="fab fa-linkedin fa-fw"></i>
</a>
{{ end }}
{{ if or .Params.Share.Pinterest (and .Site.Params.Share.Pinterest (ne .Params.Share.Pinterest false)) }}
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="Share on Pinterest">
<i class="fab fa-pinterest"></i>
<i class="fab fa-pinterest fa-fw"></i>
</a>
{{ end }}
{{ if or .Params.Share.YCombinator (and .Site.Params.Share.YCombinator (ne .Params.Share.YCombinator false)) }}
<a href="//news.ycombinator.com/submitlink?u={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="Share on Hacker News">
<i class="fab fa-y-combinator"></i>
<i class="fab fa-y-combinator fa-fw"></i>
</a>
{{ end }}
{{ if or .Params.Share.Mix (and .Site.Params.Share.Mix (ne .Params.Share.Mix false)) }}
<a href="//mix.com/add?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="Share on Mix">
<i class="fab fa-mix"></i>
<i class="fab fa-mix fa-fw"></i>
</a>
{{ end }}
{{ if or .Params.Share.Tumblr (and .Site.Params.Share.Tumblr (ne .Params.Share.Tumblr false)) }}
<a href="//www.tumblr.com/widgets/share/tool?canonicalUrl={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="Share on Tumblr">
<i class="fab fa-tumblr"></i>
<i class="fab fa-tumblr fa-fw"></i>
</a>
{{ end }}
{{ if or .Params.Share.VK (and .Site.Params.Share.VK (ne .Params.Share.VK false)) }}
<a href="//vk.com/share.php?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="Share on VKontakte ">
<i class="fab fa-vk"></i>
<i class="fab fa-vk fa-fw"></i>
</a>
{{ end }}
{{ if or .Params.Share.Weibo (and .Site.Params.Share.Weibo (ne .Params.Share.Weibo false)) }}
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&amp;appkey=&amp;title={{ .Title }}{{ with $.Params.featured_image }}&amp;pic={{ . }}{{ end }}" target="_blank" title="Share on Weibo">
<i class="fab fa-weibo"></i>
<i class="fab fa-weibo fa-fw"></i>
</a>
{{ end }}
{{ end }}

View File

@@ -12,27 +12,27 @@
<div class="post-meta">
<div class="post-meta-main">
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle"></i>&nbsp;{{ $author }}&nbsp;</a>
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle fa-fw"></i>{{ $author }}&nbsp;</a>
{{ with .Params.categories -}}
<span class="post-category">
{{ T "included" }}
{{ range . }}
{{- $name := . -}}
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
<i class="far fa-folder"></i><a href="{{ .Permalink }}">{{ $name }}</a>&nbsp;
<i class="far fa-folder fa-fw"></i><a href="{{ .Permalink }}">{{ $name }}</a>
{{ end -}}
{{ end }}
</span>
{{- end }}
</div>
<div class="post-meta-other">
<span class="post-time"><i class="far fa-calendar-alt"></i><time datetime={{ $publish_date }}>{{ $publish_date }}</time>&nbsp;</span>
<i class="fas fa-pencil-alt"></i>{{ T "wordCount" .WordCount }}&nbsp;
<i class="far fa-clock"></i>{{ T "readingTime" .ReadingTime }}&nbsp;
<i class="far fa-calendar-alt fa-fw"></i><time datetime={{ $publish_date }}>{{ $publish_date }}</time>&nbsp;
<i class="fas fa-pencil-alt fa-fw"></i>{{ T "wordCount" .WordCount }}&nbsp;
<i class="far fa-clock fa-fw"></i>{{ T "readingTime" .ReadingTime }}&nbsp;
{{- if eq (getenv "HUGO_ENV") "production" | and .Site.Params.valine.enable | and .Site.Params.valine.visitor -}}
<span id="{{ .RelPermalink | relURL }}" class="leancloud_visitors" data-flag-title="{{ .Title }}">
<i class="far fa-eye"></i>{{ T "pageviews" | safeHTML }}&nbsp;
</span>
<i class="far fa-eye fa-fw"></i>{{ T "pageviews" | safeHTML }}
</span>&nbsp;
{{- end -}}
</div>
</div>
@@ -72,7 +72,7 @@
{{ $REout = "<figure><img src=/images/loading.svg data-src=$1 data-sizes=auto alt=$2 title=$3 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `:\(([\w- ]+?)\):` }}
{{ $REout = `<i class="inline-icon $1"></i>` }}
{{ $REout = `<i class="$1 fa-fw"></i>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}

View File

@@ -1,5 +0,0 @@
{{ if .IsNamedParams -}}
<i class="inline-icon {{ .Get "class" }}"></i>
{{- else -}}
<i class="inline-icon {{ .Get 0 }}"></i>
{{- end }}

View File

@@ -5,9 +5,9 @@
<h2 class="post-title animated pulse faster">
{{ $taxonomy := .Data.Singular }}
{{ if eq $taxonomy "category" }}
<i class="far fa-folder-open"></i>{{ .Title }}
<i class="far fa-folder-open fa-fw"></i>{{ .Title }}
{{ else if eq $taxonomy "tag" }}
<i class="fas fa-tag"></i>{{ .Title }}
<i class="fas fa-tag fa-fw"></i>{{ .Title }}
{{ else }}
{{ printf "%s - %s" (T $taxonomy | default (humanize $taxonomy)) .Title }}
{{ end }}

View File

@@ -20,7 +20,7 @@
<div class="card-item">
<div class="categories">
<a href="{{ .Permalink }}">
<h3><i class="far fa-folder"></i>{{ $term | humanize}}</h3>
<h3><i class="far fa-folder fa-fw"></i>{{ $term | humanize}}</h3>
</a>
{{ range first 5 $pages }}
<article class="archive-item">