Coding/BinaryDad.Coding/Views/Home/ViewHtml.cshtml

14 lines
279 B
Plaintext
Raw Normal View History

2021-07-23 00:41:12 +00:00
@model User
@{
Layout = null;
var html = Model.Html;
var htmlTagIndex = Model.Html.IndexOf("<body>");
if (htmlTagIndex > 0)
{
html = html.Insert(htmlTagIndex, $"<head><style type=\"text/css\">{Model.Css}</style></head>");
}
}
@Html.Raw(html)