From c667ce43b8e55890ecc1c063ac1fea6406d99257 Mon Sep 17 00:00:00 2001 From: Booklordofthedings Date: Thu, 7 Nov 2024 11:13:13 +0100 Subject: [PATCH] changed some logic to work better --- src/HTML/HTML.bf | 9 +++++++++ src/Page.bf | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/HTML/HTML.bf b/src/HTML/HTML.bf index 6217e8b..b50e6f3 100644 --- a/src/HTML/HTML.bf +++ b/src/HTML/HTML.bf @@ -89,6 +89,15 @@ class HTML { if(_Id != .Empty) buffer.Append(scope $"id=\"{_Id}\""); + + if(_Classes.Count > 0) + { + buffer.Append("class=\""); + for(var i in _Classes) + buffer.Append(scope $"{i} "); + buffer.Append("\" "); + } + for(var i in _Values) { buffer.Append(scope $"{i.key}=\"{i.value}\""); diff --git a/src/Page.bf b/src/Page.bf index 508ec73..7fcd366 100644 --- a/src/Page.bf +++ b/src/Page.bf @@ -58,7 +58,7 @@ abstract class Page {Title} {BuildStyles(.. scope .())} - + {BuildScripts(.. scope .())} {BuildElements(.. scope .())}