From ec8628bac4b47b0e1b280116a52afea4f70ef55f Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 25 Oct 2022 23:55:41 +0100 Subject: [PATCH 1/7] update avalonia --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index b9c6e5b..d735eb4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,7 +5,7 @@ enable - 11.0.999-cibuild0025344-beta + 11.0.999-cibuild0025395-beta 3.0.0-avalonia11-preview2 From 10b6d1b911b983fcd5ce00ff92fbb158a3ad639b Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 27 Oct 2022 22:09:52 +0100 Subject: [PATCH 2/7] trim down calc. --- Calc.Browser/Roots.xml | 1 - Calc/App.axaml | 1 - Calc/Calc.csproj | 1 - Calc/Views/MainView.axaml | 2 -- 4 files changed, 5 deletions(-) diff --git a/Calc.Browser/Roots.xml b/Calc.Browser/Roots.xml index a27d300..a883016 100644 --- a/Calc.Browser/Roots.xml +++ b/Calc.Browser/Roots.xml @@ -11,6 +11,5 @@ - diff --git a/Calc/App.axaml b/Calc/App.axaml index ba4e172..afa3362 100644 --- a/Calc/App.axaml +++ b/Calc/App.axaml @@ -8,6 +8,5 @@ BaseTheme="Dark" PrimaryColor="DeepPurple" SecondaryColor="Lime" /> - diff --git a/Calc/Calc.csproj b/Calc/Calc.csproj index 9b0166f..55e4e81 100644 --- a/Calc/Calc.csproj +++ b/Calc/Calc.csproj @@ -8,7 +8,6 @@ - diff --git a/Calc/Views/MainView.axaml b/Calc/Views/MainView.axaml index c0dee70..f287d86 100644 --- a/Calc/Views/MainView.axaml +++ b/Calc/Views/MainView.axaml @@ -5,8 +5,6 @@ xmlns:system="clr-namespace:System;assembly=System.Runtime" xmlns:viewModels="clr-namespace:Calc.ViewModels" xmlns:m="using:Calc.Models" - xmlns:assists="clr-namespace:Material.Styles.Assists;assembly=Material.Styles" - xmlns:naming="clr-namespace:Material.Styles.Resources.Naming;assembly=Material.Styles" mc:Ignorable="d" x:Class="Calc.Views.MainView" x:DataType="viewModels:MainWindowViewModel" From 96bb71e9bc8a900198b96a38174b6652c3949df2 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 27 Oct 2022 22:09:59 +0100 Subject: [PATCH 3/7] preview 3 --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index d735eb4..4e6cc9f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,7 +5,7 @@ enable - 11.0.999-cibuild0025395-beta + 11.0.0-preview3 3.0.0-avalonia11-preview2 From 5cf268c1dc2ce158beb7afc12c42d07185da4e5f Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 8 Nov 2022 15:51:03 +0000 Subject: [PATCH 4/7] fix cache. --- Calc.Browser/AppBundle/staticwebapp.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Calc.Browser/AppBundle/staticwebapp.config.json b/Calc.Browser/AppBundle/staticwebapp.config.json index b860797..b900bcf 100644 --- a/Calc.Browser/AppBundle/staticwebapp.config.json +++ b/Calc.Browser/AppBundle/staticwebapp.config.json @@ -3,7 +3,7 @@ { "route": "/*", "headers": { - "Cache-Control": "public, must-revalidate, max-age=2419200" + "Cache-Control": "no-cache" } } ] From da628afeee6b098d06de23cf94a9c7ddc55ba484 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 8 Nov 2022 16:46:30 +0000 Subject: [PATCH 5/7] new loading / splash screen. --- Calc.Browser/AppBundle/app.css | 154 +++++++--- Calc.Browser/AppBundle/index.html | 34 +-- Calc/Views/MainView.axaml | 469 ++++++++++++++++++------------ 3 files changed, 413 insertions(+), 244 deletions(-) diff --git a/Calc.Browser/AppBundle/app.css b/Calc.Browser/AppBundle/app.css index 228d41f..c54cf03 100644 --- a/Calc.Browser/AppBundle/app.css +++ b/Calc.Browser/AppBundle/app.css @@ -1,34 +1,4 @@ -.highlight { - color: white; - font-size: 2.5rem; - display: block; -} - -.purple { - color: #8b44ac; -} - -.icon { - opacity : 0.05; - height: 35%; - width: 35%; - position : absolute; - background-repeat: no-repeat; - right: 0px; - bottom: 0px; - margin-right: 3%; - margin-bottom: 5%; - z-index: 5000; - background-position: right bottom; - pointer-events: none; -} - -#avalonia-splash a{ - color: whitesmoke; - text-decoration: none; -} - -.center { +.center { display: flex; justify-content: center; align-items: center; @@ -36,29 +6,127 @@ } #avalonia-splash { - position: relative; + position: absolute; height: 100%; width: 100%; - color: whitesmoke; - background: #1b2a4e; - font-family: 'Nunito', sans-serif; - background-position: center; - background-size: cover; - background-repeat: no-repeat; + background: black; justify-content: center; align-items: center; } .splash-close { - animation: fadeout 0.25s linear forwards; + animation: fadeout 0.3s linear forwards; +} + +.spinner-container { + display: flex; + position: absolute; + height: 100%; + width: 100%; + justify-content: center; + align-items: center; + animation: delayedFadeIn 4s linear both; + background: transparent; +} + +#out { + position: absolute; + height: 100%; + width: 100%; + z-index: 1; } @keyframes fadeout { - 0% { - opacity:100%; + 0% { + opacity: 100%; + } + 100% { + opacity: 0; + visibility: collapse; + } +} + +@keyframes delayedFadeIn { + 0% { + visibility: collapse; } - 100% { - opacity:0; + 99% { visibility: collapse; } + 100% { + visibility: visible; + } +} + +.loader { + animation: rotate 1s infinite; + height: 50px; + width: 50px; +} + +.loader:before, +.loader:after { + border-radius: 50%; + content: ''; + display: block; + height: 20px; + width: 20px; +} +.loader:before { + animation: ball1 1s infinite; + background-color: white; + box-shadow: 30px 0 0 white; + margin-bottom: 10px; +} +.loader:after { + animation: ball2 1s infinite; + background-color: white; + box-shadow: 30px 0 0 white; +} + +@keyframes rotate { + 0% { + -webkit-transform: rotate(0deg) scale(0.8); + -moz-transform: rotate(0deg) scale(0.8); + } + 50% { + -webkit-transform: rotate(360deg) scale(1.2); + -moz-transform: rotate(360deg) scale(1.2); + } + 100% { + -webkit-transform: rotate(720deg) scale(0.8); + -moz-transform: rotate(720deg) scale(0.8); + } +} + +@keyframes ball1 { + 0% { + box-shadow: 30px 0 0 white; + } + 50% { + box-shadow: 0 0 0 white; + margin-bottom: 0; + -webkit-transform: translate(15px,15px); + -moz-transform: translate(15px, 15px); + } + 100% { + box-shadow: 30px 0 0 white; + margin-bottom: 10px; + } } + +@keyframes ball2 { + 0% { + box-shadow: 30px 0 0 white; + } + 50% { + box-shadow: 0 0 0 white; + margin-top: -20px; + -webkit-transform: translate(15px,15px); + -moz-transform: translate(15px, 15px); + } + 100% { + box-shadow: 30px 0 0 white; + margin-top: 0; + } +} \ No newline at end of file diff --git a/Calc.Browser/AppBundle/index.html b/Calc.Browser/AppBundle/index.html index 9e12826..a33c42f 100644 --- a/Calc.Browser/AppBundle/index.html +++ b/Calc.Browser/AppBundle/index.html @@ -5,28 +5,26 @@ Calculator - - - - - - - - + + + + + + - -
- Avalonia Logo -
-
-

- Powered by - Avalonia UI

-
+ + + + +
+
+
+
- +
+ diff --git a/Calc/Views/MainView.axaml b/Calc/Views/MainView.axaml index f287d86..c096444 100644 --- a/Calc/Views/MainView.axaml +++ b/Calc/Views/MainView.axaml @@ -5,11 +5,91 @@ xmlns:system="clr-namespace:System;assembly=System.Runtime" xmlns:viewModels="clr-namespace:Calc.ViewModels" xmlns:m="using:Calc.Models" - mc:Ignorable="d" + mc:Ignorable="d" x:Class="Calc.Views.MainView" x:DataType="viewModels:MainWindowViewModel" x:CompileBindings="True" Background="{DynamicResource MaterialDesignPaper}"> + + + + @@ -37,185 +117,208 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 61008c70c13778050cdddcb5ed686de9f73febf0 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 8 Nov 2022 16:54:47 +0000 Subject: [PATCH 6/7] change colour of splash to black. --- Calc/Views/MainView.axaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Calc/Views/MainView.axaml b/Calc/Views/MainView.axaml index c096444..a0607ae 100644 --- a/Calc/Views/MainView.axaml +++ b/Calc/Views/MainView.axaml @@ -310,7 +310,7 @@ - + From 26c70930c081f7977f9e8201ebfb97e7f1b53611 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 8 Nov 2022 18:39:33 +0000 Subject: [PATCH 7/7] fix splash --- Calc.Browser/AppBundle/app.css | 1 + 1 file changed, 1 insertion(+) diff --git a/Calc.Browser/AppBundle/app.css b/Calc.Browser/AppBundle/app.css index c54cf03..5a24a02 100644 --- a/Calc.Browser/AppBundle/app.css +++ b/Calc.Browser/AppBundle/app.css @@ -43,6 +43,7 @@ 100% { opacity: 0; visibility: collapse; + left: 100%; } }