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/
|
public/
|
||||||
.hugo_build.lock
|
.hugo_build.lock
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
|||||||
14
config.toml
14
config.toml
@@ -42,6 +42,7 @@ enableRobotsTXT = true
|
|||||||
mastodon = "social.v.b4tman.ru/@b4tman"
|
mastodon = "social.v.b4tman.ru/@b4tman"
|
||||||
# bitbucket = "b4tman"
|
# bitbucket = "b4tman"
|
||||||
vk = "0xffff"
|
vk = "0xffff"
|
||||||
|
boosty="0xffff"
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Блог"
|
name = "Блог"
|
||||||
@@ -72,3 +73,16 @@ enableRobotsTXT = true
|
|||||||
# name = "теги"
|
# name = "теги"
|
||||||
# url = "tags"
|
# url = "tags"
|
||||||
# weight = 3
|
# 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 -}}
|
{{- $pages = $pages | first $limit -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
{{- 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>
|
<channel>
|
||||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
|
<guid>{{ .Permalink }}</guid>
|
||||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
<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 }}
|
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||||
<language>{{.}}</language>{{end}}{{ with .Site.Params.author.email }}
|
<language>{{.}}</language>{{end}}{{ with .Site.Params.author.email }}
|
||||||
@@ -30,6 +31,7 @@
|
|||||||
<item turbo="true">
|
<item turbo="true">
|
||||||
<title>{{ .Title }}</title>
|
<title>{{ .Title }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
|
<category>native-yes</category>
|
||||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
<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}}
|
{{ with .Site.Params.author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||||
<guid>{{ .Permalink }}</guid>
|
<guid>{{ .Permalink }}</guid>
|
||||||
@@ -42,6 +44,11 @@
|
|||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
{{- printf "]]>" | safeHTML }}
|
{{- printf "]]>" | safeHTML }}
|
||||||
</turbo:content>
|
</turbo:content>
|
||||||
|
<content:encoded>
|
||||||
|
{{- printf "<![CDATA[" | safeHTML }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{- printf "]]>" | safeHTML }}
|
||||||
|
</content:encoded>
|
||||||
</item>
|
</item>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</channel>
|
</channel>
|
||||||
|
|||||||
@@ -8,7 +8,11 @@
|
|||||||
{{ if .Params.tags }}
|
{{ if .Params.tags }}
|
||||||
<div class="blog-tags">
|
<div class="blog-tags">
|
||||||
{{ range .Params.tags }}
|
{{ range .Params.tags }}
|
||||||
|
<!-- 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="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>
|
||||||
|
-->
|
||||||
|
<a href="{{"tags" | absLangURL}}/{{ . | urlize }}/">{{ . }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -60,21 +64,6 @@
|
|||||||
{{ partial "remark42.html" . }}
|
{{ partial "remark42.html" . }}
|
||||||
{{ if .Site.Config.Services.Disqus.Shortname }}
|
{{ if .Site.Config.Services.Disqus.Shortname }}
|
||||||
{{ if .Site.Params.delayDisqus }}
|
{{ 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 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .Site.Params.staticman }}
|
{{ 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
@@ -61,15 +61,15 @@
|
|||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{- if .Site.Params.selfHosted -}}
|
{{- if .Site.Params.selfHosted -}}
|
||||||
<script src="{{ "js/katex.min.js" | absURL }}"></script>
|
<script defer src="{{ "js/katex.min.js" | absURL }}"></script>
|
||||||
<script src="{{ "js/auto-render.min.js" | absURL }}"></script>
|
<script defer src="{{ "js/auto-render.min.js" | absURL }}" onload="renderMathInElement(document.body);"></script>
|
||||||
<script src="{{ "js/jquery.min.js" | absURL }}"></script>
|
<script src="{{ "js/jquery-3.7.0.slim.min.js" | absURL }}"></script>
|
||||||
<script src="{{ "js/bootstrap.min.js" | absURL }}"></script>
|
<script src="{{ "js/bootstrap.min.js" | absURL }}"></script>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.js" integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx" crossorigin="anonymous"></script>
|
<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 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 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-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></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://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" 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 }}
|
{{- end }}
|
||||||
|
|
||||||
<script src="{{ "js/main.js" | absURL }}"></script>
|
<script src="{{ "js/main.js" | absURL }}"></script>
|
||||||
@@ -81,7 +81,6 @@
|
|||||||
<script> hljs.initHighlightingOnLoad(); </script>
|
<script> hljs.initHighlightingOnLoad(); </script>
|
||||||
<script> $(document).ready(function() {$("pre.chroma").css("padding","0");}); </script>
|
<script> $(document).ready(function() {$("pre.chroma").css("padding","0");}); </script>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<script> renderMathInElement(document.body); </script>
|
|
||||||
|
|
||||||
{{- if .Site.Params.selfHosted -}}
|
{{- if .Site.Params.selfHosted -}}
|
||||||
<script src="{{ "js/photoswipe.min.js" | absURL }}"></script>
|
<script src="{{ "js/photoswipe.min.js" | absURL }}"></script>
|
||||||
@@ -131,27 +130,6 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if and .Site.Params.delayDisqus .Site.Config.Services.Disqus.Shortname }}
|
{{ 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 }}
|
{{ end }}
|
||||||
|
|
||||||
{{- partial "footer_custom.html" . }}
|
{{- partial "footer_custom.html" . }}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
|
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
|
||||||
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
|
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ if (i18n .Title) }}{{ $.Scratch.Set "title" (i18n .Title) }}{{ else }}{{ $.Scratch.Set "title" .Title }}{{ end }}
|
{{ $.Scratch.Set "title" .Title }}
|
||||||
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
|
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
|
||||||
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
|
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -28,7 +28,8 @@
|
|||||||
|
|
||||||
<header class="header-section {{ if $bigimg }}has-img{{ end }}">
|
<header class="header-section {{ if $bigimg }}has-img{{ end }}">
|
||||||
{{ if $bigimg }}
|
{{ if $bigimg }}
|
||||||
<div class="intro-header big-img">
|
{{ $firstimg := index $bigimg 0 }}
|
||||||
|
<div class="intro-header big-img" style="background-image: url('{{$firstimg.src}}');">
|
||||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -50,9 +51,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="img-desc" style="display: inline;"></span>
|
<span class="img-desc" style="display: {{ cond (isset $firstimg "desc") "inline" "none"}};">{{$firstimg.desc}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{ if $title }}
|
||||||
<div class="intro-header no-img">
|
<div class="intro-header no-img">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -81,6 +83,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
</header>
|
</header>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="intro-header"></div>
|
<div class="intro-header"></div>
|
||||||
|
|||||||
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