diff --git a/src/Talo/Commands/Export.cs b/src/Talo/Commands/Export.cs index 0870159..bcc7946 100644 --- a/src/Talo/Commands/Export.cs +++ b/src/Talo/Commands/Export.cs @@ -75,7 +75,11 @@ private async Task HandleAsync(List types, string outDir, IConsole conso foreach (var metadata in allMetadata) { var fileId = await CreateHtmlPage(pipeline, metadata, outputDir, configuration.Prefix); - createdFiles.Add(new CreatedHtmlPage(metadata.SequenceNumber, fileId, metadata.Title)); + createdFiles.Add(new CreatedHtmlPage( + SequenceNumber: metadata.SequenceNumber, + LatestStatus: metadata.LatestStatus, + FileId: fileId, + Title: metadata.Title)); } await CreateIndexPage(outputDir, createdFiles, console); diff --git a/src/Talo/FileSystem/CreatedHtmlPage.cs b/src/Talo/FileSystem/CreatedHtmlPage.cs index 5aeab99..d41cbe2 100644 --- a/src/Talo/FileSystem/CreatedHtmlPage.cs +++ b/src/Talo/FileSystem/CreatedHtmlPage.cs @@ -1,3 +1,3 @@ namespace Talo.FileSystem; -public record CreatedHtmlPage(int SequenceNumber, string FileId, string Title); +public record CreatedHtmlPage(int SequenceNumber, string? LatestStatus, string FileId, string Title); diff --git a/src/Talo/Repositories/RecordMetadata.cs b/src/Talo/Repositories/RecordMetadata.cs index 79951e1..29953a5 100644 --- a/src/Talo/Repositories/RecordMetadata.cs +++ b/src/Talo/Repositories/RecordMetadata.cs @@ -12,7 +12,7 @@ public class RecordMetadata public string Title { get; private set; } = ""; public int SequenceNumber { get; private set; } private readonly List _statusRows = []; - private string? LatestStatus { get; set; } + public string? LatestStatus { get; private set; } public RecordMetadata(string filePath, IConsole console) { diff --git a/src/Talo/Templating/HtmlTemplates.cs b/src/Talo/Templating/HtmlTemplates.cs index e7da509..cdd1ca5 100644 --- a/src/Talo/Templating/HtmlTemplates.cs +++ b/src/Talo/Templating/HtmlTemplates.cs @@ -1,4 +1,5 @@ using System.Text; +using Markdig.Helpers; using Talo.FileSystem; namespace Talo.Templating; @@ -29,16 +30,24 @@ public static string Top(string title) => public static string IndexTable(List createdFiles) { var builder = new StringBuilder(); - builder.Append("
    "); + builder.Append(""); foreach (var file in createdFiles) { var fileName = $"{file.FileId}.html"; - builder.Append("
  • "); - builder.Append($"{file.SequenceNumber}. {file.Title}"); - builder.Append("
  • "); + builder.Append(""); + builder.Append(""); + builder.Append(""); + builder.Append(""); + builder.Append(""); } - builder.Append(""); + builder.Append("
    No.StatusTitle
    "); + builder.Append(file.SequenceNumber); + builder.Append(""); + builder.Append(file.LatestStatus); + builder.Append(""); + builder.Append($"{file.Title}"); + builder.Append("
    "); return builder.ToString(); } }