From b0f81d787645fe2dfd36158e8c985284d12db7d9 Mon Sep 17 00:00:00 2001 From: Christophe Peugnet <3845786+tossnet@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:54:34 +0100 Subject: [PATCH] [Doc] for the doc website add an animation of fluentui logo (#2985) * Update InputFileByCode.razor * replacement of the loading circle by a css animation with the logo --------- Co-authored-by: Christophe Peugnet Co-authored-by: Vincent Baaij --- examples/Demo/Client/wwwroot/index.html | 11 ++++-- examples/Demo/Shared/wwwroot/css/site.css | 45 +++++++++++++++++------ 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/examples/Demo/Client/wwwroot/index.html b/examples/Demo/Client/wwwroot/index.html index 9783c281a5..b275fa7e28 100644 --- a/examples/Demo/Client/wwwroot/index.html +++ b/examples/Demo/Client/wwwroot/index.html @@ -10,6 +10,7 @@ + @@ -36,9 +37,13 @@
- - - + + + + + + +
diff --git a/examples/Demo/Shared/wwwroot/css/site.css b/examples/Demo/Shared/wwwroot/css/site.css index 8db088145f..15feed2986 100644 --- a/examples/Demo/Shared/wwwroot/css/site.css +++ b/examples/Demo/Shared/wwwroot/css/site.css @@ -252,6 +252,7 @@ kbd { content: "An error has occurred: " } +/* Animate the blazor FluentUI during the loading */ .loading-progress { position: relative; display: block; @@ -260,25 +261,47 @@ kbd { margin: 20vh auto 1rem auto; } - .loading-progress circle { - fill: none; - stroke: var( --neutral-fill-layer-rest); - stroke-width: 0.6rem; - transform-origin: 50% 50%; - transform: rotate(-90deg); +#logo-anim path:nth-child(1) { + stroke-dasharray: 2000; + stroke-dashoffset: 2000; + stroke-width: 1.25em; + fill: #682A7B; + fill-opacity: 0.1; + animation: line-anim 2s ease forwards, fill-anim 1s ease forwards 1.5s; +} + +#logo-anim path:nth-child(2) { + stroke-width: 1.25em; + stroke-dasharray: 2000; + stroke-dashoffset: 2000; + fill: #4A81C3; + fill-opacity: 0.1; + animation: line-anim 2s ease forwards, fill-anim 3s ease forwards 1.2s; +} + +@keyframes line-anim { + to { + stroke-dashoffset: 0; + stroke-width: 0; + } +} + +@keyframes fill-anim { + from { + fill-opacity: 0.1; } - .loading-progress circle:last-child { - stroke: #1b6ec2; - stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; - transition: stroke-dasharray 0.05s ease-in-out; - } + to { + fill-opacity: 1; + } +} .loading-progress-text { position: absolute; text-align: center; font-weight: bold; inset: calc(20vh + 3.25rem) 0 auto 0.2rem; + margin-top:80px; } .loading-progress-text:after {