aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaesar Schinas2022-12-25 02:35:04 -1000
committerLoïc Dachary2023-03-12 16:48:47 +0100
commit7d2beea9ca4b47a29a1737b3a4d1d5486f2db1d3 (patch)
tree8167180f61073c96b4614ec47a7bed08f1cb7cf9
parent0e6ea60c802d6cfd95dea4aad5df96bb6e4bc7a5 (diff)
[BRANDING] Custom loading animation for Forgejo
(cherry picked from commit a3b3b8a2dfb31f3b8000f1bfeae63ef3190c211f) (cherry picked from commit de0fd2d2e459aec24dae1293cc1f8f04069dedac) (cherry picked from commit e1bf4de211a92a2f4645b3f34039749456a10ea3) (cherry picked from commit 60ffc88a47a158fe4920f05875ea8d156eecaa70)
-rw-r--r--public/img/failed.pngbin11009 -> 0 bytes
-rw-r--r--public/img/forgejo-loading.svg14
-rw-r--r--public/img/loading.pngbin12629 -> 0 bytes
-rw-r--r--templates/install.tmpl2
-rw-r--r--templates/post-install.tmpl2
-rw-r--r--templates/repo/migrate/migrating.tmpl4
6 files changed, 18 insertions, 4 deletions
diff --git a/public/img/failed.png b/public/img/failed.png
deleted file mode 100644
index b37545f90..000000000
--- a/public/img/failed.png
+++ /dev/null
Binary files differ
diff --git a/public/img/forgejo-loading.svg b/public/img/forgejo-loading.svg
new file mode 100644
index 000000000..919552ebb
--- /dev/null
+++ b/public/img/forgejo-loading.svg
@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212">
+ <style>
+ @keyframes draw-orange{0%{stroke-dashoffset:200}25%{stroke-dashoffset:200;stroke-width:0}50%{stroke-dashoffset:0;stroke-width:25}to{stroke-dashoffset:0}}@keyframes draw-red{0%{stroke-dashoffset:130;stroke-width:0}25%{stroke-dashoffset:0;stroke-width:25}50%,to{stroke-dashoffset:0}}@keyframes red-circle{0%{opacity:0}20%{opacity:0;stroke-width:0}25%{opacity:1;stroke-width:15}to{opacity:1}}@keyframes orange-circle{0%{opacity:0}45%{opacity:0;stroke-width:0}50%{opacity:1;stroke-width:15}to{opacity:1}}@keyframes fade{0%,90%{opacity:1}to{opacity:0}}circle,path{fill:none;stroke:#000;stroke-width:15}path{stroke-width:25}.orange{stroke:#f60}.red{stroke:#d40000}
+ </style>
+ <g transform="translate(6 6)">
+ <g style="animation:fade 2000ms ease-in-out 5ms infinite">
+ <path d="M58 168V70a50 50 0 0 1 50-50h20" class="orange" style="stroke-dasharray:200;stroke-dashoffset:200;animation:draw-orange 2000ms ease-out 5ms infinite"/>
+ <path d="M58 168v-30a50 50 0 0 1 50-50h20" class="red" style="stroke-dasharray:130;stroke-dashoffset:130;animation:draw-red 2000ms ease-out 5ms infinite"/>
+ <circle cx="142" cy="20" r="18" class="orange" style="opacity:0;animation:orange-circle 2000ms ease-out 5ms infinite"/>
+ <circle cx="142" cy="88" r="18" class="red" style="opacity:0;animation:red-circle 2000ms ease-out 5ms infinite"/>
+ </g>
+ <circle cx="58" cy="180" r="18" class="red"/>
+ </g>
+</svg>
diff --git a/public/img/loading.png b/public/img/loading.png
deleted file mode 100644
index c5ba3d9cd..000000000
--- a/public/img/loading.png
+++ /dev/null
Binary files differ
diff --git a/templates/install.tmpl b/templates/install.tmpl
index 2e10b006b..7d78882b8 100644
--- a/templates/install.tmpl
+++ b/templates/install.tmpl
@@ -346,5 +346,5 @@
</div>
</div>
</div>
-<img class="gt-hidden" src="{{AssetUrlPrefix}}/img/loading.png"/>
+<img class="gt-hidden" src="{{AssetUrlPrefix}}/img/forgejo-loading.svg" width="256" height="256"/>
{{template "base/footer" .}}
diff --git a/templates/post-install.tmpl b/templates/post-install.tmpl
index f237a6e01..a1cd4dcd8 100644
--- a/templates/post-install.tmpl
+++ b/templates/post-install.tmpl
@@ -7,7 +7,7 @@
<div class="ui stackable middle very relaxed page grid">
<div id="repo_migrating" class="sixteen wide center aligned centered column">
<div>
- <img src="{{AssetUrlPrefix}}/img/loading.png"/>
+ <img src="{{AssetUrlPrefix}}/img/forgejo-loading.svg" width="256" height="256" />
</div>
</div>
</div>
diff --git a/templates/repo/migrate/migrating.tmpl b/templates/repo/migrate/migrating.tmpl
index a3552610c..e108ecc09 100644
--- a/templates/repo/migrate/migrating.tmpl
+++ b/templates/repo/migrate/migrating.tmpl
@@ -9,12 +9,12 @@
<div class="ui stackable middle very relaxed page grid">
<div id="repo_migrating" class="sixteen wide center aligned centered column" task="{{.MigrateTask.ID}}">
<div>
- <img src="{{AssetUrlPrefix}}/img/loading.png"/>
+ <img src="{{AssetUrlPrefix}}/img/forgejo-loading.svg" width="256" height="256" />
</div>
</div>
<div id="repo_migrating_failed_image" class="sixteen wide center aligned centered column gt-hidden">
<div>
- <img src="{{AssetUrlPrefix}}/img/failed.png"/>
+ <span class="red">{{svg "octicon-git-pull-request-closed" 256 "ui red icon"}}</span>
</div>
</div>
</div>