Exemple #1
0
        public static string ConstructorHtml(MainContent content)
        {
            if (string.IsNullOrEmpty(content.body))
                return string.Empty;

            var cssBuilder = new StringBuilder();
            var jsBuilder = new StringBuilder();

            content.css.ForEach(o => cssBuilder.Append(string.Format(_cssTemplate, o)));
            content.js.ForEach(o => jsBuilder.Append(string.Format(_jsTemplate, o)));

            var header = string.Format(_headerTemplate, content.image, content.title, content.image_source);
            var source = string.Format(_htmlTemplate, cssBuilder.ToString(), jsBuilder.ToString(), content.body, _notifyScript);

            source = source.Replace("<div class=\"img-place-holder\"></div>", header);

            return source;
        }
Exemple #2
0
 public static void ArrangeMainContent(MainContent content)
 {
     content.body = ConstructorHtml(content);
 }