Adding badge icons and proper colors, as well as lazy loading them.

This commit is contained in:
Ad5001 2022-01-20 02:14:00 +01:00
parent 2d9f6fdc70
commit 33a692acac
Signed by: Ad5001
GPG Key ID: EF45F9C6AFE20160
1 changed files with 9 additions and 6 deletions

View File

@ -143,7 +143,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<a rel="nofollow noreferrer" href="https://flathub.org/apps/details/{{ .Index }}"> <a rel="nofollow noreferrer" href="https://flathub.org/apps/details/{{ .Index }}">
{{ partial "badge.html" (dict "Icon" "flathub" "Lang" $lang "Alt" "storeFlathub" ) }} {{ partial "badge.html" (dict "Icon" "flathub" "Lang" $lang "Alt" "storeFlathub" ) }}
<br> <br>
<img src="https://img.shields.io/flathub/v/{{ .Index }}?label=on%20flathub" alt="Version on flathub"/> <img loading='lazy' src="https://img.shields.io/flathub/v/{{ .Index }}?label=on%20flathub&logo=Flathub&logoColor=white&color=4A86CF" alt="Version on flathub"/>
<img loading='lazy' src="https://img.shields.io/endpoint?url=https://api.ad5001.eu/badges/flathub/?query={{ .Index }}" alt="Installs on flathub"/>
</a> </a>
<br><br>{{ i18n "warnExternalWebsite" "flathub.org" }} <br><br>{{ i18n "warnExternalWebsite" "flathub.org" }}
{{ else if hasPrefix .Title "Snap" }} {{ else if hasPrefix .Title "Snap" }}
@ -151,7 +152,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<a rel="nofollow noreferrer" href="https://snapcraft.io/{{ .Index }}"> <a rel="nofollow noreferrer" href="https://snapcraft.io/{{ .Index }}">
{{ partial "badge.html" (dict "Icon" "snapcraft" "Lang" $lang "Alt" "storeSnapcraft" ) }} {{ partial "badge.html" (dict "Icon" "snapcraft" "Lang" $lang "Alt" "storeSnapcraft" ) }}
<br> <br>
<img src="https://badgen.net/snapcraft/v/{{ .Index }}?label=on%20snapcraft" alt="Version on snapcraft"/> <img loading='lazy' src="https://badgen.net/snapcraft/v/{{ .Index }}?label=on%20snapcraft&color=82BEA0&icon=https://ad5001.eu/icons/skills/snapcraft.svg" alt="Version on snapcraft"/>
</a> </a>
<br><br>{{ i18n "warnExternalWebsite" "snapcraft.io" }} <br><br>{{ i18n "warnExternalWebsite" "snapcraft.io" }}
{{ else if hasPrefix .Title "Launchpad" }} {{ else if hasPrefix .Title "Launchpad" }}
@ -159,15 +160,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<a rel="nofollow noreferrer" href="https://launchpad.net/~ad5001/+archive/ubuntu/{{ .Index }}/"> <a rel="nofollow noreferrer" href="https://launchpad.net/~ad5001/+archive/ubuntu/{{ .Index }}/">
{{ partial "badge.html" (dict "Icon" "launchpad" "Lang" $lang "Alt" "storeLaunchpad" ) }} {{ partial "badge.html" (dict "Icon" "launchpad" "Lang" $lang "Alt" "storeLaunchpad" ) }}
</a> </a>
<br><br>{{ i18n "warnExternalWebsite" "launchpad.net" }} <br><br>{{ i18n "warnExternalWebsite" "launchpad.net" }}<!--<br><br>
{{ i18n "withTheCommandLine" }}<br>
<p class="text-left code">$ sudo add-apt-repository ppa:ad5001/logarithmplotter<br>$ sudo apt update</p>-->
{{ else if hasPrefix .Title "Firefox" }} {{ else if hasPrefix .Title "Firefox" }}
{{ $disclaimers.Set "firefox" true }} {{ $disclaimers.Set "firefox" true }}
<a rel="nofollow noreferrer" href="https://addons.mozilla.org/en-US/firefox/addon/{{ .Index }}/"> <a rel="nofollow noreferrer" href="https://addons.mozilla.org/en-US/firefox/addon/{{ .Index }}/">
{{ partial "badge.html" (dict "Icon" "amo" "Lang" $lang "Alt" "storeFirefoxAddons" ) }} {{ partial "badge.html" (dict "Icon" "amo" "Lang" $lang "Alt" "storeFirefoxAddons" ) }}
<br> <br>
<img src="https://img.shields.io/amo/v/{{ .Index }}?logo=Firefox" alt="{{ $AppData.version }} on addons.mozilla.org"/> <img loading='lazy' src="https://img.shields.io/amo/v/{{ .Index }}?logo=Firefox" alt="{{ $AppData.version }} on addons.mozilla.org"/>
<img src="https://badgen.net/amo/stars/{{ .Index }}?logo=Firefox" alt="Rating on addons.mozilla.org"/> <img loading='lazy' src="https://badgen.net/amo/stars/{{ .Index }}" alt="Rating on addons.mozilla.org"/>
<img src="https://badgen.net/amo/users/{{ .Index }}?logo=Firefox" alt="User count on addons.mozilla.org"/> <img loading='lazy' src="https://badgen.net/amo/users/{{ .Index }}" alt="User count on addons.mozilla.org"/>
</a> </a>
<br><br>{{ i18n "warnExternalWebsite" "addons.mozilla.org" }} <br><br>{{ i18n "warnExternalWebsite" "addons.mozilla.org" }}
{{ else }} {{ else }}