parent
7d6fbf5c39
commit
0bce445b73
7 changed files with 102 additions and 68 deletions
@ -1,34 +1,41 @@ |
||||
<head {{ with .Site.LanguageCode }}lang="{{ . }}"{{ end }}> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> |
||||
{{- with .Site.Params.description -}} |
||||
<meta name="description" content="{{ . }}"> |
||||
{{- end -}} |
||||
<head> |
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta charset="utf-8"> |
||||
<!-- Above is a short hand for the below line. --> |
||||
<!-- http://htmldog.com/guides/html/intermediate/metatags/ --> |
||||
<!-- <meta http-equiv="content-type" content="text/html; charset=utf-8"> --> |
||||
|
||||
<!-- Enable responsiveness on mobile devices--> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5"> |
||||
{{ with .Site.Params.description }} |
||||
<meta name="description" content="{{ . }}"> |
||||
{{ end }} |
||||
|
||||
{{ .Hugo.Generator }} |
||||
|
||||
<title>{{ if not .IsHome }}{{ .Title }} —{{ end }} {{ .Site.Title }}</title> |
||||
|
||||
<link rel="stylesheet" href="{{ "css/basic.css" | relURL }}" type="text/css" /> |
||||
<link rel="stylesheet" href="{{ "css/alabaster.css" | relURL }}" type="text/css" /> |
||||
{{ with .Site.Params.highlightjs -}} |
||||
{{ with .Site.Params.highlightjs }} |
||||
<link rel="stylesheet" href="{{ . | relURL }}" type="text/css" /> |
||||
{{- end }} |
||||
{{ end }} |
||||
|
||||
{{ range .Site.Params.custom_css -}} |
||||
{{ range .Site.Params.custom_css }} |
||||
<link rel="stylesheet" href="{{ . | relURL }}"> |
||||
{{- end }} |
||||
{{ end }} |
||||
|
||||
{{ range .Site.Params.custom_css_absolute -}} |
||||
{{ range .Site.Params.custom_css_absolute }} |
||||
<link rel="stylesheet" href="{{ . }}"> |
||||
{{- end }} |
||||
{{ end }} |
||||
|
||||
{{ with .Site.Params.favicon -}} |
||||
{{ with .Site.Params.favicon }} |
||||
<link rel="shortcut icon" href="{{ . | relURL }}" type="image/x-icon"/> |
||||
{{- else -}} |
||||
{{ else }} |
||||
<link rel="shortcut icon" href="{{ "favicon.ico" | relURL }}" type="image/x-icon"/> |
||||
{{- end }} |
||||
{{ end }} |
||||
|
||||
{{ with .Params.mathjax -}} |
||||
{{ with .Params.mathjax }} |
||||
{{ partial "mathjax.html" }} |
||||
{{- end }} |
||||
{{ end }} |
||||
</head> |
||||
|
||||
@ -1,32 +1,26 @@ |
||||
{{ if .Site.Params.github_user | and .Site.Params.github_repo -}} |
||||
{{ $path := printf "%s/%s" .Site.Params.github_user .Site.Params.github_repo }} |
||||
{{ if .Site.Params.github_user | and .Site.Params.github_repo }} |
||||
{{ $path := printf "%s/%s" .Site.Params.github_user .Site.Params.github_repo }} |
||||
|
||||
{{ if .Site.Params.sidebar.github_button -}} |
||||
<p> |
||||
<iframe src="https://ghbtns.com/github-btn.html?user={{ .Site.Params.github_user }}&repo={{ .Site.Params.github_repo }}&type=watch&count=true&size=large" |
||||
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe> |
||||
</p> |
||||
{{- end }} |
||||
{{ if .Site.Params.sidebar.github_button }} |
||||
<iframe src="https://ghbtns.com/github-btn.html?user={{ .Site.Params.github_user }}&repo={{ .Site.Params.github_repo }}&type=watch&count=true&size=large" |
||||
style="border: 0; overflow: hidden;" width="200" height="35"></iframe> |
||||
{{ end }} |
||||
|
||||
{{ if .Site.Params.sidebar.travis_button -}} |
||||
{{ if .Site.Params.sidebar.travis_button }} |
||||
<p> |
||||
<a href="https://travis-ci.org/{{ $path }}"> |
||||
<img |
||||
alt="https://secure.travis-ci.org/{{ $path }}.svg?branch=master" |
||||
src="https://secure.travis-ci.org/{{ $path }}.svg?branch=master" |
||||
/> |
||||
</a> |
||||
<a href="https://travis-ci.org/{{ $path }}"> |
||||
<img alt="https://secure.travis-ci.org/{{ $path }}.svg?branch=master" |
||||
src="https://secure.travis-ci.org/{{ $path }}.svg?branch=master" /> |
||||
</a> |
||||
</p> |
||||
{{- end }} |
||||
{{ end }} |
||||
|
||||
{{ if .Site.Params.sidebar.codecov_button -}} |
||||
{{ if .Site.Params.sidebar.codecov_button }} |
||||
<p> |
||||
<a href="https://codecov.io/github/{{ $path }}"> |
||||
<img |
||||
alt="https://codecov.io/github/{{ $path }}/coverage.svg?branch=master" |
||||
src="https://codecov.io/github/{{ $path }}/coverage.svg?branch=master" |
||||
/> |
||||
</a> |
||||
<a href="https://codecov.io/github/{{ $path }}"> |
||||
<img alt="https://codecov.io/github/{{ $path }}/coverage.svg?branch=master" |
||||
src="https://codecov.io/github/{{ $path }}/coverage.svg?branch=master" /> |
||||
</a> |
||||
</p> |
||||
{{- end }} |
||||
{{- end }} |
||||
{{ end }} |
||||
{{ end }} |
||||
|
||||
@ -0,0 +1,33 @@ |
||||
<!-- image --> |
||||
<!-- https://github.com/gohugoio/hugo/issues/4406 --> |
||||
<!-- https://github.com/gohugoio/hugo/issues/4441 --> |
||||
<figure{{ with .Get "class" }} class="{{ . }}"{{ end }}> |
||||
{{ if .Get "link"}}<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>{{ end }} |
||||
<img src="{{ .Get "src" }}" |
||||
alt="{{ if (or (.Get "alt") (.Get "caption")) }} |
||||
{{ with .Get "alt"}} |
||||
{{- . -}} |
||||
{{else}} |
||||
{{- .Get "caption" | markdownify | plainify -}} |
||||
{{ end }} |
||||
{{ else }} |
||||
{{- .Get "src" -}} |
||||
{{ end }}" |
||||
{{- with .Get "width" }}width="{{ . }}" {{ end -}} |
||||
{{- with .Get "height" }}height="{{ . }}" {{ end -}}/> |
||||
{{ if .Get "link"}}</a>{{ end }} |
||||
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} |
||||
<figcaption> |
||||
{{ if isset .Params "title" }} |
||||
<h4>{{ .Get "title" }}</h4> |
||||
{{ end }} |
||||
{{ if (or (.Get "caption") (.Get "attr")) }}<p> |
||||
{{ .Get "caption" | markdownify }} |
||||
{{ with .Get "attrlink"}}<a href="{{ . }}"> {{ end }} |
||||
{{ .Get "attr" | markdownify }} |
||||
{{ if .Get "attrlink"}}</a> {{ end }}</p> |
||||
{{ end }} |
||||
</figcaption> |
||||
{{ end }} |
||||
</figure> |
||||
<!-- image --> |
||||
Loading…
Reference in new issue