Skip to content

Commit

Permalink
Customize default CSS in demo page via JS
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed Jul 9, 2019
1 parent 7cf1e1c commit 6261253
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion website/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const siteConfig = {

onPageNav: "separate",

scripts: ["/js/pattern-validity.js"],
scripts: ["/js/pattern-validity.js", "/js/change-css-in-demo-page.js"],

algolia: {
apiKey: "29d680ce97507c5cd2836c6c74783c05",
Expand Down
5 changes: 5 additions & 0 deletions website/static/js/change-css-in-demo-page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if (window.location.pathname === "/demo") {
document.addEventListener("DOMContentLoaded", function() {
document.querySelector(".headerWrapper.wrapper").style.maxWidth = "100%";
});
}

0 comments on commit 6261253

Please sign in to comment.