mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 02:46:16 +01:00
chore(forkawesome): update forkawesome css
This commit is contained in:
parent
30747ca190
commit
933e32c4e4
22 changed files with 845 additions and 335 deletions
|
@ -10,10 +10,10 @@ license: ""
|
|||
|
||||
tags: ["Hugo", "主题"]
|
||||
categories: ["预览"]
|
||||
hiddenFromHomePage: false
|
||||
|
||||
featuredImage: ""
|
||||
featuredImagePreview: ""
|
||||
hiddenFromHomePage: false
|
||||
|
||||
toc: true
|
||||
autoCollapseToc: true
|
||||
|
|
408
exampleSite/zh/content/posts/test.md
Normal file
408
exampleSite/zh/content/posts/test.md
Normal file
|
@ -0,0 +1,408 @@
|
|||
---
|
||||
title: "Test Page"
|
||||
date: 2019-08-04T22:49:56+08:00
|
||||
lastmod: 2019-08-17T22:41:56+08:00
|
||||
draft: true
|
||||
author: ""
|
||||
authorLink: ""
|
||||
description: "This is a test page."
|
||||
license: ""
|
||||
|
||||
tags: ["Hugo", "主题"]
|
||||
categories: ["预览"]
|
||||
hiddenFromHomePage: false
|
||||
|
||||
featuredImage: ""
|
||||
featuredImagePreview: ""
|
||||
|
||||
toc: true
|
||||
autoCollapseToc: true
|
||||
math: true
|
||||
comment: false
|
||||
dev: true
|
||||
---
|
||||
|
||||
## This is a test page
|
||||
|
||||
[https://www.aol.com/article/entertainment/2020/02/10/oscars-viewership-hits-new-low-with-236-million-viewers/23923047/](https://www.aol.com/article/entertainment/2020/02/10/oscars-viewership-hits-new-low-with-236-million-viewers/23923047/)
|
||||
|
||||
Test all features in development.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Test Code
|
||||
|
||||
### Inline code
|
||||
|
||||
Inline code: `print`
|
||||
|
||||
### Code block with backticks
|
||||
|
||||
```java
|
||||
class DataHolder<T>{
|
||||
T item;
|
||||
|
||||
public void setData(T t) {
|
||||
this.item=t;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return this.item;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```go
|
||||
func (d *Database) GetCollectionByID(id uint) (*model.Collection, error) {
|
||||
var collection model.Collection
|
||||
if err := d.DB.Where("deleted = 0").
|
||||
First(&collection, id).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &collection, nil
|
||||
}
|
||||
```
|
||||
|
||||
```python
|
||||
class Labels(object):
|
||||
__slots__ = ('taskid', 'labels')
|
||||
|
||||
def __init__(self, taskid, labels):
|
||||
# check labels
|
||||
if isinstance(labels, str):
|
||||
labels = [labels]
|
||||
assert isinstance(labels, list), 'labels should be list'
|
||||
labels = [_check_tag(label) for label in labels]
|
||||
|
||||
self.taskid = taskid
|
||||
self.labels = labels
|
||||
|
||||
def for_add(self):
|
||||
return {
|
||||
'taskid': self.taskid,
|
||||
'tags': self.labels,
|
||||
}
|
||||
|
||||
@property
|
||||
def token(self):
|
||||
_check_credential(self._credential)
|
||||
return self._credential['token']
|
||||
|
||||
def scale(scalar: float, vector: Vector) -> Vector:
|
||||
return [scalar * num for num in vector]
|
||||
```
|
||||
|
||||
```js
|
||||
_Blog.chroma = function () {
|
||||
const blocks = document.querySelectorAll('.highlight > .chroma');
|
||||
for (let i = 0; i < blocks.length; i++) {
|
||||
const block = blocks[i];
|
||||
const codes = block.querySelectorAll('pre.chroma > code');
|
||||
const code = codes[codes.length - 1];
|
||||
const lang = code ? code.className.toLowerCase() : '';
|
||||
block.className += ' ' + lang;
|
||||
}
|
||||
|
||||
const nolinenosBlocks = document.querySelectorAll('.highlight > pre.chroma');
|
||||
for (let i = 0; i < nolinenosBlocks.length; i++) {
|
||||
const block = nolinenosBlocks[i];
|
||||
const chroma = document.createElement('div');
|
||||
chroma.className = block.className;
|
||||
const table = document.createElement('table');
|
||||
chroma.appendChild(table);
|
||||
const tbody = document.createElement('tbody');
|
||||
table.appendChild(tbody);
|
||||
const tr = document.createElement('tr');
|
||||
tbody.appendChild(tr);
|
||||
const td = document.createElement('td');
|
||||
tr.appendChild(td);
|
||||
block.parentElement.replaceChild(chroma, block);
|
||||
td.appendChild(block);
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
## Test ECharts
|
||||
|
||||
{{< dev/echarts >}}
|
||||
title : {
|
||||
text: '某站点用户访问来源',
|
||||
subtext: '纯属虚构',
|
||||
x:'center'
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
data: ['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
|
||||
},
|
||||
series : [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius : '55%',
|
||||
center: ['50%', '60%'],
|
||||
data:[
|
||||
{value:335, name:'直接访问'},
|
||||
{value:310, name:'邮件营销'},
|
||||
{value:234, name:'联盟广告'},
|
||||
{value:135, name:'视频广告'},
|
||||
{value:1548, name:'搜索引擎'}
|
||||
],
|
||||
itemStyle: {
|
||||
emphasis: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
{{< /dev/echarts >}}
|
||||
|
||||
## Test Mermaid
|
||||
|
||||
{{< mermaid >}}
|
||||
classDiagram
|
||||
Animal <|-- Duck
|
||||
Animal <|-- Fish
|
||||
Animal <|-- Zebra
|
||||
Animal : +int age
|
||||
Animal : +String gender
|
||||
Animal: +isMammal()
|
||||
Animal: +mate()
|
||||
class Duck{
|
||||
+String beakColor
|
||||
+swim()
|
||||
+quack()
|
||||
}
|
||||
class Fish{
|
||||
-int sizeInFeet
|
||||
-canEat()
|
||||
}
|
||||
class Zebra{
|
||||
+bool is_wild
|
||||
+run()
|
||||
}
|
||||
{{< /mermaid >}}
|
||||
|
||||
## Test Ruby
|
||||
|
||||
人最重要的特点是会思考,建站初衷无非是保存思维的电子快照。
|
||||
当然各种文档工具亦或是简单的文本编辑器也能随时记录点滴,
|
||||
选择建个人网站无非是想满足 [技术爱好者]^(Technology enthusiast) 的偏执。
|
||||
|
||||
## Test Music
|
||||
|
||||
## Test Toc
|
||||
|
||||
Toc
|
||||
|
||||
### Toc1
|
||||
|
||||
Toc
|
||||
|
||||
#### Toc 1-1
|
||||
|
||||
Toc
|
||||
|
||||
#### Toc 1-2
|
||||
|
||||
Toc
|
||||
|
||||
#### Toc 1-3
|
||||
|
||||
Toc
|
||||
|
||||
### Toc2
|
||||
|
||||
Toc
|
||||
|
||||
#### Toc 2-1
|
||||
|
||||
Toc
|
||||
|
||||
#### Toc 2-2
|
||||
|
||||
Toc
|
||||
|
||||
### Toc3
|
||||
|
||||
Toc
|
||||
|
||||
## Test Table
|
||||
|
||||
| Tables | Are | Cool |
|
||||
| :------------ |:-------------:| -----:|
|
||||
| col 3 is | right-aligned | $1600 |
|
||||
| col 2 is | centered | $12 |
|
||||
| zebra stripes | are neat | $1 |
|
||||
|
||||
## Test kbd
|
||||
|
||||
<kbd>ctrl</kbd>+<kbd>alt</kbd>+<kbd>del</kbd>
|
||||
|
||||
## Test Mixed Lists
|
||||
|
||||
Mixed Lists
|
||||
|
||||
- item 1
|
||||
* [X] item A
|
||||
* [ ] item B
|
||||
more text
|
||||
1. item a
|
||||
2. itemb
|
||||
3. item c
|
||||
* [X] item C
|
||||
- item 2
|
||||
- item 3
|
||||
|
||||
Really Mixed Lists
|
||||
|
||||
- item 1
|
||||
* [X] item A
|
||||
- item B
|
||||
more text
|
||||
1. item a
|
||||
+ itemb
|
||||
+ [ ] item c
|
||||
1. item C
|
||||
1. item 2
|
||||
- [X] item 3
|
||||
|
||||
## Test fa (Font Awesome)
|
||||
|
||||
:(fab fa-weixin fa-2x):
|
||||
|
||||
## Test Footnote
|
||||
|
||||
This is a footnote[^1]
|
||||
|
||||
[^1]: https://www.aol.com/article/entertainment/2020/02/10/oscars-viewership-hits-new-low-with-236-million-viewers/23923047/
|
||||
|
||||
## Test Admonition
|
||||
|
||||
{{% admonition quote %}}
|
||||
biu biu biu.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition quote "I'm title!" false %}}
|
||||
biu biu biu.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition example "I'm title!" false %}}
|
||||
biu biu biu.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition bug "I'm title!" false %}}
|
||||
biu biu biu.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition danger "I'm title!" false %}}
|
||||
biu biu biu.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition failure "I'm title!" false %}}
|
||||
biu biu biu.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition warning "I'm title!" false %}}
|
||||
biu biu biu.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition question "I'm title!" false %}}
|
||||
biu biu biu.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition success "I'm title!" false %}}
|
||||
biu biu biu.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition tip "I'm title!" false %}}
|
||||
biu biu biu.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition info "I'm title!" true %}}
|
||||
**biu biu biu.**
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition note "I'm title!" false %}}
|
||||
**biu biu biu.**
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition type="abstract" title="Test Admonition" %}}
|
||||
This is a Admonition.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Test Highlight
|
||||
|
||||
`ls` 命令
|
||||
|
||||
```go
|
||||
// You can edit this code!
|
||||
// Click here and start typing.
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("Hello, 世界", "Hello, 世界", "Hello, 世界", "Hello, 世界", "Hello, 世界", "Hello, 世界", "Hello, 世界", "Hello, 世界")
|
||||
}
|
||||
```
|
||||
|
||||
- This is a list that contains multiple code blocks.
|
||||
|
||||
- Here is an indented block
|
||||
|
||||
```Code
|
||||
This will still be parsed
|
||||
as a normal indented code block.
|
||||
```
|
||||
|
||||
- Here is a fenced code block:
|
||||
|
||||
```Code
|
||||
This will still be parsed
|
||||
as a fenced code block.
|
||||
```
|
||||
|
||||
> ```Code
|
||||
> Blockquotes?
|
||||
> Not a problem!
|
||||
> ```
|
||||
|
||||
## Test Typeit
|
||||
|
||||
{{< typeit group="test" tag="h3" >}}
|
||||
Here is a story about love...
|
||||
{{< /typeit >}}
|
||||
|
||||
{{< typeit group="test" code="java" >}}
|
||||
u.accepted(); // [2018/01/05](/since/) special
|
||||
int a = 1;
|
||||
{{< /typeit >}}
|
||||
|
||||
## Test Img
|
||||
|
||||
![Gif](https://static.dillonzq.com/images/20190817130904-U6cPUk.jpg "Title")
|
||||
|
||||
## Test Align
|
||||
|
||||
{{% align right %}}
|
||||
**Test Text**
|
||||
{{% /align %}}
|
||||
|
||||
## Test Katex
|
||||
|
||||
$$ c = \pm\sqrt{a^2 + b^2} $$
|
||||
|
||||
Left \\( c = \pm\sqrt{a^2 + b^2} \\) Right
|
||||
|
||||
Left $ c = \pm\sqrt{a^2 + b^2} $ Right
|
||||
|
||||
$ \ce{CO2 + C -> 2 CO} $
|
||||
|
||||
$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $
|
|
@ -1,9 +1,6 @@
|
|||
<figure>
|
||||
{{- /* Lazyload */ -}}
|
||||
{{- $loading := resources.Get "svg/loading.svg" | minify -}}
|
||||
<img src="{{ $loading.RelPermalink | safeURL }}" data-sizes="auto" data-src="{{ .Destination | safeURL }}" alt="{{ .Text }}"{{ with .Title }} title="{{ . }}"{{ end }} class="lazyload">
|
||||
{{- $caption := .Title | default .Text -}}
|
||||
{{- with $caption -}}
|
||||
{{- partial "function/image.html" (dict "src" .Destination "alt" .Text "title" .Title ) -}}
|
||||
{{- with .Title | default .Text -}}
|
||||
<figcaption class="image-caption">
|
||||
{{- . -}}
|
||||
</figcaption>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
{{- /* Content */ -}}
|
||||
<div class="content">
|
||||
{{- partial "hook/content.html" .Content | safeHTML -}}
|
||||
{{- partial "function/content.html" .Content -}}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{- with .Params.featuredImage -}}
|
||||
<div class="featured-image-preview">
|
||||
{{- $image := $.Params.featuredImagePreview | default . -}}
|
||||
{{- partial "hook/image" $image -}}
|
||||
{{- partial "function/image.html" (dict "src" $image "alt" "featured image") -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
{{- /* Summary content */ -}}
|
||||
<div class="content">
|
||||
{{- partial "hook/content.html" .Summary | safeHTML -}}
|
||||
{{- partial "function/content.html" .Summary -}}
|
||||
</div>
|
||||
|
||||
{{- /* Footer */ -}}
|
||||
|
|
|
@ -25,4 +25,4 @@
|
|||
{{- $REout = `↩︎` -}}
|
||||
{{- $content = replaceRE $REin $REout $content -}}
|
||||
|
||||
{{- return $content -}}
|
||||
{{- $content | safeHTML -}}
|
3
layouts/partials/function/icon-link.html
Normal file
3
layouts/partials/function/icon-link.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<a href="{{ index . `href` }}" rel="me noopener noreffer" target="_blank" title="{{ index . `title` }}">
|
||||
{{- partial "function/icon.html" . -}}
|
||||
</a>
|
23
layouts/partials/function/icon.html
Normal file
23
layouts/partials/function/icon.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{- $type := index . "type" | default "fa" }}
|
||||
{{- $classList := split (index . "class") " " }}
|
||||
{{- $scratch := index . "scratch" }}
|
||||
{{- /* Font Awesome */ -}}
|
||||
{{- if eq $type "fa" -}}
|
||||
<i class="{{ delimit $classList ` ` }}"></i>
|
||||
{{- /* Fork Awesome */ -}}
|
||||
{{- else if eq $type "fo" -}}
|
||||
{{- $newClassList := slice -}}
|
||||
{{- range $classList -}}
|
||||
{{- if eq . "fa" -}}
|
||||
{{- $newClassList = $newClassList | append "fo" -}}
|
||||
{{- else -}}
|
||||
{{- $newClassList = $newClassList | append (replaceRE `^fa\-(.+)$` `fo-$1` .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<i class="{{ delimit $newClassList ` ` }}"></i>
|
||||
{{- $scratch.Set "forkawesome" true -}}
|
||||
{{- /* Others */ -}}
|
||||
{{- else -}}
|
||||
<span class="{{ delimit $classList ` ` }}"></span>
|
||||
{{- $scratch.Set "iconfont" true -}}
|
||||
{{- end -}}
|
|
@ -1,3 +1,3 @@
|
|||
{{- /* Lazyload */ -}}
|
||||
{{- $res := resources.Get "svg/loading.svg" | minify -}}
|
||||
<img src="{{ $res.RelPermalink | safeURL }}" data-sizes="auto" data-src="{{ . | safeURL }}" alt="featured image" class="lazyload">
|
||||
<img src="{{ $res.RelPermalink | safeURL }}" data-sizes="auto" data-src="{{ index . `src` | safeURL }}" alt="{{ index . `alt` }}" title="{{ index . `title` | default (index . `alt`) }}" class="lazyload">
|
|
@ -37,11 +37,6 @@
|
|||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Fork Awesome https://forkaweso.me/ */ -}}
|
||||
{{- $options := dict "targetPath" "css/lib/forkawesome/fork-awesome.min.css" "outputStyle" "compressed" "enableSourceMap" true -}}
|
||||
{{- $res := resources.Get "css/lib/forkawesome/fork-awesome.scss"| toCSS $options -}}
|
||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||
|
||||
{{- /* Animate.css https://github.com/daneden/animate.css */ -}}
|
||||
{{- with $CDN.animateCSS -}}
|
||||
{{- . | safeHTML -}}
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
{{- .Pre | safeHTML }}{{ .Name -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title="{{ T "switchTheme" }}"></i></a>
|
||||
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-rotate-180 fa-fw"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
@ -38,7 +40,9 @@
|
|||
{{- .Name | safeHTML -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title="{{ T "switchTheme" }}"></i></a>
|
||||
<a href="javascript:void(0);" class="theme-switch" title="{{ T "switchTheme" }}">
|
||||
<i class="fas fa-adjust fa-rotate-180 fa-fw"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -19,11 +19,7 @@
|
|||
{{- . | safeHTML -}}
|
||||
</div>
|
||||
<div id={{ $id }} class="typeit"></div>
|
||||
{{- with $.Scratch.Get "typeitMap" -}}
|
||||
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id) | merge .) -}}
|
||||
{{- else -}}
|
||||
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id)) -}}
|
||||
{{- end -}}
|
||||
{{- $.Scratch.SetInMap "typeitMap" $id (slice $id) -}}
|
||||
{{- else -}}
|
||||
{{- . | safeHTML -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,304 +1,425 @@
|
|||
{{- /* 001: Github */ -}}
|
||||
{{- with .Site.Params.Social.Github -}}
|
||||
<a href="https://github.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-github-alt fa-fw" title="Github"></i>
|
||||
</a>
|
||||
{{- $options := dict "href" (printf "https://github.com/%s" .) "title" "GitHub" -}}
|
||||
{{- $options = dict "class" "fab fa-github-alt fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 002: LinkedIn */ -}}
|
||||
{{- with .Site.Params.Social.LinkedIn -}}
|
||||
<a href="https://linkedin.com/in/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-linkedin fa-fw" title="LinkedIn"></i>
|
||||
</a>
|
||||
{{- $options := dict "href" (printf "https://linkedin.com/in/%s" .) "title" "LinkedIn" -}}
|
||||
{{- $options = dict "class" "fab fa-linkedin fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 003: Twitter */ -}}
|
||||
{{- with .Site.Params.Social.Twitter -}}
|
||||
<a href="https://twitter.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-twitter fa-fw" title="Twitter"></i>
|
||||
</a>
|
||||
{{- $options := dict "href" (printf "https://twitter.com/%s" .) "title" "Twitter" -}}
|
||||
{{- $options = dict "class" "fab fa-twitter fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 004: Instagram */ -}}
|
||||
{{- with .Site.Params.Social.Instagram -}}
|
||||
<a href="https://www.instagram.com/{{ . }}/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-instagram fa-fw" title="Instagram"></i>
|
||||
</a>
|
||||
{{- $options := dict "href" (printf "https://www.instagram.com/%s" .) "title" "Instagram" -}}
|
||||
{{- $options = dict "class" "fab fa-instagram fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Facebook}}
|
||||
<a href="https://facebook.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-facebook fa-fw" title="Facebook"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 005: Facebook */ -}}
|
||||
{{- with .Site.Params.Social.Facebook -}}
|
||||
{{- $options := dict "href" (printf "https://facebook.com/%s" .) "title" "Facebook" -}}
|
||||
{{- $options = dict "class" "fab fa-facebook fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Telegram}}
|
||||
<a href="https://t.me/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-telegram-plane fa-fw" title="Telegram"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 006: Telegram */ -}}
|
||||
{{- with .Site.Params.Social.Telegram -}}
|
||||
{{- $options := dict "href" (printf "https://t.me/%s" .) "title" "Telegram" -}}
|
||||
{{- $options = dict "class" "fab fa-telegram-plane fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Medium}}
|
||||
<a href="https://medium.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-medium fa-fw" title="Medium"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 007: Medium */ -}}
|
||||
{{- with .Site.Params.Social.Medium -}}
|
||||
{{- $options := dict "href" (printf "https://medium.com/%s" .) "title" "Medium" -}}
|
||||
{{- $options = dict "class" "fab fa-medium fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Gitlab}}
|
||||
<a href="https://gitlab.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-gitlab fa-fw" title="Gitlab"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 008: Medium */ -}}
|
||||
{{- with .Site.Params.Social.Gitlab -}}
|
||||
{{- $options := dict "href" (printf "https://gitlab.com/%s" .) "title" "GitLab" -}}
|
||||
{{- $options = dict "class" "fab fa-gitlab fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Youtubelegacy}}
|
||||
<a href="https://www.youtube.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 009: YouTube Legacy */ -}}
|
||||
{{- with .Site.Params.Social.Youtubelegacy -}}
|
||||
{{- $options := dict "href" (printf "https://www.youtube.com/user/%s" .) "title" "YouTube" -}}
|
||||
{{- $options = dict "class" "fab fa-youtube fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Youtubecustom}}
|
||||
<a href="https://www.youtube.com/c/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 010: YouTube Custom */ -}}
|
||||
{{- with .Site.Params.Social.Youtubecustom -}}
|
||||
{{- $options := dict "href" (printf "https://www.youtube.com/c/%s" .) "title" "YouTube" -}}
|
||||
{{- $options = dict "class" "fab fa-youtube fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Youtubechannel}}
|
||||
<a href="https://www.youtube.com/channel/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-youtube fa-fw" title="Youtube"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 011: Youtube Channel */ -}}
|
||||
{{- with .Site.Params.Social.Youtubechannel -}}
|
||||
{{- $options := dict "href" (printf "https://www.youtube.com/channel/%s" .) "title" "YouTube" -}}
|
||||
{{- $options = dict "class" "fab fa-youtube fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Tumblr}}
|
||||
<a href="https://{{ . }}.tumblr.com" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-tumblr fa-fw" title="Tumblr"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 012: Tumblr */ -}}
|
||||
{{- with .Site.Params.Social.Tumblr -}}
|
||||
{{- $options := dict "href" (printf "https://%s.tumblr.com" .) "title" "Tumblr" -}}
|
||||
{{- $options = dict "class" "fab fa-tumblr fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Quora}}
|
||||
<a href="https://www.quora.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-quora fa-fw" title="Quora"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 013: Tumblr */ -}}
|
||||
{{- with .Site.Params.Social.Quora -}}
|
||||
{{- $options := dict "href" (printf "https://www.quora.com/profile/%s" .) "title" "Quora" -}}
|
||||
{{- $options = dict "class" "fab fa-quora fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Keybase}}
|
||||
<a href="https://keybase.io/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-keybase fa-fw" title="Keybase"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 014: Keybase */ -}}
|
||||
{{- with .Site.Params.Social.Keybase -}}
|
||||
{{- $options := dict "href" (printf "https://keybase.io/%s" .) "title" "Keybase" -}}
|
||||
{{- $options = dict "class" "fab fa-keybase fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Pinterest}}
|
||||
<a href="https://www.pinterest.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-pinterest fa-fw" title="Pinterest"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 015: Pinterest */ -}}
|
||||
{{- with .Site.Params.Social.Pinterest -}}
|
||||
{{- $options := dict "href" (printf "https://www.pinterest.com/%s" .) "title" "Pinterest" -}}
|
||||
{{- $options = dict "class" "fab fa-pinterest fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Reddit}}
|
||||
<a href="https://www.reddit.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-reddit fa-fw" title="Reddit"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 016: Reddit */ -}}
|
||||
{{- with .Site.Params.Social.Reddit -}}
|
||||
{{- $options := dict "href" (printf "https://www.reddit.com/user/%s" .) "title" "Reddit" -}}
|
||||
{{- $options = dict "class" "fab fa-reddit fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Codepen}}
|
||||
<a href="https://codepen.io/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-codepen fa-fw" title="Codepen"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 017: CodePen */ -}}
|
||||
{{- with .Site.Params.Social.Codepen -}}
|
||||
{{- $options := dict "href" (printf "https://codepen.io/%s" .) "title" "CodePen" -}}
|
||||
{{- $options = dict "class" "fab fa-codepen fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.FreeCodeCamp}}
|
||||
<a href="https://freecodecamp.org/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-free-code-camp fa-fw"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 018: freeCodeCamp */ -}}
|
||||
{{- with .Site.Params.Social.FreeCodeCamp -}}
|
||||
{{- $options := dict "href" (printf "https://freecodecamp.org/%s" .) "title" "freeCodeCamp" -}}
|
||||
{{- $options = dict "class" "fab fa-free-code-camp fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Bitbucket}}
|
||||
<a href="https://bitbucket.org/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-bitbucket fa-fw" title="Bitbucket"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 019: Bitbucket */ -}}
|
||||
{{- with .Site.Params.Social.Bitbucket -}}
|
||||
{{- $options := dict "href" (printf "https://bitbucket.org/%s" .) "title" "Bitbucket" -}}
|
||||
{{- $options = dict "class" "fab fa-bitbucket fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Stackoverflow}}
|
||||
<a href="https://stackoverflow.com/users/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-stack-overflow fa-fw" title="Stackoverflow"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 020: Stack Overflow */ -}}
|
||||
{{- with .Site.Params.Social.Stackoverflow -}}
|
||||
{{- $options := dict "href" (printf "https://stackoverflow.com/users/%s" .) "title" "Stack Overflow" -}}
|
||||
{{- $options = dict "class" "fab fa-stack-overflow fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Weibo}}
|
||||
<a href="https://weibo.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-weibo fa-fw" title="Weibo"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 021: 微博 */ -}}
|
||||
{{- with .Site.Params.Social.Weibo -}}
|
||||
{{- $options := dict "href" (printf "https://weibo.com/%s" .) "title" "微博" -}}
|
||||
{{- $options = dict "class" "fab fa-weibo fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Odnoklassniki}}
|
||||
<a href="https://ok.ru/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-odnoklassniki fa-fw" title="Odnoklassniki"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 022: OK.RU */ -}}
|
||||
{{- with .Site.Params.Social.Odnoklassniki -}}
|
||||
{{- $options := dict "href" (printf "https://ok.ru/%s" .) "title" "OK.RU" -}}
|
||||
{{- $options = dict "class" "fab fa-odnoklassniki fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.VKontakte}}
|
||||
<a href="https://vk.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-vk fa-fw" title="VKontakte"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 023: VKontakte */ -}}
|
||||
{{- with .Site.Params.Social.VKontakte -}}
|
||||
{{- $options := dict "href" (printf "https://vk.com/%s" .) "title" "VKontakte" -}}
|
||||
{{- $options = dict "class" "fab fa-vk fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Flickr}}
|
||||
<a href="https://www.flickr.com/photos/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-flickr fa-fw" title="Flickr"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 024: Flickr */ -}}
|
||||
{{- with .Site.Params.Social.Flickr -}}
|
||||
{{- $options := dict "href" (printf "https://www.flickr.com/photos/%s" .) "title" "Flickr" -}}
|
||||
{{- $options = dict "class" "fab fa-flickr fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Xing}}
|
||||
<a href="https://www.xing.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-xing fa-fw" title="Xing"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 025: Xing */ -}}
|
||||
{{- with .Site.Params.Social.Xing -}}
|
||||
{{- $options := dict "href" (printf "https://www.xing.com/profile/%s" .) "title" "Xing" -}}
|
||||
{{- $options = dict "class" "fab fa-xing fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Snapchat}}
|
||||
<a href="https://www.snapchat.com/add/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-snapchat fa-fw" title="Snapchat"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 026: Snapchat */ -}}
|
||||
{{- with .Site.Params.Social.Snapchat -}}
|
||||
{{- $options := dict "href" (printf "https://www.snapchat.com/add/%s" .) "title" "Snapchat" -}}
|
||||
{{- $options = dict "class" "fab fa-snapchat fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Soundcloud}}
|
||||
<a href="https://soundcloud.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-soundcloud fa-fw" title="Soundcloud"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 027: SoundCloud */ -}}
|
||||
{{- with .Site.Params.Social.Soundcloud -}}
|
||||
{{- $options := dict "href" (printf "https://soundcloud.com/%s" .) "title" "SoundCloud" -}}
|
||||
{{- $options = dict "class" "fab fa-soundcloud fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Spotify}}
|
||||
<a href="https://open.spotify.com/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-spotify fa-fw" title="Spotify"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 028: Spotify */ -}}
|
||||
{{- with .Site.Params.Social.Spotify -}}
|
||||
{{- $options := dict "href" (printf "https://open.spotify.com/user/%s" .) "title" "Spotify" -}}
|
||||
{{- $options = dict "class" "fab fa-spotify fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Bandcamp}}
|
||||
<a href="https://{{ . }}.bandcamp.com/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-bandcamp fa-fw" title="Bandcamp"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 029: Bandcamp */ -}}
|
||||
{{- with .Site.Params.Social.Bandcamp -}}
|
||||
{{- $options := dict "href" (printf "https://%s.bandcamp.com/" .) "title" "Bandcamp" -}}
|
||||
{{- $options = dict "class" "fab fa-bandcamp fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Paypal}}
|
||||
<a href="https://paypal.me/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-paypal fa-fw" title="Paypal"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 030: PayPal */ -}}
|
||||
{{- with .Site.Params.Social.Paypal -}}
|
||||
{{- $options := dict "href" (printf "https://paypal.me/%s" .) "title" "PayPal" -}}
|
||||
{{- $options = dict "class" "fab fa-paypal fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Fivehundredpx}}
|
||||
<a href="https://500px.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-500px fa-fw" title="Fivehundredpx"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 031: 500px */ -}}
|
||||
{{- with .Site.Params.Social.Fivehundredpx -}}
|
||||
{{- $options := dict "href" (printf "https://500px.com/%s" .) "title" "500px" -}}
|
||||
{{- $options = dict "class" "fab fa-500px fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Mix}}
|
||||
<a href="https://mix.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-mix fa-fw" title="Mix"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 032: Mix */ -}}
|
||||
{{- with .Site.Params.Social.Mix -}}
|
||||
{{- $options := dict "href" (printf "https://mix.com/%s" .) "title" "Mix" -}}
|
||||
{{- $options = dict "class" "fab fa-mix fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Goodreads}}
|
||||
<a href="https://www.goodreads.com/user/show/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-goodreads fa-fw" title="Goodreads"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 033: Goodreads */ -}}
|
||||
{{- with .Site.Params.Social.Goodreads -}}
|
||||
{{- $options := dict "href" (printf "https://www.goodreads.com/user/show/%s" .) "title" "Goodreads" -}}
|
||||
{{- $options = dict "class" "fab fa-goodreads fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Lastfm}}
|
||||
<a href="https://www.last.fm/user/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-POP_lastfm fa-fw" title="Lastfm"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 034: Last.fm */ -}}
|
||||
{{- with .Site.Params.Social.Lastfm -}}
|
||||
{{- $options := dict "href" (printf "https://www.last.fm/user/%s" .) "title" "Last.fm" -}}
|
||||
{{- $options = dict "class" "fab fa-lastfm fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Foursquare}}
|
||||
<a href="https://foursquare.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-foursquare fa-fw" title="Foursquare"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 035: Foursquare */ -}}
|
||||
{{- with .Site.Params.Social.Foursquare -}}
|
||||
{{- $options := dict "href" (printf "https://foursquare.com/%s" .) "title" "Foursquare" -}}
|
||||
{{- $options = dict "class" "fab fa-foursquare fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Hackernews}}
|
||||
<a href="https://news.ycombinator.com/user?id={{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-hacker-news fa-fw" title="Hackernews"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 036: Hacker News */ -}}
|
||||
{{- with .Site.Params.Social.Hackernews -}}
|
||||
{{- $options := dict "href" (printf "https://news.ycombinator.com/user?id=%s" .) "title" "Hacker News" -}}
|
||||
{{- $options = dict "class" "fab fa-hacker-news fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Kickstarter}}
|
||||
<a href="https://kickstarter.com/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-kickstarter fa-fw" title="Kickstarter"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 037: Kickstarter */ -}}
|
||||
{{- with .Site.Params.Social.Kickstarter -}}
|
||||
{{- $options := dict "href" (printf "https://kickstarter.com/profile/%s" .) "title" "Kickstarter" -}}
|
||||
{{- $options = dict "class" "fab fa-kickstarter fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Patreon}}
|
||||
<a href="https://patreon.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-patreon fa-fw" title="Patreon"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 038: Patreon */ -}}
|
||||
{{- with .Site.Params.Social.Patreon -}}
|
||||
{{- $options := dict "href" (printf "https://patreon.com/%s" .) "title" "Patreon" -}}
|
||||
{{- $options = dict "class" "fab fa-patreon fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Steam}}
|
||||
<a href="https://steamcommunity.com/id/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-steam fa-fw" title="Steam"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 039: Steam */ -}}
|
||||
{{- with .Site.Params.Social.Steam -}}
|
||||
{{- $options := dict "href" (printf "https://steamcommunity.com/id/%s" .) "title" "Steam" -}}
|
||||
{{- $options = dict "class" "fab fa-steam fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Twitch}}
|
||||
<a href="https://www.twitch.tv/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-twitch fa-fw" title="Twitch"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 040: Twitch */ -}}
|
||||
{{- with .Site.Params.Social.Twitch -}}
|
||||
{{- $options := dict "href" (printf "https://www.twitch.tv/%s" .) "title" "Twitch" -}}
|
||||
{{- $options = dict "class" "fab fa-twitch fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Strava}}
|
||||
<a href="https://www.strava.com/athletes/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-strava fa-fw" title="Strava"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 041: Strava */ -}}
|
||||
{{- with .Site.Params.Social.Strava -}}
|
||||
{{- $options := dict "href" (printf "https://www.strava.com/athletes/%s" .) "title" "Strava" -}}
|
||||
{{- $options = dict "class" "fab fa-strava fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Skype}}
|
||||
<a href="skype:{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-skype fa-fw" title="Skype"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 042: Skype */ -}}
|
||||
{{- with .Site.Params.Social.Skype -}}
|
||||
{{- $options := dict "href" (printf "skype:%s" .) "title" "Skype" -}}
|
||||
{{- $options = dict "class" "fab fa-skype fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Whatsapp}}
|
||||
<a href="https://wa.me/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-whatsapp fa-fw" title="Whatsapp"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 043: WhatsApp */ -}}
|
||||
{{- with .Site.Params.Social.Whatsapp -}}
|
||||
{{- $options := dict "href" (printf "https://wa.me/%s" .) "title" "WhatsApp" -}}
|
||||
{{- $options = dict "class" "fab fa-whatsapp fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Zhihu}}
|
||||
<a href="https://www.zhihu.com/people/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-zhihu fa-fw" title="Zhihu"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 044: 知乎 */ -}}
|
||||
{{- with .Site.Params.Social.Zhihu -}}
|
||||
{{- $options := dict "href" (printf "https://www.zhihu.com/people/%s" .) "title" "知乎" -}}
|
||||
{{- $options = dict "class" "fab fa-zhihu fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Angellist}}
|
||||
<a href="https://angel.co/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-angellist fa-fw" title="Angellist"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 045: Angellist */ -}}
|
||||
{{- with .Site.Params.Social.Angellist -}}
|
||||
{{- $options := dict "href" (printf "https://angel.co/%s" .) "title" "Angellist" -}}
|
||||
{{- $options = dict "class" "fab fa-angellist fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Slideshare}}
|
||||
<a href="https://slideshare.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-slideshare fa-fw" title="Slideshare"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 046: SlideShare */ -}}
|
||||
{{- with .Site.Params.Social.Slideshare -}}
|
||||
{{- $options := dict "href" (printf "https://slideshare.com/%s" .) "title" "SlideShare" -}}
|
||||
{{- $options = dict "class" "fab fa-slideshare fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Jsfiddle}}
|
||||
<a href="https://jsfiddle.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-jsfiddle fa-fw" title="Jsfiddle"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 047: JSFiddle */ -}}
|
||||
{{- with .Site.Params.Social.Jsfiddle -}}
|
||||
{{- $options := dict "href" (printf "https://jsfiddle.com/%s" .) "title" "JSFiddle" -}}
|
||||
{{- $options = dict "class" "fab fa-jsfiddle fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Deviantart}}
|
||||
<a href="https://{{ . }}.deviantart.com/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-deviantart fa-fw" title="Deviantart"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 048: DeviantArt */ -}}
|
||||
{{- with .Site.Params.Social.Deviantart -}}
|
||||
{{- $options := dict "href" (printf "https://%s.deviantart.com/" .) "title" "DeviantArt" -}}
|
||||
{{- $options = dict "class" "fab fa-deviantart fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Behance}}
|
||||
<a href="https://behance.net/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-behance fa-fw" title="Behance"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 049: Behance */ -}}
|
||||
{{- with .Site.Params.Social.Behance -}}
|
||||
{{- $options := dict "href" (printf "https://behance.net/%s" .) "title" "Behance" -}}
|
||||
{{- $options = dict "class" "fab fa-behance fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Dribble}}
|
||||
<a href="https://dribbble.com/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-dribbble fa-fw" title="Dribble"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 050: Dribbble */ -}}
|
||||
{{- with .Site.Params.Social.Dribble -}}
|
||||
{{- $options := dict "href" (printf "https://dribbble.com/%s" .) "title" "Dribbble" -}}
|
||||
{{- $options = dict "class" "fab fa-dribbble fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Wordpress}}
|
||||
<a href="https://{{ . }}.wordpress.com" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-wordpress fa-fw" title="Wordpress"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 051: WordPress */ -}}
|
||||
{{- with .Site.Params.Social.Wordpress -}}
|
||||
{{- $options := dict "href" (printf "https://%s.wordpress.com/" .) "title" "WordPress" -}}
|
||||
{{- $options = dict "class" "fab fa-wordpress fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Vine}}
|
||||
<a href="https://vine.co/" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-vine fa-fw" title="Vine"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 052: Vine */ -}}
|
||||
{{- with .Site.Params.Social.Vine -}}
|
||||
{{- $options := dict "href" (printf "https://vine.co/%s" .) "title" "Vine" -}}
|
||||
{{- $options = dict "class" "fab fa-vine fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Googlescholar}}
|
||||
<a href="https://scholar.google.com/citations?{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-Googlescholar fa-fw" title="Googlescholar"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 053: Google Scholar */ -}}
|
||||
{{- with .Site.Params.Social.Googlescholar -}}
|
||||
{{- $options := dict "href" (printf "https://scholar.google.com/citations?%s" .) "title" "Google Scholar" -}}
|
||||
{{- $options = dict "class" "fab fa-google fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Researchgate}}
|
||||
<a href="https://www.researchgate.net/profile/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-researchgate fa-fw" title="Researchgate"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 054: ResearchGate */ -}}
|
||||
{{- with .Site.Params.Social.Researchgate -}}
|
||||
{{- $options := dict "href" (printf "https://www.researchgate.net/profile/%s" .) "title" "ResearchGate" -}}
|
||||
{{- $options = dict "class" "fab fa-researchgate fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Mastodon}}
|
||||
|
||||
{{- /* 055: Mastodon */ -}}
|
||||
{{- with .Site.Params.Social.Mastodon -}}
|
||||
{{- $MastodonPrefix := $.Site.Params.Social.MastodonPrefix | default "https://mastodon.social/" -}}
|
||||
<a href="{{ $MastodonPrefix | safeURL }}{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-mastodon fa-fw" title="Mastodon"></i>
|
||||
</a>
|
||||
{{- $options := dict "href" $MastodonPrefix "title" "Mastodon" -}}
|
||||
{{- $options = dict "class" "fab fa-mastodon fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Devto}}
|
||||
<a href="https://dev.to/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fab fa-dev fa-fw" title="Dev.To"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 054: Dev.To */ -}}
|
||||
{{- with .Site.Params.Social.Devto -}}
|
||||
{{- $options := dict "href" (printf "https://dev.to/%s" .) "title" "Dev.To" -}}
|
||||
{{- $options = dict "class" "fab fa-dev fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Gitea}}
|
||||
<a href="{{ . | safeURL }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fo fo-gitea fo-fw" title="Gitea"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 055: Gitea */ -}}
|
||||
{{- with .Site.Params.Social.Gitea -}}
|
||||
{{- $options := dict "href" . "title" "Gitea" -}}
|
||||
{{- $options = dict "class" "fa fa-gitea fa-fw" "type" "fo" "scratch" $.Scratch | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.XMPP}}
|
||||
<a href="xmpp:{{ . }}" rel="me noopener noreffer">
|
||||
<i class="fo fo-xmpp fo-fw" title="XMPP"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 056: XMPP */ -}}
|
||||
{{- with .Site.Params.Social.XMPP -}}
|
||||
{{- $options := dict "href" (printf "xmpp:%s" .) "title" "XMPP" -}}
|
||||
{{- $options = dict "class" "fa fa-xmpp fa-fw" "type" "fo" "scratch" $.Scratch | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Matrix}}
|
||||
<a href="https://matrix.to/#/{{ . }}" rel="me noopener noreffer" target="_blank">
|
||||
<i class="fo fo-matrix-org fo-fw" title="Matrix"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 057: Matrix */ -}}
|
||||
{{- with .Site.Params.Social.Matrix -}}
|
||||
{{- $options := dict "href" (printf "https://matrix.to/#/%s" .) "title" "Matrix" -}}
|
||||
{{- $options = dict "class" "fa fa-matrix-org fa-fw" "type" "fo" "scratch" $.Scratch | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Email}}
|
||||
<a href="mailto:{{ . }}" rel="me noopener noreffer">
|
||||
<i class="far fa-envelope fa-fw" title="Email"></i>
|
||||
</a>
|
||||
|
||||
{{- /* 058: Email */ -}}
|
||||
{{- with .Site.Params.Social.Email -}}
|
||||
{{- $options := dict "href" (printf "mailto:%s" .) "title" "Email" -}}
|
||||
{{- $options = dict "class" "far fa-envelope fa-fw" | merge $options -}}
|
||||
{{- partial "function/icon-link.html" $options -}}
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.Social.Custom}}
|
||||
|
||||
{{- /* Custom */ -}}
|
||||
{{- with .Site.Params.Social.Custom -}}
|
||||
{{- . | safeHTML -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,71 +1,71 @@
|
|||
{{- if .Params.share.enable | default .Site.Params.share.enable | eq true -}}
|
||||
{{- /* Share on Twitter */ -}}
|
||||
{{- /* 001: Twitter */ -}}
|
||||
{{- if .Params.Share.Twitter | default .Site.Params.Share.Twitter | eq true -}}
|
||||
<a href="//twitter.com/share?url={{ .Permalink }}&text={{ .Title }}&via={{ .Site.Params.Social.Twitter }}" target="_blank" title="{{ T "share" }} Twitter">
|
||||
<i class="fab fa-twitter fa-fw"></i>
|
||||
{{- partial "function/icon.html" (dict "class" "fab fa-twitter fa-fw") -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Facebook */ -}}
|
||||
{{- /* 002: Facebook */ -}}
|
||||
{{- if .Params.Share.Facebook | default .Site.Params.Share.Facebook | eq true -}}
|
||||
<a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="{{ T "share" }} Facebook">
|
||||
<i class="fab fa-facebook-square fa-fw"></i>
|
||||
{{- partial "function/icon.html" (dict "class" "fab fa-facebook-square fa-fw") -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Reddit */ -}}
|
||||
{{- /* 003: Reddit */ -}}
|
||||
{{- if .Params.Share.Reddit | default .Site.Params.Share.Reddit | eq true -}}
|
||||
<a href="//reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="{{ T "share" }} Reddit">
|
||||
<i class="fab fa-reddit fa-fw"></i>
|
||||
{{- partial "function/icon.html" (dict "class" "fab fa-reddit fa-fw") -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Linkedin */ -}}
|
||||
{{- /* 004: Linkedin */ -}}
|
||||
{{- if .Params.Share.Linkedin | default .Site.Params.Share.Linkedin | eq true -}}
|
||||
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="{{ T "share" }} LinkedIn">
|
||||
<i class="fab fa-linkedin fa-fw"></i>
|
||||
{{- partial "function/icon.html" (dict "class" "fab fa-linkedin fa-fw") -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Pinterest */ -}}
|
||||
{{- /* 005: Pinterest */ -}}
|
||||
{{- if .Params.Share.Pinterest | default .Site.Params.Share.Pinterest | eq true -}}
|
||||
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="{{ T "share" }} Pinterest">
|
||||
<i class="fab fa-pinterest fa-fw"></i>
|
||||
{{- partial "function/icon.html" (dict "class" "fab fa-pinterest fa-fw") -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Hacker News */ -}}
|
||||
{{- /* 006: Hacker News */ -}}
|
||||
{{- if .Params.Share.Hackernews | default .Site.Params.Share.Hackernews | eq true -}}
|
||||
<a href="//news.ycombinator.com/submitlink?u={{ .Permalink }}&description={{ .Title }}" target="_blank" title="{{ T "share" }} Hacker News">
|
||||
<i class="fab fa-y-combinator fa-fw"></i>
|
||||
{{- partial "function/icon.html" (dict "class" "fab fa-hacker-news fa-fw") -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Mix */ -}}
|
||||
{{- /* 007: Mix */ -}}
|
||||
{{- if .Params.Share.Mix | default .Site.Params.Share.Mix | eq true -}}
|
||||
<a href="//mix.com/add?url={{ .Permalink }}&description={{ .Title }}" target="_blank" title="{{ T "share" }} Mix">
|
||||
<i class="fab fa-mix fa-fw"></i>
|
||||
{{- partial "function/icon.html" (dict "class" "fab fa-mix fa-fw") -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Tumblr */ -}}
|
||||
{{- /* 008: Tumblr */ -}}
|
||||
{{- if .Params.Share.Tumblr | default .Site.Params.Share.Tumblr | eq true -}}
|
||||
<a href="//www.tumblr.com/widgets/share/tool?canonicalUrl={{ .Permalink }}&title={{ .Title }}" target="_blank" title="{{ T "share" }} Tumblr">
|
||||
<i class="fab fa-tumblr fa-fw"></i>
|
||||
{{- partial "function/icon.html" (dict "class" "fab fa-tumblr fa-fw") -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on VKontakte */ -}}
|
||||
{{- /* 009: VKontakte */ -}}
|
||||
{{- if .Params.Share.VKontakte | default .Site.Params.Share.VKontakte | eq true -}}
|
||||
<a href="//vk.com/share.php?url={{ .Permalink }}&title={{ .Title }}" target="_blank" title="{{ T "share" }} VKontakte ">
|
||||
<i class="fab fa-vk fa-fw"></i>
|
||||
{{- partial "function/icon.html" (dict "class" "fab fa-vk fa-fw") -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Share on Weibo */ -}}
|
||||
{{- /* 010: 微博 */ -}}
|
||||
{{- if .Params.Share.Weibo | default .Site.Params.Share.Weibo | eq true -}}
|
||||
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&appkey=&title={{ .Title }}{{ with $.Params.featuredImage }}&pic={{ . }}{{- end -}}" target="_blank" title="{{ T "share" }} Weibo">
|
||||
<i class="fab fa-weibo fa-fw"></i>
|
||||
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&appkey=&title={{ .Title }}{{ with $.Params.featuredImage }}&pic={{ . }}{{- end -}}" target="_blank" title="{{ T "share" }} 微博">
|
||||
{{- partial "function/icon.html" (dict "class" "fab fa-weibo fa-fw") -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{{- $CDN := .Scratch.Get "CDN" -}}
|
||||
|
||||
{{- /* Google analytics async */ -}}
|
||||
{{- if .Scratch.Get "production" | and .Site.GoogleAnalytics -}}
|
||||
{{- template "_internal/google_analytics_async.html" . -}}
|
||||
{{- /* Fork Awesome https://forkaweso.me/ */ -}}
|
||||
{{- if .Scratch.Get "forkawesome" -}}
|
||||
{{- slice "css/lib/forkawesome/fork-awesome.scss" | .Scratch.Add "linkLocal" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* lazysizes https://github.com/aFarkas/lazysizes */ -}}
|
||||
|
@ -178,3 +178,8 @@
|
|||
|
||||
{{- /* Theme script */ -}}
|
||||
<script src=/js/theme.min.js></script>
|
||||
|
||||
{{- /* Google analytics async */ -}}
|
||||
{{- if .Scratch.Get "production" | and .Site.GoogleAnalytics -}}
|
||||
{{- template "_internal/google_analytics_async.html" . -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
{{- /* Featured image */ -}}
|
||||
{{- with .Params.featuredImage -}}
|
||||
<div class="featured-image">
|
||||
{{- partial "hook/image" . -}}
|
||||
{{- partial "function/image.html" (dict "src" . "alt" "featured image") -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
|||
|
||||
{{- /* Content */ -}}
|
||||
<div class="content">
|
||||
{{- partial "hook/content.html" .Content | safeHTML -}}
|
||||
{{- partial "function/content.html" .Content -}}
|
||||
</div>
|
||||
|
||||
{{- /* Footer */ -}}
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
<!-- shuffle md5 as id -->
|
||||
{{- $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "echarts-%s" -}}
|
||||
{{- $echartsMap := .Page.Scratch.Get "echartsMap" -}}
|
||||
{{- if $echartsMap -}}
|
||||
{{ $echartsMap = .Inner | printf "{%s}" | dict $id | merge $echartsMap -}}
|
||||
{{- else -}}
|
||||
{{ $echartsMap = .Inner | printf "{%s}" | dict $id -}}
|
||||
{{- end -}}
|
||||
{{- .Page.Scratch.Set "echartsMap" $echartsMap -}}
|
||||
<div class="echarts" id="{{ $id }}"></div>
|
||||
{{- .Page.Scratch.SetInMap "echartsMap" $id (printf "{%s}" .Inner) -}}
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
<!-- shuffle md5 as id -->
|
||||
{{- $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "mermaid-%s" -}}
|
||||
{{- $mermaidMap := .Page.Scratch.Get "mermaidMap" -}}
|
||||
{{- if $mermaidMap -}}
|
||||
{{- $mermaidMap = trim .Inner "\n" | dict $id | merge $mermaidMap -}}
|
||||
{{- else -}}
|
||||
{{- $mermaidMap = trim .Inner "\n" | dict $id -}}
|
||||
{{- end -}}
|
||||
{{- .Page.Scratch.Set "mermaidMap" $mermaidMap -}}
|
||||
<div class="mermaid" id="{{ $id }}"></div>
|
||||
{{- .Page.Scratch.SetInMap "mermaidMap" $id (trim .Inner "\n") -}}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{{- .Page.Scratch.Set "music" "true" -}}
|
||||
{{- if .IsNamedParams -}}
|
||||
<meting-js server="{{ .Get "server" }}" type="{{ .Get "type" }}" id="{{ .Get "id" }}" theme="#A9A9B3"
|
||||
{{- with .Get "autoplay" }} autoplay="{{ . }}"{{ end -}}
|
||||
|
@ -10,3 +9,4 @@
|
|||
{{- else -}}
|
||||
<meting-js server="{{ .Get 0 }}" type="{{ .Get 1 }}" id="{{ .Get 2 }}" theme="#A9A9B3"></meting-js>
|
||||
{{- end -}}
|
||||
{{- .Page.Scratch.Set "music" true -}}
|
||||
|
|
|
@ -34,23 +34,8 @@
|
|||
{{- printf "<%s id=%s></%s>" $tag $id $tag | safeHTML -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $typeitMap := .Page.Scratch.Get "typeitMap" -}}
|
||||
{{- $group := slice $id -}}
|
||||
{{- with .Get "group" -}}
|
||||
{{- if $typeitMap -}}
|
||||
{{- if index $typeitMap . -}}
|
||||
{{- $group = index $typeitMap . | append $id -}}
|
||||
{{- end -}}
|
||||
{{- $typeitMap = dict . $group | merge $typeitMap -}}
|
||||
{{- else -}}
|
||||
{{- $typeitMap = dict . $group -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if $typeitMap -}}
|
||||
{{- $typeitMap = dict $id $group | merge $typeitMap -}}
|
||||
{{- else -}}
|
||||
{{- $typeitMap = dict $id $group -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- .Page.Scratch.Set "typeitMap" $typeitMap -}}
|
||||
{{- $key := .Get "group" | default $id -}}
|
||||
{{- $group := index (.Page.Scratch.Get "typeitMap" | default dict) $key -}}
|
||||
{{- $group = $group | default slice | append $id -}}
|
||||
{{- .Page.Scratch.SetInMap "typeitMap" $key $group -}}
|
||||
</div>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
{"Target":"css/lib/forkawesome/fork-awesome.min.css","MediaType":"text/css","Data":{}}
|
Loading…
Reference in a new issue