diff --git a/demo/Semi.Avalonia.Demo.Web/Properties/AssemblyInfo.cs b/demo/Semi.Avalonia.Demo.Web/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..17366c4 --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Web/Properties/AssemblyInfo.cs @@ -0,0 +1 @@ +[assembly: System.Runtime.Versioning.SupportedOSPlatform("browser")] \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo.Web/Properties/launchSettings.json b/demo/Semi.Avalonia.Demo.Web/Properties/launchSettings.json index 07152e3..8e39157 100644 --- a/demo/Semi.Avalonia.Demo.Web/Properties/launchSettings.json +++ b/demo/Semi.Avalonia.Demo.Web/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/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj b/demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj index a97b8ce..938a569 100644 --- a/demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj +++ b/demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj @@ -1,7 +1,8 @@  - Exe net8.0-browser + Exe + true diff --git a/demo/Semi.Avalonia.Demo.Web/runtimeconfig.template.json b/demo/Semi.Avalonia.Demo.Web/runtimeconfig.template.json index c6990ba..b96a943 100644 --- a/demo/Semi.Avalonia.Demo.Web/runtimeconfig.template.json +++ b/demo/Semi.Avalonia.Demo.Web/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/Semi.Avalonia.Demo.Web/wwwroot/Logo.svg b/demo/Semi.Avalonia.Demo.Web/wwwroot/Logo.svg deleted file mode 100644 index 9685a23..0000000 --- a/demo/Semi.Avalonia.Demo.Web/wwwroot/Logo.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/demo/Semi.Avalonia.Demo.Web/wwwroot/app.css b/demo/Semi.Avalonia.Demo.Web/wwwroot/app.css index a424538..1d6f754 100644 --- a/demo/Semi.Avalonia.Demo.Web/wwwroot/app.css +++ b/demo/Semi.Avalonia.Demo.Web/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 */ - -.highlight { - color: white; - font-size: 2.5rem; - display: block; -} - -.purple { - color: #8b44ac; -} - -.icon { - opacity: 0.05; - height: 35%; - width: 35%; +/* HTML styles for the splash screen */ +.avalonia-splash { position: absolute; - background-repeat: no-repeat; - right: 0px; - bottom: 0px; - margin-right: 3%; - margin-bottom: 5%; - z-index: 5000; - background-position: right bottom; + height: 100%; + width: 100%; + background: white; + font-family: 'Outfit', sans-serif; + justify-content: center; + align-items: center; + display: flex; pointer-events: none; } -#avalonia-splash a { - color: whitesmoke; +/* Light theme styles */ +@media (prefers-color-scheme: light) { + .avalonia-splash { + background: white; + } + + .avalonia-splash h2 { + color: #1b2a4e; + } + + .avalonia-splash a { + color: #0D6EFD; + } +} + +@media (prefers-color-scheme: dark) { + .avalonia-splash { + background: #1b2a4e; + } + + .avalonia-splash h2 { + color: white; + } + + .avalonia-splash a { + color: white; + } +} + +.avalonia-splash h2 { + font-weight: 400; + font-size: 1.5rem; +} + +.avalonia-splash a { text-decoration: none; + font-size: 2.5rem; + display: block; } -.center { - display: flex; - justify-content: center; - align-items: center; - height: 100vh; -} - -#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; -} - -.splash-close { - animation: fadeout 0.25s linear forwards; -} - -@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/Semi.Avalonia.Demo.Web/wwwroot/index.html b/demo/Semi.Avalonia.Demo.Web/wwwroot/index.html index 8b9f68f..1c0e7e3 100644 --- a/demo/Semi.Avalonia.Demo.Web/wwwroot/index.html +++ b/demo/Semi.Avalonia.Demo.Web/wwwroot/index.html @@ -5,26 +5,32 @@ Semi.Avalonia.Demo.Web - - - - - -
-
-
-

- Powered by - Avalonia UI -

-
- Avalonia Logo -
+ +
+
+

+ Powered by + + + + + + + + + + + + + + +

- +
+ - \ No newline at end of file + diff --git a/demo/Semi.Avalonia.Demo.Web/wwwroot/main.js b/demo/Semi.Avalonia.Demo.Web/wwwroot/main.js index a9de29f..d9dec01 100644 --- a/demo/Semi.Avalonia.Demo.Web/wwwroot/main.js +++ b/demo/Semi.Avalonia.Demo.Web/wwwroot/main.js @@ -10,4 +10,4 @@ const dotnetRuntime = await dotnet const config = dotnetRuntime.getConfig(); -await dotnetRuntime.runMain(config.mainAssemblyName, [window.location.search]); +await dotnetRuntime.runMain(config.mainAssemblyName, [globalThis.location.href]);