diff --git a/SimpleCDN/Services/IndexGenerator.cs b/SimpleCDN/Services/IndexGenerator.cs index f2b6399..424cd37 100644 --- a/SimpleCDN/Services/IndexGenerator.cs +++ b/SimpleCDN/Services/IndexGenerator.cs @@ -35,10 +35,10 @@ public class IndexGenerator(IOptionsMonitor options) : IIndexG
- - - - + + + + """, rootRelativePath.Replace("/", "/"), _options.CurrentValue.PageTitle, rootRelativePath); @@ -83,10 +83,10 @@ public class IndexGenerator(IOptionsMonitor options) : IIndexG private static void AppendRow(StringBuilder index, string href, string name, string icon, long size, DateTimeOffset lastModified) { index.Append(""); - index.AppendFormat("""""", icon); - index.AppendFormat("""""", href, name); - index.AppendFormat("""""", size < 0 ? "-" : size.FormatByteCount()); - index.AppendFormat("""""", lastModified.ToString("dd/MM/yyyy HH:mm")); + index.AppendFormat("""""", icon); + index.AppendFormat("""""", href, name); + index.AppendFormat("""""", size < 0 ? "-" : size.FormatByteCount()); + index.AppendFormat("""""", lastModified.ToString("dd/MM/yyyy HH:mm")); index.Append(""); } } diff --git a/SimpleCDN/wwwroot/styles.css b/SimpleCDN/wwwroot/styles.css index f4bb70c..8d4d8b1 100644 --- a/SimpleCDN/wwwroot/styles.css +++ b/SimpleCDN/wwwroot/styles.css @@ -1,11 +1,11 @@ @font-face { font-family: Code; font-display: swap; - src: local("Cascadia Code"),url(/CascadiaCode/woff2/CascadiaCode.woff2) format("woff2"),url(/CascadiaCode/ttf/CascadiaCode.ttf) format("truetype"),url(/CascadiaCode/CascadiaCode.ttf) format("truetype"),url(/CascadiaCode/otf/static/CascadiaCodeNF-Regular.otf) format("opentype"),local("Cascadia Mono"),monospace; + src: local("Cascadia Code"),url(/CascadiaCode/woff2/CascadiaCode.woff2) format("woff2"),url(/CascadiaCode/ttf/CascadiaCode.ttf) format("truetype"),url(/CascadiaCode/CascadiaCode.ttf) format("truetype"),url(/CascadiaCode/otf/static/CascadiaCodeNF-Regular.otf) format("opentype"),local("Cascadia Mono"); } :root { - font-family: Code; + font-family: Code, monospace; } * { @@ -32,6 +32,7 @@ main { table { margin: auto; overflow: auto; + border-collapse: collapse; } h1 { @@ -45,11 +46,31 @@ th, td { padding: .2em 1em; } +.col-size, .col-date { + text-align: center; +} + thead th { font-size: 1.2rem; border-bottom: 1px solid black; } +tr { + position: relative; + transition: background-color .5s; +} + +tr:has(a):hover { + transition: background-color 200ms; + background-color: #eee; +} + +.col-name a::after { + content: ''; + position: absolute; + inset: 0; +} + footer { text-align: center; }
NameSizeLast Modified (UTC)NameSizeLast Change (UTC)
{0}{1}{0}{0}{0}{1}{0}{0}