Esempio n. 1
0
        public string GetThemeCodeCssUrl(DemoTheme theme)
        {
            var highlightjsTheme = HighlightJSThemes[DefaultThemeName];

            if (HighlightJSThemes.ContainsKey(theme.Name))
            {
                highlightjsTheme = HighlightJSThemes[theme.Name];
            }
            return($"//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/{highlightjsTheme}.min.css");
        }
Esempio n. 2
0
        public void SetActiveThemeByName(string themeName)
        {
            var theme = FindThemeByName(themeName);

            if (theme != null)
            {
                _activeTheme = theme;
            }
            else
            {
                _activeTheme = DefaultTheme;
            }
        }
Esempio n. 3
0
 public string GetThemeCssUrl(DemoTheme theme)
 {
     return($"_content/BlazorDemo/css/switcher-resources/themes/{theme.Name}/bootstrap.min.css");
 }