public static StyleSheet Style(HTMLLinkElement link)
        {
            //TODO Read content from ext. file
            var sheet = CssParser.ParseStyleSheet(string.Empty);

            sheet.Media.MediaText = link.Media;
            sheet.OwnerNode       = link;
            return(sheet);
        }
Exemple #2
0
        public static void AddBootstrap(HTMLElement head)
        {
            var scriptBootstrap = new HTMLScriptElement()
            {
                Src         = "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js",
                CrossOrigin = "anonymous",
            };

            scriptBootstrap.SetAttribute("integrity", "sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl");
            head.AppendChild(scriptBootstrap);

            var linkBootstrap = new HTMLLinkElement()
            {
                Href = "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css",
                Rel  = "stylesheet",
            };

            linkBootstrap.SetAttribute("integrity", "sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm");
            linkBootstrap.SetAttribute("crossorigin", "anonymous");
            head.AppendChild(linkBootstrap);
        }