From 3883f2d22c080947aeef7f5063647240e3892007 Mon Sep 17 00:00:00 2001
From: Artur Yurii Korchynskyi <42449190+akorchyn@users.noreply.github.com>
Date: Fri, 25 Oct 2024 15:47:56 +0300
Subject: [PATCH] feat: updated streak display in dynamic images (#195)
@race-of-sloths
---
Cargo.lock | 179 +++++++++---------
public/templates/badge_bot_template_dark.svg | 16 +-
public/templates/badge_bot_template_white.svg | 16 +-
.../templates/badge_bot_with_pr_info_dark.svg | 16 +-
.../badge_bot_with_pr_info_white.svg | 16 +-
public/templates/badge_meta_template.svg | 16 +-
.../templates/badge_share_template_dark.svg | 16 +-
.../templates/badge_share_template_white.svg | 16 +-
server/src/svg.rs | 4 +
9 files changed, 148 insertions(+), 147 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index dde3ef7..47c86dc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -68,9 +68,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.89"
+version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6"
+checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8"
[[package]]
name = "arbitrary"
@@ -118,7 +118,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -129,7 +129,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -253,7 +253,7 @@ dependencies = [
"regex",
"rustc-hash 1.1.0",
"shlex",
- "syn 2.0.79",
+ "syn 2.0.85",
"which",
]
@@ -360,7 +360,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
"syn_derive",
]
@@ -405,9 +405,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
[[package]]
name = "bytes"
-version = "1.7.2"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3"
+checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
[[package]]
name = "bytesize"
@@ -420,9 +420,9 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.1.30"
+version = "1.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945"
+checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f"
dependencies = [
"jobserver",
"libc",
@@ -641,7 +641,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -665,7 +665,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -676,7 +676,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -714,7 +714,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -727,7 +727,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustc_version",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -760,7 +760,7 @@ dependencies = [
"proc-macro2",
"proc-macro2-diagnostics",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -792,7 +792,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -864,9 +864,9 @@ dependencies = [
[[package]]
name = "encoding_rs"
-version = "0.8.34"
+version = "0.8.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59"
+checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
dependencies = [
"cfg-if 1.0.0",
]
@@ -888,7 +888,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -995,9 +995,9 @@ checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"
[[package]]
name = "flume"
-version = "0.11.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
+checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095"
dependencies = [
"futures-core",
"futures-sink",
@@ -1136,7 +1136,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -1778,9 +1778,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
-version = "0.2.159"
+version = "0.2.161"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5"
+checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
[[package]]
name = "libloading"
@@ -2005,9 +2005,9 @@ dependencies = [
[[package]]
name = "near-api"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c75a4f6ba36f0d67e8d16b3df6ed1db601632f26e82fdbc9a87fa4b9f5e0c84"
+checksum = "3f545885389b10b7540a43e8bd77466471fcbc92ab44fefc11ef2b8b4d46e800"
dependencies = [
"async-trait",
"bip39",
@@ -2253,7 +2253,7 @@ checksum = "df598b0785a3e36d7e4fb73afcdf20536988b13d07cead71dfa777db4783e552"
dependencies = [
"quote",
"serde",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2264,7 +2264,7 @@ checksum = "647ef261df99ad877c08c97af2f10368c8b8cde0968250d3482a5a249e9f3926"
dependencies = [
"near-rpc-error-core",
"serde",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2306,7 +2306,7 @@ dependencies = [
"serde_json",
"strum 0.26.3",
"strum_macros 0.26.4",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2541,7 +2541,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2606,9 +2606,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
[[package]]
name = "openssl"
-version = "0.10.67"
+version = "0.10.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b8cefcf97f41316955f9294cd61f639bdcfa9f2f230faac6cb896aa8ab64704"
+checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5"
dependencies = [
"bitflags 2.6.0",
"cfg-if 1.0.0",
@@ -2627,7 +2627,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2638,9 +2638,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-src"
-version = "300.3.2+3.3.2"
+version = "300.4.0+3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b"
+checksum = "a709e02f2b4aca747929cca5ed248880847c650233cf8b8cdc48f40aaf4898a6"
dependencies = [
"cc",
]
@@ -2725,7 +2725,7 @@ dependencies = [
"proc-macro2",
"proc-macro2-diagnostics",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2761,29 +2761,29 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315"
[[package]]
name = "pin-project"
-version = "1.1.6"
+version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec"
+checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
-version = "1.1.6"
+version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8"
+checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
name = "pin-project-lite"
-version = "0.2.14"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
+checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
[[package]]
name = "pin-utils"
@@ -2848,12 +2848,12 @@ dependencies = [
[[package]]
name = "prettyplease"
-version = "0.2.22"
+version = "0.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba"
+checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033"
dependencies = [
"proc-macro2",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2901,9 +2901,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.88"
+version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9"
+checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
dependencies = [
"unicode-ident",
]
@@ -2916,7 +2916,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
"version_check",
"yansi",
]
@@ -2955,7 +2955,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -3143,14 +3143,14 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
name = "regex"
-version = "1.11.0"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
@@ -3340,7 +3340,7 @@ dependencies = [
"proc-macro2",
"quote",
"rocket_http",
- "syn 2.0.79",
+ "syn 2.0.85",
"unicode-xid",
"version_check",
]
@@ -3467,7 +3467,7 @@ dependencies = [
"proc-macro2",
"quote",
"rust-embed-utils",
- "syn 2.0.79",
+ "syn 2.0.85",
"walkdir",
]
@@ -3682,7 +3682,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -3766,22 +3766,22 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
[[package]]
name = "serde"
-version = "1.0.210"
+version = "1.0.213"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
+checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.210"
+version = "1.0.213"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
+checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -3792,14 +3792,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
name = "serde_json"
-version = "1.0.128"
+version = "1.0.132"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8"
+checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03"
dependencies = [
"itoa",
"memchr",
@@ -3825,7 +3825,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -3876,7 +3876,7 @@ dependencies = [
"darling",
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -4095,7 +4095,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -4429,7 +4429,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -4461,9 +4461,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.79"
+version = "2.0.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590"
+checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56"
dependencies = [
"proc-macro2",
"quote",
@@ -4479,7 +4479,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -4533,22 +4533,22 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "1.0.64"
+version = "1.0.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84"
+checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.64"
+version = "1.0.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3"
+checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -4644,9 +4644,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.40.0"
+version = "1.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
+checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
dependencies = [
"backtrace",
"bytes",
@@ -4668,7 +4668,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -4818,7 +4818,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -4914,12 +4914,9 @@ dependencies = [
[[package]]
name = "unicase"
-version = "2.7.0"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89"
-dependencies = [
- "version_check",
-]
+checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df"
[[package]]
name = "unicase_serde"
@@ -5079,7 +5076,7 @@ dependencies = [
"proc-macro2",
"quote",
"regex",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -5171,7 +5168,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
"wasm-bindgen-shared",
]
@@ -5205,7 +5202,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -5550,7 +5547,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -5570,7 +5567,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
diff --git a/public/templates/badge_bot_template_dark.svg b/public/templates/badge_bot_template_dark.svg
index dc29870..ece47aa 100644
--- a/public/templates/badge_bot_template_dark.svg
+++ b/public/templates/badge_bot_template_dark.svg
@@ -103,10 +103,10 @@
d="M33.3 283.583C33.3 287.237 30.278 290.2 26.55 290.2C22.8221 290.2 19.8 287.237 19.8 283.583C19.8 280.961 23.2726 276.244 25.2363 273.787C25.9169 272.935 27.1832 272.935 27.8638 273.787C29.8275 276.244 33.3 280.961 33.3 283.583Z"
fill="url(#paint14_linear_2384_5617)" />
- {max-month-streak}
+ {month-streak} / {max-month-streak}
- Max. month streak
+ Monthly streak
@@ -117,10 +117,10 @@
d="M302.633 283.583C302.633 287.237 299.611 290.2 295.883 290.2C292.156 290.2 289.133 287.237 289.133 283.583C289.133 280.961 292.606 276.244 294.57 273.787C295.25 272.935 296.517 272.935 297.197 273.787C299.161 276.244 302.633 280.961 302.633 283.583Z"
fill="url(#paint16_linear_2384_5617)" />
- {max-week-streak}
+ {week-streak} / {max-week-streak}
- Max. week streak
+ Weekly streak
@@ -312,13 +312,13 @@
-
-
+
+
-
-
+
+
diff --git a/public/templates/badge_bot_template_white.svg b/public/templates/badge_bot_template_white.svg
index a5e1a1a..cfa0ddb 100644
--- a/public/templates/badge_bot_template_white.svg
+++ b/public/templates/badge_bot_template_white.svg
@@ -112,11 +112,11 @@
fill="url(#paint14_linear_2350_2393)" />
- {max-month-streak}
+ {month-streak} / {max-month-streak}
- Max. month streak
+ Monthly streak
@@ -128,11 +128,11 @@
fill="url(#paint16_linear_2350_2393)" />
- {max-week-streak}
+ {week-streak} / {max-week-streak}
- Max. week streak
+ Weekly streak
@@ -326,13 +326,13 @@
-
-
+
+
-
-
+
+
diff --git a/public/templates/badge_bot_with_pr_info_dark.svg b/public/templates/badge_bot_with_pr_info_dark.svg
index 1c7fdc2..5ae9c91 100644
--- a/public/templates/badge_bot_with_pr_info_dark.svg
+++ b/public/templates/badge_bot_with_pr_info_dark.svg
@@ -225,11 +225,11 @@
fill="url(#paint18_linear_2818_1021)" />
- {max-month-streak}
+ {month-streak} / {max-month-streak}
- Max. month streak
+ Monthly streak
@@ -241,11 +241,11 @@
fill="url(#paint20_linear_2818_1021)" />
- {max-week-streak}
+ {week-streak} / {max-week-streak}
- Max. week streak
+ Weekly streak
@@ -409,13 +409,13 @@
-
-
+
+
-
-
+
+
diff --git a/public/templates/badge_bot_with_pr_info_white.svg b/public/templates/badge_bot_with_pr_info_white.svg
index b7c16af..f4439b8 100644
--- a/public/templates/badge_bot_with_pr_info_white.svg
+++ b/public/templates/badge_bot_with_pr_info_white.svg
@@ -224,11 +224,11 @@
fill="url(#paint18_linear_2820_1183)" />
- {max-month-streak}
+ {month-streak} / {max-month-streak}
- Max. month streak
+ Monthly streak
@@ -240,11 +240,11 @@
fill="url(#paint20_linear_2820_1183)" />
- {max-week-streak}
+ {week-streak} / {max-week-streak}
- Max. week streak
+ Weekly streak
@@ -408,13 +408,13 @@
-
-
+
+
-
-
+
+
diff --git a/public/templates/badge_meta_template.svg b/public/templates/badge_meta_template.svg
index e6557f3..2ebb340 100644
--- a/public/templates/badge_meta_template.svg
+++ b/public/templates/badge_meta_template.svg
@@ -117,10 +117,10 @@
d="M51 267.734C51 271.795 47.6421 275.087 43.5 275.087C39.3579 275.087 36 271.795 36 267.734C36 264.821 39.8584 259.581 42.0403 256.85C42.7965 255.903 44.2035 255.903 44.9597 256.85C47.1416 259.581 51 264.821 51 267.734Z"
fill="url(#paint13_linear_2171_6879)" />
- {max-month-streak}
+ {month-streak} / {max-month-streak}
- Max. month streak
+ Monthly streak
@@ -132,10 +132,10 @@
d="M339 267.734C339 271.795 335.642 275.087 331.5 275.087C327.358 275.087 324 271.795 324 267.734C324 264.821 327.858 259.581 330.04 256.85C330.797 255.903 332.203 255.903 332.96 256.85C335.142 259.581 339 264.821 339 267.734Z"
fill="url(#paint15_linear_2171_6879)" />
- {max-week-streak}
+ {week-streak} / {max-week-streak}
- Max. week streak
+ Weekly streak
@@ -205,13 +205,13 @@
-
-
+
+
-
-
+
+
diff --git a/public/templates/badge_share_template_dark.svg b/public/templates/badge_share_template_dark.svg
index 42e2351..6c7a6a7 100644
--- a/public/templates/badge_share_template_dark.svg
+++ b/public/templates/badge_share_template_dark.svg
@@ -94,10 +94,10 @@
d="M33.3 283.583C33.3 287.237 30.278 290.2 26.55 290.2C22.8221 290.2 19.8 287.237 19.8 283.583C19.8 280.961 23.2726 276.244 25.2363 273.787C25.9169 272.935 27.1832 272.935 27.8638 273.787C29.8275 276.244 33.3 280.961 33.3 283.583Z"
fill="url(#paint14_linear_2384_5617)" />
- {max-month-streak}
+ {month-streak} / {max-month-streak}
- Max. month streak
+ Monthly streak
@@ -108,10 +108,10 @@
d="M302.633 283.583C302.633 287.237 299.611 290.2 295.883 290.2C292.156 290.2 289.133 287.237 289.133 283.583C289.133 280.961 292.606 276.244 294.57 273.787C295.25 272.935 296.517 272.935 297.197 273.787C299.161 276.244 302.633 280.961 302.633 283.583Z"
fill="url(#paint16_linear_2384_5617)" />
- {max-week-streak}
+ {week-streak} / {max-week-streak}
- Max. week streak
+ Weekly streak
@@ -300,13 +300,13 @@
-
-
+
+
-
-
+
+
diff --git a/public/templates/badge_share_template_white.svg b/public/templates/badge_share_template_white.svg
index b2f3551..f309fb1 100644
--- a/public/templates/badge_share_template_white.svg
+++ b/public/templates/badge_share_template_white.svg
@@ -101,11 +101,11 @@
fill="url(#paint14_linear_2350_2393)" />
- {max-month-streak}
+ {month-streak} / {max-month-streak}
- Max. month streak
+ Monthly streak
@@ -117,11 +117,11 @@
fill="url(#paint16_linear_2350_2393)" />
- {max-week-streak}
+ {week-streak} / {max-week-streak}
- Max. week streak
+ Weekly streak
@@ -313,13 +313,13 @@
-
-
+
+
-
-
+
+
diff --git a/server/src/svg.rs b/server/src/svg.rs
index dff77e5..c61922e 100644
--- a/server/src/svg.rs
+++ b/server/src/svg.rs
@@ -85,7 +85,9 @@ pub async fn generate_svg_badge(
"{total-contributions}",
&total_period.prs_opened.to_string(),
)
+ .replace("{week-streak}", &week_streak.amount.to_string())
.replace("{max-week-streak}", &week_streak.best.to_string())
+ .replace("{month-streak}", &month_streak.amount.to_string())
.replace("{max-month-streak}", &month_streak.best.to_string())
.replace("{place}", &place)
.replace("{place-type}", &place_type)
@@ -165,7 +167,9 @@ pub async fn generate_png_meta_badge(
"{total-rating}",
&total_period.total_rating.to_formatted_string(&Locale::en),
)
+ .replace("{week-streak}", &week_streak.amount.to_string())
.replace("{max-week-streak}", &week_streak.best.to_string())
+ .replace("{month-streak}", &month_streak.amount.to_string())
.replace("{max-month-streak}", &month_streak.best.to_string())
.replace("{place}", &place)
.replace("{place-type}", &place_type)