From ee204dde4675f01b87688e2164ae277d8eb9a3e0 Mon Sep 17 00:00:00 2001 From: 6d486f49 Date: Wed, 17 Jun 2026 23:51:28 -0400 Subject: [PATCH] ...cleanup --- Chrono/Build/Build.csproj | 2 +- Chrono/Build/Program.cs | 24 +- Chrono/Model/CardData.cs | 2 +- Chrono/Web/App.razor | 3 +- Chrono/Web/Layout/MainLayout.razor.css | 24 +- Chrono/Web/Layout/NavMenu.razor.css | 34 +- Chrono/Web/Pages/Agents.razor | 5 +- Chrono/Web/Pages/Cards.razor | 59 +- Chrono/Web/Pages/Cards.razor.css | 19 +- Chrono/Web/Program.cs | 1 - Chrono/Web/Web.csproj | 16 +- Chrono/Web/wwwroot/css/app.css | 24 +- Chrono/Web/wwwroot/index.html | 52 +- .../lib/bootstrap/dist/css/bootstrap-grid.css | 7866 ++++--- .../bootstrap/dist/css/bootstrap-grid.rtl.css | 7867 ++++--- .../bootstrap/dist/css/bootstrap-reboot.css | 666 +- .../dist/css/bootstrap-reboot.rtl.css | 670 +- .../dist/css/bootstrap-utilities.css | 8572 ++++---- .../dist/css/bootstrap-utilities.rtl.css | 8570 ++++---- .../lib/bootstrap/dist/css/bootstrap.css | 18340 ++++++++------- .../lib/bootstrap/dist/css/bootstrap.rtl.css | 18349 +++++++++------- .../lib/bootstrap/dist/js/bootstrap.bundle.js | 12484 +++++------ .../lib/bootstrap/dist/js/bootstrap.esm.js | 6657 +++--- .../lib/bootstrap/dist/js/bootstrap.js | 9022 ++++---- .../frontmatter-markdown-links/main.js | 12565 ++++++++++- chrono.docs/Decks/Rewind Me.md | 5 +- chrono.docs/Master of Ceremonies.md | 1 + 27 files changed, 65978 insertions(+), 45921 deletions(-) diff --git a/Chrono/Build/Build.csproj b/Chrono/Build/Build.csproj index efceba6..ebd3ef4 100644 --- a/Chrono/Build/Build.csproj +++ b/Chrono/Build/Build.csproj @@ -8,7 +8,7 @@ - + diff --git a/Chrono/Build/Program.cs b/Chrono/Build/Program.cs index 659b90d..05e793b 100644 --- a/Chrono/Build/Program.cs +++ b/Chrono/Build/Program.cs @@ -53,10 +53,12 @@ foreach (var file in mdFiles) Set = StripWikiLink(yaml.GetValueOrDefault("set")), Speed = StripWikiLink(yaml.GetValueOrDefault("speed")), Archetypes = ParseList(yaml, "archetypes").Select(s => StripWikiLink(s) ?? "").Where(s => s != "").ToList(), - ImmortalizeTo = yaml.ContainsKey("immortalizeTo") ? ParseListOrScalar(yaml, "immortalizeTo").Select(s => StripWikiLink(s) ?? "").Where(s => s != "").ToList() : null, + ImmortalizeTo = yaml.ContainsKey("immortalizeTo") + ? ParseListOrScalar(yaml, "immortalizeTo").Select(s => StripWikiLink(s) ?? "").Where(s => s != "").ToList() + : null, ImmortalizeFrom = StripWikiLink(yaml.GetValueOrDefault("immortalizeFrom")), ImmortalizeWhen = NullIfNa(StripWikiLinks(yaml.GetValueOrDefault("immortalizeWhen"))), - ImageFile = imageFile, + ImageFile = imageFile }; cards.Add(card); @@ -71,7 +73,7 @@ foreach (var card in cards) var src = Path.Combine(docsDir, card.ImageFile); var dst = Path.Combine(cardsDir, card.ImageFile); if (File.Exists(src)) - File.Copy(src, dst, overwrite: true); + File.Copy(src, dst, true); } // Generate C# source file @@ -87,7 +89,7 @@ writer.WriteLine("{"); writer.WriteLine(" public static readonly System.Collections.Generic.List Cards ="); writer.WriteLine(" ["); -for (int i = 0; i < cards.Count; i++) +for (var i = 0; i < cards.Count; i++) { var c = cards[i]; writer.WriteLine(" new()"); @@ -138,7 +140,10 @@ static string? StripWikiLinks(string? s) return Regex.Replace(s.Trim('"'), @"\[\[([^\]]*)\]\]", "$1").Trim(); } -static string? NullIfNa(string? s) => s is "N/A" or null ? null : s.Trim('"'); +static string? NullIfNa(string? s) +{ + return s is "N/A" or null ? null : s.Trim('"'); +} static List ParseList(Dictionary yaml, string key) { @@ -149,6 +154,7 @@ static List ParseList(Dictionary yaml, string key) var trimmed = item.TrimStart('-', ' ').Trim(' ', '"'); if (trimmed.Length > 0) result.Add(trimmed); } + return result; } @@ -165,6 +171,7 @@ static List ParseListOrScalar(Dictionary yaml, string ke var trimmed = item.TrimStart('-', ' ').Trim(' ', '"'); if (trimmed.Length > 0) result.Add(trimmed); } + return result; } @@ -240,8 +247,7 @@ static string ToLiteral(string? s) if (s == null) return "null"; var sb = new StringBuilder(); sb.Append('"'); - foreach (char c in s) - { + foreach (var c in s) switch (c) { case '"': sb.Append("\\\""); break; @@ -252,7 +258,7 @@ static string ToLiteral(string? s) case '\0': sb.Append("\\0"); break; default: sb.Append(c); break; } - } + sb.Append('"'); return sb.ToString(); -} +} \ No newline at end of file diff --git a/Chrono/Model/CardData.cs b/Chrono/Model/CardData.cs index da88073..4587e3d 100644 --- a/Chrono/Model/CardData.cs +++ b/Chrono/Model/CardData.cs @@ -26,4 +26,4 @@ public class CardData public bool HasImmortalize => ImmortalizeTo is { Count: > 0 }; public bool IsImmortalized => ImmortalizeFrom != null; public string ImagePath => $"cards/{ImageFile ?? "placeholder.png"}"; -} +} \ No newline at end of file diff --git a/Chrono/Web/App.razor b/Chrono/Web/App.razor index 3e84bca..735b1ff 100644 --- a/Chrono/Web/App.razor +++ b/Chrono/Web/App.razor @@ -1,4 +1,5 @@ - +@using Web.Pages + diff --git a/Chrono/Web/Layout/MainLayout.razor.css b/Chrono/Web/Layout/MainLayout.razor.css index ecf25e5..019d27b 100644 --- a/Chrono/Web/Layout/MainLayout.razor.css +++ b/Chrono/Web/Layout/MainLayout.razor.css @@ -21,20 +21,20 @@ main { align-items: center; } - .top-row ::deep a, .top-row ::deep .btn-link { - white-space: nowrap; - margin-left: 1.5rem; - text-decoration: none; - } +.top-row ::deep a, .top-row ::deep .btn-link { + white-space: nowrap; + margin-left: 1.5rem; + text-decoration: none; +} - .top-row ::deep a:hover, .top-row ::deep .btn-link:hover { - text-decoration: underline; - } +.top-row ::deep a:hover, .top-row ::deep .btn-link:hover { + text-decoration: underline; +} - .top-row ::deep a:first-child { - overflow: hidden; - text-overflow: ellipsis; - } +.top-row ::deep a:first-child { + overflow: hidden; + text-overflow: ellipsis; +} @media (max-width: 640.98px) { .top-row { diff --git a/Chrono/Web/Layout/NavMenu.razor.css b/Chrono/Web/Layout/NavMenu.razor.css index 7d733ad..cc414c7 100644 --- a/Chrono/Web/Layout/NavMenu.razor.css +++ b/Chrono/Web/Layout/NavMenu.razor.css @@ -4,7 +4,7 @@ .top-row { min-height: 3.5rem; - background-color: rgba(0,0,0,0.4); + background-color: rgba(0, 0, 0, 0.4); } .navbar-brand { @@ -23,30 +23,30 @@ padding-bottom: 0.5rem; } - .nav-item:first-of-type { - padding-top: 1rem; - } +.nav-item:first-of-type { + padding-top: 1rem; +} - .nav-item:last-of-type { - padding-bottom: 1rem; - } +.nav-item:last-of-type { + padding-bottom: 1rem; +} - .nav-item ::deep a { - color: #d7d7d7; - border-radius: 4px; - height: 3rem; - display: flex; - align-items: center; - line-height: 3rem; - } +.nav-item ::deep a { + color: #d7d7d7; + border-radius: 4px; + height: 3rem; + display: flex; + align-items: center; + line-height: 3rem; +} .nav-item ::deep a.active { - background-color: rgba(255,255,255,0.37); + background-color: rgba(255, 255, 255, 0.37); color: white; } .nav-item ::deep a:hover { - background-color: rgba(255,255,255,0.1); + background-color: rgba(255, 255, 255, 0.1); color: white; } diff --git a/Chrono/Web/Pages/Agents.razor b/Chrono/Web/Pages/Agents.razor index 6e88b9e..4f34735 100644 --- a/Chrono/Web/Pages/Agents.razor +++ b/Chrono/Web/Pages/Agents.razor @@ -1,5 +1,4 @@ @page "/agents" -@using Chrono.Model Agents @@ -29,7 +28,8 @@ @@ -55,4 +55,5 @@ .ThenBy(c => c.Name) .ToList(); } + } diff --git a/Chrono/Web/Pages/Cards.razor b/Chrono/Web/Pages/Cards.razor index d2d3ce6..f7780fb 100644 --- a/Chrono/Web/Pages/Cards.razor +++ b/Chrono/Web/Pages/Cards.razor @@ -1,5 +1,4 @@ @page "/cards" -@using Chrono.Model Card Gallery @@ -27,7 +26,8 @@
- + @if (search.Length > 0) { @@ -42,7 +42,7 @@