mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-15 00:03:38 -07:00
[HTML] Cleanup templates slightly
This commit is contained in:
parent
fd9d367bad
commit
2b0fa4213b
|
|
@ -1,8 +1,9 @@
|
|||
@using System
|
||||
@using System.Linq
|
||||
@using System.Threading.Tasks
|
||||
|
||||
@namespace DiscordChatExporter.Core.Exporting.Writers.Html
|
||||
@inherits MiniRazor.TemplateBase<DiscordChatExporter.Core.Exporting.Writers.Html.MessageGroupTemplateContext>
|
||||
@inherits MiniRazor.TemplateBase<MessageGroupTemplateContext>
|
||||
|
||||
@{
|
||||
string FormatDate(DateTimeOffset date) => Model.ExportContext.FormatDate(date);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@namespace DiscordChatExporter.Core.Exporting.Writers.Html
|
||||
@inherits MiniRazor.TemplateBase<DiscordChatExporter.Core.Exporting.Writers.Html.PostambleTemplateContext>
|
||||
@inherits MiniRazor.TemplateBase<PostambleTemplateContext>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
@using System
|
||||
@using System.Threading.Tasks
|
||||
|
||||
@namespace DiscordChatExporter.Core.Exporting.Writers.Html
|
||||
@inherits MiniRazor.TemplateBase<DiscordChatExporter.Core.Exporting.Writers.Html.PreambleTemplateContext>
|
||||
@inherits MiniRazor.TemplateBase<PreambleTemplateContext>
|
||||
|
||||
@{
|
||||
string FormatDate(DateTimeOffset date) => Model.ExportContext.FormatDate(date);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
@using System
|
||||
|
||||
@namespace DiscordChatExporter.Core.Exporting.Writers.Html
|
||||
@inherits MiniRazor.TemplateBase<DiscordChatExporter.Core.Exporting.Writers.Html.PreambleTemplateContext>
|
||||
@inherits MiniRazor.TemplateBase<PreambleTemplateContext>
|
||||
|
||||
@{
|
||||
var isDarkTheme = string.Equals(Model.ThemeName, "Dark", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
string Themed(string darkVariant, string lightVariant) => isDarkTheme ? darkVariant : lightVariant;
|
||||
string Themed(string darkVariant, string lightVariant) =>
|
||||
string.Equals(Model.ThemeName, "Dark", StringComparison.OrdinalIgnoreCase)
|
||||
? darkVariant
|
||||
: lightVariant;
|
||||
}
|
||||
|
||||
<style>
|
||||
|
|
|
|||
Loading…
Reference in a new issue