diff --git a/demo/Ursa.Demo.Browser/Assets/SourceHanSansCN-Bold.otf b/demo/Ursa.Demo.Browser/Assets/Fonts/SourceHanSansCN-Bold.otf similarity index 100% rename from demo/Ursa.Demo.Browser/Assets/SourceHanSansCN-Bold.otf rename to demo/Ursa.Demo.Browser/Assets/Fonts/SourceHanSansCN-Bold.otf diff --git a/demo/Ursa.Demo.Browser/Assets/SourceHanSansCN-Regular.otf b/demo/Ursa.Demo.Browser/Assets/Fonts/SourceHanSansCN-Regular.otf similarity index 100% rename from demo/Ursa.Demo.Browser/Assets/SourceHanSansCN-Regular.otf rename to demo/Ursa.Demo.Browser/Assets/Fonts/SourceHanSansCN-Regular.otf diff --git a/demo/Ursa.Demo.Browser/AvaloniaAppBuilderExtensions.cs b/demo/Ursa.Demo.Browser/AvaloniaAppBuilderExtensions.cs index eb3c4b76..3e1323ac 100644 --- a/demo/Ursa.Demo.Browser/AvaloniaAppBuilderExtensions.cs +++ b/demo/Ursa.Demo.Browser/AvaloniaAppBuilderExtensions.cs @@ -11,6 +11,6 @@ public static AppBuilder WithSourceHanSansCNFont(this AppBuilder builder) => builder.With(new FontManagerOptions { DefaultFamilyName = DefaultFontFamily, - FontFallbacks = new[] { new FontFallback { FontFamily = new FontFamily(DefaultFontFamily) } } + FontFallbacks = [new FontFallback { FontFamily = new FontFamily(DefaultFontFamily) }] }); } \ No newline at end of file diff --git a/demo/Ursa.Demo.Browser/Properties/AssemblyInfo.cs b/demo/Ursa.Demo.Browser/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..17366c42 --- /dev/null +++ b/demo/Ursa.Demo.Browser/Properties/AssemblyInfo.cs @@ -0,0 +1 @@ +[assembly: System.Runtime.Versioning.SupportedOSPlatform("browser")] \ No newline at end of file diff --git a/demo/Ursa.Demo.Browser/Properties/launchSettings.json b/demo/Ursa.Demo.Browser/Properties/launchSettings.json index a1d7d0ad..12ce651e 100644 --- a/demo/Ursa.Demo.Browser/Properties/launchSettings.json +++ b/demo/Ursa.Demo.Browser/Properties/launchSettings.json @@ -6,8 +6,8 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, - "applicationUrl": "https://localhost:5001;http://localhost:5000", - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/debug?browser={browserInspectUri}" + "applicationUrl": "https://localhost:7169;http://localhost:5235", + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" } } -} \ No newline at end of file +} diff --git a/demo/Ursa.Demo.Browser/Roots.xml b/demo/Ursa.Demo.Browser/Roots.xml deleted file mode 100644 index 1b96c2ac..00000000 --- a/demo/Ursa.Demo.Browser/Roots.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj b/demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj index 5f6658e8..ca266d6b 100644 --- a/demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj +++ b/demo/Ursa.Demo.Browser/Ursa.Demo.Browser.csproj @@ -1,13 +1,12 @@ - Exe net8.0-browser + Exe + true + enable - diff --git a/demo/Ursa.Demo.Browser/runtimeconfig.template.json b/demo/Ursa.Demo.Browser/runtimeconfig.template.json index c6990ba7..b96a9432 100644 --- a/demo/Ursa.Demo.Browser/runtimeconfig.template.json +++ b/demo/Ursa.Demo.Browser/runtimeconfig.template.json @@ -1,11 +1,10 @@ { - "wasmHostProperties": { - "perHostConfig": [ - { - "name": "browser", - "html-path": "index.html", - "Host": "browser" - } - ] - } + "wasmHostProperties": { + "perHostConfig": [ + { + "name": "browser", + "host": "browser" + } + ] + } } \ No newline at end of file diff --git a/demo/Ursa.Demo.Browser/wwwroot/Logo.svg b/demo/Ursa.Demo.Browser/wwwroot/Logo.svg deleted file mode 100644 index 4cb587da..00000000 --- a/demo/Ursa.Demo.Browser/wwwroot/Logo.svg +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - diff --git a/demo/Ursa.Demo.Browser/wwwroot/app.css b/demo/Ursa.Demo.Browser/wwwroot/app.css index a424538b..1d6f754a 100644 --- a/demo/Ursa.Demo.Browser/wwwroot/app.css +++ b/demo/Ursa.Demo.Browser/wwwroot/app.css @@ -1,74 +1,58 @@ -:root { - --sat: env(safe-area-inset-top); - --sar: env(safe-area-inset-right); - --sab: env(safe-area-inset-bottom); - --sal: env(safe-area-inset-left); +/* HTML styles for the splash screen */ +.avalonia-splash { + position: absolute; + height: 100%; + width: 100%; + background: white; + font-family: 'Outfit', sans-serif; + justify-content: center; + align-items: center; + display: flex; + pointer-events: none; } -/* HTML styles for the splash screen */ +/* Light theme styles */ +@media (prefers-color-scheme: light) { + .avalonia-splash { + background: white; + } -.highlight { - color: white; - font-size: 2.5rem; - display: block; -} + .avalonia-splash h2 { + color: #1b2a4e; + } -.purple { - color: #8b44ac; + .avalonia-splash a { + color: #0D6EFD; + } } -.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; -} +@media (prefers-color-scheme: dark) { + .avalonia-splash { + background: #1b2a4e; + } -#avalonia-splash a { - color: whitesmoke; - text-decoration: none; -} + .avalonia-splash h2 { + color: white; + } -.center { - display: flex; - justify-content: center; - align-items: center; - height: 100vh; + .avalonia-splash a { + color: white; + } } -#avalonia-splash { - position: relative; - height: 100%; - width: 100%; - color: whitesmoke; - background: #1b2a4e; - font-family: 'Nunito', sans-serif; - background-position: center; - background-size: cover; - background-repeat: no-repeat; - justify-content: center; - align-items: center; +.avalonia-splash h2 { + font-weight: 400; + font-size: 1.5rem; } -.splash-close { - animation: fadeout 0.25s linear forwards; +.avalonia-splash a { + text-decoration: none; + font-size: 2.5rem; + display: block; } -@keyframes fadeout { - 0% { - opacity: 100%; - } - - 100% { - opacity: 0; - visibility: collapse; - } +.avalonia-splash.splash-close { + transition: opacity 200ms, display 200ms; + display: none; + opacity: 0; } diff --git a/demo/Ursa.Demo.Browser/wwwroot/index.html b/demo/Ursa.Demo.Browser/wwwroot/index.html index 1c9e22f9..5350f304 100644 --- a/demo/Ursa.Demo.Browser/wwwroot/index.html +++ b/demo/Ursa.Demo.Browser/wwwroot/index.html @@ -5,26 +5,33 @@ Ursa.Demo.Browser - - - - + - - - - - - Powered by - Ursa - - - - + + + + + Powered by + + + + + + + + + + + + + + + - + + - \ No newline at end of file +