update theme

This commit is contained in:
Cyryl Płotnicki 2022-08-21 10:48:00 +01:00
parent 32be1d9190
commit 2a080999b2
35 changed files with 683 additions and 170 deletions

View file

@ -23,14 +23,14 @@ tasks:
- build: |
cd blog
nix-shell --pure --run 'hugo --gc --minify'
- netlify_publish: |
set +xv
cd blog
export NETLIFY_TOKEN=`cat ~/.netlify_token`
nix-shell --pure --keep NETLIFY_TOKEN --run 'netlify-deployer master 7a0944f0-cfd0-424b-8252-ca44fc950350 public'
- package: |
tar -C blog/public -cv . > site.tar
gzip --best site.tar
ls -hal site.tar.gz
- sourcehut_upload: |
acurl -i -f https://pages.sr.ht/publish/cyplo.srht.site -Fcontent=@site.tar.gz
- netlify_publish: |
set +xv
cd blog
export NETLIFY_TOKEN=`cat ~/.netlify_token`
nix-shell --pure --keep NETLIFY_TOKEN --run 'netlify-deployer master 7a0944f0-cfd0-424b-8252-ca44fc950350 public'

View file

@ -1,78 +1,70 @@
{{ if eq .Type "page" }}
{{ partial "page_meta.html" . }}
{{ end }}
{{ if eq .Type "page" }}
{{ partial "page_meta.html" . }}
{{ end }}
<footer>
<div class="container">
<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.Author .id }}
<li>
<a href="{{ printf .url (index $.Site.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>
</a>
</li>
{{- end -}}
{{ end }}
{{ if .Site.Params.rss }}
<li>
<a href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" title="RSS">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fas fa-rss fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
{{ end }}
</ul>
<p class="credits copyright text-muted">
{{ if .Site.Author.name }}
{{ if .Site.Author.website }}
<a href="{{ .Site.Author.website }}">{{ .Site.Author.name }}</a>
{{ else }}
{{ .Site.Author.name }}
{{ end }}
{{ end }}
<div class="container">
<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.Author .id }}
<li>
<a href="{{ printf .url (index $.Site.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>
</a>
</li>
{{- end -}}
{{ end }}
{{ if .Site.Params.rss }}
<li>
<a href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" title="RSS">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fas fa-rss fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
{{ end }}
</ul>
<p class="credits copyright text-muted">
{{ if .Site.Author.name }}
{{ if .Site.Author.website }}
<a href="{{ .Site.Author.website }}">{{ .Site.Author.name }}</a>
{{ else }}
{{ .Site.Author.name }}
{{ end }}
{{ end }}
&nbsp;&bull;&nbsp;&copy;
{{ if .Site.Params.since }}
{{ .Site.Params.since }} - {{ .Site.LastChange.Format "2006" }}
{{ else }}
{{ .Site.LastChange.Format "2006" }}
{{ end }}
&nbsp;&bull;&nbsp;&copy;
{{ if .Site.Params.since }}
{{ .Site.Params.since }} - {{ .Site.LastChange.Format "2006" }}
{{ else }}
{{ .Site.LastChange.Format "2006" }}
{{ end }}
{{ if .Site.Title }}
&nbsp;&bull;&nbsp;
<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">
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> powered &nbsp;&bull;&nbsp; Theme is "peninsula" by me, adapted from <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>, adapted from <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
{{ if $.GitInfo }}&nbsp;&bull;&nbsp;[<a href="{{ .Site.Params.commit }}{{ .GitInfo.Hash }}">{{ substr .GitInfo.Hash 0 8 }}</a>]{{ end }}
</p>
</div>
{{ if .Site.Title }}
&nbsp;&bull;&nbsp;
<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">
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> powered &nbsp;&bull;&nbsp; Theme is "peninsula" by me, adapted from <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>, adapted from <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
{{ if $.GitInfo }}&nbsp;&bull;&nbsp;[<a href="{{ .Site.Params.commit }}{{ .GitInfo.Hash }}">{{ substr .GitInfo.Hash 0 8 }}</a>]{{ end }}
</p>
</div>
</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>
@ -84,13 +76,8 @@
{{- 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>
{{- partial "footer_custom.html" . }}
{{- partial "footer_custom.html" . }}

View file

@ -110,6 +110,8 @@ If you *don't* have the section `[Params.staticman]` in `config.toml`, you *won'
To add Google Analytics, simply sign up to [Google Analytics](https://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `config.toml`.
Note that the Google Analytics tracking code will only be inserted into the page when the site isn't served on Hugo's built-in server, to prevent tracking from local testing environments.
### Commit SHA on the footer
If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two site parameters `commit` has to be defined in the config file `config.toml`:
@ -158,9 +160,9 @@ There are two extra shortcodes provided (along with the customized figure shortc
This simply adds the html5 detail attribute, supported on all *modern* browsers. Use it like this:
```
{{% details "This is the details title (click to expand)" %}}
{{< details "This is the details title (click to expand)" >}}
This is the content (hidden until clicked).
{{% /details %}}
{{< /details >}}
```
#### Split
@ -172,7 +174,7 @@ This adds a two column side-by-side environment (will turn into 1 col for narrow
This is column 1.
{{< column >}}
This is column 2.
{{< endcolumn >}}
{{< endcolumns >}}
```
## About

View file

@ -153,9 +153,22 @@ 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 = "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"

View file

@ -73,6 +73,8 @@ pygmentsCodefencesGuessSyntax = true
kaggle = "username"
weibo = "username"
slack = "username"
discord = "invite code (https://discord.gg/XXXXXXX)"
strava = "userid"
[[menu.main]]
name = "Blog"

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "02/Jan/2006 15:04:05"
- id: postedOnDate
translation: "Postado em {{ .Count }}"
translation: "Postado em {{ . }}"
- id: lastModified
translation: "(Ultima modificação em {{ .Count }})"
translation: "(Ultima modificação em {{ . }})"
- id: translationsLabel
translation: "Outras linguagens: "
- id: translationsSeparator

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "2 Jan, 2006 15:04:05"
- id: postedOnDate
translation: "Gepostet am {{ .Count }}"
translation: "Gepostet am {{ . }}"
- id: lastModified
translation: "(Zuletzt geändert am {{ .Count }})"
translation: "(Zuletzt geändert am {{ . }})"
- id: translationsLabel
translation: "Andere Sprachen: "
- id: translationsSeparator

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "Jan 2, 2006 15:04:05"
- id: postedOnDate
translation: "Posted on {{ .Count }}"
translation: "Posted on {{ . }}"
- id: lastModified
translation: "(Last modified on {{ .Count }})"
translation: "(Last modified on {{ . }})"
- id: translationsLabel
translation: "Other languages: "
- id: translationsSeparator
@ -61,7 +61,7 @@
- id: yourEmail
translation: "Your email address"
- id: yourWebsite
translation: "You website"
translation: "Your website"
# Delayed Disqus
- id: show

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "2 Jan, 2006 15:04:05"
- id: postedOnDate
translation: "Afiŝiĝis je {{ .Count }}"
translation: "Afiŝiĝis je {{ . }}"
- id: lastModified
translation: "(Laste aliiĝis je {{ .Count }})"
translation: "(Laste aliiĝis je {{ . }})"
- id: translationsLabel
translation: "Aliaj lingvoj: "
- id: translationsSeparator

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "2 Jan, 2006 15:04:05"
- id: postedOnDate
translation: "Publicado el {{ .Count }}"
translation: "Publicado el {{ . }}"
- id: lastModified
translation: "(Última modificación en {{ .Count }})"
translation: "(Última modificación en {{ . }})"
- id: translationsLabel
translation: "Otros idiomas: "
- id: translationsSeparator

View file

@ -1,18 +1,18 @@
# Content
- id: dateFormat
translation: "January 2, 2006"
translation: "2·01·2006"
- id: shortdateFormat
translation: "2 Jan, 2006 15:04:05"
translation: "2·01·2006 - 15:04:05"
- id: postedOnDate
translation: "Posté le {{ .Count }}"
translation: "Publié le {{ . }}"
- id: lastModified
translation: "(Dernière modification le {{ .Count }})"
translation: "(Mise à jour le {{ . }})"
- id: translationsLabel
translation: "Autres langues : "
translation: "Traductions : "
- id: translationsSeparator
translation: ", "
- id: readMore
translation: "Voir plus"
translation: "Lire"
- id: olderPosts
translation: "Anciens posts"
- id: newerPosts
@ -37,7 +37,7 @@
# Navigation
- id: toggleNavigation
translation: "Toggle navigation"
translation: "Activer la navigation"
- id: languageSwitcherLabel
translation: "Langue"
- id: gcseLabelShort
@ -55,13 +55,15 @@
- id: moreComment
translation: "commentaires"
- id: useMarkdown
translation: "Vous pouvez utiliser la syntaxe Markdown"
translation: "Rédigez votre commentaire ici. (Vous pouvez utiliser la syntaxe Markdown)"
- id: yourName
translation: "Votre nom"
- id: yourEmail
translation: "Votre addresse mail"
translation: "Votre adresse mail"
- id: yourWebsite
translation: "Votre site web"
- id: sendComment
translation: "Envoyer"
# Delayed Disqus
- id: show
@ -71,4 +73,4 @@
# Related posts
- id: seeAlso
translation: "Voir également"
translation: "Suggestions de lecture :"

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "2 Jan 2006 15:04:05"
- id: postedOnDate
translation: "Redatto il {{ .Count }}"
translation: "Pubblicato il {{ . }}"
- id: lastModified
translation: "(Ultima modifica il {{ .Count }})"
translation: "(Ultima modifica il {{ . }})"
- id: translationsLabel
translation: "Altre lingue: "
- id: translationsSeparator
@ -37,9 +37,9 @@
# Navigation
- id: toggleNavigation
translation: "Attiva/disattiva la navigazione"
translation: "Menu"
- id: languageSwitcherLabel
translation: "Linguaggio"
translation: "Lingua"
- id: gcseLabelShort
translation: "Cerca"
- id: gcseLabelLong
@ -71,4 +71,4 @@
# Related posts
- id: seeAlso
translation: "Guarda anche"
translation: "Vedi anche"

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "2 Jan, 2006 15:04:05"
- id: postedOnDate
translation: "{{ .Count }}に投稿"
translation: "{{ . }}に投稿"
- id: lastModified
translation: "(最終更新日時{{ .Count }})"
translation: "(最終更新日時{{ . }})"
- id: translationsLabel
translation: "翻訳:"
- id: translationsSeparator

View file

@ -0,0 +1,297 @@
# Content
- id: dateFormat
translation: "2 January 2006"
- id: shortdateFormat
translation: "2 Jan 2006 15:04:05"
- id: postedOnDate
translation: "Publegaa il {{ .Count }}"
- id: lastModified
translation: "(Darrera modifega ell {{ .Count }})"
- id: translationsLabel
translation: "Alter lengov: "
- id: translationsSeparator
translation: ", "
- id: readMore
translation: "Lensg"
- id: olderPosts
translation: "Articol pussee vegg"
- id: newerPosts
translation: "Articoli pussee noeuv"
- id: previousPost
translation: "Articolo de prima"
- id: nextPost
translation: "Articolo dopo"
- id: readTime
translation: "megnuu"
- id: words
translation: "paroll"
# 404 page
- id: pageNotFound
translation: "Ocio, quella pagina chi la esist no. (errore 404)"
# Footer
- id: poweredBy # Accepts HTML
translation: '<a href="https://gohugo.io">Desviluppaa con Hugo v{{ .Site.Hugo.Version }}</a> &nbsp;&bull;&nbsp; Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adattaa de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
# Navigation
- id: toggleNavigation
translation: "Attiva/disattiva la navigazion"
- id: languageSwitcherLabel
translation: "Lengua"
- id: gcseLabelShort
translation: "Cerca"
- id: gcseLabelLong
translation: "Cerca {{ .Site.Title }}"
- id: gcseClose
translation: "Sara su"
# Staticman
- id: noComment
translation: "Nissub comment"
- id: oneComment
translation: "comment"
- id: moreComment
translation: "comment"
- id: useMarkdown
translation: "Te pòdet doperà la sintassi Markdown"
- id: yourName
translation: "El tò nomm"
- id: yourEmail
translation: "La toa adressa e-mail"
- id: yourWebsite
translation: "El tò sitt web"
# Delayed Disqus
- id: show
translation: "Mostra"
- id: comments
translation: "comment"
# Related posts
- id: seeAlso
translation: "Varda anca"
# Content
- id: dateFormat
translation: "2 January 2006"
- id: shortdateFormat
translation: "2 Jan 2006 15:04:05"
- id: postedOnDate
translation: "Publegaa il {{ .Count }}"
- id: lastModified
translation: "(Darrera modifega ell {{ .Count }})"
- id: translationsLabel
translation: "Alter lengov: "
- id: translationsSeparator
translation: ", "
- id: readMore
translation: "Lensg"
- id: olderPosts
translation: "Articol pussee vegg"
- id: newerPosts
translation: "Articoli pussee noeuv"
- id: previousPost
translation: "Articolo de prima"
- id: nextPost
translation: "Articolo dopo"
- id: readTime
translation: "megnuu"
- id: words
translation: "paroll"
# 404 page
- id: pageNotFound
translation: "Ocio, quella pagina chi la esist no. (errore 404)"
# Footer
- id: poweredBy # Accepts HTML
translation: '<a href="https://gohugo.io">Desviluppaa con Hugo v{{ .Site.Hugo.Version }}</a> &nbsp;&bull;&nbsp; Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adattaa de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
# Navigation
- id: toggleNavigation
translation: "Attiva/disattiva la navigazion"
- id: languageSwitcherLabel
translation: "Lengua"
- id: gcseLabelShort
translation: "Cerca"
- id: gcseLabelLong
translation: "Cerca {{ .Site.Title }}"
- id: gcseClose
translation: "Sara su"
# Staticman
- id: noComment
translation: "Nissub comment"
- id: oneComment
translation: "comment"
- id: moreComment
translation: "comment"
- id: useMarkdown
translation: "Te pòdet doperà la sintassi Markdown"
- id: yourName
translation: "El tò nomm"
- id: yourEmail
translation: "La toa adressa e-mail"
- id: yourWebsite
translation: "El tò sitt web"
# Delayed Disqus
- id: show
translation: "Mostra"
- id: comments
translation: "comment"
# Related posts
- id: seeAlso
translation: "Varda anca"

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "2 Jan, 2006 15:04:05"
- id: postedOnDate
translation: "Postet {{ .Count }}"
translation: "Postet {{ . }}"
- id: lastModified
translation: "(Sist endret {{ .Count }})"
translation: "(Sist endret {{ . }})"
- id: translationsLabel
translation: "Andre språk: "
- id: translationsSeparator

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "2 Jan, 2006 15:04:05"
- id: postedOnDate
translation: "Gepost op {{ .Count }}"
translation: "Gepost op {{ . }}"
- id: lastModified
translation: "(Laatst gewijzigd op {{ .Count }})"
translation: "(Laatst gewijzigd op {{ . }})"
- id: translationsLabel
translation: "Andere talen: "
- id: translationsSeparator
@ -65,9 +65,9 @@
# Delayed Disqus
- id: show
translation: "Laat"
translation: "Laat zien"
- id: comments
translation: "reacties zien"
translation: "reacties"
# Related posts
- id: seeAlso

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "2 Jan, 2006 15:04:05"
- id: postedOnDate
translation: "Opublikowany {{ .Count }}"
translation: "Opublikowany {{ . }}"
- id: lastModified
translation: "(Ostatnia modyfikacja {{ .Count }})"
translation: "(Ostatnia modyfikacja {{ . }})"
- id: translationsLabel
translation: "Inne języki: "
- id: translationsSeparator

View file

@ -1,12 +1,12 @@
# Content
- id: dateFormat
translation: "Январь 2, 2006"
translation: "02.01.2006"
- id: shortdateFormat
translation: "2 Jan, 2006 15:04:05"
- id: postedOnDate
translation: "Опубликовано {{ .Count }}"
translation: "Опубликовано {{ . }}"
- id: lastModified
translation: "(Последнее изменение {{ .Count }})"
translation: "(Последнее изменение {{ . }})"
- id: translationsLabel
translation: "Другие языки: "
- id: translationsSeparator

View file

@ -0,0 +1,74 @@
# Content
- id: dateFormat
translation: "2 Ocak 2006"
- id: shortdateFormat
translation: "2 Oca 2006 15.04.05"
- id: postedOnDate
translation: "{{ . }} tarihinde paylaşıldı"
- id: lastModified
translation: "({{ . }} tarihinde güncellendi)"
- id: translationsLabel
translation: "Diğer diller: "
- id: translationsSeparator
translation: ", "
- id: readMore
translation: "Daha fazla oku"
- id: olderPosts
translation: "Önceki gönderiler"
- id: newerPosts
translation: "Son gönderiler"
- id: previousPost
translation: "Önceki gönderi"
- id: nextPost
translation: "Sonraki gönderi"
- id: readTime
translation: "dakika"
- id: words
translation: "kelime"
# 404 page
- id: pageNotFound
translation: "Ups, bu sayfa mevcut değil. Başka bir yöne ilerleyin. (404 hatası)"
# Footer
- id: poweredBy # Accepts HTML
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> altyapısı &nbsp;&bull;&nbsp; <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> temasından uyarlanan <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> teması kullanılmaktadır.'
# Navigation
- id: toggleNavigation
translation: "Gezinmeyi aktifleştirin"
- id: languageSwitcherLabel
translation: "Dil"
- id: gcseLabelShort
translation: "Arama"
- id: gcseLabelLong
translation: "{{ .Site.Title }} içinde arayın"
- id: gcseClose
translation: "Kapat"
# Staticman
- id: noComment
translation: "Yorum yok"
- id: oneComment
translation: "yorum"
- id: moreComment
translation: "yorum"
- id: useMarkdown
translation: "Markdown söz dizimini kullanabilirsiniz"
- id: yourName
translation: "İsminiz"
- id: yourEmail
translation: "E-posta adresiniz"
- id: yourWebsite
translation: "Web siteniz"
# Delayed Disqus
- id: show
translation: "Göster"
- id: comments
translation: "yorumlar"
# Related posts
- id: seeAlso
translation: "Ayrıca bakınız"

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "2 Jan, 2006 15:04:05"
- id: postedOnDate
translation: "发表于 {{ .Count }}"
translation: "发表于 {{ . }}"
- id: lastModified
translation: "(上次修改时间 {{ .Count }})"
translation: "(上次修改时间 {{ . }})"
- id: translationsLabel
translation: "其它语言: "
- id: translationsSeparator

View file

@ -4,9 +4,9 @@
- id: shortdateFormat
translation: "2 Jan, 2006 15:04:05"
- id: postedOnDate
translation: "發表於 {{ .Count }}"
translation: "發表於 {{ . }}"
- id: lastModified
translation: "(最後修改於 {{ .Count }})"
translation: "(最後修改於 {{ . }})"
- id: translationsLabel
translation: "其他語言: "
- id: translationsSeparator

View file

@ -9,7 +9,7 @@
{{ range .Site.Data.beautifulhugo.social.social_icons }}
{{- if isset $.Site.Author .id }}
<li>
<a href="{{ printf .url (index $.Site.Author .id) }}" title="{{ .title }}">
<a {{ if .rel }}rel="{{ .rel }}"{{- end -}} href="{{ printf .url (index $.Site.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>
@ -63,12 +63,12 @@
{{- 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/jquery-3.5.1.slim.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://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
{{- end }}

View file

@ -50,7 +50,7 @@
<link rel="stylesheet" href="{{ "fontawesome/css/all.css" | absURL }}" />
<link rel="stylesheet" href="{{ "css/bootstrap.min.css" | absURL }}" />
{{- else -}}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
{{- end -}}
@ -88,4 +88,6 @@
{{- end -}}
{{- partial "head_custom.html" . }}
{{ template "_internal/google_analytics_async.html" . }}
{{- if not .Site.IsServer -}}
{{ template "_internal/google_analytics.html" . }}
{{- end -}}

View file

@ -53,6 +53,7 @@
<span class="img-desc" style="display: inline;"></span>
</div>
{{end}}
{{ if $title }}
<div class="intro-header no-img">
<div class="container">
<div class="row">
@ -81,6 +82,7 @@
</div>
</div>
</div>
{{ end }}
</header>
{{ else }}
<div class="intro-header"></div>

View file

@ -7,7 +7,7 @@
{{- with .Params.share_img | default .Params.image | default .Site.Params.logo }}
<meta name="twitter:image" content="{{ . | absURL }}" />
{{- end }}
<meta name="twitter:card" content="summary" />
<meta name="twitter:card" content="summary_large_image" />
{{- with .Site.Author.twitter }}
<meta name="twitter:site" content="@{{ . }}" />
<meta name="twitter:creator" content="@{{ . }}" />

View file

@ -1,3 +1,3 @@
<details><summary>{{ .Get 0 }}</summary>
{{ .Inner }}
<details><summary>{{ .Get 0 | markdownify }}</summary>
{{ .Inner | markdownify }}
</details>

View file

@ -0,0 +1,8 @@
[build]
publish = "exampleSite/public"
command = "cd exampleSite && hugo --gc --themesDir ../.."
[build.environment]
HUGO_VERSION = "0.79.0"
HUGO_THEME = "repo"
HUGO_BASEURL = "/"

View file

@ -30,4 +30,4 @@ pre code.hljs {
.highlight td:last-child pre code, .highlight pre code {
white-space: pre;
}
}

File diff suppressed because one or more lines are too long

View file

@ -10,6 +10,12 @@ body {
flex-flow: column;
height: 100vh;
}
@media (prefers-color-scheme: dark) {
body {
background: black;
color: white;
}
}
.container[role=main] {
margin-bottom:50px;
flex: 1 0 auto;
@ -33,6 +39,12 @@ p a {
/* text-decoration: underline */
color: #008AFF;
}
@media (prefers-color-scheme: dark) {
p a {
color: #50afff;
}
}
h1,h2,h3,h4,h5,h6 {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 800;
@ -40,6 +52,11 @@ h1,h2,h3,h4,h5,h6 {
a {
color: #008AFF;
}
@media (prefers-color-scheme: dark) {
a {
color: #50afff;
}
}
a:hover,
a:focus {
color: #0085a1;
@ -51,6 +68,11 @@ blockquote {
blockquote p:first-child {
margin-top: 0;
}
@media (prefers-color-scheme: dark) {
blockquote {
border-left: 5px solid #444;
}
}
hr.small {
max-width: 100px;
margin: 15px auto;
@ -95,30 +117,27 @@ div.panel-body a.list-group-item.view-all {
font-weight: 600;
}
::-moz-selection {
::-moz-selection, ::selection {
color: white;
text-shadow: none;
background: #0085a1;
}
::selection {
color: white;
text-shadow: none;
background: #0085a1;
}
img::selection {
color: white;
background: transparent;
}
img::-moz-selection {
img::selection, img::-moz-selection {
color: white;
background: transparent;
}
img {
display: block;
margin: auto;
max-width: 100%;
}
@media (prefers-color-scheme: dark) {
figure:not(.dark) img, img.white {
background-color: white;
}
}
.img-title {
width: 100%;
@ -141,6 +160,12 @@ img {
border-bottom: 1px solid #EAEAEA;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
.navbar-custom {
background: #505050;
border-bottom: 1px solid #AAA;
}
}
.navbar-custom .nav li a {
text-transform: uppercase;
@ -154,6 +179,13 @@ img {
color: #404040;
}
@media (prefers-color-scheme: dark) {
.navbar-custom .navbar-brand,
.navbar-custom .nav li a {
color: #b0b0b0;
}
}
.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus ,
.navbar-custom .nav li a:hover,
@ -161,6 +193,15 @@ img {
color: #0085a1;
}
.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus ,
.navbar-custom .nav li a:hover,
.navbar-custom .nav li a:focus {
@media (prefers-color-scheme: dark) {
color: #b0e0ff;
}
}
.navbar-custom .navbar-brand-logo {
padding-top: 0;
-webkit-transition: padding .5s ease-in-out;
@ -294,6 +335,17 @@ img {
border-width: 0 1px 1px;
}
}
@media (prefers-color-scheme: dark) {
.navbar-custom .nav .navlinks-container:hover {
background: #666;
}
.navbar-custom .nav .navlinks-container .navlinks-children a {
border: 1px solid #AAA;
}
.navbar-custom .nav .navlinks-container .navlinks-children a {
background: #444;
}
}
/* --- Footer --- */
@ -307,6 +359,7 @@ footer {
footer a {
color: #404040;
}
footer .list-inline {
@ -335,13 +388,22 @@ footer .theme-by {
}
}
@media (prefers-color-scheme: dark) {
footer {
background: #444;
border-top: 1px #AAA solid;
}
footer a {
color: #AAA;
}
}
/* --- Post preview --- */
.post-preview {
padding: 20px 0;
border-bottom: 1px solid #eee;
}
@media only screen and (min-width: 768px) {
.post-preview {
padding: 35px 0;
@ -356,6 +418,11 @@ footer .theme-by {
text-decoration: none;
color: #404040;
}
@media (prefers-color-scheme: dark) {
.post-preview a {
color: #AAA;
}
}
.post-preview a:focus,
.post-preview a:hover {
@ -657,6 +724,13 @@ footer .theme-by {
border: 1px solid #0085a1;
}
@media (prefers-color-scheme: dark) {
.pager li a {
background: #444;
color: white;
}
}
.pager {
margin: 10px 0 0;
}
@ -686,9 +760,19 @@ table tr {
margin: 0;
padding: 0;
}
@media (prefers-color-scheme: dark) {
}
table tr:nth-child(2n) {
background-color: #f8f8f8;
}
@media (prefers-color-scheme: dark) {
table tr {
background-color: #181818;
}
table tr:nth-child(2n) {
background-color: #303030
}
}
table tr th {
font-weight: bold;
border: 1px solid #cccccc;
@ -815,3 +899,43 @@ h4.see-also {
ul.share li:hover .fab {
transform: scale(1.4)
}
/* Dark mode */
@media (prefers-color-scheme: dark) {
code {
background-color: #222;
color: #fbb;
}
pre code {
color: #ccc;
}
.well {
background-color: #444;
}
.panel {
background-color: #222;
}
.list-group-item {
background-color: #333;
}
pre.chroma {
color: white;
background-color: #444;
}
pre.chroma .k {
color: #44AACC;
}
pre.chroma .kt {
color: #33CCCC;
}
pre.chroma .o {
color: #AAA;
}
pre.chroma .nb {
color: #00fee9;
}
pre.chroma .ow {
color: #CC0;
}
}

View file

@ -1 +1 @@
(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.renderMathInElement=e()}})(function(){var e,t,r;return function n(e,t,r){function a(o,l){if(!t[o]){if(!e[o]){var f=typeof require=="function"&&require;if(!l&&f)return f(o,!0);if(i)return i(o,!0);var d=new Error("Cannot find module '"+o+"'");throw d.code="MODULE_NOT_FOUND",d}var s=t[o]={exports:{}};e[o][0].call(s.exports,function(t){var r=e[o][1][t];return a(r?r:t)},s,s.exports,n,e,t,r)}return t[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)a(r[o]);return a}({1:[function(e,t,r){var n=e("./splitAtDelimiters");var a=function(e,t){var r=[{type:"text",data:e}];for(var a=0;a<t.length;a++){var i=t[a];r=n(r,i.left,i.right,i.display||false)}return r};var i=function(e,t){var r=a(e,t);var n=document.createDocumentFragment();for(var i=0;i<r.length;i++){if(r[i].type==="text"){n.appendChild(document.createTextNode(r[i].data))}else{var o=document.createElement("span");var l=r[i].data;try{katex.render(l,o,{displayMode:r[i].display})}catch(f){if(!(f instanceof katex.ParseError)){throw f}console.error("KaTeX auto-render: Failed to parse `"+r[i].data+"` with ",f);n.appendChild(document.createTextNode(r[i].rawData));continue}n.appendChild(o)}}return n};var o=function(e,t,r){for(var n=0;n<e.childNodes.length;n++){var a=e.childNodes[n];if(a.nodeType===3){var l=i(a.textContent,t);n+=l.childNodes.length-1;e.replaceChild(l,a)}else if(a.nodeType===1){var f=r.indexOf(a.nodeName.toLowerCase())===-1;if(f){o(a,t,r)}}}};var l={delimiters:[{left:"$$",right:"$$",display:true},{left:"\\[",right:"\\]",display:true},{left:"\\(",right:"\\)",display:false}],ignoredTags:["script","noscript","style","textarea","pre","code"]};var f=function(e){var t;var r;for(var n=1,a=arguments.length;n<a;n++){t=arguments[n];for(r in t){if(Object.prototype.hasOwnProperty.call(t,r)){e[r]=t[r]}}}return e};var d=function(e,t){if(!e){throw new Error("No element provided to render")}t=f({},l,t);o(e,t.delimiters,t.ignoredTags)};t.exports=d},{"./splitAtDelimiters":2}],2:[function(e,t,r){var n=function(e,t,r){var n=r;var a=0;var i=e.length;while(n<t.length){var o=t[n];if(a<=0&&t.slice(n,n+i)===e){return n}else if(o==="\\"){n++}else if(o==="{"){a++}else if(o==="}"){a--}n++}return-1};var a=function(e,t,r,a){var i=[];for(var o=0;o<e.length;o++){if(e[o].type==="text"){var l=e[o].data;var f=true;var d=0;var s;s=l.indexOf(t);if(s!==-1){d=s;i.push({type:"text",data:l.slice(0,d)});f=false}while(true){if(f){s=l.indexOf(t,d);if(s===-1){break}i.push({type:"text",data:l.slice(d,s)});d=s}else{s=n(r,l,d+t.length);if(s===-1){break}i.push({type:"math",data:l.slice(d+t.length,s),rawData:l.slice(d,s+r.length),display:a});d=s+r.length}f=!f}i.push({type:"text",data:l.slice(d)})}else{i.push(e[o])}}return i};t.exports=a},{}]},{},[1])(1)});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),a=function(e,t,r){for(var n=r,o=0,a=e.length;n<t.length;){var i=t[n];if(o<=0&&t.slice(n,n+a)===e)return n;"\\"===i?n++:"{"===i?o++:"}"===i&&o--,n++}return-1},i=function(e,t,r,n){for(var o=[],i=0;i<e.length;i++)if("text"===e[i].type){var l=e[i].data,d=!0,s=0,f=void 0;for(-1!==(f=l.indexOf(t))&&(s=f,o.push({type:"text",data:l.slice(0,s)}),d=!1);;){if(d){if(-1===(f=l.indexOf(t,s)))break;o.push({type:"text",data:l.slice(s,f)}),s=f}else{if(-1===(f=a(r,l,s+t.length)))break;o.push({type:"math",data:l.slice(s+t.length,f),rawData:l.slice(s,f+r.length),display:n}),s=f+r.length}d=!d}o.push({type:"text",data:l.slice(s)})}else o.push(e[i]);return o},l=function(e,t){var r=function(e,t){for(var r=[{type:"text",data:e}],n=0;n<t.length;n++){var o=t[n];r=i(r,o.left,o.right,o.display||!1)}return r}(e,t.delimiters);if(1===r.length&&"text"===r[0].type)return null;for(var n=document.createDocumentFragment(),a=0;a<r.length;a++)if("text"===r[a].type)n.appendChild(document.createTextNode(r[a].data));else{var l=document.createElement("span"),d=r[a].data;t.displayMode=r[a].display;try{t.preProcess&&(d=t.preProcess(d)),o.a.render(d,l,t)}catch(e){if(!(e instanceof o.a.ParseError))throw e;t.errorCallback("KaTeX auto-render: Failed to parse `"+r[a].data+"` with ",e),n.appendChild(document.createTextNode(r[a].rawData));continue}n.appendChild(l)}return n};t.default=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},function e(t,r){for(var n=0;n<t.childNodes.length;n++){var o=t.childNodes[n];if(3===o.nodeType){var a=l(o.textContent,r);a&&(n+=a.childNodes.length-1,t.replaceChild(a,o))}else 1===o.nodeType&&function(){var t=" "+o.className+" ";-1===r.ignoredTags.indexOf(o.nodeName.toLowerCase())&&r.ignoredClasses.every(function(e){return-1===t.indexOf(" "+e+" ")})&&e(o,r)}()}}(e,r)}}]).default});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -5,24 +5,30 @@
$('.js-form').submit(function () {
var form = this;
let url = $(this).attr('action');
let data = $(this).serialize();
$(form).addClass('form--loading');
$.ajax({
type: $(this).attr('method'),
url: $(this).attr('action'),
data: $(this).serialize(),
contentType: 'application/x-www-form-urlencoded',
success: function (data) {
showModal('Perfect !', 'Thanks for your comment! It will show on the site once it has been approved. .');
$(form).removeClass('form--loading');
},
error: function (err) {
console.log(err);
showModal('Error', 'Sorry, there was an error with the submission!');
$(form).removeClass('form--loading');
var xhr = new XMLHttpRequest();
xhr.open("POST", url);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.onreadystatechange = function () {
if(xhr.readyState === XMLHttpRequest.DONE) {
var status = xhr.status;
if (status >= 200 && status < 400) {
showModal('Perfect !', 'Thanks for your comment! It will show on the site once it has been approved. .');
$(form).removeClass('form--loading');
} else {
console.error(xhr.statusText);
showModal('Error', 'Sorry, there was an error with the submission!');
$(form).removeClass('form--loading');
}
}
});
};
xhr.send(data);
return false;
});