예제 #1
0
        private static IEnumerable <HtmlTag> styleTags()
        {
#if DEBUG
            foreach (var file in Stylesheets)
            {
                var path = $"/public/stylesheets/{file}";
                yield return(new HtmlTag("link").Attr("rel", "stylesheet").Attr("href", path));
            }
#else
            yield return(BatchResultsWriter.StyleTag());
#endif

            yield return(new HtmlTag("link")
                         .Attr("rel", "stylesheet")
                         .Attr("href", "//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"));
        }
        public static HtmlDocument Build(Suite top, FixtureLibrary fixtures, string title)
        {
            var document = new HtmlDocument
            {
                Title = title
            };

            document.Head.Append(BatchResultsWriter.StyleTag());

            writeInitialData(document, top, fixtures, title);

#if DEBUG
            var scriptTag = HomeEndpoint.ScriptTag(false, "/preview.js");
            document.Body.Append(scriptTag);
#else
            writeEnbeddedJavascript(document);
#endif

            document.Body.Add("div").Id("main");

            return(document);
        }