Skip to content

Commit

Permalink
Cache weblate translation status image on build
Browse files Browse the repository at this point in the history
Don't leak IP of website visitors to weblate
  • Loading branch information
tmolitor-stud-tu committed Jul 9, 2024
1 parent 7300918 commit a74061e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 5 additions & 1 deletion content/support.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
title: "Support"
date: 2022-03-12T10:01:54+01:00
resources:
- src: "https://hosted.weblate.org/widgets/monal/-/multi-auto.svg"
name: "weblate.svg"
title: "Detailed translation status"

tags: []
author: "Monal"
Expand All @@ -27,7 +31,7 @@ Find general information in the [Monal Wiki](https://github.com/monal-im/Monal/w
We host and manage translations via [Weblate](https://hosted.weblate.org/engage/monal/).
Feel free to translate Monal to your language!

[![Detailed translation status](https://hosted.weblate.org/widgets/monal/-/multi-auto.svg)](https://hosted.weblate.org/engage/monal/?utm_source=widget)
<a href="https://hosted.weblate.org/engage/monal/?utm_source=widget">{{< remoteImage "weblate.svg" >}}</a>

## Reporting a Vulnerability

Expand Down
9 changes: 9 additions & 0 deletions layouts/shortcodes/remoteImage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ if .IsNamedParams }}
{{ $image := $.Page.Resources.GetMatch (.Get "name") }}
{{ $title := cond (not (.Get "title")) $image.title (.Get "title") }}
<img src="{{ $image.RelPermalink }}" title="{{ $title | safeHTML }}">
{{ else }}
{{ $image := $.Page.Resources.GetMatch (.Get 0) }}
{{ $title := cond (not (.Get 1)) $image.title (.Get 1) }}
<img src="{{ $image.RelPermalink }}" title="{{ $title | safeHTML }}">
{{ end }}
2 changes: 1 addition & 1 deletion themes/hugo-PaperMod
Submodule hugo-PaperMod updated 68 files
+1 −1 .github/ISSUE_TEMPLATE/bug_report.md
+1 −1 .github/ISSUE_TEMPLATE/config.yml
+7 −0 .github/ISSUE_TEMPLATE/new-blank-issue.md
+0 −7 .github/ISSUE_TEMPLATE/proposal.md
+17 −0 .github/stale.yml
+10 −7 .github/workflows/gh-pages.yml
+1 −1 LICENSE
+19 −29 README.md
+5 −3 assets/css/common/main.css
+4 −8 assets/css/common/post-entry.css
+21 −23 assets/css/common/post-single.css
+4 −5 assets/css/common/profile-mode.css
+2 −2 assets/css/core/license.css
+0 −2 assets/css/core/reset.css
+2 −2 assets/css/core/theme-vars.css
+0 −6 assets/css/core/zmedia.css
+63 −0 assets/css/hljs/an-old-hope.min.css
+0 −24 assets/css/includes/chroma-mod.css
+0 −86 assets/css/includes/chroma-styles.css
+2 −2 assets/css/includes/scroll-bar.css
+1 −6 assets/js/fastsearch.js
+3 −3 assets/js/fuse.basic.min.js
+44 −0 assets/js/highlight.min.js
+2 −2 assets/js/license.js
+2 −8 i18n/ar.yaml
+0 −39 i18n/be.yaml
+0 −5 i18n/bn.yaml
+0 −33 i18n/cs.yaml
+0 −33 i18n/el.yaml
+2 −2 i18n/fr.yaml
+5 −19 i18n/he.yaml
+0 −33 i18n/hr.yaml
+3 −9 i18n/it.yaml
+2 −2 i18n/ja.yaml
+0 −33 i18n/no.yaml
+0 −33 i18n/pa.yaml
+2 −7 i18n/pl.yaml
+0 −33 i18n/pnb.yaml
+0 −12 i18n/pt.yaml
+0 −33 i18n/ro.yaml
+0 −33 i18n/sk.yaml
+0 −33 i18n/sw.yaml
+0 −33 i18n/th.yaml
+2 −10 i18n/tr.yaml
+1 −9 i18n/vi.yaml
+3 −28 layouts/_default/archives.html
+0 −4 layouts/_default/baseof.html
+5 −14 layouts/_default/list.html
+26 −59 layouts/_default/rss.xml
+1 −1 layouts/_default/search.html
+4 −11 layouts/_default/single.html
+1 −1 layouts/partials/breadcrumbs.html
+6 −9 layouts/partials/cover.html
+1 −1 layouts/partials/edit_post.html
+18 −5 layouts/partials/head.html
+3 −1 layouts/partials/header.html
+1 −1 layouts/partials/home_info.html
+14 −1 layouts/partials/index_profile.html
+5 −3 layouts/partials/post_meta.html
+45 −69 layouts/partials/share_icons.html
+3 −4 layouts/partials/social_icons.html
+6 −183 layouts/partials/svg.html
+0 −47 layouts/partials/templates/_funcs/get-page-images.html
+13 −20 layouts/partials/templates/opengraph.html
+3 −8 layouts/partials/templates/schema_json.html
+19 −24 layouts/partials/templates/twitter_cards.html
+2 −2 layouts/partials/toc.html
+1 −1 theme.toml

0 comments on commit a74061e

Please sign in to comment.