Beispiel #1
0
 public static HtmlBuilder SiteImageIcon(
     this HtmlBuilder hb, Context context, SiteSettings ss, long siteId)
 {
     return(BinaryUtilities.ExistsSiteImage(
                context: context,
                ss: ss,
                referenceId: siteId,
                sizeType: ImageData.SizeTypes.Icon)
             ? hb.Img(
                src: Locations.Get(
                    context: context,
                    parts: new string[]
     {
         "Items",
         siteId.ToString(),
         "Binaries",
         "SiteImageIcon",
         BinaryUtilities.SiteImagePrefix(
             context: context,
             ss: ss,
             referenceId: siteId,
             sizeType: ImageData.SizeTypes.Icon)
     }),
                css: "site-image-icon")
             : hb);
 }
Beispiel #2
0
 private static HtmlBuilder Title(
     this HtmlBuilder hb, SiteSettings ss, long siteId, string text)
 {
     if (!text.IsNullOrEmpty())
     {
         if (BinaryUtilities.ExistsSiteImage(ss, siteId, ImageData.SizeTypes.Icon))
         {
             hb.Img(
                 src: Locations.Get(
                     "Items",
                     siteId.ToString(),
                     "Binaries",
                     "SiteImageIcon",
                     BinaryUtilities.SiteImagePrefix(
                         ss, siteId, ImageData.SizeTypes.Icon)),
                 css: "site-image-icon");
         }
         return(hb.Header(id: "HeaderTitleContainer", action: () => hb
                          .H(number: 1, id: "HeaderTitle", action: () => hb
                             .Text(text: text))));
     }
     else
     {
         return(hb);
     }
 }
Beispiel #3
0
 public static HtmlBuilder SiteImageIcon(
     this HtmlBuilder hb, SiteSettings ss, long siteId)
 {
     return(BinaryUtilities.ExistsSiteImage(ss, siteId, ImageData.SizeTypes.Icon)
         ? hb.Img(
                src: Locations.Get(
                    "Items",
                    siteId.ToString(),
                    "Binaries",
                    "SiteImageIcon",
                    BinaryUtilities.SiteImagePrefix(ss, siteId, ImageData.SizeTypes.Icon)),
                css: "site-image-icon")
         : hb);
 }