feat(content): support complete local resource references (#388)
@@ -100,6 +100,10 @@
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
@include object-fit(none);
|
||||
}
|
||||
|
||||
img.lazyloaded {
|
||||
@include object-fit(cover);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,11 +40,15 @@
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
img.lazyloaded {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -321,3 +325,7 @@
|
||||
@import "../_partial/_single/footer";
|
||||
@import "../_partial/_single/comment";
|
||||
}
|
||||
|
||||
.lg-toolbar .lg-icon::after {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
@@ -1,511 +1,511 @@
|
||||
# 001: Github
|
||||
github:
|
||||
weight: 1
|
||||
prefix: https://github.com/
|
||||
title: GitHub
|
||||
icon:
|
||||
class: fab fa-github-alt fa-fw
|
||||
Weight: 1
|
||||
Prefix: https://github.com/
|
||||
Title: GitHub
|
||||
Icon:
|
||||
Class: fab fa-github-alt fa-fw
|
||||
|
||||
# 002: LinkedIn
|
||||
linkedin:
|
||||
weight: 2
|
||||
prefix: https://linkedin.com/in/
|
||||
title: LinkedIn
|
||||
icon:
|
||||
class: fab fa-linkedin fa-fw
|
||||
Weight: 2
|
||||
Prefix: https://linkedin.com/in/
|
||||
Title: LinkedIn
|
||||
Icon:
|
||||
Class: fab fa-linkedin fa-fw
|
||||
|
||||
# 003: Twitter
|
||||
twitter:
|
||||
weight: 3
|
||||
prefix: https://twitter.com/
|
||||
title: Twitter
|
||||
icon:
|
||||
class: fab fa-twitter fa-fw
|
||||
Weight: 3
|
||||
Prefix: https://twitter.com/
|
||||
Title: Twitter
|
||||
Icon:
|
||||
Class: fab fa-twitter fa-fw
|
||||
|
||||
# 004: Instagram
|
||||
instagram:
|
||||
weight: 4
|
||||
prefix: https://www.instagram.com/
|
||||
title: Instagram
|
||||
icon:
|
||||
class: fab fa-instagram fa-fw
|
||||
Weight: 4
|
||||
Prefix: https://www.instagram.com/
|
||||
Title: Instagram
|
||||
Icon:
|
||||
Class: fab fa-instagram fa-fw
|
||||
|
||||
# 005: facebook
|
||||
facebook:
|
||||
weight: 5
|
||||
prefix: https://facebook.com/
|
||||
title: facebook
|
||||
icon:
|
||||
class: fab fa-facebook fa-fw
|
||||
Weight: 5
|
||||
Prefix: https://facebook.com/
|
||||
Title: facebook
|
||||
Icon:
|
||||
Class: fab fa-facebook fa-fw
|
||||
|
||||
# 006: Telegram
|
||||
telegram:
|
||||
weight: 6
|
||||
prefix: https://t.me/
|
||||
title: Telegram
|
||||
icon:
|
||||
class: fab fa-telegram-plane fa-fw
|
||||
Weight: 6
|
||||
Prefix: https://t.me/
|
||||
Title: Telegram
|
||||
Icon:
|
||||
Class: fab fa-telegram-plane fa-fw
|
||||
|
||||
# 007: Medium
|
||||
medium:
|
||||
weight: 7
|
||||
prefix: https://medium.com/
|
||||
title: Medium
|
||||
icon:
|
||||
class: fab fa-medium fa-fw
|
||||
Weight: 7
|
||||
Prefix: https://medium.com/
|
||||
Title: Medium
|
||||
Icon:
|
||||
Class: fab fa-medium fa-fw
|
||||
|
||||
# 008: GitLab
|
||||
gitlab:
|
||||
weight: 8
|
||||
prefix: https://gitlab.com/
|
||||
title: GitLab
|
||||
icon:
|
||||
class: fab fa-gitlab fa-fw
|
||||
Weight: 8
|
||||
Prefix: https://gitlab.com/
|
||||
Title: GitLab
|
||||
Icon:
|
||||
Class: fab fa-gitlab fa-fw
|
||||
|
||||
# 009: YouTube Legacy
|
||||
youtubelegacy:
|
||||
weight: 9
|
||||
prefix: https://www.youtube.com/user/
|
||||
title: YouTube
|
||||
icon:
|
||||
class: fab fa-youtube fa-fw
|
||||
Weight: 9
|
||||
Prefix: https://www.youtube.com/user/
|
||||
Title: YouTube
|
||||
Icon:
|
||||
Class: fab fa-youtube fa-fw
|
||||
|
||||
# 010: YouTube Custom
|
||||
youtubecustom:
|
||||
weight: 10
|
||||
prefix: https://www.youtube.com/c/
|
||||
title: YouTube
|
||||
icon:
|
||||
class: fab fa-youtube fa-fw
|
||||
Weight: 10
|
||||
Prefix: https://www.youtube.com/c/
|
||||
Title: YouTube
|
||||
Icon:
|
||||
Class: fab fa-youtube fa-fw
|
||||
|
||||
# 011: YouTube Channel
|
||||
youtubechannel:
|
||||
weight: 11
|
||||
prefix: https://www.youtube.com/channel/
|
||||
title: YouTube
|
||||
icon:
|
||||
class: fab fa-youtube fa-fw
|
||||
Weight: 11
|
||||
Prefix: https://www.youtube.com/channel/
|
||||
Title: YouTube
|
||||
Icon:
|
||||
Class: fab fa-youtube fa-fw
|
||||
|
||||
# 012: Tumblr
|
||||
tumblr:
|
||||
weight: 12
|
||||
template: https://%v.tumblr.com/
|
||||
title: Tumblr
|
||||
icon:
|
||||
class: fab fa-tumblr fa-fw
|
||||
Weight: 12
|
||||
Template: https://%v.tumblr.com/
|
||||
Title: Tumblr
|
||||
Icon:
|
||||
Class: fab fa-tumblr fa-fw
|
||||
|
||||
# 013: Quora
|
||||
quora:
|
||||
weight: 13
|
||||
prefix: https://www.quora.com/profile/
|
||||
title: Quora
|
||||
icon:
|
||||
class: fab fa-quora fa-fw
|
||||
Weight: 13
|
||||
Prefix: https://www.quora.com/profile/
|
||||
Title: Quora
|
||||
Icon:
|
||||
Class: fab fa-quora fa-fw
|
||||
|
||||
# 014: Keybase
|
||||
keybase:
|
||||
weight: 14
|
||||
prefix: https://keybase.io/
|
||||
title: Keybase
|
||||
icon:
|
||||
class: fab fa-keybase fa-fw
|
||||
Weight: 14
|
||||
Prefix: https://keybase.io/
|
||||
Title: Keybase
|
||||
Icon:
|
||||
Class: fab fa-keybase fa-fw
|
||||
|
||||
# 015: Pinterest
|
||||
pinterest:
|
||||
weight: 15
|
||||
prefix: https://www.pinterest.com/
|
||||
title: Pinterest
|
||||
icon:
|
||||
class: fab fa-pinterest fa-fw
|
||||
Weight: 15
|
||||
Prefix: https://www.pinterest.com/
|
||||
Title: Pinterest
|
||||
Icon:
|
||||
Class: fab fa-pinterest fa-fw
|
||||
|
||||
# 016: Reddit
|
||||
reddit:
|
||||
weight: 16
|
||||
prefix: https://www.reddit.com/user/
|
||||
title: Reddit
|
||||
icon:
|
||||
class: fab fa-reddit fa-fw
|
||||
Weight: 16
|
||||
Prefix: https://www.reddit.com/user/
|
||||
Title: Reddit
|
||||
Icon:
|
||||
Class: fab fa-reddit fa-fw
|
||||
|
||||
# 017: CodePen
|
||||
codepen:
|
||||
weight: 17
|
||||
prefix: https://codepen.io/
|
||||
title: CodePen
|
||||
icon:
|
||||
class: fab fa-codepen fa-fw
|
||||
Weight: 17
|
||||
Prefix: https://codepen.io/
|
||||
Title: CodePen
|
||||
Icon:
|
||||
Class: fab fa-codepen fa-fw
|
||||
|
||||
# 018: freeCodeCamp
|
||||
freecodecamp:
|
||||
weight: 18
|
||||
prefix: https://freecodecamp.org/
|
||||
title: freeCodeCamp
|
||||
icon:
|
||||
class: fab fa-free-code-camp fa-fw
|
||||
Weight: 18
|
||||
Prefix: https://freecodecamp.org/
|
||||
Title: freeCodeCamp
|
||||
Icon:
|
||||
Class: fab fa-free-code-camp fa-fw
|
||||
|
||||
# 019: Bitbucket
|
||||
bitbucket:
|
||||
weight: 19
|
||||
prefix: https://bitbucket.org/
|
||||
title: Bitbucket
|
||||
icon:
|
||||
class: fab fa-bitbucket fa-fw
|
||||
Weight: 19
|
||||
Prefix: https://bitbucket.org/
|
||||
Title: Bitbucket
|
||||
Icon:
|
||||
Class: fab fa-bitbucket fa-fw
|
||||
|
||||
# 020: Stack Overflow
|
||||
stackoverflow:
|
||||
weight: 20
|
||||
prefix: https://stackoverflow.com/users/
|
||||
title: Stack Overflow
|
||||
icon:
|
||||
class: fab fa-codepen fa-fw
|
||||
Weight: 20
|
||||
Prefix: https://stackoverflow.com/users/
|
||||
Title: Stack Overflow
|
||||
Icon:
|
||||
Class: fab fa-codepen fa-fw
|
||||
|
||||
# 021: 微博
|
||||
weibo:
|
||||
weight: 21
|
||||
prefix: https://weibo.com/
|
||||
title: 微博
|
||||
icon:
|
||||
class: fab fa-weibo fa-fw
|
||||
Weight: 21
|
||||
Prefix: https://weibo.com/
|
||||
Title: 微博
|
||||
Icon:
|
||||
Class: fab fa-weibo fa-fw
|
||||
|
||||
# 022: OK.RU
|
||||
odnoklassniki:
|
||||
weight: 22
|
||||
prefix: https://ok.ru/
|
||||
title: OK.RU
|
||||
icon:
|
||||
class: fab fa-odnoklassniki fa-fw
|
||||
Weight: 22
|
||||
Prefix: https://ok.ru/
|
||||
Title: OK.RU
|
||||
Icon:
|
||||
Class: fab fa-odnoklassniki fa-fw
|
||||
|
||||
# 023: VK
|
||||
vk:
|
||||
weight: 23
|
||||
prefix: https://vk.com/
|
||||
title: VK
|
||||
icon:
|
||||
class: fab fa-vk fa-fw
|
||||
Weight: 23
|
||||
Prefix: https://vk.com/
|
||||
Title: VK
|
||||
Icon:
|
||||
Class: fab fa-vk fa-fw
|
||||
|
||||
# 024: Flickr
|
||||
flickr:
|
||||
weight: 24
|
||||
prefix: https://www.flickr.com/photos/
|
||||
title: Flickr
|
||||
icon:
|
||||
class: fab fa-flickr fa-fw
|
||||
Weight: 24
|
||||
Prefix: https://www.flickr.com/photos/
|
||||
Title: Flickr
|
||||
Icon:
|
||||
Class: fab fa-flickr fa-fw
|
||||
|
||||
# 025: Xing
|
||||
xing:
|
||||
weight: 25
|
||||
prefix: https://www.xing.com/profile/
|
||||
title: Xing
|
||||
icon:
|
||||
class: fab fa-xing fa-fw
|
||||
Weight: 25
|
||||
Prefix: https://www.xing.com/profile/
|
||||
Title: Xing
|
||||
Icon:
|
||||
Class: fab fa-xing fa-fw
|
||||
|
||||
# 026: Snapchat
|
||||
snapchat:
|
||||
weight: 26
|
||||
prefix: https://www.snapchat.com/add/
|
||||
title: Snapchat
|
||||
icon:
|
||||
class: fab fa-snapchat fa-fw
|
||||
Weight: 26
|
||||
Prefix: https://www.snapchat.com/add/
|
||||
Title: Snapchat
|
||||
Icon:
|
||||
Class: fab fa-snapchat fa-fw
|
||||
|
||||
# 027: SoundCloud
|
||||
soundcloud:
|
||||
weight: 27
|
||||
prefix: https://soundcloud.com/
|
||||
title: SoundCloud
|
||||
icon:
|
||||
class: fab fa-soundcloud fa-fw
|
||||
Weight: 27
|
||||
Prefix: https://soundcloud.com/
|
||||
Title: SoundCloud
|
||||
Icon:
|
||||
Class: fab fa-soundcloud fa-fw
|
||||
|
||||
# 028: Spotify
|
||||
spotify:
|
||||
weight: 28
|
||||
prefix: https://open.spotify.com/user/
|
||||
title: Spotify
|
||||
icon:
|
||||
class: fab fa-spotify fa-fw
|
||||
Weight: 28
|
||||
Prefix: https://open.spotify.com/user/
|
||||
Title: Spotify
|
||||
Icon:
|
||||
Class: fab fa-spotify fa-fw
|
||||
|
||||
# 029: Bandcamp
|
||||
bandcamp:
|
||||
weight: 29
|
||||
template: https://%v.bandcamp.com/
|
||||
title: Bandcamp
|
||||
icon:
|
||||
class: fab fa-bandcamp fa-fw
|
||||
Weight: 29
|
||||
Template: https://%v.bandcamp.com/
|
||||
Title: Bandcamp
|
||||
Icon:
|
||||
Class: fab fa-bandcamp fa-fw
|
||||
|
||||
# 030: PayPal
|
||||
paypal:
|
||||
weight: 30
|
||||
prefix: https://paypal.me/
|
||||
title: PayPal
|
||||
icon:
|
||||
class: fab fa-paypal fa-fw
|
||||
Weight: 30
|
||||
Prefix: https://paypal.me/
|
||||
Title: PayPal
|
||||
Icon:
|
||||
Class: fab fa-paypal fa-fw
|
||||
|
||||
# 031: 500px
|
||||
fivehundredpx:
|
||||
weight: 31
|
||||
prefix: https://500px.com/
|
||||
title: 500px
|
||||
icon:
|
||||
class: fab fa-500px fa-fw
|
||||
Weight: 31
|
||||
Prefix: https://500px.com/
|
||||
Title: 500px
|
||||
Icon:
|
||||
Class: fab fa-500px fa-fw
|
||||
|
||||
# 032: Mix
|
||||
mix:
|
||||
weight: 32
|
||||
prefix: https://mix.com/
|
||||
title: Mix
|
||||
icon:
|
||||
class: fab fa-mix fa-fw
|
||||
Weight: 32
|
||||
Prefix: https://mix.com/
|
||||
Title: Mix
|
||||
Icon:
|
||||
Class: fab fa-mix fa-fw
|
||||
|
||||
# 033: Goodreads
|
||||
goodreads:
|
||||
weight: 33
|
||||
prefix: https://www.goodreads.com/user/show/
|
||||
title: Goodreads
|
||||
icon:
|
||||
class: fab fa-goodreads fa-fw
|
||||
Weight: 33
|
||||
Prefix: https://www.goodreads.com/user/show/
|
||||
Title: Goodreads
|
||||
Icon:
|
||||
Class: fab fa-goodreads fa-fw
|
||||
|
||||
# 034: Last.fm
|
||||
lastfm:
|
||||
weight: 34
|
||||
prefix: https://www.last.fm/user/
|
||||
title: Last.fm
|
||||
icon:
|
||||
class: fab fa-lastfm fa-fw
|
||||
Weight: 34
|
||||
Prefix: https://www.last.fm/user/
|
||||
Title: Last.fm
|
||||
Icon:
|
||||
Class: fab fa-lastfm fa-fw
|
||||
|
||||
# 035: Foursquare
|
||||
foursquare:
|
||||
weight: 35
|
||||
prefix: https://foursquare.com/
|
||||
title: Foursquare
|
||||
icon:
|
||||
class: fab fa-foursquare fa-fw
|
||||
Weight: 35
|
||||
Prefix: https://foursquare.com/
|
||||
Title: Foursquare
|
||||
Icon:
|
||||
Class: fab fa-foursquare fa-fw
|
||||
|
||||
# 036: Hacker News
|
||||
hackernews:
|
||||
weight: 36
|
||||
template: https://news.ycombinator.com/user?id=%v
|
||||
title: Hacker News
|
||||
icon:
|
||||
class: fab fa-hacker-news fa-fw
|
||||
Weight: 36
|
||||
Template: https://news.ycombinator.com/user?id=%v
|
||||
Title: Hacker News
|
||||
Icon:
|
||||
Class: fab fa-hacker-news fa-fw
|
||||
|
||||
# 037: Kickstarter
|
||||
kickstarter:
|
||||
weight: 37
|
||||
prefix: https://kickstarter.com/profile/
|
||||
title: Kickstarter
|
||||
icon:
|
||||
class: fab fa-kickstarter fa-fw
|
||||
Weight: 37
|
||||
Prefix: https://kickstarter.com/profile/
|
||||
Title: Kickstarter
|
||||
Icon:
|
||||
Class: fab fa-kickstarter fa-fw
|
||||
|
||||
# 038: Patreon
|
||||
patreon:
|
||||
weight: 38
|
||||
prefix: https://patreon.com/
|
||||
title: Patreon
|
||||
icon:
|
||||
class: fab fa-patreon fa-fw
|
||||
Weight: 38
|
||||
Prefix: https://patreon.com/
|
||||
Title: Patreon
|
||||
Icon:
|
||||
Class: fab fa-patreon fa-fw
|
||||
|
||||
# 039: Steam
|
||||
steam:
|
||||
weight: 39
|
||||
prefix: https://steamcommunity.com/id/
|
||||
title: Steam
|
||||
icon:
|
||||
class: fab fa-steam fa-fw
|
||||
Weight: 39
|
||||
Prefix: https://steamcommunity.com/id/
|
||||
Title: Steam
|
||||
Icon:
|
||||
Class: fab fa-steam fa-fw
|
||||
|
||||
# 040: Twitch
|
||||
twitch:
|
||||
weight: 40
|
||||
prefix: https://www.twitch.tv/
|
||||
title: Twitch
|
||||
icon:
|
||||
class: fab fa-twitch fa-fw
|
||||
Weight: 40
|
||||
Prefix: https://www.twitch.tv/
|
||||
Title: Twitch
|
||||
Icon:
|
||||
Class: fab fa-twitch fa-fw
|
||||
|
||||
# 041: Strava
|
||||
strava:
|
||||
weight: 41
|
||||
prefix: https://www.strava.com/athletes/
|
||||
title: Strava
|
||||
icon:
|
||||
class: fab fa-strava fa-fw
|
||||
Weight: 41
|
||||
Prefix: https://www.strava.com/athletes/
|
||||
Title: Strava
|
||||
Icon:
|
||||
Class: fab fa-strava fa-fw
|
||||
|
||||
# 042: Skype
|
||||
skype:
|
||||
weight: 42
|
||||
template: "skype:"
|
||||
title: Skype
|
||||
icon:
|
||||
class: fab fa-skype fa-fw
|
||||
Weight: 42
|
||||
Template: "skype:"
|
||||
Title: Skype
|
||||
Icon:
|
||||
Class: fab fa-skype fa-fw
|
||||
|
||||
# 043: WhatsApp
|
||||
whatsapp:
|
||||
weight: 43
|
||||
prefix: https://wa.me/
|
||||
title: WhatsApp
|
||||
icon:
|
||||
class: fab fa-whatsapp fa-fw
|
||||
Weight: 43
|
||||
Prefix: https://wa.me/
|
||||
Title: WhatsApp
|
||||
Icon:
|
||||
Class: fab fa-whatsapp fa-fw
|
||||
|
||||
# 044: 知乎
|
||||
zhihu:
|
||||
weight: 44
|
||||
prefix: https://www.zhihu.com/people/
|
||||
title: 知乎
|
||||
icon:
|
||||
simpleicons: zhihu
|
||||
Weight: 44
|
||||
Prefix: https://www.zhihu.com/people/
|
||||
Title: 知乎
|
||||
Icon:
|
||||
Simpleicons: zhihu
|
||||
|
||||
# 045: 豆瓣
|
||||
douban:
|
||||
weight: 45
|
||||
prefix: https://www.douban.com/people/
|
||||
title: 豆瓣
|
||||
icon:
|
||||
simpleicons: douban
|
||||
Weight: 45
|
||||
Prefix: https://www.douban.com/people/
|
||||
Title: 豆瓣
|
||||
Icon:
|
||||
Simpleicons: douban
|
||||
|
||||
# 046: Angellist
|
||||
angellist:
|
||||
weight: 46
|
||||
prefix: https://angel.co/
|
||||
title: Angellist
|
||||
icon:
|
||||
class: fab fa-angellist fa-fw
|
||||
Weight: 46
|
||||
Prefix: https://angel.co/
|
||||
Title: Angellist
|
||||
Icon:
|
||||
Class: fab fa-angellist fa-fw
|
||||
|
||||
# 047: SlideShare
|
||||
slideshare:
|
||||
weight: 47
|
||||
prefix: https://slideshare.com/
|
||||
title: SlideShare
|
||||
icon:
|
||||
class: fab fa-slideshare fa-fw
|
||||
Weight: 47
|
||||
Prefix: https://slideshare.com/
|
||||
Title: SlideShare
|
||||
Icon:
|
||||
Class: fab fa-slideshare fa-fw
|
||||
|
||||
# 048: JSFiddle
|
||||
jsfiddle:
|
||||
weight: 48
|
||||
prefix: https://jsfiddle.com/
|
||||
title: JSFiddle
|
||||
icon:
|
||||
class: fab fa-jsfiddle fa-fw
|
||||
Weight: 48
|
||||
Prefix: https://jsfiddle.com/
|
||||
Title: JSFiddle
|
||||
Icon:
|
||||
Class: fab fa-jsfiddle fa-fw
|
||||
|
||||
# 049: DeviantArt
|
||||
deviantart:
|
||||
weight: 49
|
||||
template: https://%v.deviantart.com/
|
||||
title: DeviantArt
|
||||
icon:
|
||||
class: fab fa-deviantart fa-fw
|
||||
Weight: 49
|
||||
Template: https://%v.deviantart.com/
|
||||
Title: DeviantArt
|
||||
Icon:
|
||||
Class: fab fa-deviantart fa-fw
|
||||
|
||||
# 050: Behance
|
||||
behance:
|
||||
weight: 50
|
||||
prefix: https://behance.net/
|
||||
title: Behance
|
||||
icon:
|
||||
class: fab fa-behance fa-fw
|
||||
Weight: 50
|
||||
Prefix: https://behance.net/
|
||||
Title: Behance
|
||||
Icon:
|
||||
Class: fab fa-behance fa-fw
|
||||
|
||||
# 051: Dribbble
|
||||
dribbble:
|
||||
weight: 51
|
||||
prefix: https://dribbble.com/
|
||||
title: Dribbble
|
||||
icon:
|
||||
class: fab fa-dribbble fa-fw
|
||||
Weight: 51
|
||||
Prefix: https://dribbble.com/
|
||||
Title: Dribbble
|
||||
Icon:
|
||||
Class: fab fa-dribbble fa-fw
|
||||
|
||||
# 052: WordPress
|
||||
wordpress:
|
||||
weight: 52
|
||||
template: https://%v.wordpress.com/
|
||||
title: WordPress
|
||||
icon:
|
||||
class: fab fa-wordpress fa-fw
|
||||
Weight: 52
|
||||
Template: https://%v.wordpress.com/
|
||||
Title: WordPress
|
||||
Icon:
|
||||
Class: fab fa-wordpress fa-fw
|
||||
|
||||
# 053: Vine
|
||||
vine:
|
||||
weight: 53
|
||||
prefix: https://vine.co/
|
||||
title: Vine
|
||||
icon:
|
||||
class: fab fa-vine fa-fw
|
||||
Weight: 53
|
||||
Prefix: https://vine.co/
|
||||
Title: Vine
|
||||
Icon:
|
||||
Class: fab fa-vine fa-fw
|
||||
|
||||
# 054: Google Scholar
|
||||
googlescholar:
|
||||
weight: 54
|
||||
template: https://scholar.google.com/citations?%v
|
||||
title: Google Scholar
|
||||
icon:
|
||||
simpleicons: googlescholar
|
||||
Weight: 54
|
||||
Template: https://scholar.google.com/citations?%v
|
||||
Title: Google Scholar
|
||||
Icon:
|
||||
Simpleicons: googlescholar
|
||||
|
||||
# 055: ResearchGate
|
||||
researchgate:
|
||||
weight: 55
|
||||
prefix: https://www.researchgate.net/profile/
|
||||
title: ResearchGate
|
||||
icon:
|
||||
class: fab fa-researchgate fa-fw
|
||||
Weight: 55
|
||||
Prefix: https://www.researchgate.net/profile/
|
||||
Title: ResearchGate
|
||||
Icon:
|
||||
Class: fab fa-researchgate fa-fw
|
||||
|
||||
# 056: Mastodon
|
||||
mastodon:
|
||||
weight: 56
|
||||
prefix: https://mastodon.social/
|
||||
title: Mastodon
|
||||
icon:
|
||||
class: fab fa-mastodon fa-fw
|
||||
Weight: 56
|
||||
Prefix: https://mastodon.social/
|
||||
Title: Mastodon
|
||||
Icon:
|
||||
Class: fab fa-mastodon fa-fw
|
||||
|
||||
# 057: Thingiverse
|
||||
thingiverse:
|
||||
weight: 57
|
||||
prefix: https://www.thingiverse.com/
|
||||
title: Thingiverse
|
||||
icon:
|
||||
src: svg/icons/thingiverse.svg
|
||||
Weight: 57
|
||||
Prefix: https://www.thingiverse.com/
|
||||
Title: Thingiverse
|
||||
Icon:
|
||||
Src: svg/icons/thingiverse.svg
|
||||
|
||||
# 058: Dev.To
|
||||
devto:
|
||||
weight: 58
|
||||
prefix: https://dev.to/
|
||||
title: Dev.To
|
||||
icon:
|
||||
class: fab fa-dev fa-fw
|
||||
Weight: 58
|
||||
Prefix: https://dev.to/
|
||||
Title: Dev.To
|
||||
Icon:
|
||||
Class: fab fa-dev fa-fw
|
||||
|
||||
# 059: Gitea
|
||||
gitea:
|
||||
weight: 59
|
||||
title: Gitea
|
||||
icon:
|
||||
simpleicons: gitea
|
||||
Weight: 59
|
||||
Title: Gitea
|
||||
Icon:
|
||||
Simpleicons: gitea
|
||||
|
||||
# 060: XMPP
|
||||
xmpp:
|
||||
weight: 60
|
||||
template: xmpp:%v
|
||||
title: XMPP
|
||||
icon:
|
||||
simpleicons: xmpp
|
||||
Weight: 60
|
||||
Template: xmpp:%v
|
||||
Title: XMPP
|
||||
Icon:
|
||||
Simpleicons: xmpp
|
||||
|
||||
# 061: Matrix
|
||||
matrix:
|
||||
weight: 61
|
||||
prefix: https://matrix.to/#/
|
||||
title: Matrix
|
||||
icon:
|
||||
simpleicons: matrix
|
||||
Weight: 61
|
||||
Prefix: https://matrix.to/#/
|
||||
Title: Matrix
|
||||
Icon:
|
||||
Simpleicons: matrix
|
||||
|
||||
# 062: bilibili
|
||||
bilibili:
|
||||
weight: 62
|
||||
prefix: https://space.bilibili.com/
|
||||
title: bilibili
|
||||
icon:
|
||||
src: svg/icons/bilibili.svg
|
||||
Weight: 62
|
||||
Prefix: https://space.bilibili.com/
|
||||
Title: bilibili
|
||||
Icon:
|
||||
Src: svg/icons/bilibili.svg
|
||||
|
||||
# 063: Email
|
||||
email:
|
||||
weight: 63
|
||||
template: mailto:%v
|
||||
title: Email
|
||||
icon:
|
||||
class: far fa-envelope fa-fw
|
||||
Weight: 63
|
||||
Template: mailto:%v
|
||||
Title: Email
|
||||
Icon:
|
||||
Class: far fa-envelope fa-fw
|
||||
|
||||
# 064: RSS
|
||||
rss:
|
||||
weight: 64
|
||||
url: /index.xml
|
||||
title: RSS
|
||||
newtab: true
|
||||
icon:
|
||||
class: fas fa-rss fa-fw
|
||||
Weight: 64
|
||||
Url: /index.xml
|
||||
Title: RSS
|
||||
Newtab: true
|
||||
Icon:
|
||||
Class: fas fa-rss fa-fw
|
||||
|
||||
5
assets/svg/loading.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="margin:auto;background:0 0" width="60" height="60" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" display="block">
|
||||
<circle cx="50" cy="50" r="20" stroke-width="4" stroke="#a5a5a5" stroke-dasharray="31.416 31.416" fill="none" stroke-linecap="round" transform="rotate(67.21 50 50)">
|
||||
<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" keyTimes="0;1" values="0 50 50;360 50 50"/>
|
||||
</circle>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 503 B |
@@ -1,32 +0,0 @@
|
||||
<!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
|
||||
<svg width="319" height="319" viewBox="-281 -281 600 600" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="a">
|
||||
<stop stop-color="#a5a5a5" stop-opacity="0" offset="0%"/>
|
||||
<stop stop-color="#a5a5a5" stop-opacity=".631" offset="63.146%"/>
|
||||
<stop stop-color="#a5a5a5" offset="100%"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(1 1)">
|
||||
<path d="M36 18c0-9.94-8.06-18-18-18" id="Oval-2" stroke="url(#a)" stroke-width="2">
|
||||
<animateTransform
|
||||
attributeName="transform"
|
||||
type="rotate"
|
||||
from="0 18 18"
|
||||
to="360 18 18"
|
||||
dur="0.9s"
|
||||
repeatCount="indefinite" />
|
||||
</path>
|
||||
<circle fill="#a5a5a5" cx="36" cy="18" r="1">
|
||||
<animateTransform
|
||||
attributeName="transform"
|
||||
type="rotate"
|
||||
from="0 18 18"
|
||||
to="360 18 18"
|
||||
dur="0.9s"
|
||||
repeatCount="indefinite" />
|
||||
</circle>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,32 +0,0 @@
|
||||
<!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
|
||||
<svg width="69" height="69" viewBox="-31 -31 100 100" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="a">
|
||||
<stop stop-color="#a5a5a5" stop-opacity="0" offset="0%"/>
|
||||
<stop stop-color="#a5a5a5" stop-opacity=".631" offset="63.146%"/>
|
||||
<stop stop-color="#a5a5a5" offset="100%"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(1 1)">
|
||||
<path d="M36 18c0-9.94-8.06-18-18-18" id="Oval-2" stroke="url(#a)" stroke-width="2">
|
||||
<animateTransform
|
||||
attributeName="transform"
|
||||
type="rotate"
|
||||
from="0 18 18"
|
||||
to="360 18 18"
|
||||
dur="0.9s"
|
||||
repeatCount="indefinite" />
|
||||
</path>
|
||||
<circle fill="#a5a5a5" cx="36" cy="18" r="1">
|
||||
<animateTransform
|
||||
attributeName="transform"
|
||||
type="rotate"
|
||||
from="0 18 18"
|
||||
to="360 18 18"
|
||||
dur="0.9s"
|
||||
repeatCount="indefinite" />
|
||||
</circle>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
@@ -21,7 +21,7 @@ math:
|
||||
>
|
||||
> It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/Fastbyte01/KeepIt).
|
||||
|
||||

|
||||

|
||||
|
||||
### Features
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Welcome to take the time to propose a translation by [:(fas fa-code-branch fa-fw
|
||||
>
|
||||
> It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/Fastbyte01/KeepIt).
|
||||
|
||||

|
||||

|
||||
|
||||
### Features
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ math:
|
||||
>
|
||||
> 它的原型基于 [LeaveIt 主题](https://github.com/liuzc/LeaveIt) 和 [KeepIt 主题](https://github.com/Fastbyte01/KeepIt)。
|
||||
|
||||

|
||||

|
||||
|
||||
### 特性
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 168 KiB |
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "This article shows the basic Markdown syntax and format."
|
||||
images: ["/images/basic-markdown-syntax/featured-image.png"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.png"
|
||||
|
||||
tags: ["Markdown", "HTML"]
|
||||
categories: ["Markdown"]
|
||||
featuredImage: "/images/basic-markdown-syntax/featured-image.png"
|
||||
|
||||
lightgallery: true
|
||||
---
|
||||
|
||||
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Cet article présente la syntaxe et le format de base de Markdown."
|
||||
images: ["/images/basic-markdown-syntax/featured-image.png"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.png"
|
||||
|
||||
tags: ["Markdown", "HTML"]
|
||||
categories: ["Markdown"]
|
||||
featuredImage: "/images/basic-markdown-syntax/featured-image.png"
|
||||
|
||||
lightgallery: true
|
||||
---
|
||||
|
||||
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "这篇文章展示了基本的 Markdown 语法和格式."
|
||||
images: ["/images/basic-markdown-syntax/featured-image.png"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.png"
|
||||
|
||||
tags: ["Markdown", "HTML"]
|
||||
categories: ["Markdown"]
|
||||
featuredImage: "/images/basic-markdown-syntax/featured-image.png"
|
||||
|
||||
lightgallery: true
|
||||
---
|
||||
|
||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Guide to emoji usage in Hugo and LoveIt."
|
||||
images: ["/images/emoji-support/featured-image.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
|
||||
tags: ["emoji"]
|
||||
categories: ["Markdown"]
|
||||
featuredImage: "/images/emoji-support/featured-image.jpg"
|
||||
|
||||
lightgallery: true
|
||||
---
|
||||
|
||||
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Guide d'utilisation des emoji dans Hugo et LoveIt."
|
||||
images: ["/images/emoji-support/featured-image.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
|
||||
tags: ["emoji"]
|
||||
categories: ["Markdown"]
|
||||
featuredImage: "/images/emoji-support/featured-image.jpg"
|
||||
|
||||
lightgallery: true
|
||||
---
|
||||
|
||||
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Hugo 和 LoveIt 中的 Emoji 的用法指南."
|
||||
images: ["/images/emoji-support/featured-image.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
|
||||
tags: ["emoji"]
|
||||
categories: ["Markdown"]
|
||||
featuredImage: "/images/emoji-support/featured-image.jpg"
|
||||
|
||||
lightgallery: true
|
||||
---
|
||||
|
||||
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Discover what the Hugo - LoveIt theme is all about and the core-concepts behind it."
|
||||
images: ["/images/theme-documentation-basics/featured-image.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
|
||||
tags: ["installation", "configuration"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-basics/featured-image.jpg"
|
||||
|
||||
lightgallery: true
|
||||
|
||||
@@ -153,7 +154,7 @@ hugo serve
|
||||
|
||||
Go to `http://localhost:1313`.
|
||||
|
||||

|
||||

|
||||
|
||||
{{< admonition tip >}}
|
||||
When you run `hugo serve`, when the contents of the files change, the page automatically refreshes with the changes.
|
||||
@@ -785,7 +786,7 @@ The default data of all supported social links is located in `themes/LoveIt/asse
|
||||
which is you can refer to.
|
||||
{{< /admonition >}}
|
||||
|
||||

|
||||

|
||||
|
||||
### 3.2 Favicons, Browserconfig, Manifest
|
||||
|
||||
@@ -833,7 +834,7 @@ In `assets/css/_custom.scss`, you can add some css style code to customize the s
|
||||
|
||||
**LoveIt** theme is fully compatible with Hugo multilingual mode, which provides in-browser language switching.
|
||||
|
||||

|
||||

|
||||
|
||||
### 4.1 Compatibility {#language-compatibility}
|
||||
|
||||
|
||||
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Découvrez en quoi consiste le thème Hugo - LoveIt et les concepts fondamentaux qui le sous-tendent."
|
||||
images: ["/images/theme-documentation-basics/featured-image.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
|
||||
tags: ["installation", "configuration"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-basics/featured-image.jpg"
|
||||
|
||||
lightgallery: true
|
||||
|
||||
@@ -158,7 +159,7 @@ hugo serve
|
||||
|
||||
Go to `http://localhost:1313`.
|
||||
|
||||

|
||||

|
||||
|
||||
{{< admonition tip >}}
|
||||
When you run `hugo serve`, when the contents of the files change, the page automatically refreshes with the changes.
|
||||
@@ -790,7 +791,7 @@ The default data of all supported social links is located in `themes/LoveIt/asse
|
||||
which is you can refer to.
|
||||
{{< /admonition >}}
|
||||
|
||||

|
||||

|
||||
|
||||
### 3.2 Favicons, Browserconfig, Manifest
|
||||
|
||||
@@ -838,7 +839,7 @@ In `assets/css/_custom.scss`, you can add some css style code to customize the s
|
||||
|
||||
**LoveIt** theme is fully compatible with Hugo multilingual mode, which provides in-browser language switching.
|
||||
|
||||

|
||||

|
||||
|
||||
### 4.1 Compatibility {#language-compatibility}
|
||||
|
||||
|
||||
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "探索 Hugo - LoveIt 主题的全部内容和背后的核心概念."
|
||||
images: ["/images/theme-documentation-basics/featured-image.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
|
||||
tags: ["installation", "configuration"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-basics/featured-image.jpg"
|
||||
|
||||
lightgallery: true
|
||||
|
||||
@@ -156,7 +157,7 @@ hugo serve
|
||||
|
||||
去查看 `http://localhost:1313`.
|
||||
|
||||

|
||||

|
||||
|
||||
{{< admonition tip >}}
|
||||
当你运行 `hugo serve` 时, 当文件内容更改时, 页面会随着更改自动刷新.
|
||||
@@ -789,7 +790,7 @@ hugo
|
||||
你可以参考它来配置你的社交链接.
|
||||
{{< /admonition >}}
|
||||
|
||||

|
||||

|
||||
|
||||
### 3.2 网站图标, 浏览器配置, 网站清单
|
||||
|
||||
@@ -837,7 +838,7 @@ $code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospac
|
||||
|
||||
**LoveIt** 主题完全兼容 Hugo 的多语言模式, 并且支持在网页上切换语言.
|
||||
|
||||

|
||||

|
||||
|
||||
### 4.1 兼容性 {#language-compatibility}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 280 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Hugo provides multiple built-in shortcodes for author convenience and to keep your markdown content clean."
|
||||
images: ["/images/theme-documentation-built-in-shortcodes/featured-image.png"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.png"
|
||||
|
||||
tags: ["shortcodes"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
|
||||
|
||||
lightgallery: true
|
||||
---
|
||||
@@ -36,18 +37,18 @@ Hugo ships with a set of predefined shortcodes that represent very common usage.
|
||||
Example `figure` input:
|
||||
|
||||
```markdown
|
||||
{{</* figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" */>}}
|
||||
{{</* figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" */>}}
|
||||
```
|
||||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" >}}
|
||||
{{< figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" >}}
|
||||
|
||||
The HTML looks like this:
|
||||
|
||||
```html
|
||||
<figure>
|
||||
<img src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg"/>
|
||||
<img src="/images/lighthouse.jpg"/>
|
||||
<figcaption>
|
||||
<h4>Lighthouse (figure)</h4>
|
||||
</figcaption>
|
||||
|
||||
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Hugo fournit plusieurs shortcodes intégrés pour la commodité de l'auteur et pour garder votre contenu de démarque propre."
|
||||
images: ["/images/theme-documentation-built-in-shortcodes/featured-image.png"]
|
||||
resources:
|
||||
- name: "featured"
|
||||
src: "featured-image.png"
|
||||
|
||||
tags: ["shortcodes"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
|
||||
|
||||
lightgallery: true
|
||||
---
|
||||
@@ -41,18 +42,18 @@ Hugo ships with a set of predefined shortcodes that represent very common usage.
|
||||
Example `figure` input:
|
||||
|
||||
```markdown
|
||||
{{</* figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" */>}}
|
||||
{{</* figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" */>}}
|
||||
```
|
||||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" >}}
|
||||
{{< figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" >}}
|
||||
|
||||
The HTML looks like this:
|
||||
|
||||
```html
|
||||
<figure>
|
||||
<img src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg"/>
|
||||
<img src="/images/lighthouse.jpg"/>
|
||||
<figcaption>
|
||||
<h4>Lighthouse (figure)</h4>
|
||||
</figcaption>
|
||||
|
||||
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Hugo 提供了多个内置的 Shortcodes, 以方便作者保持 Markdown 内容的整洁."
|
||||
images: ["/images/theme-documentation-built-in-shortcodes/featured-image.png"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.png"
|
||||
|
||||
tags: ["shortcodes"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
|
||||
|
||||
lightgallery: true
|
||||
---
|
||||
@@ -37,18 +38,18 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见
|
||||
一个 `figure` 示例:
|
||||
|
||||
```markdown
|
||||
{{</* figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" */>}}
|
||||
{{</* figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" */>}}
|
||||
```
|
||||
|
||||
呈现的输出效果如下:
|
||||
|
||||
{{< figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" >}}
|
||||
{{< figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" >}}
|
||||
|
||||
输出的 HTML 看起来像这样:
|
||||
|
||||
```html
|
||||
<figure>
|
||||
<img src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg"/>
|
||||
<img src="/images/lighthouse.jpg"/>
|
||||
<figcaption>
|
||||
<h4>Lighthouse (figure)</h4>
|
||||
</figcaption>
|
||||
|
||||
|
Before Width: | Height: | Size: 289 KiB After Width: | Height: | Size: 289 KiB |
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Find out how to create and organize your content quickly and intuitively in LoveIt theme."
|
||||
images: ["/images/theme-documentation-content/featured-image.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
|
||||
tags: ["content", "Markdown"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-content/featured-image.jpg"
|
||||
|
||||
lightgallery: true
|
||||
|
||||
@@ -25,13 +26,35 @@ Find out how to create and organize your content quickly and intuitively in **Lo
|
||||
|
||||
<!--more-->
|
||||
|
||||
## 1 Contents Organization
|
||||
## 1 Contents Organization {#contents-organization}
|
||||
|
||||
A few suggestions to help you get a good looking site quickly:
|
||||
|
||||
* Keep post pages in the `content/posts` directory, for example: `content/posts/my-first-post.md`
|
||||
* Keep static pages in the `content` directory, for example: `content/about.md`
|
||||
* Keep media like images in the `static` directory, for example: `static/images/screenshot.png`
|
||||
* Keep other pages in the `content` directory, for example: `content/about.md`
|
||||
* Local resources organization
|
||||
|
||||
{{< admonition note "Local Resource Reference" >}}
|
||||
{{< version 0.2.10 >}}
|
||||
|
||||
There are three ways to reference local resources such as **images** and **music**:
|
||||
|
||||
1. Using [page resources](https://gohugo.io/content-management/page-resources/) in [page bundles](https://gohugo.io/content-management/page-bundles/).
|
||||
You can reference page resources by the value for `Resources.GetMatch` or the filepath of the resource relative to the page directory directly.
|
||||
2. Store resources in the **assets** directory, which is `/assets` by default.
|
||||
The filepath of the resource to reference in the post is relative to the assets directory.
|
||||
3. Store resources in the **static** directory, which is `/static` by default.
|
||||
The filepath of the resource to reference in the post is relative to the static directory.
|
||||
|
||||
The **priority** of references is also in the above order.
|
||||
|
||||
There are many places in the theme where the above local resource references can be used,
|
||||
such as **links**, **images**, `image` shortcode, `music` shortcode and some params in the **front matter**.
|
||||
|
||||
Images in page resources or assets directory [processing](https://gohugo.io/content-management/image-processing/)
|
||||
will be supported in the future.
|
||||
It's really cool! :(far fa-grin-squint fa-fw):
|
||||
{{< /admonition >}}
|
||||
|
||||
## 2 Front Matter {#front-matter}
|
||||
|
||||
@@ -138,11 +161,28 @@ library:
|
||||
* **comment**: {{< version 0.2.0 changed >}} the same as the `params.page.comment` part in the [site configuration](../theme-documentation-basics#site-configuration).
|
||||
* **library**: {{< version 0.2.7 >}} the same as the `params.page.library` part in the [site configuration](../theme-documentation-basics#site-configuration).
|
||||
|
||||
{{< admonition tip >}}
|
||||
{{< version 0.2.10 >}}
|
||||
|
||||
**featuredImage** and **featuredImagePreview** support the complete usage of [local resource references](#contents-organization).
|
||||
|
||||
If the page resource with `name: featured-image` or `name: featured-image-preview` is set in the front matter,
|
||||
it is not necessary to set the parameter `featuredImage` or `featuredImagePreview`:
|
||||
|
||||
```yaml
|
||||
resources:
|
||||
- name: featured-image
|
||||
src: featured-image.jpg
|
||||
- name: featured-image-preview
|
||||
src: featured-image-preview.jpg
|
||||
```
|
||||
{{< /admonition >}}
|
||||
|
||||
## 3 Content Summaries
|
||||
|
||||
**LoveIt** theme uses the summary of the content to display abstract information in the home page. Hugo can generate summaries of your content.
|
||||
|
||||

|
||||

|
||||
|
||||
### Automatic Summary Splitting
|
||||
|
||||
|
||||
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Découvrez comment créer et organiser votre contenu rapidement et intuitivement dans le thème LoveIt."
|
||||
images: ["/images/theme-documentation-content/featured-image.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
|
||||
tags: ["content", "Markdown"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-content/featured-image.jpg"
|
||||
|
||||
lightgallery: true
|
||||
|
||||
@@ -30,13 +31,35 @@ Sorry, this article has not been completely translated into **French**.
|
||||
Welcome to take the time to propose a translation by [:(fas fa-code-branch fa-fw): making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme!
|
||||
{{< /admonition >}}
|
||||
|
||||
## 1 Contents Organization
|
||||
## 1 Contents Organization {#contents-organization}
|
||||
|
||||
A few suggestions to help you get a good looking site quickly:
|
||||
|
||||
* Keep post pages in the `content/posts` directory, for example: `content/posts/my-first-post.md`
|
||||
* Keep static pages in the `content` directory, for example: `content/about.md`
|
||||
* Keep media like images in the `static` directory, for example: `static/images/screenshot.png`
|
||||
* Keep other pages in the `content` directory, for example: `content/about.md`
|
||||
* Local resources organization
|
||||
|
||||
{{< admonition note "Local Resource Reference" >}}
|
||||
{{< version 0.2.10 >}}
|
||||
|
||||
There are three ways to reference local resources such as **images** and **music**:
|
||||
|
||||
1. Using [page resources](https://gohugo.io/content-management/page-resources/) in [page bundles](https://gohugo.io/content-management/page-bundles/).
|
||||
You can reference page resources by the value for `Resources.GetMatch` or the filepath of the resource relative to the page directory directly.
|
||||
2. Store resources in the **assets** directory, which is `/assets` by default.
|
||||
The filepath of the resource to reference in the post is relative to the assets directory.
|
||||
3. Store resources in the **static** directory, which is `/static` by default.
|
||||
The filepath of the resource to reference in the post is relative to the static directory.
|
||||
|
||||
The **priority** of references is also in the above order.
|
||||
|
||||
There are many places in the theme where the above local resource references can be used,
|
||||
such as **links**, **images**, `image` shortcode, `music` shortcode and some params in the **front matter**.
|
||||
|
||||
Images in page resources or assets directory [processing](https://gohugo.io/content-management/image-processing/)
|
||||
will be supported in the future.
|
||||
It's really cool! :(far fa-grin-squint fa-fw):
|
||||
{{< /admonition >}}
|
||||
|
||||
## 2 Front Matter {#front-matter}
|
||||
|
||||
@@ -143,11 +166,28 @@ library:
|
||||
* **comment**: {{< version 0.2.0 changed >}} the same as the `params.page.comment` part in the [site configuration](../theme-documentation-basics#site-configuration).
|
||||
* **library**: {{< version 0.2.7 >}} the same as the `params.page.library` part in the [site configuration](../theme-documentation-basics#site-configuration).
|
||||
|
||||
{{< admonition tip >}}
|
||||
{{< version 0.2.10 >}}
|
||||
|
||||
**featuredImage** and **featuredImagePreview** support the complete usage of [local resource references](#contents-organization).
|
||||
|
||||
If the page resource with `name: featured-image` or `name: featured-image-preview` is set in the front matter,
|
||||
it is not necessary to set the parameter `featuredImage` or `featuredImagePreview`:
|
||||
|
||||
```yaml
|
||||
resources:
|
||||
- name: featured-image
|
||||
src: featured-image.jpg
|
||||
- name: featured-image-preview
|
||||
src: featured-image-preview.jpg
|
||||
```
|
||||
{{< /admonition >}}
|
||||
|
||||
## 3 Content Summaries
|
||||
|
||||
**LoveIt** theme uses the summary of the content to display abstract information in the home page. Hugo can generate summaries of your content.
|
||||
|
||||

|
||||

|
||||
|
||||
### Automatic Summary Splitting
|
||||
|
||||
|
||||
@@ -7,11 +7,12 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "了解如何在 LoveIt 主题中快速, 直观地创建和组织内容."
|
||||
images: ["/images/theme-documentation-content/featured-image.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
|
||||
tags: ["content", "Markdown"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-content/featured-image.jpg"
|
||||
|
||||
lightgallery: true
|
||||
|
||||
@@ -25,13 +26,34 @@ math:
|
||||
|
||||
<!--more-->
|
||||
|
||||
## 1 内容组织
|
||||
## 1 内容组织 {#contents-organization}
|
||||
|
||||
以下是一些方便你清晰管理和生成文章的目录结构建议:
|
||||
|
||||
* 保持博客文章存放在 `content/posts` 目录, 例如: `content/posts/我的第一篇文章.md`
|
||||
* 保持简单的静态页面存放在 `content` 目录, 例如: `content/about.md`
|
||||
* 保持图片之类的媒体资源存放在 `static` 目录, 例如: `static/images/screenshot.png`
|
||||
* 本地资源组织
|
||||
|
||||
{{< admonition note "本地资源引用" >}}
|
||||
{{< version 0.2.10 >}}
|
||||
|
||||
有三种方法来引用**图片**和**音乐**等本地资源:
|
||||
|
||||
1. 使用[页面包](https://gohugo.io/content-management/page-bundles/)中的[页面资源](https://gohugo.io/content-management/page-resources/).
|
||||
你可以使用适用于 `Resources.GetMatch` 的值或者直接使用相对于当前页面目录的文件路径来引用页面资源.
|
||||
2. 将本地资源放在 **assets** 目录中, 默认路径是 `/assets`.
|
||||
引用资源的文件路径是相对于 assets 目录的.
|
||||
3. 将本地资源放在 **static** 目录中, 默认路径是 `/static`.
|
||||
引用资源的文件路径是相对于 static 目录的.
|
||||
|
||||
引用的**优先级**符合以上的顺序.
|
||||
|
||||
在这个主题中的很多地方可以使用上面的本地资源引用,
|
||||
例如 **链接**, **图片**, `image` shortcode, `music` shortcode 和**前置参数**中的部分参数.
|
||||
|
||||
页面资源或者 **assets** 目录中的[图片处理](https://gohugo.io/content-management/image-processing/)会在未来的版本中得到支持.
|
||||
非常酷的功能! :(far fa-grin-squint fa-fw):
|
||||
{{< /admonition >}}
|
||||
|
||||
## 2 前置参数 {#front-matter}
|
||||
|
||||
@@ -138,11 +160,28 @@ library:
|
||||
* **comment**: {{< version 0.2.0 changed >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.comment` 部分相同.
|
||||
* **library**: {{< version 0.2.7 >}} 和 [网站配置](../theme-documentation-basics#site-configuration) 中的 `params.page.library` 部分相同.
|
||||
|
||||
{{< admonition tip >}}
|
||||
{{< version 0.2.10 >}}
|
||||
|
||||
**featuredImage** 和 **featuredImagePreview** 支持[本地资源引用](#contents-organization)的完整用法.
|
||||
|
||||
如果带有在前置参数中设置了 `name: featured-image` 或 `name: featured-image-preview` 属性的页面资源,
|
||||
没有必要在设置 `featuredImage` 或 `featuredImagePreview`:
|
||||
|
||||
```yaml
|
||||
resources:
|
||||
- name: featured-image
|
||||
src: featured-image.jpg
|
||||
- name: featured-image-preview
|
||||
src: featured-image-preview.jpg
|
||||
```
|
||||
{{< /admonition >}}
|
||||
|
||||
## 3 内容摘要
|
||||
|
||||
**LoveIt** 主题使用内容摘要在主页中显示大致文章信息。Hugo 支持生成文章的摘要.
|
||||
|
||||

|
||||

|
||||
|
||||
### 自动摘要拆分
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 272 KiB After Width: | Height: | Size: 272 KiB |
|
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 269 KiB |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
@@ -7,12 +7,14 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "LoveIt theme provides multiple shortcodes on top of built-in ones in Hugo."
|
||||
images: ["/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
- name: "featured-image-preview"
|
||||
src: "featured-image-preview.jpg"
|
||||
|
||||
tags: ["shortcodes"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg"
|
||||
featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"
|
||||
|
||||
lightgallery: true
|
||||
---
|
||||
@@ -59,6 +61,8 @@ This is a **right-aligned** paragraph.
|
||||
|
||||
`link` shortcode is an alternative to [Markdown link syntax](../basic-markdown-syntax#links). `link` shortcode can provide some other features and can be used in code blocks.
|
||||
|
||||
{{< version 0.2.10 >}} The complete usage of [local resource references](../theme-documentation-content#contents-organization) is supported.
|
||||
|
||||
The `link` shortcode has the following named parameters:
|
||||
|
||||
* **href** *[required]* (**first** positional parameter)
|
||||
@@ -123,6 +127,8 @@ The rendered output looks like this (hover over the link, there should be a tool
|
||||
|
||||
`image` shortcode is an alternative to [`figure` shortcode](../theme-documentation-built-in-shortcodes#figure). `image` shortcode can take full advantage of the dependent libraries of [lazysizes](https://github.com/aFarkas/lazysizes) and [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js).
|
||||
|
||||
{{< version 0.2.10 >}} The complete usage of [local resource references](../theme-documentation-content#contents-organization) is supported.
|
||||
|
||||
The `image` shortcode has the following named parameters:
|
||||
|
||||
* **src** *[required]* (**first** positional parameter)
|
||||
@@ -173,19 +179,15 @@ The `image` shortcode has the following named parameters:
|
||||
|
||||
Additional `rel` attributes of the HTML `a` tag, if **linked** parameter is set to `true`.
|
||||
|
||||
* **large** *[optional]*
|
||||
|
||||
Whether the image is large used for loading animation, if **linked** parameter is set to `false`.
|
||||
|
||||
Example `image` input:
|
||||
|
||||
```markdown
|
||||
{{</* image src="/images/theme-documentation-extended-shortcodes/lighthouse.jpg" caption="Lighthouse (`image`)" src-s="/images/theme-documentation-extended-shortcodes/lighthouse-small.jpg" src-l="/images/theme-documentation-extended-shortcodes/lighthouse-large.jpg" */>}}
|
||||
{{</* image src="/images/lighthouse.jpg" caption="Lighthouse (`image`)" src_s="/images/lighthouse-small.jpg" src_l="/images/lighthouse-large.jpg" */>}}
|
||||
```
|
||||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< image src="/images/theme-documentation-extended-shortcodes/lighthouse.jpg" caption="Lighthouse (`image`)" src-s="/images/theme-documentation-extended-shortcodes/lighthouse-small.jpg" src-l="/images/theme-documentation-extended-shortcodes/lighthouse-large.jpg" >}}
|
||||
{{< image src="/images/lighthouse.jpg" caption="Lighthouse (`image`)" src_s="/images/lighthouse-small.jpg" src_l="/images/lighthouse-large.jpg" >}}
|
||||
|
||||
## 4 admonition
|
||||
|
||||
@@ -997,6 +999,8 @@ There are three ways to use it the `music` shortcode.
|
||||
|
||||
### 8.1 Custom Music URL {#custom-music-url}
|
||||
|
||||
{{< version 0.2.10 >}} The complete usage of [local resource references](../theme-documentation-content#contents-organization) is supported.
|
||||
|
||||
The `music` shortcode has the following named parameters by custom music URL:
|
||||
|
||||
* **server** *[required]*
|
||||
@@ -1018,12 +1022,12 @@ The `music` shortcode has the following named parameters by custom music URL:
|
||||
Example `music` input by custom music URL:
|
||||
|
||||
```markdown
|
||||
{{</* music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" */>}}
|
||||
{{</* music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/Wavelength.jpg" */>}}
|
||||
```
|
||||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" >}}
|
||||
{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/Wavelength.jpg" >}}
|
||||
|
||||
### 8.2 Music Platform URL Automatic Identification {#automatic-identification}
|
||||
|
||||
|
||||
@@ -7,12 +7,14 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "Le thème LoveIt fournit plusieurs shortcodes en plus de ceux intégrés dans Hugo."
|
||||
images: ["/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
- name: "featured-image-preview"
|
||||
src: "featured-image-preview.jpg"
|
||||
|
||||
tags: ["shortcodes"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg"
|
||||
featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"
|
||||
|
||||
lightgallery: true
|
||||
---
|
||||
@@ -64,6 +66,8 @@ This is a **right-aligned** paragraph.
|
||||
|
||||
`link` shortcode is an alternative to [Markdown link syntax](../basic-markdown-syntax#links). `link` shortcode can provide some other features and can be used in code blocks.
|
||||
|
||||
{{< version 0.2.10 >}} The complete usage of [local resource references](../theme-documentation-content#contents-organization) is supported.
|
||||
|
||||
The `link` shortcode has the following named parameters:
|
||||
|
||||
* **href** *[required]* (**first** positional parameter)
|
||||
@@ -128,6 +132,8 @@ The rendered output looks like this (hover over the link, there should be a tool
|
||||
|
||||
`image` shortcode is an alternative to [`figure` shortcode](../theme-documentation-built-in-shortcodes#figure). `image` shortcode can take full advantage of the dependent libraries of [lazysizes](https://github.com/aFarkas/lazysizes) and [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js).
|
||||
|
||||
{{< version 0.2.10 >}} The complete usage of [local resource references](../theme-documentation-content#contents-organization) is supported.
|
||||
|
||||
The `image` shortcode has the following named parameters:
|
||||
|
||||
* **src** *[required]* (**first** positional parameter)
|
||||
@@ -178,19 +184,15 @@ The `image` shortcode has the following named parameters:
|
||||
|
||||
Additional `rel` attributes of the HTML `a` tag, if **linked** parameter is set to `true`.
|
||||
|
||||
* **large** *[optional]*
|
||||
|
||||
Whether the image is large used for loading animation, if **linked** parameter is set to `false`.
|
||||
|
||||
Example `image` input:
|
||||
|
||||
```markdown
|
||||
{{</* image src="/images/theme-documentation-extended-shortcodes/lighthouse.jpg" caption="Lighthouse (`image`)" src-s="/images/theme-documentation-extended-shortcodes/lighthouse-small.jpg" src-l="/images/theme-documentation-extended-shortcodes/lighthouse-large.jpg" */>}}
|
||||
{{</* image src="/images/lighthouse.jpg" caption="Lighthouse (`image`)" src_s="/images/lighthouse-small.jpg" src_l="/images/lighthouse-large.jpg" */>}}
|
||||
```
|
||||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< image src="/images/theme-documentation-extended-shortcodes/lighthouse.jpg" caption="Lighthouse (`image`)" src-s="/images/theme-documentation-extended-shortcodes/lighthouse-small.jpg" src-l="/images/theme-documentation-extended-shortcodes/lighthouse-large.jpg" >}}
|
||||
{{< image src="/images/lighthouse.jpg" caption="Lighthouse (`image`)" src_s="/images/lighthouse-small.jpg" src_l="/images/lighthouse-large.jpg" >}}
|
||||
|
||||
## 4 admonition
|
||||
|
||||
@@ -1002,6 +1004,8 @@ There are three ways to use it the `music` shortcode.
|
||||
|
||||
### 8.1 Custom Music URL {#custom-music-url}
|
||||
|
||||
{{< version 0.2.10 >}} The complete usage of [local resource references](../theme-documentation-content#contents-organization) is supported.
|
||||
|
||||
The `music` shortcode has the following named parameters by custom music URL:
|
||||
|
||||
* **server** *[required]*
|
||||
@@ -1023,12 +1027,12 @@ The `music` shortcode has the following named parameters by custom music URL:
|
||||
Example `music` input by custom music URL:
|
||||
|
||||
```markdown
|
||||
{{</* music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" */>}}
|
||||
{{</* music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/Wavelength.jpg" */>}}
|
||||
```
|
||||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" >}}
|
||||
{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/Wavelength.jpg" >}}
|
||||
|
||||
### 8.2 Music Platform URL Automatic Identification {#automatic-identification}
|
||||
|
||||
|
||||
@@ -7,12 +7,14 @@ draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
description: "LoveIt 主题在 Hugo 内置的 shortcode 的基础上提供多个扩展的 shortcode."
|
||||
images: ["/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"]
|
||||
resources:
|
||||
- name: "featured-image"
|
||||
src: "featured-image.jpg"
|
||||
- name: "featured-image-preview"
|
||||
src: "featured-image-preview.jpg"
|
||||
|
||||
tags: ["shortcodes"]
|
||||
categories: ["documentation"]
|
||||
featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg"
|
||||
featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"
|
||||
|
||||
lightgallery: true
|
||||
mapbox:
|
||||
@@ -62,6 +64,8 @@ This is a **right-aligned** paragraph.
|
||||
`link` shortcode 是 [Markdown 链接语法](../basic-markdown-syntax#links) 的替代.
|
||||
`link` shortcode 可以提供一些其它的功能并且可以在代码块中使用.
|
||||
|
||||
{{< version 0.2.10 >}} 支持[本地资源引用](../theme-documentation-content#contents-organization)的完整用法.
|
||||
|
||||
`link` shortcode 有以下命名参数:
|
||||
|
||||
* **href** *[必需]* (**第一个**位置参数)
|
||||
@@ -126,6 +130,8 @@ This is a **right-aligned** paragraph.
|
||||
|
||||
`image` shortcode 是 [`figure` shortcode](../theme-documentation-built-in-shortcodes#figure) 的替代. `image` shortcode 可以充分利用 [lazysizes](https://github.com/aFarkas/lazysizes) 和 [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) 两个依赖库.
|
||||
|
||||
{{< version 0.2.10 >}} 支持[本地资源引用](../theme-documentation-content#contents-organization)的完整用法.
|
||||
|
||||
`image` shortcode 有以下命名参数:
|
||||
|
||||
* **src** *[必需]* (**第一个**位置参数)
|
||||
@@ -176,19 +182,15 @@ This is a **right-aligned** paragraph.
|
||||
|
||||
HTML `a` 标签 的 `rel` 补充属性, 仅在 **linked** 属性设置成 `true` 时有效.
|
||||
|
||||
* **large** *[可选]*
|
||||
|
||||
图片是否是大尺寸的, 用来加载动画, 仅在 **linked** 属性设置成 `false` 时有效.
|
||||
|
||||
一个 `image` 示例:
|
||||
|
||||
```markdown
|
||||
{{</* image src="/images/theme-documentation-extended-shortcodes/lighthouse.jpg" caption="Lighthouse (`image`)" src-s="/images/theme-documentation-extended-shortcodes/lighthouse-small.jpg" src-l="/images/theme-documentation-extended-shortcodes/lighthouse-large.jpg" */>}}
|
||||
{{</* image src="/images/lighthouse.jpg" caption="Lighthouse (`image`)" src_s="/images/lighthouse-small.jpg" src_l="/images/lighthouse-large.jpg" */>}}
|
||||
```
|
||||
|
||||
呈现的输出效果如下:
|
||||
|
||||
{{< image src="/images/theme-documentation-extended-shortcodes/lighthouse.jpg" caption="Lighthouse (`image`)" src-s="/images/theme-documentation-extended-shortcodes/lighthouse-small.jpg" src-l="/images/theme-documentation-extended-shortcodes/lighthouse-large.jpg" >}}
|
||||
{{< image src="/images/lighthouse.jpg" caption="Lighthouse (`image`)" src_s="/images/lighthouse-small.jpg" src_l="/images/lighthouse-large.jpg" >}}
|
||||
|
||||
## 4 admonition
|
||||
|
||||
@@ -1000,6 +1002,8 @@ data = [
|
||||
|
||||
### 8.1 自定义音乐 URL {#custom-music-url}
|
||||
|
||||
{{< version 0.2.10 >}} 支持[本地资源引用](../theme-documentation-content#contents-organization)的完整用法.
|
||||
|
||||
`music` shortcode 有以下命名参数来使用自定义音乐 URL:
|
||||
|
||||
* **server** *[必需]*
|
||||
@@ -1021,12 +1025,12 @@ data = [
|
||||
一个使用自定义音乐 URL 的 `music` 示例:
|
||||
|
||||
```markdown
|
||||
{{</* music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" */>}}
|
||||
{{</* music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/Wavelength.jpg" */>}}
|
||||
```
|
||||
|
||||
呈现的输出效果如下:
|
||||
|
||||
{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" >}}
|
||||
{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/Wavelength.jpg" >}}
|
||||
|
||||
### 8.2 音乐平台 URL 的自动识别 {#automatic-identification}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 638 KiB After Width: | Height: | Size: 638 KiB |
|
Before Width: | Height: | Size: 638 KiB |
@@ -1,10 +1,10 @@
|
||||
{{- with .Title -}}
|
||||
{{- if .Title -}}
|
||||
<figure>
|
||||
{{- dict "src" $.Destination "alt" $.Text "caption" . "linked" true | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" .Destination "Title" .Text "Caption" .Title "Linked" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
|
||||
<figcaption class="image-caption">
|
||||
{{- . | safeHTML -}}
|
||||
{{- .Title | safeHTML -}}
|
||||
</figcaption>
|
||||
</figure>
|
||||
{{- else -}}
|
||||
{{- dict "src" .Destination "alt" .Text | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" .Destination "Title" .Text "Resources" .Page.Resources | partial "plugin/image.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
{{- $options := dict "href" .Destination "title" .Title "content" .Text -}}
|
||||
{{- $destination := .Destination -}}
|
||||
{{- with dict "Path" $destination "Resources" .Page.Resources | partial "function/resource.html" -}}
|
||||
{{- $destination = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $options := dict "Destination" $destination "Title" .Title "Content" .Text -}}
|
||||
{{- partial "plugin/link.html" $options -}}
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
{{- $params := .Params | merge .Site.Params.page -}}
|
||||
|
||||
<article class="single summary" itemscope itemtype="http://schema.org/Article">
|
||||
{{- /* Featured image */ -}}
|
||||
{{- with $params.featuredimagepreview | default $params.featuredimage -}}
|
||||
{{- $image := $params.featuredimagepreview | default $params.featuredimage -}}
|
||||
{{- with .Resources.GetMatch "featured-image" -}}
|
||||
{{- $image = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- with .Resources.GetMatch "featured-image-preview" -}}
|
||||
{{- $image = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- with $image -}}
|
||||
<div class="featured-image-preview">
|
||||
<a href="{{ $.RelPermalink }}">
|
||||
{{- dict "src" . "alt" $.Description "large" true | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" . "Title" $.Description "Resources" $.Resources | partial "plugin/image.html" -}}
|
||||
</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
@@ -19,7 +27,7 @@
|
||||
{{- $author := $params.author | default .Site.Author.name | default (T "author") -}}
|
||||
{{- $authorLink := $params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
|
||||
<span class="post-author">
|
||||
{{- $options := dict "class" "author" "href" $authorLink "title" "Author" "rel" "author" "icon" (dict "class" "fas fa-user-circle fa-fw") "content" $author -}}
|
||||
{{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fas fa-user-circle fa-fw") "Content" $author -}}
|
||||
{{- partial "plugin/link.html" $options -}}
|
||||
</span>
|
||||
|
||||
|
||||
@@ -5,59 +5,57 @@
|
||||
|
||||
{{- /* Smooth Scroll */ -}}
|
||||
{{- $source := $cdn.smoothScrollJS | default "lib/smooth-scroll/smooth-scroll.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
|
||||
{{- /* Search */ -}}
|
||||
{{- if .Site.Params.search | and .Site.Params.search.enable -}}
|
||||
{{- $search := .Site.Params.search -}}
|
||||
{{- $source := $cdn.autocompleteJS | default "lib/autocomplete/autocomplete.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $config = dict "maxResultLength" $search.maxResultLength "snippetLength" $search.snippetLength "highlightTag" $search.highlightTag "noResultsFound" (T "noResultsFound") | dict "search" | merge $config -}}
|
||||
{{- if eq $search.type "lunr" -}}
|
||||
{{- with .Site.Home.OutputFormats.Get "json" -}}
|
||||
{{- $config = dict "type" "lunr" "lunrIndexURL" .RelPermalink | dict "search" | merge $config -}}
|
||||
{{- end -}}
|
||||
{{- $source := $cdn.lunrJS | default "lib/lunr/lunr.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- if T "lunrLanguageLib" -}}
|
||||
{{- $config = T "lunrLanguageCode" | dict "lunrLanguageCode" | dict "search" | merge $config -}}
|
||||
{{- with T "lunrSegmentitLib" -}}
|
||||
{{- $config = dict "lunrSegmentitURL" (resources.Get .).RelPermalink | dict "search" | merge $config -}}
|
||||
{{- end -}}
|
||||
{{- dict "source" "lib/lunr/lunr.stemmer.support.js" "minify" true "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "source" (T "lunrLanguageLib") "minify" true "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" "lib/lunr/lunr.stemmer.support.js" "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" (T "lunrLanguageLib") "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
{{- else if eq $search.type "algolia" -}}
|
||||
{{- $source := $cdn.algoliasearchJS | default "lib/algoliasearch/algoliasearch-lite.umd.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $config = dict "type" "algolia" "algoliaIndex" $search.algolia.index "algoliaAppID" $search.algolia.appID "algoliaSearchKey" $search.algolia.searchKey | dict "search" | merge $config -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* lazysizes */ -}}
|
||||
{{- $source := $cdn.lazysizesJS | default "lib/lazysizes/lazysizes.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
|
||||
{{- /* twemoji */ -}}
|
||||
{{- if $params.twemoji -}}
|
||||
{{- $source := $cdn.twemojiJS | default "lib/twemoji/twemoji.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $config = dict "twemoji" true | merge $config -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* lightgallery.js */ -}}
|
||||
{{- if $params.lightgallery -}}
|
||||
{{- $source := $cdn.lightgalleryCSS | default "lib/lightgallery/lightgallery.min.css" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $source := $cdn.lightgalleryJS | default "lib/lightgallery/lightgallery.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $source := $cdn.lightgalleryThumbnailJS | default "lib/lightgallery/lg-thumbnail.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $source := $cdn.lightgalleryZoomJS | default "lib/lightgallery/lg-zoom.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $config = dict "selector" ".lightgallery" "speed" 400 "hideBarsDelay" 2000 "thumbnail" true "exThumbImage" "data-thumbnail" "thumbWidth" 80 "thumbContHeight" 80 "actualSize" false | dict "lightGallery" | merge $config -}}
|
||||
{{- $styleArr := (.Scratch.Get "this").styleArr | default slice -}}
|
||||
{{- $styleArr | append ".lg-toolbar .lg-icon::after { color: #999; }" | .Scratch.SetInMap "this" "styleArr" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $code := $params.code | default dict -}}
|
||||
@@ -66,21 +64,21 @@
|
||||
{{- /* clipboard.js */ -}}
|
||||
{{- if ne $code.copy false -}}
|
||||
{{- $source := $cdn.clipboardJS | default "lib/clipboard/clipboard.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $config = T "copyToClipboard" | dict "copyTitle" | dict "code" | merge $config -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Sharer.js */ -}}
|
||||
{{- if $params.share.enable -}}
|
||||
{{- $source := $cdn.sharerJS | default "lib/sharer/sharer.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* TypeIt */ -}}
|
||||
{{- with (.Scratch.Get "this").typeitMap -}}
|
||||
{{- $typeit := $.Site.Params.typeit -}}
|
||||
{{- $source := $cdn.typeitJS | default "lib/typeit/typeit.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $config = dict "speed" $typeit.speed "cursorSpeed" $typeit.cursorSpeed "cursorChar" $typeit.cursorChar "duration" $typeit.duration "data" . | dict "typeit" | merge $config -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -93,20 +91,20 @@
|
||||
{{- end -}}
|
||||
{{- if $math.enable -}}
|
||||
{{- $source := $cdn.katexCSS | default "lib/katex/katex.min.css" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $source := $cdn.katexJS | default "lib/katex/katex.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $source := $cdn.katexAutoRenderJS | default "lib/katex/auto-render.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- if $math.copyTex -}}
|
||||
{{- $source := $cdn.katexCopyTexCSS | default "lib/katex/copy-tex.min.css" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $source := $cdn.katexCopyTexJS | default "lib/katex/copy-tex.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
{{- if $math.mhchem -}}
|
||||
{{- $source := $cdn.katexMhchemJS | default "lib/katex/mhchem.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
{{- $delimiters := slice (dict "left" "$$" "right" "$$" "display" true) (dict "left" "\\[" "right" "\\]" "display" true) -}}
|
||||
{{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}}
|
||||
@@ -122,26 +120,26 @@
|
||||
{{- /* mermaid */ -}}
|
||||
{{- if (.Scratch.Get "this").mermaid -}}
|
||||
{{- $source := $cdn.mermaidJS | default "lib/mermaid/mermaid.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $options := dict "targetPath" "lib/mermaid/mermaid.min.css" "enableSourceMap" true -}}
|
||||
{{- dict "source" "lib/mermaid/mermaid.scss" "toCSS" $options "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- dict "Source" "lib/mermaid/mermaid.scss" "ToCSS" $options "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* ECharts */ -}}
|
||||
{{- if (.Scratch.Get "this").echarts -}}
|
||||
{{- $source := $cdn.echartsJS | default "lib/echarts/echarts.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $source := $cdn.echartsMacaronsJS | default "lib/echarts/macarons.js" -}}
|
||||
{{- dict "source" $source "minify" true "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Mapbox GL */ -}}
|
||||
{{- if (.Scratch.Get "this").mapbox -}}
|
||||
{{- $source := $cdn.mapboxGLCSS | default "lib/mapbox-gl/mapbox-gl.min.css" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $source := $cdn.mapboxGLJS | default "lib/mapbox-gl/mapbox-gl.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "source" "lib/mapbox-gl/mapbox-gl-language.js" "minify" true "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" "lib/mapbox-gl/mapbox-gl-language.js" "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $config = dict "accessToken" $params.mapbox.accessToken "RTLTextPlugin" "https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js" | dict "mapbox" | merge $config -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -149,23 +147,23 @@
|
||||
{{- if (.Scratch.Get "this").music -}}
|
||||
{{- /* APlayer */ -}}
|
||||
{{- $source := $cdn.aplayerCSS | default "lib/aplayer/APlayer.min.css" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $options := dict "targetPath" "lib/aplayer/dark.min.css" "enableSourceMap" true -}}
|
||||
{{- dict "source" "lib/aplayer/dark.scss" "toCSS" $options "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- dict "Source" "lib/aplayer/dark.scss" "ToCSS" $options "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $source := $cdn.aplayerJS | default "lib/aplayer/APlayer.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
|
||||
{{- /* MetingJS */ -}}
|
||||
{{- $source := $cdn.metingJS | default "lib/meting/Meting.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Cookie Consent */ -}}
|
||||
{{- if .Site.Params.cookieconsent | and .Site.Params.cookieconsent.enable -}}
|
||||
{{- $source := $cdn.cookieconsentCSS | default "lib/cookieconsent/cookieconsent.min.css" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $source := $cdn.cookieconsentJS | default "lib/cookieconsent/cookieconsent.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $cookieconsentConfig := dict "popup" (dict "background" "#1aa3ff") "button" (dict "background" "#f0f0f0") | dict "theme" "edgeless" "palette" -}}
|
||||
{{- $cookieconsentConfig = .Site.Params.cookieconsent | merge $cookieconsentConfig -}}
|
||||
{{- $cookieconsentConfig = dict "message" ($cookieconsentConfig.content.message | default (T "cookieconsentMessage")) "dismiss" ($cookieconsentConfig.content.dismiss | default (T "cookieconsentDismiss")) "link" ($cookieconsentConfig.content.link | default (T "cookieconsentLink")) | dict "content" | merge $cookieconsentConfig -}}
|
||||
@@ -173,26 +171,29 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- range $params.library.css -}}
|
||||
{{- dict "source" . "fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- dict "Source" . "Fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range $params.library.js -}}
|
||||
{{- dict "source" . "fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" . "Fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with (.Scratch.Get "this").styleArr -}}
|
||||
{{- delimit . "" | dict "content" | dict "Scratch" $.Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $content := delimit . "" -}}
|
||||
{{- $path := substr (md5 $content) 0 6 | printf "css/%v" -}}
|
||||
{{- $options := printf "%v.min.css" $path | dict "targetPath" -}}
|
||||
{{- dict "Content" $content "Path" (printf "%v.scss" $path) "ToCSS" $options | dict "Scratch" $.Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Config script */ -}}
|
||||
{{- $config | jsonify | printf "window.config=%s;" | dict "content" | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $config | jsonify | printf "window.config=%s;" | dict "Content" | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
|
||||
{{- /* Theme script */ -}}
|
||||
{{- dict "source" "js/theme.min.js" "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" "js/theme.min.js" "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $_ := (resources.Get "js/theme.min.js.map").RelPermalink -}}
|
||||
|
||||
{{- with (.Scratch.Get "this").scriptArr -}}
|
||||
{{- delimit . "\n" | dict "content" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- delimit . "\n" | dict "Content" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range (.Scratch.Get "this").style -}}
|
||||
@@ -203,6 +204,4 @@
|
||||
{{- partial "plugin/script.html" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Scratch.Get "analytics" -}}
|
||||
{{- partial "plugin/analytics.html" . -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{- if $disqus.enable -}}
|
||||
<div id="disqus_thread" class="comment"></div>
|
||||
{{- $source := printf "https://%v.disqus.com/embed.js" $disqus.shortname -}}
|
||||
{{- dict "source" $source "defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
<noscript>
|
||||
Please enable JavaScript to view the comments powered by <a href="https://disqus.com/?ref_noscript">Disqus</a>.
|
||||
</noscript>
|
||||
@@ -21,9 +21,9 @@
|
||||
{{- if $gitalk.enable -}}
|
||||
<div id="gitalk" class="comment"></div>
|
||||
{{- $source := $cdn.gitalkCSS | default "lib/gitalk/gitalk.css" -}}
|
||||
{{- dict "source" $source "minify" true "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- dict "Source" $source "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $source := $cdn.gitalkJS | default "lib/gitalk/gitalk.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $commentConfig = dict "id" .Date "title" .Title "clientID" $gitalk.clientId "clientSecret" $gitalk.clientSecret "repo" $gitalk.repo "owner" $gitalk.owner "admin" (slice $gitalk.owner) | dict "gitalk" | merge $commentConfig -}}
|
||||
<noscript>
|
||||
Please enable JavaScript to view the comments powered by <a href="https://github.com/gitalk/gitalk"></a>Gitalk</a>.
|
||||
@@ -35,9 +35,9 @@
|
||||
{{- if $valine.enable -}}
|
||||
<div id="valine" class="comment"></div>
|
||||
{{- $options := dict "targetPath" "lib/valine/valine.min.css" -}}
|
||||
{{- dict "source" "lib/valine/valine.scss" "toCSS" $options | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- dict "Source" "lib/valine/valine.scss" "ToCSS" $options | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
|
||||
{{- $source := $cdn.valineJS | default "lib/valine/Valine.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $commentConfig = dict "el" "#valine" "appId" $valine.appId "appKey" $valine.appKey "lang" ($valine.lang | default (T "valineLang")) "visitor" $valine.visitor "recordIP" $valine.recordIP "placeholder" ($valine.placeholder | default (T "valinePlaceholder")) "highlight" (ne $valine.highlight false) "enableQQ" $valine.enableQQ | dict "valine" | merge $commentConfig -}}
|
||||
{{- with $valine.avatar -}}
|
||||
{{- $commentConfig = dict "avatar" . | dict "valine" | merge $commentConfig -}}
|
||||
@@ -68,7 +68,7 @@
|
||||
data-numposts="{{ $facebook.numPosts }}"
|
||||
></div>
|
||||
{{- $source := printf "https://connect.facebook.net/%v/sdk.js#xfbml=1&version=v5.0&appId=%v&autoLogAppEvents=1" ($facebook.languageCode | default (T "facebookLanguageCode")) $facebook.appId -}}
|
||||
{{- dict "source" $source "defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
<noscript>
|
||||
Please enable JavaScript to view the comments powered by <a href="https://developers.facebook.com/docs/plugins/comments/"></a>Facebook</a>.
|
||||
</noscript>
|
||||
@@ -95,7 +95,7 @@
|
||||
{{- if $telegram.outlined -}}
|
||||
{{- $attr = printf `%v data-outlined="1"` $attr -}}
|
||||
{{- end -}}
|
||||
{{- dict "source" "https://comments.app/js/widget.js?2" "defer" true "attr" $attr | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" "https://comments.app/js/widget.js?2" "Defer" true "Attr" $attr | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
<noscript>
|
||||
Please enable JavaScript to view the comments powered by <a href="https://comments.app/">Telegram Comments</a>.
|
||||
</noscript>
|
||||
@@ -105,7 +105,7 @@
|
||||
{{- $commento := $comment.commento | default dict -}}
|
||||
{{- if $commento.enable -}}
|
||||
<div id="commento"></div>
|
||||
{{- dict "source" "https://cdn.commento.io/js/commento.js" "defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" "https://cdn.commento.io/js/commento.js" "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
<noscript>
|
||||
Please enable JavaScript to view the comments powered by <a href="https://commento.io/">Commento</a>.
|
||||
</noscript>
|
||||
|
||||
16
layouts/partials/function/resource.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{- $resource := 0 -}}
|
||||
{{- $url := urls.Parse .Path -}}
|
||||
{{- if not $url.Host | and $url.Path | and (strings.HasSuffix $url.Path "/" | not) -}}
|
||||
{{- if .Resources -}}
|
||||
{{- with .Resources.GetMatch $url.Path -}}
|
||||
{{- $resource = . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if not $resource -}}
|
||||
{{- with resources.Get $url.Path -}}
|
||||
{{- $resource = . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return $resource -}}
|
||||
@@ -31,21 +31,21 @@
|
||||
|
||||
{{- /* normalize.css */ -}}
|
||||
{{- $source := $cdn.normalizeCSS | default "lib/normalize/normalize.min.css" -}}
|
||||
{{- $style := dict "source" $source "fingerprint" $fingerprint -}}
|
||||
{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}}
|
||||
{{- partial "plugin/style.html" $style -}}
|
||||
|
||||
{{- /* style.min.css */ -}}
|
||||
{{- $style := dict "source" "css/style.scss" "fingerprint" $fingerprint -}}
|
||||
{{- $style := dict "Source" "css/style.scss" "Fingerprint" $fingerprint -}}
|
||||
{{- $options := dict "targetPath" "css/style.min.css" "enableSourceMap" true -}}
|
||||
{{- $style = dict "context" . "toCSS" $options | merge $style -}}
|
||||
{{- $style = dict "Context" . "ToCSS" $options | merge $style -}}
|
||||
{{- partial "plugin/style.html" $style -}}
|
||||
|
||||
{{- /* Font Awesome */ -}}
|
||||
{{- $source := $cdn.fontawesomeFreeCSS | default "lib/fontawesome-free/all.min.css" -}}
|
||||
{{- $style := dict "source" $source "fingerprint" $fingerprint -}}
|
||||
{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}}
|
||||
{{- partial "plugin/style.html" $style -}}
|
||||
|
||||
{{- /* Animate.css */ -}}
|
||||
{{- $source := $cdn.animateCSS | default "lib/animate/animate.min.css" -}}
|
||||
{{- $style := dict "source" $source "fingerprint" $fingerprint -}}
|
||||
{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}}
|
||||
{{- partial "plugin/style.html" $style -}}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<a href="{{ .Site.Home.RelPermalink }}" title="{{ .Site.Title }}">
|
||||
{{- with .Site.Params.header.title -}}
|
||||
{{- with .logo -}}
|
||||
{{- dict "src" . "alt" $.Site.Title "class" "logo" | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" . "Class" "logo" | partial "plugin/image.html" -}}
|
||||
{{- end -}}
|
||||
{{- with .pre -}}
|
||||
<span class="header-title-pre">{{ . | safeHTML }}</span>
|
||||
@@ -89,7 +89,7 @@
|
||||
<a href="{{ .Site.Home.RelPermalink }}" title="{{ .Site.Title }}">
|
||||
{{- with .Site.Params.header.title -}}
|
||||
{{- with .logo -}}
|
||||
{{- dict "src" . "alt" $.Site.Title "class" "logo" | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" . "Class" "logo" | partial "plugin/image.html" -}}
|
||||
{{- end -}}
|
||||
{{- with .pre -}}
|
||||
<span class="header-title-pre">{{ . | safeHTML }}</span>
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
{{- $url = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
<a href="{{ $url }}"{{ with .Title | default .Name }} title="{{ . }}"{{ end }}{{ if (urls.Parse $url).Host }} rel="noopener noreffer" target="_blank"{{ end }}>
|
||||
{{- dict "src" $avatar "alt" .Name | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" $avatar | partial "plugin/image.html" -}}
|
||||
</a>
|
||||
{{- else -}}
|
||||
{{- dict "src" $avatar | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" $avatar | partial "plugin/image.html" -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
@@ -47,18 +47,41 @@
|
||||
{{- $social := $key | lower | index $socialMap | default dict -}}
|
||||
{{- if $value -}}
|
||||
{{- if reflect.IsMap $value -}}
|
||||
{{- $social = $value | merge $social -}}
|
||||
{{- else if ne $value true -}}
|
||||
{{- $social = dict "id" $value | merge $social -}}
|
||||
{{- with $value.weight -}}
|
||||
{{- $social = dict "Weight" . | merge $social -}}
|
||||
{{- end -}}
|
||||
{{- if $social.icon.simpleicons -}}
|
||||
{{- with $value.prefix -}}
|
||||
{{- $social = dict "Prefix" . | merge $social -}}
|
||||
{{- end -}}
|
||||
{{- with $value.template -}}
|
||||
{{- $social = dict "Template" . | merge $social -}}
|
||||
{{- end -}}
|
||||
{{- with $value.id -}}
|
||||
{{- $social = dict "Id" . | merge $social -}}
|
||||
{{- end -}}
|
||||
{{- with $value.url -}}
|
||||
{{- $social = dict "Url" . | merge $social -}}
|
||||
{{- end -}}
|
||||
{{- with $value.title -}}
|
||||
{{- $social = dict "Title" . | merge $social -}}
|
||||
{{- end -}}
|
||||
{{- with $value.newtab -}}
|
||||
{{- $social = dict "Newtab" . | merge $social -}}
|
||||
{{- end -}}
|
||||
{{- with $value.icon -}}
|
||||
{{- $social = dict "Icon" . | merge $social -}}
|
||||
{{- end -}}
|
||||
{{- else if ne $value true -}}
|
||||
{{- $social = dict "Id" $value | merge $social -}}
|
||||
{{- end -}}
|
||||
{{- if $social.Icon.Simpleicons -}}
|
||||
{{- $prefix := ($.Scratch.Get "cdn" | default dict).simpleIconsPrefix -}}
|
||||
{{- $social = dict "prefix" $prefix | dict "icon" | merge $social -}}
|
||||
{{- $social = dict "Prefix" $prefix | dict "Icon" | merge $social -}}
|
||||
{{- end -}}
|
||||
{{- $socialArr = $socialArr | append $social -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- range sort $socialArr "weight" -}}
|
||||
{{- range sort $socialArr "Weight" -}}
|
||||
{{- partial "plugin/social.html" . -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
{{- if .enable -}}
|
||||
{{- $analytics := .Scratch.Get "analytics" | default dict -}}
|
||||
|
||||
{{- if $analytics.enable -}}
|
||||
{{- /* Google Analytics */ -}}
|
||||
{{- with .google.id -}}
|
||||
{{- with $analytics.google.id -}}
|
||||
<script type="text/javascript">
|
||||
window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());
|
||||
gtag('config', '{{ . }}'{{ if $.google.anonymizeIP }}, { 'anonymize_ip': true }{{ end }});
|
||||
gtag('config', '{{ . }}'{{ if $analytics.google.anonymizeIP }}, { 'anonymize_ip': true }{{ end }});
|
||||
</script>
|
||||
{{- printf "https://www.googletagmanager.com/gtag/js?id=%v" . | dict "async" true "source" | partial "plugin/script.html" -}}
|
||||
{{- printf "https://www.googletagmanager.com/gtag/js?id=%v" . | dict "Async" true "Source" | partial "plugin/script.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Fathom Analytics */ -}}
|
||||
{{- with .fathom.id -}}
|
||||
{{- with $analytics.fathom.id -}}
|
||||
<script type="text/javascript">
|
||||
window.fathom=window.fathom||function(){(fathom.q=fathom.q||[]).push(arguments);};
|
||||
fathom('set', 'siteId', '{{ . }}');
|
||||
fathom('trackPageview');
|
||||
</script>
|
||||
{{- dict "source" ($.fathom.server | default "cdn.usefathom.com" | printf "https://%v/tracker.js") "async" true "attr" "id=fathom-script" | partial "plugin/script.html" -}}
|
||||
{{- dict "Source" ($analytics.fathom.server | default "cdn.usefathom.com" | printf "https://%v/tracker.js") "Async" true "Attr" "id=fathom-script" | partial "plugin/script.html" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with $features | uniq -}}
|
||||
{{- delimit . "%2C" | printf "https://polyfill.io/v3/polyfill.min.js?features=%v" | dict "source" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- delimit . "%2C" | printf "https://polyfill.io/v3/polyfill.min.js?features=%v" | dict "Source" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* object-fit-images */ -}}
|
||||
{{- if $compatibility.objectFit -}}
|
||||
{{- $source := $cdn.objectFitImagesJS | default "lib/object-fit-images/ofi.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
{{- with .class -}}
|
||||
{{- with .Class -}}
|
||||
<i class="{{ . }}"></i>
|
||||
{{- else -}}
|
||||
{{- $src := .src -}}
|
||||
{{- with .simpleicons -}}
|
||||
{{- $prefix := "lib/simple-icons/icons" -}}
|
||||
{{- with $.prefix -}}
|
||||
{{- $prefix = . -}}
|
||||
{{- end -}}
|
||||
{{- $prefix = $prefix | strings.TrimSuffix "/" -}}
|
||||
{{- $src := .Src -}}
|
||||
{{- with .Simpleicons -}}
|
||||
{{- $prefix := $.Prefix | default "lib/simple-icons/icons" | strings.TrimSuffix "/" -}}
|
||||
{{- $src = printf "%v/%v.svg" $prefix . -}}
|
||||
{{- end -}}
|
||||
{{- if (urls.Parse $src).Host | not -}}
|
||||
|
||||
@@ -1,28 +1,38 @@
|
||||
{{- /* lazysizes and lightgallery.js */ -}}
|
||||
{{- $loading := resources.Get "svg/loading/normal.svg" | minify -}}
|
||||
{{- $small := .src_s | default .src -}}
|
||||
{{- $large := .src_l | default .src -}}
|
||||
{{- $alt := .alt | default (relURL .src) -}}
|
||||
{{- if .linked -}}
|
||||
<a class="lightgallery" href="{{ $large | relURL }}" title="{{ .title | default $alt }}" data-thumbnail="{{ $small | relURL }}"{{ with .caption }} data-sub-html="<h2>{{ . }}</h2>{{ with $.alt }}<p>{{ . }}</p>{{ end }}"{{ end }}{{ with .rel }} rel="{{ . }}"{{ end }}>
|
||||
{{- $src := .Src -}}
|
||||
{{- with dict "Path" .Src "Resources" .Resources | partial "function/resource.html" -}}
|
||||
{{- $src = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $small := .SrcSmall | default $src -}}
|
||||
{{- with dict "Path" .SrcSmall "Resources" .Resources | partial "function/resource.html" -}}
|
||||
{{- $small = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $large := .SrcLarge | default $src -}}
|
||||
{{- with dict "Path" .SrcLarge "Resources" .Resources | partial "function/resource.html" -}}
|
||||
{{- $large = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $alt := .Alt | default $src -}}
|
||||
{{- $loading := resources.Get "svg/loading.svg" | minify -}}
|
||||
{{- if .Linked -}}
|
||||
<a class="lightgallery" href="{{ $large | safeURL }}" title="{{ .Title | default $alt }}" data-thumbnail="{{ $small | safeURL }}"{{ with .Caption }} data-sub-html="<h2>{{ . }}</h2>{{ with $.Title }}<p>{{ . }}</p>{{ end }}"{{ end }}{{ with .Rel }} rel="{{ . }}"{{ end }}>
|
||||
<img
|
||||
class="lazyload{{ with .class }} {{ . }}{{ end }}"
|
||||
class="lazyload{{ with .Class }} {{ . }}{{ end }}"
|
||||
src="{{ $loading.RelPermalink }}"
|
||||
data-src="{{ .src | relURL }}"
|
||||
data-srcset="{{ $small | relURL }}, {{ .src | relURL }} 1.5x, {{ $large | relURL }} 2x"
|
||||
data-src="{{ .Src | safeURL }}"
|
||||
data-srcset="{{ $small | safeURL }}, {{ .Src | safeURL }} 1.5x, {{ $large | safeURL }} 2x"
|
||||
data-sizes="auto"
|
||||
alt="{{ $alt }}"{{ with .height }} height="{{ . }}"{{ end }}{{ with .width }} width="{{ . }}"{{ end }} />
|
||||
alt="{{ $alt }}"{{ with .Height }} height="{{ . }}"{{ end }}{{ with .Width }} width="{{ . }}"{{ end }} />
|
||||
</a>
|
||||
{{- else -}}
|
||||
{{- if not .large -}}
|
||||
{{- $loading = resources.Get "svg/loading/small.svg" | minify -}}
|
||||
{{- end -}}
|
||||
<img
|
||||
class="lazyload{{ with .class }} {{ . }}{{ end }}"
|
||||
class="lazyload{{ with .Class }} {{ . }}{{ end }}"
|
||||
src="{{ $loading.RelPermalink }}"
|
||||
data-src="{{ .src | relURL }}"
|
||||
data-srcset="{{ $small | relURL }}, {{ .src | relURL }} 1.5x, {{ $large | relURL }} 2x"
|
||||
data-src="{{ .Src | safeURL }}"
|
||||
data-srcset="{{ $small | safeURL }}, {{ .Src | safeURL }} 1.5x, {{ $large | safeURL }} 2x"
|
||||
data-sizes="auto"
|
||||
alt="{{ $alt }}"
|
||||
title="{{ .title | default $alt }}"{{ with .height }} height="{{ . }}"{{ end }}{{ with .width }} width="{{ . }}"{{ end }} />
|
||||
title="{{ .Title | default $alt }}"{{ with .Height }} height="{{ . }}"{{ end }}{{ with .Width }} width="{{ . }}"{{ end }} />
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{{- $rel := "" -}}
|
||||
<a href="{{ .href | safeURL }}"{{ with .title }} title="{{ . }}"{{ end }}{{ if (urls.Parse .href).Host | or .newtab }}{{ $rel = "noopener noreffer" }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .rel }} {{ . }}{{ end }}"{{ with .class }} class="{{ . }}"{{ end }}>
|
||||
{{- with .icon -}}
|
||||
<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if (urls.Parse .Destination).Host | or .Newtab }}{{ $rel = "noopener noreffer" }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .Rel }} {{ . }}{{ end }}"{{ with .Class }} class="{{ . }}"{{ end }}>
|
||||
{{- with .Icon -}}
|
||||
{{- partial "plugin/icon.html" . -}}
|
||||
{{- end -}}
|
||||
{{- with .content -}}
|
||||
{{- with .Content -}}
|
||||
{{- . | safeHTML -}}
|
||||
{{- end -}}
|
||||
</a>
|
||||
@@ -1,25 +1,25 @@
|
||||
{{- if .content -}}
|
||||
{{- if .Content -}}
|
||||
<script type="text/javascript">
|
||||
{{- .content | safeJS -}}
|
||||
{{- .Content | safeJS -}}
|
||||
</script>
|
||||
{{- else if strings.HasPrefix .source "<script" -}}
|
||||
{{- safeHTML .source -}}
|
||||
{{- else if strings.HasPrefix .Source "<script" -}}
|
||||
{{- safeHTML .Source -}}
|
||||
{{- else -}}
|
||||
{{- $src := .source -}}
|
||||
{{- $integrity := .integrity -}}
|
||||
{{- $src := .Source -}}
|
||||
{{- $integrity := .Integrity -}}
|
||||
{{- if (urls.Parse $src).Host | not -}}
|
||||
{{- $res := resources.Get $src -}}
|
||||
{{- with .template -}}
|
||||
{{- $res = $res | resources.ExecuteAsTemplate . $.context -}}
|
||||
{{- $resource := resources.Get $src -}}
|
||||
{{- with .Template -}}
|
||||
{{- $resource = $resource | resources.ExecuteAsTemplate . $.Context -}}
|
||||
{{- end -}}
|
||||
{{- if .minify -}}
|
||||
{{- $res = $res | minify -}}
|
||||
{{- if .Minify -}}
|
||||
{{- $resource = $resource | minify -}}
|
||||
{{- end -}}
|
||||
{{- with .fingerprint -}}
|
||||
{{- $res = $res | fingerprint . -}}
|
||||
{{- $integrity = $res.Data.Integrity -}}
|
||||
{{- with .Fingerprint -}}
|
||||
{{- $resource = $resource | fingerprint . -}}
|
||||
{{- $integrity = $resource.Data.Integrity -}}
|
||||
{{- end -}}
|
||||
{{- $src = $res.RelPermalink -}}
|
||||
{{- $src = $resource.RelPermalink -}}
|
||||
{{- end -}}
|
||||
<script type="text/javascript" src="{{ $src }}"{{ if .crossorigin }} crossorigin="anonymous"{{ end }}{{ with $integrity }} integrity="{{ . }}"{{ end }}{{ if .async }} async{{ end }}{{ if .defer }} defer{{ end }}{{ with .attr }} {{ . | safeHTMLAttr }}{{ end }}></script>
|
||||
<script type="text/javascript" src="{{ $src }}"{{ if .Crossorigin }} crossorigin="anonymous"{{ end }}{{ with $integrity }} integrity="{{ . }}"{{ end }}{{ if .Async }} async{{ end }}{{ if .Defer }} defer{{ end }}{{ with .Attr }} {{ . | safeHTMLAttr }}{{ end }}></script>
|
||||
{{- end -}}
|
||||
|
||||
@@ -4,196 +4,196 @@
|
||||
{{- /* 001: Twitter */ -}}
|
||||
{{- if $share.Twitter -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Twitter" data-sharer="twitter" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.tags }} data-hashtags="{{ delimit . `,` }}"{{ end }}>
|
||||
{{- dict "class" "fab fa-twitter fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-twitter fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 002: Facebook */ -}}
|
||||
{{- if $share.Facebook -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Facebook" data-sharer="facebook" data-url="{{ .Permalink }}"{{ with .Params.tags }} data-hashtag="{{ index . 0 }}"{{ end }}>
|
||||
{{- dict "class" "fab fa-facebook-square fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-facebook-square fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 003: Linkedin */ -}}
|
||||
{{- if $share.Linkedin -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Linkedin" data-sharer="linkedin" data-url="{{ .Permalink }}">
|
||||
{{- dict "class" "fab fa-linkedin fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-linkedin fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 004: WhatsApp */ -}}
|
||||
{{- if $share.Whatsapp -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} WhatsApp" data-sharer="whatsapp" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-web>
|
||||
{{- dict "class" "fab fa-whatsapp fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-whatsapp fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 005: Viber */ -}}
|
||||
{{- if $share.Viber -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Viber" data-sharer="viber" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
|
||||
{{- dict "class" "fab fa-viber fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-viber fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 006: Pinterest */ -}}
|
||||
{{- if $share.Pinterest -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Pinterest" data-sharer="pinterest" data-url="{{ .Permalink }}"{{ with .Description }} data-description="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}>
|
||||
{{- dict "class" "fab fa-pinterest fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-pinterest fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 007: Tumblr */ -}}
|
||||
{{- if $share.Tumblr -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Tumblr" data-sharer="tumblr" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.tags }} data-tags="{{ delimit . `,` }}"{{ end }}>
|
||||
{{- dict "class" "fab fa-tumblr fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-tumblr fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 008: Hacker News */ -}}
|
||||
{{- if $share.Hackernews -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Hacker News" data-sharer="hackernews" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
|
||||
{{- dict "class" "fab fa-hacker-news fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-hacker-news fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 009: Reddit */ -}}
|
||||
{{- if $share.Reddit -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Reddit" data-sharer="reddit" data-url="{{ .Permalink }}">
|
||||
{{- dict "class" "fab fa-reddit fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-reddit fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 010: VK */ -}}
|
||||
{{- if $share.VK -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} VK" data-sharer="vk" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}>
|
||||
{{- dict "class" "fab fa-vk fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-vk fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 011: Buffer */ -}}
|
||||
{{- if $share.Buffer -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Buffer" data-sharer="buffer" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-picture="{{ . }}"{{ end }}>
|
||||
{{- dict "class" "fab fa-buffer fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-buffer fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 012: Xing */ -}}
|
||||
{{- if $share.Xing -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Xing" data-sharer="xing" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
|
||||
{{- dict "class" "fab fa-xing fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-xing fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 013: Line */ -}}
|
||||
{{- if $share.Line -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Line" data-sharer="line" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
|
||||
{{- dict "simpleicons" "line" "prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
|
||||
{{- dict "Simpleicons" "line" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 014: Instapaper */ -}}
|
||||
{{- if $share.Instapaper -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Instapaper" data-sharer="instapaper" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
|
||||
{{- dict "simpleicons" "instapaper" "prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
|
||||
{{- dict "Simpleicons" "instapaper" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 015: Pocket */ -}}
|
||||
{{- if $share.Pocket -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Pocket" data-sharer="pocket" data-url="{{ .Permalink }}">
|
||||
{{- dict "class" "fab fa-get-pocket fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-get-pocket fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 016: Digg */ -}}
|
||||
{{- if $share.Digg -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Digg" data-sharer="digg" data-url="{{ .Permalink }}">
|
||||
{{- dict "class" "fab fa-digg fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-digg fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 017: StumbleUpon */ -}}
|
||||
{{- if $share.Stumbleupon -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} StumbleUpon" data-sharer="stumbleupon" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
|
||||
{{- dict "class" "fab fa-stumbleupon fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-stumbleupon fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 018: Flipboard */ -}}
|
||||
{{- if $share.Flipboard -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Flipboard" data-sharer="flipboard" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
|
||||
{{- dict "class" "fab fa-flipboard fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-flipboard fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 019: 微博 */ -}}
|
||||
{{- if $share.Weibo -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} 微博" data-sharer="weibo" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}{{ with .Site.Params.Social.Weibo }} data-ralateuid="{{ . }}"{{ end }}>
|
||||
{{- dict "class" "fab fa-weibo fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-weibo fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 020: 人人 */ -}}
|
||||
{{- if $share.Renren -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} 人人" data-sharer="renren" data-url="{{ .Permalink }}">
|
||||
{{- dict "class" "fab fa-renren fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-renren fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 021: Myspace */ -}}
|
||||
{{- if $share.Myspace -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Myspace" data-sharer="myspace" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
|
||||
{{- dict "simpleicons" "myspace" "prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
|
||||
{{- dict "Simpleicons" "myspace" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 022: Blogger */ -}}
|
||||
{{- if $share.Blogger -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Blogger" data-sharer="blogger" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
|
||||
{{- dict "class" "fab fa-blogger fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-blogger fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 023: 百度 */ -}}
|
||||
{{- if $share.Baidu -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} 百度" data-sharer="baidu" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
|
||||
{{- dict "simpleicons" "baidu" "prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
|
||||
{{- dict "Simpleicons" "baidu" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 024: OK.RU */ -}}
|
||||
{{- if $share.Odnoklassniki -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} OK.RU" data-sharer="okru" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
|
||||
{{- dict "class" "fab fa-odnoklassniki fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-odnoklassniki fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 025: Evernote */ -}}
|
||||
{{- if $share.Evernote -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Evernote" data-sharer="evernote" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
|
||||
{{- dict "class" "fab fa-evernote fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-evernote fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 026: Skype */ -}}
|
||||
{{- if $share.Skype -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Skype" data-sharer="skype" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
|
||||
{{- dict "class" "fab fa-skype fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-skype fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 027: Trello */ -}}
|
||||
{{- if $share.Trello -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} Trello" data-sharer="trello" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
|
||||
{{- dict "class" "fab fa-trello fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-trello fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 028: Mix */ -}}
|
||||
{{- if $share.Mix -}}
|
||||
<a href="//mix.com/add?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="{{ T `shareOn` }} Mix">
|
||||
{{- dict "class" "fab fa-mix fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- dict "Class" "fab fa-mix fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{{- $href := "" -}}
|
||||
{{- with .url -}}
|
||||
{{- $href = . | relLangURL -}}
|
||||
{{- $destination := "" -}}
|
||||
{{- with .Url -}}
|
||||
{{- $destination = . | relLangURL -}}
|
||||
{{- else -}}
|
||||
{{- $template := .template | default "%v" -}}
|
||||
{{- with .prefix -}}
|
||||
{{- $template := .Template | default "%v" -}}
|
||||
{{- with .Prefix -}}
|
||||
{{- $template = . | strings.TrimSuffix "/" | printf "%v/%%v" -}}
|
||||
{{- end -}}
|
||||
{{- $href = printf (string $template) .id -}}
|
||||
{{- $destination = printf (string $template) .Id -}}
|
||||
{{- end -}}
|
||||
{{- dict "href" $href "rel" "me" | merge . | partial "plugin/link.html" -}}
|
||||
{{- dict "Destination" $destination "Rel" "me" | merge . | partial "plugin/link.html" -}}
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
{{- if .content -}}
|
||||
<style>
|
||||
{{- .content | safeCSS -}}
|
||||
</style>
|
||||
{{- else if strings.HasPrefix .source "<link" -}}
|
||||
{{- safeHTML .source -}}
|
||||
{{- if strings.HasPrefix .Source "<link" -}}
|
||||
{{- safeHTML .Source -}}
|
||||
{{- else -}}
|
||||
{{- $href := .source -}}
|
||||
{{- $integrity := .integrity -}}
|
||||
{{- if (urls.Parse $href).Host | not -}}
|
||||
{{- $res := resources.Get $href -}}
|
||||
{{- with .template -}}
|
||||
{{- $res = $res | resources.ExecuteAsTemplate . $.context -}}
|
||||
{{- $href := .Source -}}
|
||||
{{- $integrity := .Integrity -}}
|
||||
{{- $resource := 0 -}}
|
||||
{{- if $href | and (not (urls.Parse $href).Host) -}}
|
||||
{{- $resource = resources.Get $href -}}
|
||||
{{- end -}}
|
||||
{{- with .toCSS -}}
|
||||
{{- with .Content -}}
|
||||
{{- $resource = resources.FromString $.Path . -}}
|
||||
{{- end -}}
|
||||
{{- if $resource -}}
|
||||
{{- with .Template -}}
|
||||
{{- $resource = $resource | resources.ExecuteAsTemplate . $.Context -}}
|
||||
{{- end -}}
|
||||
{{- with .ToCSS -}}
|
||||
{{- $options := . | merge (dict "outputStyle" "compressed") -}}
|
||||
{{- $res = $res | toCSS $options -}}
|
||||
{{- $resource = $resource | toCSS $options -}}
|
||||
{{- end -}}
|
||||
{{- if .minify -}}
|
||||
{{- $res = $res | minify -}}
|
||||
{{- if .Minify -}}
|
||||
{{- $resource = $resource | minify -}}
|
||||
{{- end -}}
|
||||
{{- with .fingerprint -}}
|
||||
{{- $res = $res | fingerprint . -}}
|
||||
{{- $integrity = $res.Data.Integrity -}}
|
||||
{{- with .Fingerprint -}}
|
||||
{{- $resource = $resource | fingerprint . -}}
|
||||
{{- $integrity = $resource.Data.Integrity -}}
|
||||
{{- end -}}
|
||||
{{- $href = $res.RelPermalink -}}
|
||||
{{- $href = $resource.RelPermalink -}}
|
||||
{{- end -}}
|
||||
<link rel="stylesheet" href="{{ $href }}"{{ if .crossorigin }} crossorigin="anonymous"{{ end }}{{ with $integrity }} integrity="{{ . }}"{{ end }}{{ with .attr }} {{ . | safeHTMLAttr }}{{ end }}>
|
||||
<link rel="stylesheet" href="{{ $href }}"{{ if .Crossorigin }} crossorigin="anonymous"{{ end }}{{ with $integrity }} integrity="{{ . }}"{{ end }}{{ with .Attr }} {{ . | safeHTMLAttr }}{{ end }}>
|
||||
{{- end -}}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
{{- $author := $params.author | default .Site.Author.name | default (T "author") -}}
|
||||
{{- $authorLink := $params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
|
||||
<span class="post-author">
|
||||
{{- $options := dict "class" "author" "href" $authorLink "title" "Author" "rel" "author" "icon" (dict "class" "fas fa-user-circle fa-fw") "content" $author -}}
|
||||
{{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fas fa-user-circle fa-fw") "Content" $author -}}
|
||||
{{- partial "plugin/link.html" $options -}}
|
||||
</span>
|
||||
|
||||
@@ -64,9 +64,13 @@
|
||||
</div>
|
||||
|
||||
{{- /* Featured image */ -}}
|
||||
{{- with $params.featuredimage -}}
|
||||
{{- $image := $params.featuredimage -}}
|
||||
{{- with .Resources.GetMatch "featured-image" -}}
|
||||
{{- $image = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- with $image -}}
|
||||
<div class="featured-image">
|
||||
{{- dict "src" . "alt" $.Description "large" true | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" . "Title" $.Description "Resources" $.Resources | partial "plugin/image.html" -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
{{- $options := cond .IsNamedParams (.Get "src") (.Get 0) | dict "src" -}}
|
||||
{{- $options = cond .IsNamedParams (.Get "alt") (.Get 1) | .Page.RenderString | dict "alt" | merge $options -}}
|
||||
{{- $options := cond .IsNamedParams (.Get "src") (.Get 0) | dict "Src" -}}
|
||||
{{- $options = cond .IsNamedParams (.Get "alt") (.Get 1) | .Page.RenderString | dict "Alt" | merge $options -}}
|
||||
{{- $caption := cond .IsNamedParams (.Get "caption") (.Get 2) | .Page.RenderString -}}
|
||||
{{- $options = dict "caption" $caption | merge $options -}}
|
||||
{{- $options = dict "Caption" $caption | merge $options -}}
|
||||
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- $options = dict "title" (.Get "title") | merge $options -}}
|
||||
{{- $options = dict "src_s" (.Get "src_s") | merge $options -}}
|
||||
{{- $options = dict "src_l" (.Get "src_l") | merge $options -}}
|
||||
{{- $options = dict "height" (.Get "height") | merge $options -}}
|
||||
{{- $options = dict "width" (.Get "width") | merge $options -}}
|
||||
{{- $options = dict "large" (.Get "large") | merge $options -}}
|
||||
{{- $options = .Get "linked" | ne false | dict "linked" | merge $options -}}
|
||||
{{- $options = dict "rel" (.Get "rel") | merge $options -}}
|
||||
{{- $options = dict "Title" (.Get "title") | merge $options -}}
|
||||
{{- $options = dict "SrcSmall" (.Get "src_s") | merge $options -}}
|
||||
{{- $options = dict "SrcLarge" (.Get "src_l") | merge $options -}}
|
||||
{{- $options = dict "Height" (.Get "height") | merge $options -}}
|
||||
{{- $options = dict "Width" (.Get "width") | merge $options -}}
|
||||
{{- $options = .Get "linked" | ne false | dict "Linked" | merge $options -}}
|
||||
{{- $options = dict "Rel" (.Get "rel") | merge $options -}}
|
||||
{{- else -}}
|
||||
{{- $options = cond $caption true false | dict "linked" | merge $options -}}
|
||||
{{- $options = cond $caption true false | dict "Linked" | merge $options -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $options = dict "Resources" .Page.Resources | merge $options -}}
|
||||
|
||||
{{- with $caption -}}
|
||||
<figure{{ with cond $.IsNamedParams ($.Get "class") "" }} class="{{ . }}"{{ end }}>
|
||||
{{- partial "plugin/image.html" $options -}}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
{{- $options := cond .IsNamedParams (.Get "href") (.Get 0) | dict "href" -}}
|
||||
{{- $destination := cond .IsNamedParams (.Get "href") (.Get 0) -}}
|
||||
{{- with dict "Path" $destination "Resources" .Page.Resources | partial "function/resource.html" -}}
|
||||
{{- $destination = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $options := dict "Destination" $destination -}}
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- $options = dict "content" (.Get "content") | merge $options -}}
|
||||
{{- $options = dict "title" (.Get "title") | merge $options -}}
|
||||
{{- $options = dict "class" (.Get "class") | merge $options -}}
|
||||
{{- $options = dict "rel" (.Get "rel") | merge $options -}}
|
||||
{{- $options = dict "Content" (.Get "content") | merge $options -}}
|
||||
{{- $options = dict "Title" (.Get "title") | merge $options -}}
|
||||
{{- $options = dict "Class" (.Get "class") | merge $options -}}
|
||||
{{- $options = dict "Rel" (.Get "rel") | merge $options -}}
|
||||
{{- else -}}
|
||||
{{- $options = dict "content" (.Get 1 | default (.Get 0)) | merge $options -}}
|
||||
{{- $options = dict "title" (.Get 2) | merge $options -}}
|
||||
{{- $options = dict "Content" (.Get 1 | default (.Get 0)) | merge $options -}}
|
||||
{{- $options = dict "Title" (.Get 2) | merge $options -}}
|
||||
{{- end -}}
|
||||
{{- partial "plugin/link.html" $options -}}
|
||||
|
||||
@@ -2,7 +2,15 @@
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- $theme = .Get "theme" | default $theme -}}
|
||||
{{- if .Get "url" -}}
|
||||
<meting-js url="{{ .Get `url` }}" name="{{ .Get `name` }}" artist="{{ .Get `artist` }}" cover="{{ .Get `cover` }}" theme="{{ $theme }}"
|
||||
{{- $url := .Get "url" -}}
|
||||
{{- with dict "Path" $url "Resources" .Page.Resources | partial "function/resource.html" -}}
|
||||
{{- $url = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $cover := .Get "cover" -}}
|
||||
{{- with dict "Path" $cover "Resources" .Page.Resources | partial "function/resource.html" -}}
|
||||
{{- $cover = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
<meting-js url="{{ $url }}" name="{{ .Get `name` }}" artist="{{ .Get `artist` }}" cover="{{ $cover }}" theme="{{ $theme }}"
|
||||
{{- with .Get "fixed" }} fixed="{{ . }}"{{ end -}}
|
||||
{{- with .Get "mini" }} mini="{{ . }}"{{ end -}}
|
||||
{{- with .Get "autoplay" }} autoplay="{{ . }}"{{ end -}}
|
||||
|
||||
@@ -4,8 +4,5 @@
|
||||
{{- printf `<%v id="%v">%v</%v>` $tag $id $content $tag | safeHTML -}}
|
||||
|
||||
{{- $style := .Get 0 | printf "#%v{%v}" $id -}}
|
||||
{{- $path := printf "style/%v/%v" (md5 .Page.RelPermalink) $id -}}
|
||||
{{- $res := resources.FromString (printf "%v.scss" $path) $style -}}
|
||||
{{- $res = $res | toCSS (dict "targetPath" (printf "%v.css" $path) "outputStyle" "compressed") -}}
|
||||
{{- $styleArr := (.Page.Scratch.Get "this").styleArr | default slice -}}
|
||||
{{- $styleArr | append $res.Content | .Page.Scratch.SetInMap "this" "styleArr" -}}
|
||||
{{- $styleArr | append $style | .Page.Scratch.SetInMap "this" "styleArr" -}}
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
{{- $color := cond (eq $type "changed") "ff9101" "00b1ff" | cond (eq $type "deleted") "ff5252" -}}
|
||||
{{- $pathTemplate := cond .Site.IsMultiLingual (printf "svg/version/%%v-%%v.%v.svg" .Page.Language.Lang) "svg/version/%v-%v.svg" -}}
|
||||
{{- $path := printf $pathTemplate $version $type -}}
|
||||
{{- $res := resources.Get "svg/version.template.svg" -}}
|
||||
{{- $res = $res | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}}
|
||||
{{- $resource := resources.Get "svg/version.template.svg" -}}
|
||||
{{- $resource = $resource | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}}
|
||||
{{- $alt := printf "LoveIt %v | %v" $label $version -}}
|
||||
<a href="{{ $url }}" rel="noopener noreffer" target="_blank">
|
||||
{{- dict "src" $res.RelPermalink "alt" $alt "class" "version" | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" $resource.RelPermalink "Alt" $alt "Class" "version" | partial "plugin/image.html" -}}
|
||||
</a>
|
||||
@@ -0,0 +1 @@
|
||||
{"Target":"css/2f1ef0.min.css","MediaType":"text/css","Data":{}}
|
||||
@@ -0,0 +1 @@
|
||||
{"Target":"css/790698.min.css","MediaType":"text/css","Data":{}}
|
||||
@@ -0,0 +1 @@
|
||||
{"Target":"css/f79aa6.min.css","MediaType":"text/css","Data":{}}
|
||||
@@ -1 +0,0 @@
|
||||
{"Target":"style/06219b515bd3039bce88e4417e803b29/id-1.css","MediaType":"text/css","Data":{}}
|
||||
@@ -1 +0,0 @@
|
||||
#id-1 img{height:1.25rem}
|
||||
@@ -1 +0,0 @@
|
||||
{"Target":"style/2d4250d7b4edf7b7647e94cfdc183b86/id-1.css","MediaType":"text/css","Data":{}}
|
||||
@@ -1 +0,0 @@
|
||||
{"Target":"style/2f6a44c07cd36aed63db163b9f515d63/id-1.css","MediaType":"text/css","Data":{}}
|
||||
@@ -1 +0,0 @@
|
||||
#id-1{text-align:right}
|
||||
@@ -1 +0,0 @@
|
||||
{"Target":"style/387e497be0b7dbdc903468dec88ce042/id-1.css","MediaType":"text/css","Data":{}}
|
||||
@@ -1 +0,0 @@
|
||||
{"Target":"style/409594da26069e6252388311312abfd5/id-1.css","MediaType":"text/css","Data":{}}
|
||||
@@ -1 +0,0 @@
|
||||
#id-1{text-align:right}#id-1 strong{color:#00b1ff}
|
||||
@@ -1 +0,0 @@
|
||||
{"Target":"style/7857d7858fcfb859deeb60f29672cffc/id-1.css","MediaType":"text/css","Data":{}}
|
||||
@@ -1 +0,0 @@
|
||||
#id-1{text-align:right}
|
||||
@@ -1 +0,0 @@
|
||||
{"Target":"style/c17d91e847fcfcd8e30a3c3f56b6af46/id-1.css","MediaType":"text/css","Data":{}}
|
||||
@@ -1 +0,0 @@
|
||||
#id-1 img{height:1.25rem}
|
||||
@@ -1 +0,0 @@
|
||||
{"Target":"style/f34bb62f734d1cecaa4de6a8b8efab52/id-1.css","MediaType":"text/css","Data":{}}
|
||||
@@ -1 +0,0 @@
|
||||
#id-1{text-align:right}#id-1 strong{color:#00b1ff}
|
||||
@@ -1 +0,0 @@
|
||||
{"Target":"style/fb3ada7a67e15e6dfbcd8e86e0e7fb61/id-1.css","MediaType":"text/css","Data":{}}
|
||||