Improvements to themes, layouts, and CSS styling

This commit is contained in:
Shaun Walker
2019-10-16 14:28:49 -04:00
parent c029e70783
commit 05a405e036
51 changed files with 11843 additions and 777 deletions

View File

@ -8,7 +8,7 @@ namespace Oqtane.Services
{
Task<List<Theme>> GetThemesAsync();
Dictionary<string, string> GetThemeTypes(List<Theme> Themes);
Dictionary<string, string> GetPaneLayoutTypes(List<Theme> Themes);
Dictionary<string, string> GetPaneLayoutTypes(List<Theme> Themes, string ThemeName);
Dictionary<string, string> GetContainerTypes(List<Theme> Themes);
Task InstallThemesAsync();
Task DeleteThemeAsync(string ThemeName);

View File

@ -74,14 +74,17 @@ namespace Oqtane.Services
return selectableThemes;
}
public Dictionary<string, string> GetPaneLayoutTypes(List<Theme> Themes)
public Dictionary<string, string> GetPaneLayoutTypes(List<Theme> Themes, string ThemeName)
{
var selectablePaneLayouts = new Dictionary<string, string>();
foreach (Theme theme in Themes)
{
foreach (string panelayout in theme.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
if (ThemeName.StartsWith(theme.ThemeName))
{
selectablePaneLayouts.Add(panelayout, theme.Name + " - " + @Utilities.GetTypeNameClass(panelayout));
foreach (string panelayout in theme.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
selectablePaneLayouts.Add(panelayout, theme.Name + " - " + @Utilities.GetTypeNameClass(panelayout));
}
}
}
return selectablePaneLayouts;