Compare commits
13 Commits
487ed729f2
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
df321ebc60
|
|||
|
1b4c4e4470
|
|||
|
74a333879d
|
|||
| 7958f33a9e | |||
|
64ab52571b
|
|||
|
86a584e465
|
|||
|
c4088cb74a
|
|||
|
579305158a
|
|||
|
124b8eb400
|
|||
|
b31f4b09f8
|
|||
|
621b6b68c0
|
|||
|
ecaf0a185a
|
|||
|
428ff47b7e
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
public/
|
||||
.hugo_build.lock
|
||||
.vscode/
|
||||
|
||||
|
||||
14
config.toml
14
config.toml
@@ -42,6 +42,7 @@ enableRobotsTXT = true
|
||||
mastodon = "social.v.b4tman.ru/@b4tman"
|
||||
# bitbucket = "b4tman"
|
||||
vk = "0xffff"
|
||||
boosty="0xffff"
|
||||
|
||||
[[menu.main]]
|
||||
name = "Блог"
|
||||
@@ -72,3 +73,16 @@ enableRobotsTXT = true
|
||||
# name = "теги"
|
||||
# url = "tags"
|
||||
# weight = 3
|
||||
|
||||
[security]
|
||||
enableInlineShortcodes = false
|
||||
[security.exec]
|
||||
allow = ['^dart-sass-embedded$', '^go$', '^git$', '^npx$', '^postcss$', '^pandoc$', '^nvim$']
|
||||
osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$']
|
||||
|
||||
[security.funcs]
|
||||
getenv = ['^HUGO_']
|
||||
|
||||
[security.http]
|
||||
methods = ['(?i)GET|POST']
|
||||
urls = ['.*']
|
||||
|
||||
17
content/post/2024-10-07-sponsor.md
Normal file
17
content/post/2024-10-07-sponsor.md
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: Ссылки для спонсоров
|
||||
date: 2024-10-07T19:53:29+03:00
|
||||
tags: [sponsor,donation,бусти,донаты,поддержка,спонсор]
|
||||
---
|
||||
|
||||
Добавил ссылки для тех, кто вдруг захочет поддержать меня.
|
||||
|
||||
<!--more-->
|
||||
|
||||
Поддержать меня можно тут:
|
||||
|
||||
- [Подписка на Бусти](https://boosty.to/0xffff)
|
||||
- [DonationAlerts (DALINK)](https://dalink.to/b4tman1)
|
||||
- [Канал на VK Video Live](https://live.vkvideo.ru/0xffff)
|
||||
- [Канал на Дзене](https://dzen.ru/0xffff)
|
||||
|
||||
70
content/post/2024-10-10-minica.md
Normal file
70
content/post/2024-10-10-minica.md
Normal file
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: "minica - программа для создания сертификатов ssl"
|
||||
author: "Dmitry Belyaev"
|
||||
date: 2024-10-10T16:45:26+03:00
|
||||
tags: [minica,pkcs12,https,iis,apache,nginx,openssl,1C,1C Link]
|
||||
---
|
||||
|
||||
Описал как создавать и использовать сертификаты для веб публикаций 1С.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Введение
|
||||
|
||||
Для автоматического обновления тонких клиентов через веб-публикацию, включая **1C Link**, необходимо использовать либо протокол **http**, что не является безопасным, либо **https** с корректным сертификатом, так как самоподписанный сертификат больше не подходит.
|
||||
|
||||
## Создание сертификатов
|
||||
|
||||
Для решения этой задачи можно воспользоваться программой **minica**, доступной по следующей ссылке:
|
||||
https://github.com/jsha/minica
|
||||
|
||||
Например:
|
||||
|
||||
~~~bash
|
||||
minica -ca-cert company-ca.pem -ca-key company-ca-key.pem -domains *.company.local,mysrv,anothername,localhost -ip-addresses 127.0.0.1,192.168.1.21
|
||||
~~~
|
||||
|
||||
Получим файлы CA:
|
||||
|
||||
- `company-ca.pem` — корневой сертификат, можно переименовать в `.crt` и установить на клиентах и на сервере
|
||||
|
||||
- `company-ca-key.pem` — ключ коренного сертификата (не нужен)
|
||||
|
||||
и папку `_.company.local` с файлами:
|
||||
- `cert.pem` — можно переименовать в `.crt` и установить на сервер
|
||||
- `key.pem` — ключ сертификата
|
||||
|
||||
Но это файлы в формате `pem` (для закрытого ключа), который подходит для **apache** и **nginx**, но не подойдёт для **IIS**.
|
||||
|
||||
## Конвертация для IIS
|
||||
|
||||
Для использования с **IIS** нужно сконвертировать файлы сертификатов.
|
||||
Это можно сделать с помощью `openssl`:
|
||||
|
||||
~~~bash
|
||||
openssl pkcs12 -export -out cert.pfx -inkey .\key.pem -in .\cert.pem -certfile .\cert.pem
|
||||
~~~
|
||||
|
||||
В итоге получится файл `cert.pfx`, который можно импортировать в хранилище сертификатов Windows и использовать в **IIS**.
|
||||
|
||||
## Установка на клиентах
|
||||
|
||||
Сертификаты CA нужно установить на клиентах в "Доверенные корневые центры сертификации".
|
||||
|
||||
На Windows можно установить так:
|
||||
|
||||
~~~bat
|
||||
certutil -addstore "Root" 1C-Link-CA.crt
|
||||
~~~
|
||||
|
||||
## Сертификаты 1С Линк
|
||||
|
||||
Сейчасм можно скачать тут:
|
||||
https://d.1c.link/1C-Link-CA.crt
|
||||
|
||||
Но путь могут изменить, лучше посмотреть в документации.
|
||||
|
||||
## Заключение
|
||||
|
||||
Исползование корневых сертификатов созданных с помощью **minica** позволяет пользоваться автоматическим обновлением тонких клиентов, при этом не жертвуя безопасностью.
|
||||
|
||||
216
data/beautifulhugo/social.toml
Normal file
216
data/beautifulhugo/social.toml
Normal file
@@ -0,0 +1,216 @@
|
||||
[[social_icons]]
|
||||
id = "email"
|
||||
url = "mailto:%s"
|
||||
title = "Email me"
|
||||
icon = "fas fa-envelope"
|
||||
|
||||
[[social_icons]]
|
||||
id = "boosty"
|
||||
url = "https://boosty.to/%s"
|
||||
title = "Boosty"
|
||||
icon = "fa fa-bolt"
|
||||
|
||||
[[social_icons]]
|
||||
id = "github"
|
||||
url = "https://github.com/%s"
|
||||
title = "GitHub"
|
||||
icon = "fab fa-github"
|
||||
|
||||
[[social_icons]]
|
||||
id = "gitlab"
|
||||
url = "https://gitlab.com/%s"
|
||||
title = "GitLab"
|
||||
icon = "fab fa-gitlab"
|
||||
|
||||
[[social_icons]]
|
||||
id = "bitbucket"
|
||||
url = "https://bitbucket.org/%s"
|
||||
title = "Bitbucket"
|
||||
icon = "fab fa-bitbucket"
|
||||
|
||||
[[social_icons]]
|
||||
id = "twitter"
|
||||
url = "https://twitter.com/%s"
|
||||
title = "Twitter"
|
||||
icon = "fab fa-twitter"
|
||||
|
||||
[[social_icons]]
|
||||
id = "slack"
|
||||
url = "https://%s.slack.com/"
|
||||
title = "Slack"
|
||||
icon = "fab fa-slack"
|
||||
|
||||
[[social_icons]]
|
||||
id = "reddit"
|
||||
url = "https://reddit.com/u/%s"
|
||||
title = "Reddit"
|
||||
icon = "fab fa-reddit-alien"
|
||||
|
||||
[[social_icons]]
|
||||
id = "linkedin"
|
||||
url = "https://linkedin.com/in/%s"
|
||||
title = "LinkedIn"
|
||||
icon = "fab fa-linkedin"
|
||||
|
||||
[[social_icons]]
|
||||
id = "xing"
|
||||
url = "https://www.xing.com/profile/%s"
|
||||
title = "Xing"
|
||||
icon = "fab fa-xing"
|
||||
|
||||
[[social_icons]]
|
||||
id = "stackoverflow"
|
||||
url = "https://stackoverflow.com/%s"
|
||||
title = "StackOverflow"
|
||||
icon = "fab fa-stack-overflow"
|
||||
|
||||
[[social_icons]]
|
||||
id = "snapchat"
|
||||
url = "https://www.snapchat.com/add/%s"
|
||||
title = "Snapchat"
|
||||
icon = "fab fa-snapchat-ghost"
|
||||
|
||||
[[social_icons]]
|
||||
id = "instagram"
|
||||
url = "https://www.instagram.com/%s"
|
||||
title = "Instagram"
|
||||
icon = "fab fa-instagram"
|
||||
|
||||
[[social_icons]]
|
||||
id = "youtube"
|
||||
url = "https://www.youtube.com/%s"
|
||||
title = "Youtube"
|
||||
icon = "fab fa-youtube"
|
||||
|
||||
[[social_icons]]
|
||||
id = "soundcloud"
|
||||
url = "https://soundcloud.com/%s"
|
||||
title = "SoundCloud"
|
||||
icon = "fab fa-soundcloud"
|
||||
|
||||
[[social_icons]]
|
||||
id = "spotify"
|
||||
url = "https://open.spotify.com/user/%s"
|
||||
title = "Spotify"
|
||||
icon = "fab fa-spotify"
|
||||
|
||||
[[social_icons]]
|
||||
id = "bandcamp"
|
||||
url = "https://%s.bandcamp.com/"
|
||||
title = "Bandcamp"
|
||||
icon = "fab fa-bandcamp"
|
||||
|
||||
[[social_icons]]
|
||||
id = "itchio"
|
||||
url = "https://itch.io/profile/%s"
|
||||
title = "Itch.io"
|
||||
icon = "fas fa-gamepad"
|
||||
|
||||
[[social_icons]]
|
||||
id = "keybase"
|
||||
url = "https://keybase.io/%s"
|
||||
title = "Keybase"
|
||||
icon = "fab fa-keybase"
|
||||
|
||||
[[social_icons]]
|
||||
id = "vk"
|
||||
url = "https://vk.com/%s"
|
||||
title = "VK"
|
||||
icon = "fab fa-vk"
|
||||
|
||||
[[social_icons]]
|
||||
id = "paypal"
|
||||
url = "https://paypal.me/%s"
|
||||
title = "PayPal"
|
||||
icon = "fab fa-paypal"
|
||||
|
||||
[[social_icons]]
|
||||
id = "telegram"
|
||||
url = "https://telegram.me/%s"
|
||||
title = "Telegram"
|
||||
icon = "fab fa-telegram"
|
||||
|
||||
[[social_icons]]
|
||||
id = "500px"
|
||||
url = "https://500px.com/%s"
|
||||
title = "500px"
|
||||
icon = "fab fa-500px"
|
||||
|
||||
[[social_icons]]
|
||||
id = "codepen"
|
||||
url = "https://codepen.io/%s"
|
||||
title = "CodePen"
|
||||
icon = "fab fa-codepen"
|
||||
|
||||
[[social_icons]]
|
||||
id = "kaggle"
|
||||
url = "https://www.kaggle.com/%s"
|
||||
title = "kaggle"
|
||||
icon = "fab fa-kaggle"
|
||||
|
||||
[[social_icons]]
|
||||
id = "mastodon"
|
||||
url = "https://%s"
|
||||
title = "Mastodon"
|
||||
icon = "fab fa-mastodon"
|
||||
rel = "me"
|
||||
|
||||
[[social_icons]]
|
||||
id = "weibo"
|
||||
url = "https://weibo.com/%s"
|
||||
title = "Weibo"
|
||||
icon = "fab fa-weibo"
|
||||
|
||||
[[social_icons]]
|
||||
id = "medium"
|
||||
url = "https://medium.com/@%s"
|
||||
title = "Medium"
|
||||
icon = "fab fa-medium"
|
||||
|
||||
[[social_icons]]
|
||||
id = "discord"
|
||||
url = "https://discord.gg/%s"
|
||||
title = "Discord"
|
||||
icon = "fab fa-discord"
|
||||
|
||||
[[social_icons]]
|
||||
id = "strava"
|
||||
url = "https://www.strava.com/athletes/%s"
|
||||
title = "Strava"
|
||||
icon = "fab fa-strava"
|
||||
|
||||
[[social_icons]]
|
||||
id = "steam"
|
||||
url = "https://steamcommunity.com/id/%s"
|
||||
title = "Steam"
|
||||
icon = "fab fa-steam"
|
||||
|
||||
[[social_icons]]
|
||||
id = "quora"
|
||||
url = "https://www.quora.com/profile/%s"
|
||||
title = "Quora"
|
||||
icon = "fab fa-quora"
|
||||
|
||||
[[social_icons]]
|
||||
id = "amazonwishlist"
|
||||
url = "https://amzn.com/w/%s"
|
||||
title = "Amazon Wishlist"
|
||||
icon = "fab fa-amazon"
|
||||
|
||||
[[social_icons]]
|
||||
id = "slideshare"
|
||||
url = "https://www.slideshare.net/%s"
|
||||
title = "Slideshare"
|
||||
icon = "fab fa-slideshare"
|
||||
|
||||
[[social_icons]]
|
||||
id = "angellist"
|
||||
url = "https://www.angel.co/p/%s"
|
||||
title = "AngelList"
|
||||
icon = "fab fa-angellist"
|
||||
|
||||
[[social_icons]]
|
||||
id = "about"
|
||||
url = "%s"
|
||||
title = "About"
|
||||
icon = "fas fa-at"
|
||||
@@ -11,10 +11,11 @@
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:yandex="http://news.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/" xmlns:turbo="http://turbo.yandex.ru" >
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:yandex="http://news.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/" xmlns:turbo="http://turbo.yandex.ru" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:georss="http://www.georss.org/georss" >
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Params.author.email }}
|
||||
@@ -30,6 +31,7 @@
|
||||
<item turbo="true">
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<category>native-yes</category>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Params.author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
@@ -41,8 +43,13 @@
|
||||
<header><h1>{{ .Title }}</h1></header>
|
||||
{{ .Content }}
|
||||
{{- printf "]]>" | safeHTML }}
|
||||
</turbo:content>
|
||||
</turbo:content>
|
||||
<content:encoded>
|
||||
{{- printf "<![CDATA[" | safeHTML }}
|
||||
{{ .Content }}
|
||||
{{- printf "]]>" | safeHTML }}
|
||||
</content:encoded>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
||||
</rss>
|
||||
|
||||
@@ -8,51 +8,55 @@
|
||||
{{ if .Params.tags }}
|
||||
<div class="blog-tags">
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>
|
||||
<!-- Fix for "https://github.com/halogenica/beautifulhugo/issues/349".
|
||||
Inspired by "https://github.com/dovidio/personalwebsite/commit/34762e94c29fd2c26c16c45f8ae2de21bdf9b46d".
|
||||
<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>
|
||||
-->
|
||||
<a href="{{"tags" | absLangURL}}/{{ . | urlize }}/">{{ . }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if $.Param "socialShare" }}
|
||||
<hr/>
|
||||
<section id="social-share">
|
||||
<div class="list-inline footer-links">
|
||||
{{ partial "share-links" . }}
|
||||
</div>
|
||||
</section>
|
||||
{{ if $.Param "socialShare" }}
|
||||
<hr/>
|
||||
<section id="social-share">
|
||||
<div class="list-inline footer-links">
|
||||
{{ partial "share-links" . }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.showRelatedPosts }}
|
||||
{{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
||||
{{ $.Scratch.Set "has_related" true }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $.Scratch.Get "has_related" }}
|
||||
<h4 class="see-also">{{ i18n "seeAlso" }}</h4>
|
||||
<ul>
|
||||
{{ $num_to_show := .Site.Params.related_content_limit | default 5 }}
|
||||
{{ range first $num_to_show (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ end }}
|
||||
{{ if .Site.Params.showRelatedPosts }}
|
||||
{{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
||||
{{ $.Scratch.Set "has_related" true }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $.Scratch.Get "has_related" }}
|
||||
<h4 class="see-also">{{ i18n "seeAlso" }}</h4>
|
||||
<ul>
|
||||
{{ $num_to_show := .Site.Params.related_content_limit | default 5 }}
|
||||
{{ range first $num_to_show (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</article>
|
||||
|
||||
{{ if ne .Type "page" }}
|
||||
<ul class="pager blog-pager">
|
||||
{{ if .PrevInSection }}
|
||||
<li class="previous">
|
||||
<a href="{{ .PrevInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">← {{ i18n "previousPost" }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if .NextInSection }}
|
||||
<li class="next">
|
||||
<a href="{{ .NextInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title }}">{{ i18n "nextPost" }} →</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ if ne .Type "page" }}
|
||||
<ul class="pager blog-pager">
|
||||
{{ if .PrevInSection }}
|
||||
<li class="previous">
|
||||
<a href="{{ .PrevInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">← {{ i18n "previousPost" }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if .NextInSection }}
|
||||
<li class="next">
|
||||
<a href="{{ .NextInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title }}">{{ i18n "nextPost" }} →</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -60,21 +64,6 @@
|
||||
{{ partial "remark42.html" . }}
|
||||
{{ if .Site.Config.Services.Disqus.Shortname }}
|
||||
{{ if .Site.Params.delayDisqus }}
|
||||
<div class="disqus-comments">
|
||||
<button id="show-comments" class="btn btn-default" type="button">{{ i18n "show" }} <span class="disqus-comment-count" data-disqus-url="{{ trim .Permalink "/" }}">{{ i18n "comments" }}</span></button>
|
||||
<div id="disqus_thread"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var disqus_config = function () {
|
||||
this.page.url = '{{ trim .Permalink "/" }}';
|
||||
};
|
||||
|
||||
</script>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="disqus-comments">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.staticman }}
|
||||
|
||||
0
layouts/_internal/disqus.html
Normal file
0
layouts/_internal/disqus.html
Normal file
0
layouts/_internal/google_analytics_async.html
Normal file
0
layouts/_internal/google_analytics_async.html
Normal file
@@ -3,16 +3,16 @@
|
||||
{{ end }}
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<ul class="list-inline text-center footer-links">
|
||||
{{ range .Site.Data.beautifulhugo.social.social_icons }}
|
||||
{{- if isset $.Site.Params.author .id }}
|
||||
<li>
|
||||
<a {{ if eq .id "mastodon" }}rel="me"{{ end }} href="{{ printf .url (index $.Site.Params.author .id) }}" title="{{ .title }}">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="{{ .icon }} fa-stack-1x fa-inverse"></i>
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="{{ .icon }} fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
@@ -29,129 +29,107 @@
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<p class="credits copyright text-muted">
|
||||
{{ if .Site.Params.author.name }}
|
||||
{{ if .Site.Params.author.website }}
|
||||
<a href="{{ .Site.Params.author.website }}">{{ .Site.Params.author.name }}</a>
|
||||
{{ else }}
|
||||
{{ .Site.Params.author.name }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
• ©
|
||||
{{ if .Site.Params.since }}
|
||||
{{ .Site.Params.since }} - {{ .Site.Lastmod.Format "2006" }}
|
||||
{{ else }}
|
||||
{{ .Site.Lastmod.Format "2006" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Title }}
|
||||
•
|
||||
<a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a>
|
||||
{{ end }}
|
||||
<p class="credits copyright text-muted">
|
||||
{{ if .Site.Params.author.name }}
|
||||
{{ if .Site.Params.author.website }}
|
||||
<a href="{{ .Site.Params.author.website }}">{{ .Site.Params.author.name }}</a>
|
||||
{{ else }}
|
||||
{{ .Site.Params.author.name }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
• ©
|
||||
{{ if .Site.Params.since }}
|
||||
{{ .Site.Params.since }} - {{ .Site.Lastmod.Format "2006" }}
|
||||
{{ else }}
|
||||
{{ .Site.Lastmod.Format "2006" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Title }}
|
||||
•
|
||||
<a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
<!-- Please don't remove this, keep my open source work credited :) -->
|
||||
<p class="credits theme-by text-muted">
|
||||
{{ i18n "poweredBy" . | safeHTML }}
|
||||
{{ if $.GitInfo }} • [<a href="{{ .Site.Params.commit }}{{ .GitInfo.Hash }}">{{ substr .GitInfo.Hash 0 8 }}</a>]{{ end }}
|
||||
<!-- Please don't remove this, keep my open source work credited :) -->
|
||||
<p class="credits theme-by text-muted">
|
||||
{{ i18n "poweredBy" . | safeHTML }}
|
||||
{{ if $.GitInfo }} • [<a href="{{ .Site.Params.commit }}{{ .GitInfo.Hash }}">{{ substr .GitInfo.Hash 0 8 }}</a>]{{ end }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{{- if .Site.Params.selfHosted -}}
|
||||
<script src="{{ "js/katex.min.js" | absURL }}"></script>
|
||||
<script src="{{ "js/auto-render.min.js" | absURL }}"></script>
|
||||
<script src="{{ "js/jquery.min.js" | absURL }}"></script>
|
||||
<script src="{{ "js/bootstrap.min.js" | absURL }}"></script>
|
||||
{{- else -}}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.js" integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/contrib/auto-render.min.js" integrity="sha384-kmZOZB5ObwgQnS/DuDg6TScgOiWWBiVt0plIRkZCmE6rDZGrEOQeHM5PcHi+nyqe" crossorigin="anonymous"></script>
|
||||
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
{{- end }}
|
||||
|
||||
<script src="{{ "js/main.js" | absURL }}"></script>
|
||||
{{- if .Site.Params.staticman }}
|
||||
<script src="{{ "js/staticman.js" | absURL }}"></script>
|
||||
{{- end }}
|
||||
{{- if .Site.Params.useHLJS }}
|
||||
<script src="{{ "js/highlight.min.js" | absURL }}"></script>
|
||||
<script> hljs.initHighlightingOnLoad(); </script>
|
||||
<script> $(document).ready(function() {$("pre.chroma").css("padding","0");}); </script>
|
||||
{{- end -}}
|
||||
<script> renderMathInElement(document.body); </script>
|
||||
|
||||
{{- if .Site.Params.selfHosted -}}
|
||||
<script src="{{ "js/photoswipe.min.js" | absURL }}"></script>
|
||||
<script src="{{ "js/photoswipe-ui-default.min.js" | absURL }}"></script>
|
||||
{{- else -}}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe.min.js" integrity="sha384-QELNnmcmU8IR9ZAykt67vGr9/rZJdHbiWi64V88fCPaOohUlHCqUD/unNN0BXSqy" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe-ui-default.min.js" integrity="sha384-m67o7SkQ1ALzKZIFh4CiTA8tmadaujiTa9Vu+nqPSwDOqHrDmxLezTdFln8077+q" crossorigin="anonymous"></script>
|
||||
{{- end -}}
|
||||
<script src="{{ "js/load-photoswipe.js" | absURL }}"></script>
|
||||
|
||||
<!-- Google Custom Search Engine -->
|
||||
{{ if .Site.Params.gcse }}
|
||||
<script>
|
||||
(function() {
|
||||
var cx = '{{ .Site.Params.gcse }}';
|
||||
var gcse = document.createElement('script');
|
||||
gcse.type = 'text/javascript';
|
||||
gcse.async = true;
|
||||
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(gcse, s);
|
||||
})();
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.piwik }}
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
_paq.push(["trackPageView"]);
|
||||
_paq.push(["enableLinkTracking"]);
|
||||
|
||||
(function() {
|
||||
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://{{ .Site.Params.piwik.server }}/";
|
||||
_paq.push(["setTrackerUrl", u+"piwik.php"]);
|
||||
_paq.push(["setSiteId", "{{ .Site.Params.piwik.id }}"]);
|
||||
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
|
||||
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
<!-- Piwik Image Tracker -->
|
||||
<img src="http://{{ .Site.Params.piwik.server }}/piwik.php?idsite={{ .Site.Params.piwik.id }}&rec=1" style="border:0" alt="" />
|
||||
<!-- End Piwik -->
|
||||
</noscript>
|
||||
<!-- End Piwik Code -->
|
||||
{{- if .Site.Params.selfHosted -}}
|
||||
<script defer src="{{ "js/katex.min.js" | absURL }}"></script>
|
||||
<script defer src="{{ "js/auto-render.min.js" | absURL }}" onload="renderMathInElement(document.body);"></script>
|
||||
<script src="{{ "js/jquery-3.7.0.slim.min.js" | absURL }}"></script>
|
||||
<script src="{{ "js/bootstrap.min.js" | absURL }}"></script>
|
||||
{{- else -}}
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/katex.min.js" integrity="sha384-cMkvdD8LoxVzGF/RPUKAcvmm49FQ0oxwDF3BGKtDXcEc+T1b2N+teh/OJfpU0jr6" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/contrib/auto-render.min.js" integrity="sha384-hCXGrW6PitJEwbkoStFjeJxv+fSOOQKOPbJxSfM6G5sWZjAyWhXiTIIAmQqnlLlh" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.7.0.slim.min.js" integrity="sha384-w5y/xIeYixWvfM+A1cEbmHPURnvyqmVg5eVENruEdDjcyRLUSNej7512JQGspFUr" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
|
||||
{{- end }}
|
||||
|
||||
<script src="{{ "js/main.js" | absURL }}"></script>
|
||||
{{- if .Site.Params.staticman }}
|
||||
<script src="{{ "js/staticman.js" | absURL }}"></script>
|
||||
{{- end }}
|
||||
{{- if .Site.Params.useHLJS }}
|
||||
<script src="{{ "js/highlight.min.js" | absURL }}"></script>
|
||||
<script> hljs.initHighlightingOnLoad(); </script>
|
||||
<script> $(document).ready(function() {$("pre.chroma").css("padding","0");}); </script>
|
||||
{{- end -}}
|
||||
|
||||
{{- if .Site.Params.selfHosted -}}
|
||||
<script src="{{ "js/photoswipe.min.js" | absURL }}"></script>
|
||||
<script src="{{ "js/photoswipe-ui-default.min.js" | absURL }}"></script>
|
||||
{{- else -}}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe.min.js" integrity="sha384-QELNnmcmU8IR9ZAykt67vGr9/rZJdHbiWi64V88fCPaOohUlHCqUD/unNN0BXSqy" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe-ui-default.min.js" integrity="sha384-m67o7SkQ1ALzKZIFh4CiTA8tmadaujiTa9Vu+nqPSwDOqHrDmxLezTdFln8077+q" crossorigin="anonymous"></script>
|
||||
{{- end -}}
|
||||
<script src="{{ "js/load-photoswipe.js" | absURL }}"></script>
|
||||
|
||||
<!-- Google Custom Search Engine -->
|
||||
{{ if .Site.Params.gcse }}
|
||||
<script>
|
||||
(function() {
|
||||
var cx = '{{ .Site.Params.gcse }}';
|
||||
var gcse = document.createElement('script');
|
||||
gcse.type = 'text/javascript';
|
||||
gcse.async = true;
|
||||
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(gcse, s);
|
||||
})();
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.piwik }}
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
_paq.push(["trackPageView"]);
|
||||
_paq.push(["enableLinkTracking"]);
|
||||
|
||||
(function() {
|
||||
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://{{ .Site.Params.piwik.server }}/";
|
||||
_paq.push(["setTrackerUrl", u+"piwik.php"]);
|
||||
_paq.push(["setSiteId", "{{ .Site.Params.piwik.id }}"]);
|
||||
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
|
||||
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
<!-- Piwik Image Tracker -->
|
||||
<img src="http://{{ .Site.Params.piwik.server }}/piwik.php?idsite={{ .Site.Params.piwik.id }}&rec=1" style="border:0" alt="" />
|
||||
<!-- End Piwik -->
|
||||
</noscript>
|
||||
<!-- End Piwik Code -->
|
||||
{{ end }}
|
||||
|
||||
{{ if and .Site.Params.delayDisqus .Site.Config.Services.Disqus.Shortname }}
|
||||
<!-- Delayed Disqus -->
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('#show-comments').on('click', function(){
|
||||
var disqus_shortname = '{{ .Site.Config.Services.Disqus.Shortname }}';
|
||||
|
||||
(function() {
|
||||
var disqus = document.createElement('script');
|
||||
disqus.type = 'text/javascript';
|
||||
disqus.async = true;
|
||||
disqus.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(disqus);
|
||||
})();
|
||||
|
||||
$(this).hide();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<script id="dsq-count-scr" src="//{{ .Site.Config.Services.Disqus.Shortname }}.disqus.com/count.js" async></script>
|
||||
<!-- End Delayed Disqus -->
|
||||
{{ end }}
|
||||
|
||||
{{- partial "footer_custom.html" . }}
|
||||
|
||||
@@ -1,87 +1,90 @@
|
||||
{{- partial "load-photoswipe-theme.html" . }}
|
||||
|
||||
{{ if .IsHome }}
|
||||
{{ if .Site.Params.homeTitle }}{{ $.Scratch.Set "title" .Site.Params.homeTitle }}{{ else }}{{ $.Scratch.Set "title" .Site.Title }}{{ end }}
|
||||
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
|
||||
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
|
||||
{{ else }}
|
||||
{{ if (i18n .Title) }}{{ $.Scratch.Set "title" (i18n .Title) }}{{ else }}{{ $.Scratch.Set "title" .Title }}{{ end }}
|
||||
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
|
||||
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
|
||||
{{ end }}
|
||||
{{ $bigimg := $.Scratch.Get "bigimg" }}
|
||||
{{ $title := $.Scratch.Get "title" }}
|
||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||
|
||||
{{ if or $bigimg $title }}
|
||||
{{ if $bigimg }}
|
||||
<div id="header-big-imgs" data-num-img={{len $bigimg}}
|
||||
{{range $i, $img := $bigimg}}
|
||||
{{ if (fileExists $img.src)}}
|
||||
data-img-src-{{add $i 1}}="{{$img.src | absURL }}"
|
||||
{{else}}
|
||||
data-img-src-{{add $i 1}}="{{$img.src}}"
|
||||
{{end}}
|
||||
{{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}
|
||||
{{end}}></div>
|
||||
{{ end }}
|
||||
|
||||
<header class="header-section {{ if $bigimg }}has-img{{ end }}">
|
||||
{{ if $bigimg }}
|
||||
<div class="intro-header big-img">
|
||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="{{ .Type }}-heading">
|
||||
<h1>{{ with $.Scratch.Get "title" }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ if $subtitle }}
|
||||
{{ if eq .Type "page" }}
|
||||
<hr class="small">
|
||||
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||
{{ else }}
|
||||
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="img-desc" style="display: inline;"></span>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="intro-header no-img">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="{{ .Type }}-heading">
|
||||
{{ if eq .Type "list" }}
|
||||
<h1>{{ if .Data.Singular }}#{{ end }}{{ .Title }}</h1>
|
||||
{{ else }}
|
||||
<h1>{{ with $title }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ end }}
|
||||
{{ if ne .Type "post" }}
|
||||
<hr class="small">
|
||||
{{ end }}
|
||||
{{ if $subtitle }}
|
||||
{{ if eq .Type "page" }}
|
||||
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||
{{ else }}
|
||||
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{ else }}
|
||||
<div class="intro-header"></div>
|
||||
{{ end }}
|
||||
{{- partial "load-photoswipe-theme.html" . }}
|
||||
|
||||
{{ if .IsHome }}
|
||||
{{ if .Site.Params.homeTitle }}{{ $.Scratch.Set "title" .Site.Params.homeTitle }}{{ else }}{{ $.Scratch.Set "title" .Site.Title }}{{ end }}
|
||||
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
|
||||
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "title" .Title }}
|
||||
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
|
||||
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
|
||||
{{ end }}
|
||||
{{ $bigimg := $.Scratch.Get "bigimg" }}
|
||||
{{ $title := $.Scratch.Get "title" }}
|
||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||
|
||||
{{ if or $bigimg $title }}
|
||||
{{ if $bigimg }}
|
||||
<div id="header-big-imgs" data-num-img={{len $bigimg}}
|
||||
{{range $i, $img := $bigimg}}
|
||||
{{ if (fileExists $img.src)}}
|
||||
data-img-src-{{add $i 1}}="{{$img.src | absURL }}"
|
||||
{{else}}
|
||||
data-img-src-{{add $i 1}}="{{$img.src}}"
|
||||
{{end}}
|
||||
{{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}
|
||||
{{end}}></div>
|
||||
{{ end }}
|
||||
|
||||
<header class="header-section {{ if $bigimg }}has-img{{ end }}">
|
||||
{{ if $bigimg }}
|
||||
{{ $firstimg := index $bigimg 0 }}
|
||||
<div class="intro-header big-img" style="background-image: url('{{$firstimg.src}}');">
|
||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="{{ .Type }}-heading">
|
||||
<h1>{{ with $.Scratch.Get "title" }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ if $subtitle }}
|
||||
{{ if eq .Type "page" }}
|
||||
<hr class="small">
|
||||
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||
{{ else }}
|
||||
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="img-desc" style="display: {{ cond (isset $firstimg "desc") "inline" "none"}};">{{$firstimg.desc}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
{{ if $title }}
|
||||
<div class="intro-header no-img">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="{{ .Type }}-heading">
|
||||
{{ if eq .Type "list" }}
|
||||
<h1>{{ if .Data.Singular }}#{{ end }}{{ .Title }}</h1>
|
||||
{{ else }}
|
||||
<h1>{{ with $title }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||
{{ end }}
|
||||
{{ if ne .Type "post" }}
|
||||
<hr class="small">
|
||||
{{ end }}
|
||||
{{ if $subtitle }}
|
||||
{{ if eq .Type "page" }}
|
||||
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||
{{ else }}
|
||||
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if eq .Type "post" }}
|
||||
{{ partial "post_meta.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</header>
|
||||
{{ else }}
|
||||
<div class="intro-header"></div>
|
||||
{{ end }}
|
||||
96
layouts/partials/nav.html
Normal file
96
layouts/partials/nav.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<nav class="navbar navbar-default navbar-fixed-top navbar-custom">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navbar">
|
||||
<span class="sr-only">{{ i18n "toggleNavigation" }}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ "" | absLangURL }}">{{ .Site.Title }}</a>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse" id="main-navbar">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ range .Site.Menus.main.ByWeight }}
|
||||
{{ if .HasChildren }}
|
||||
<li class="navlinks-container">
|
||||
<a class="navlinks-parent">{{ .Name }}</a>
|
||||
<div class="navlinks-children">
|
||||
{{ range .Children }}
|
||||
<a href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
<a title="{{ .Name }}" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if hugo.IsMultilingual }}
|
||||
{{ if ge (len .Site.Languages) 3 }}
|
||||
<li class="navlinks-container">
|
||||
<a class="navlinks-parent">{{ i18n "languageSwitcherLabel" }}</a>
|
||||
<div class="navlinks-children">
|
||||
{{ range .Site.Languages }}
|
||||
{{ if not (eq .Lang $.Site.Language.Lang) }}
|
||||
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
{{ range .Site.Languages }}
|
||||
{{ if not (eq .Lang $.Site.Language.Lang) }}
|
||||
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Site.Params "gcse" }}
|
||||
<li>
|
||||
<a href="#modalSearch" data-toggle="modal" data-target="#modalSearch" style="outline: none;">
|
||||
<span class="hidden-sm hidden-md hidden-lg">{{ i18n "gcseLabelShort" }}</span> <span id="searchGlyph" class="glyphicon glyphicon-search"></span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{ if isset .Site.Params "logo" }}
|
||||
<div class="avatar-container">
|
||||
<div class="avatar-img-border">
|
||||
<a title="{{ .Site.Title }}" href="{{ "" | absLangURL }}">
|
||||
<img class="avatar-img" src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Search Modal -->
|
||||
{{ if isset .Site.Params "gcse" }}
|
||||
<div id="modalSearch" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">{{ i18n "gcseLabelLong" . }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<gcse:search></gcse:search>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ i18n "gcseClose" }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
Submodule themes/beautifulhugo updated: fd74af48c3...99ca240e99
Reference in New Issue
Block a user