Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dillonzq/LoveIt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-04-30 18:21:52 +0300
committerGitHub <noreply@github.com>2020-04-30 18:21:52 +0300
commit3040ffa107eccd45416a5b9c5f3b85fdd50d94d8 (patch)
treed2ce33130c7929cd1a0a571f09f16a8cd35b8a96 /assets/svg
parent3096ff623597d3af9a9c65525405b858ad547e7a (diff)
feat: improve browser compatibility for TypeIt and object-fit (#293)
* object-fit polyfill * TypeIt 7.0.3 -> 6.5.1
Diffstat (limited to 'assets/svg')
-rw-r--r--assets/svg/version.template.svg15
1 files changed, 8 insertions, 7 deletions
diff --git a/assets/svg/version.template.svg b/assets/svg/version.template.svg
index 32ce06da..0a057911 100644
--- a/assets/svg/version.template.svg
+++ b/assets/svg/version.template.svg
@@ -1,18 +1,19 @@
{{- /* https://img.shields.io/badge/$label-$version-$color?style=flat-square&labelColor=403c3d */ -}}
{{- $labelLength := strings.RuneCount .label | mul 64 | add 100 -}}
{{- $versionLength := strings.RuneCount .version | mul 60 -}}
-<svg xmlns="http://www.w3.org/2000/svg" width="{{ add $labelLength $versionLength | add 200 | mul 0.1 }}" height="20">
+{{- $width := add $labelLength $versionLength | add 200 -}}
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {{ $width }} 200">
<g shape-rendering="crispEdges">
- {{- $x1 := add $labelLength 100 | mul 0.1 -}}
- {{- $x2 := add $versionLength 100 | mul 0.1 -}}
- <path fill="#403c3d" d="M0 0h{{ $x1 }}v20H0z"/>
- <path fill="#{{ .color }}" d="M{{ $x1 }} 0h{{ $x2 }}v20H{{ $x1 }}z"/>
+ {{- $x1 := add $labelLength 100 -}}
+ {{- $x2 := add $versionLength 100 -}}
+ <path fill="#403c3d" d="M0 0h{{ $x1 }}v200H0z"/>
+ <path fill="#{{ .color }}" d="M{{ $x1 }} 0h{{ $x2 }}v200H{{ $x1 }}z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
- <text x="{{ div $labelLength 2 | add 60 }}" y="140" textLength="{{ $labelLength }}" transform="scale(.1)">
+ <text x="{{ div $labelLength 2 | add 60 }}" y="140" textLength="{{ $labelLength }}">
{{- .label -}}
</text>
- <text x="{{ div $versionLength 2 | add $labelLength | add 140 }}" y="140" textLength="{{ $versionLength }}" transform="scale(.1)">
+ <text x="{{ div $versionLength 2 | add $labelLength | add 140 }}" y="140" textLength="{{ $versionLength }}">
{{- .version -}}
</text>
</g>