コード例 #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");
        }
コード例 #2
0
        public void SetActiveThemeByName(string themeName)
        {
            var theme = FindThemeByName(themeName);

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