예제 #1
0
        #pragma warning disable 1998
        protected override void BuildRenderTree(Microsoft.AspNetCore.Blazor.RenderTree.RenderTreeBuilder builder)
        {
            base.BuildRenderTree(builder);
            builder.OpenElement(0, "div");
            builder.AddContent(1, "\n    ");
            builder.OpenComponent <Frontend.Shared.NavMenu>(2);
            builder.CloseComponent();
            builder.AddContent(3, "\n");
            builder.CloseElement();
            builder.AddContent(4, "\n\n");
            builder.OpenElement(5, "div");
            builder.AddAttribute(6, "class", "main");
            builder.AddContent(7, "\n    ");
            builder.OpenElement(8, "div");
            builder.AddAttribute(9, "class", "content px-4");
            builder.AddContent(10, "\n        ");
            builder.AddContent(11, Body);
            builder.AddContent(12, "\n    ");
            builder.CloseElement();
            builder.AddContent(13, "\n");
            builder.CloseElement();
            builder.AddContent(14, "\n\n");
            builder.AddMarkupContent(15, @"<footer class=""blog-footer"">
    <p>Fresh Tomatoes built for <a href=""https://webassembly.org/"">WebAssembly</a> by <a href=""https://www.linkedin.com/in/hanwen-guo-71b805149/"">@Hanwen
            Guo</a>&amp;<a href=""https://www.linkedin.com/in/gongdai-liu-bb8b5013b/""> @Gongdai Liu.</a></p>
    <p>
        <a href=""#"">Back to top</a>
    </p>
</footer>");
        }
예제 #2
0
 #pragma warning disable 1998
 protected override void BuildRenderTree(Microsoft.AspNetCore.Blazor.RenderTree.RenderTreeBuilder builder)
 {
     base.BuildRenderTree(builder);
     builder.OpenComponent <Microsoft.AspNetCore.Blazor.Routing.Router>(0);
     builder.AddAttribute(1, "AppAssembly", Microsoft.AspNetCore.Blazor.Components.RuntimeHelpers.TypeCheck <System.Reflection.Assembly>(typeof(Program).Assembly));
     builder.CloseComponent();
 }