put the page class on html element

This commit is contained in:
Pierre Bondoerffer
2017-08-04 14:50:35 +02:00
parent e2ad99ab3c
commit 6614f3f0e6
3 changed files with 18 additions and 9 deletions

View File

@@ -78,6 +78,15 @@ $(function () {
return;
}
} else {
// add class on info-pages
var css = location.pathname.replace(/(\/$|^\/|.html$)/gm, "")
.replace(/[^a-zA-Z]/gi, "-");
if (css === '')
{
css = 'index';
}
$('body').addClass('cp-page-' + css);
}
require([