diff --git a/ZS/Deploy/Deploy.csproj b/ZS/Deploy/Deploy.csproj
new file mode 100644
index 0000000..6c1dc92
--- /dev/null
+++ b/ZS/Deploy/Deploy.csproj
@@ -0,0 +1,10 @@
+
+
+
+ Exe
+ net10.0
+ enable
+ enable
+
+
+
diff --git a/ZS/Deploy/Program.cs b/ZS/Deploy/Program.cs
new file mode 100644
index 0000000..d684f2a
--- /dev/null
+++ b/ZS/Deploy/Program.cs
@@ -0,0 +1,33 @@
+using System.Diagnostics;
+
+var deployDir = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..", "..", ".."));
+var webDir = Path.GetFullPath(Path.Combine(deployDir, "..", "Web"));
+var webProject = Path.Combine(webDir, "Web.csproj");
+var publishDir = Path.Combine(Path.GetTempPath(), "zs-deploy", Guid.NewGuid().ToString());
+var deploymentToken = Environment.GetEnvironmentVariable("ZS_DeployToken") ?? throw new InvalidOperationException("ZS_DeployToken environment variable not set.");
+var deployEnv = Environment.GetEnvironmentVariable("ZS_DeployEnv") ?? "preview";
+
+// 1. Publish
+Console.WriteLine("Publishing Web project...");
+Run("dotnet", $"publish \"{webProject}\" -c Release -o \"{publishDir}\"");
+
+var wwwroot = Path.Combine(publishDir, "wwwroot");
+if (!Directory.Exists(wwwroot))
+{
+ Console.Error.WriteLine("wwwroot not found in publish output.");
+ return 1;
+}
+
+// 2. Deploy
+Console.WriteLine("Deploying to Azure Static Web Apps...");
+Run("swa.cmd", $"deploy \"{wwwroot}\" --deployment-token \"{deploymentToken}\" --app-location \"{webDir}\" --env \"{deployEnv}\"");
+
+Console.WriteLine("Deploy successful!");
+return 0;
+
+static void Run(string fileName, string arguments)
+{
+ var process = Process.Start(new ProcessStartInfo(fileName, arguments) { UseShellExecute = false })!;
+ process.WaitForExit();
+ if (process.ExitCode != 0) { Environment.Exit(process.ExitCode); }
+}
\ No newline at end of file
diff --git a/ZS/Web/Layout/MainLayout.razor.css b/ZS/Web/Layout/MainLayout.razor.css
index ecf25e5..cd870cb 100644
--- a/ZS/Web/Layout/MainLayout.razor.css
+++ b/ZS/Web/Layout/MainLayout.razor.css
@@ -9,7 +9,7 @@ main {
}
.sidebar {
- background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
+ background-image: linear-gradient(180deg, #0d1117 0%, #161b22 70%);
}
.top-row {
diff --git a/ZS/Web/Layout/NavMenu.razor b/ZS/Web/Layout/NavMenu.razor
index 49aabc0..1d8c7fb 100644
--- a/ZS/Web/Layout/NavMenu.razor
+++ b/ZS/Web/Layout/NavMenu.razor
@@ -1,6 +1,6 @@
-
- Counter
-
-
-
-
- Weather
+
+ Units
diff --git a/ZS/Web/Layout/NavMenu.razor.css b/ZS/Web/Layout/NavMenu.razor.css
index 617b89c..04764da 100644
--- a/ZS/Web/Layout/NavMenu.razor.css
+++ b/ZS/Web/Layout/NavMenu.razor.css
@@ -56,13 +56,13 @@
}
.nav-item ::deep a.active {
- background-color: rgba(255,255,255,0.37);
- color: white;
+ background-color: rgba(88, 166, 255, 0.2);
+ color: #58a6ff;
}
.nav-item ::deep a:hover {
- background-color: rgba(255,255,255,0.1);
- color: white;
+ background-color: rgba(88, 166, 255, 0.1);
+ color: #58a6ff;
}
@media (min-width: 641px) {
diff --git a/ZS/Web/Pages/Counter.razor b/ZS/Web/Pages/Counter.razor
deleted file mode 100644
index 372905f..0000000
--- a/ZS/Web/Pages/Counter.razor
+++ /dev/null
@@ -1,19 +0,0 @@
-@page "/counter"
-
-
Counter
-
-
Counter
-
-
Current count: @currentCount
-
-
-
-@code {
- private int currentCount = 0;
-
- private void IncrementCount()
- {
- currentCount++;
- }
-
-}
\ No newline at end of file
diff --git a/ZS/Web/Pages/Weather.razor b/ZS/Web/Pages/Weather.razor
deleted file mode 100644
index be9adb1..0000000
--- a/ZS/Web/Pages/Weather.razor
+++ /dev/null
@@ -1,60 +0,0 @@
-@page "/weather"
-@inject HttpClient Http
-
-
Weather
-
-
Weather
-
-
This component demonstrates fetching data from the server.
-
-@if (forecasts == null)
-{
-
- Loading...
-
-}
-else
-{
-
-
-
- | Date |
- Temp. (C) |
- Temp. (F) |
- Summary |
-
-
-
- @foreach (var forecast in forecasts)
- {
-
- | @forecast.Date.ToShortDateString() |
- @forecast.TemperatureC |
- @forecast.TemperatureF |
- @forecast.Summary |
-
- }
-
-
-}
-
-@code {
- private WeatherForecast[]? forecasts;
-
- protected override async Task OnInitializedAsync()
- {
- forecasts = await Http.GetFromJsonAsync
("sample-data/weather.json");
- }
-
- public class WeatherForecast
- {
- public DateOnly Date { get; set; }
-
- public int TemperatureC { get; set; }
-
- public string? Summary { get; set; }
-
- public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
- }
-
-}
\ No newline at end of file
diff --git a/ZS/Web/wwwroot/css/app.css b/ZS/Web/wwwroot/css/app.css
index fe44b1d..2b5f274 100644
--- a/ZS/Web/wwwroot/css/app.css
+++ b/ZS/Web/wwwroot/css/app.css
@@ -1,13 +1,23 @@
html, body {
- font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ background-color: #0d1117;
+ color: #c9d1d9;
}
h1:focus {
outline: none;
}
+h1, h2, h3, h4, h5, h6 {
+ color: #e6edf3;
+}
+
a, .btn-link {
- color: #0071c1;
+ color: #58a6ff;
+}
+
+p {
+ color: #8b949e;
}
.btn-primary {
diff --git a/ZS/Web/wwwroot/index.html b/ZS/Web/wwwroot/index.html
index 584f0cf..4137b57 100644
--- a/ZS/Web/wwwroot/index.html
+++ b/ZS/Web/wwwroot/index.html
@@ -29,6 +29,7 @@
Reload
🗙
+