Merge pull request #2186 from anojht/baseurl-themefix

detect if baseurl is set and reset the url !wip
pull/2194/head
Jamie 7 years ago committed by GitHub
commit ced7cfa80f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -90,10 +90,20 @@ O:::::::OOO:::::::Om::::m m::::m m::::mb:::::bbbbbb::::::bi::::::i
if (customization.HasPresetTheme)
{
if (!string.IsNullOrEmpty(baseUrl))
{
if (!customization.PresetThemeContent.Contains("/" + baseUrl))
{
var index = customization.PresetThemeContent.IndexOf("/api/");
customization.PresetThemeContent = customization.PresetThemeContent.Insert(index, "/" + baseUrl);
} else
{
var startIndex = customization.PresetThemeContent.IndexOf("href=");
var index = customization.PresetThemeContent.IndexOf("/api/");
customization.PresetThemeContent = customization.PresetThemeContent.Remove(startIndex+6, (index-(startIndex+6)));
index = customization.PresetThemeContent.IndexOf("/api/");
customization.PresetThemeContent = customization.PresetThemeContent.Insert(index, "/" + baseUrl);
}
}
<style>
@Html.Raw(customization.PresetThemeContent)

Loading…
Cancel
Save