private static HtmlBuilder Container(
     this HtmlBuilder hb,
     Context context,
     SiteSettings ss,
     string body,
     Action action)
 {
     if (!context.Ajax)
     {
         return(hb.Html(
                    lang: context.Language,
                    action: () => hb.Head(action: () => hb
                                          .Raw(HtmlHtmls.ExtendedHtmls(
                                                   context: context,
                                                   id: "HtmlHeaderTop"))
                                          .Meta(httpEquiv: "X-UA-Compatible", content: "IE=edge")
                                          .Meta(charset: "utf-8")
                                          .Meta(name: "keywords", content: Parameters.General.HtmlHeadKeywords)
                                          .Meta(name: "description", content: Description(
                                                    ss: ss,
                                                    body: body))
                                          .Meta(name: "author", content: "Implem Inc.")
                                          .Meta(name: "viewport", content: Parameters.General.HtmlHeadViewport)
                                          .LinkedStyles(
                                              context: context,
                                              ss: ss)
                                          .ExtendedStyles(context: context)
                                          .Title(action: () => hb
                                                 .Text(text: HtmlTitle(
                                                           context: context,
                                                           ss: ss)))
                                          .ExtendedHeader(ss: ss)
                                          .Raw(HtmlHtmls.ExtendedHtmls(
                                                   context: context,
                                                   id: "HtmlHeaderBottom")))
                    .Body(style: "visibility:hidden", action: action)));
     }
     else
     {
         action?.Invoke();
         return(hb);
     }
 }
Exemple #2
0
 public static HtmlBuilder Template(
     this HtmlBuilder hb,
     Context context,
     SiteSettings ss,
     View view,
     Versions.VerTypes verType,
     BaseModel.MethodTypes methodType,
     long siteId              = 0,
     long parentId            = 0,
     string referenceType     = null,
     string siteReferenceType = null,
     string title             = null,
     string body              = null,
     bool useBreadcrumb       = true,
     bool useTitle            = true,
     bool useSearch           = true,
     bool useNavigationMenu   = true,
     string script            = null,
     string userScript        = null,
     string userStyle         = null,
     Action action            = null)
 {
     return(hb.Container(
                context: context,
                ss: ss,
                body: body,
                action: () => hb
                .Raw(HtmlHtmls.ExtendedHtmls(
                         context: context,
                         id: "HtmlBodyTop"))
                .MainContainer(
                    context: context,
                    ss: ss,
                    view: view,
                    verType: verType,
                    methodType: methodType,
                    siteId: siteId,
                    parentId: parentId,
                    referenceType: referenceType,
                    siteReferenceType: siteReferenceType,
                    title: title,
                    useBreadcrumb: useBreadcrumb,
                    useTitle: useTitle,
                    useSearch: useSearch,
                    useNavigationMenu: useNavigationMenu,
                    action: action)
                .TemplateDialogs(
                    context: context,
                    ss: ss,
                    useNavigationMenu: useNavigationMenu)
                .HiddenData(
                    context: context,
                    ss: ss)
                .VideoDialog(
                    context: context,
                    ss: ss)
                .Styles(
                    context: context,
                    ss: ss,
                    userStyle: userStyle)
                .Scripts(
                    context: context,
                    ss: ss,
                    script: script,
                    userScript: userScript)
                .Raw(HtmlHtmls.ExtendedHtmls(
                         context: context,
                         id: "HtmlBodyBottom"))));
 }