Skip to content

Commit

Permalink
Add userGroup search param for topbar theme banner
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaliyR committed Nov 6, 2020
1 parent 4abc5e6 commit fefed1a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/supporting-files/stackbit-banner.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ module.exports = `<div id="theme-bar" class="theme-bar theme-bar-fixed theme-bar
newSiteButton.querySelector('span').textContent = decodeURIComponent(searchParams.themeBarNewSite);
}
}
if (searchParams.themeBarUserGroup) {
var newSiteButton = themebar.querySelector('.theme-bar-new-site');
var joiner = newSiteButton.search.length ? '&' : '';
newSiteButton.search += joiner + 'userGroup=' + searchParams.themeBarUserGroup;
}
if (body && !hideThemeBar) {
body.classList.add("has-theme-bar");
themebar.classList.remove("theme-bar-hidden");
Expand Down

0 comments on commit fefed1a

Please sign in to comment.