🏗️ Finish post follow channel widget coding.

This commit is contained in:
凡梦星尘 2022-06-04 11:03:09 +08:00
parent 6c362cf117
commit df06c05c4e
7 changed files with 35 additions and 5 deletions

View File

@ -4,6 +4,8 @@
padding: 1em 1.5em;
text-align: center;
@include post-card();
border-left: none;
border-bottom: #46b404 solid 5px;
.social-list {
@include flex-wrap();

View File

@ -70,7 +70,7 @@ $toc_wrap: {{ $P.toc.wrap }};
// Posts
$creative_commons_post: {{ $P.creativeCommons.post }};
$follow_me: {{ isset $P "followMe" }};
$follow_me: {{ isset $P "followme" }};
$motion_trans_coll_header: {{ $P.motion.transition.collHeader }};
$motion_trans_post_block: {{ $P.motion.transition.postBlock }};
$motion_trans_post_body: {{ $P.motion.transition.postBody }};

View File

@ -352,10 +352,10 @@ params:
# Subscribe through Telegram Channel, Twitter, etc.
# Usage: `Key: permalink || icon` (Font Awesome)
followMe:
Twitter: https://twitter.com/username || fab fa-twitter
#Telegram: https://t.me/channel_name || fab fa-telegram
#WeChat: /images/wechat_channel.jpg || fab fa-weixin
#RSS: /atom.xml || fa fa-rss
#channel0: Twitter || https://twitter.com/username || fab fa-twitter
#channel1: Telegram || https://t.me/channel_name || fab fa-telegram
channel2: WeChat || /images/wechat_channel.jpg || fab fa-weixin
channel3: RSS || /atom.xml || fa fa-rss
# Related popular posts
# Dependencies: https://github.com/sergeyzwezdin/hexo-related-posts

View File

@ -68,6 +68,9 @@ PostCRLicenseTitle:
PostCRLicenseContent:
other: "All articles in this blog are licensed under <i class=\"fab fa-fw fa-creative-commons\"></i>%s unless stating additionally."
PostFollowMe:
other: Welcome to my other publishing channels
VisitorsLabel:
other: Total Visitors
PageViewsLabel:

View File

@ -70,6 +70,9 @@ PostCRLicenseTitle:
PostCRLicenseContent:
other: "本博客所有文章除特别声明外,均采用 <i class=\"fab fa-fw fa-creative-commons\"></i>%s 许可协议。转载请注明出处!"
PostFollowMe:
other: 欢迎关注我的其它发布渠道
UserVistorsLabel:
other: 总访客量
PageViewsLabel:

View File

@ -0,0 +1,21 @@
{{- with .Site.Params.followMe }}
<div class="followme">
<span>{{ T "PostFollowMe" }}</span>
<div class="social-list">
{{ range . }}
{{- $vals := split . "||" }}
{{- $name := trim (index $vals 0) " " }}
{{- $url := trim (index $vals 1) " " }}
{{- $icon := trim (index $vals 2) " " }}
<div class="social-item">
<a target="_blank" class="social-link" href="{{ $url }}">
<span class="icon">
<i class="{{ $icon }}"></i>
</span>
<span class="label">{{ $name }}</span>
</a>
</div>
{{- end }}
</div>
</div>
{{- end }}

View File

@ -10,6 +10,7 @@
<div class="post-eof"></div>
{{- else }}
{{ partial "post/post_copyright.html" . }}
{{ partial "post/post_followme.html" . }}
<div class="post-nav">
<div class="post-nav-next post-nav-item">
{{- with .NextInSection }}