Skip to content

Commit

Permalink
class renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
ropalko committed Feb 7, 2022
1 parent 381246b commit b8e41b6
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 16 deletions.
13 changes: 7 additions & 6 deletions controls/body-css-classes.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@
/// </summary>
private string CurrentPageClasses(PortalSettings portal, DotNetNuke.Entities.Tabs.TabInfo tab)
{
return "tab-" + tab.TabID + " "
+ (portal.HomeTabId == portal.ActiveTab.TabID ? "tab-is-home " : "")
+ "tab-level-" + tab.Level + " ";
return "page-" + tab.TabID + " "
+ (portal.ActiveTab.ParentId > -1 ? "page-parent-" + portal.ActiveTab.ParentId + " " : "")
+ (portal.HomeTabId == portal.ActiveTab.TabID ? "page-is-home " : "")
+ "nav-level-" + (tab.Level+1) + " ";
}
Expand All @@ -85,9 +86,9 @@
/// </summary>
private string PageAndPortalClasses(PortalSettings portal, DotNetNuke.Entities.Tabs.TabInfo rootTab, DotNetNuke.Entities.Tabs.TabInfo neutralRoot)
{
return " portal-" + portal.PortalId
+ " root-tab-" + rootTab.TabID
+ " root-neutral-tab-" + neutralRoot.TabID;
return " site-" + portal.PortalId
+ " page-root-" + rootTab.TabID
+ " page-root-neutral-" + neutralRoot.TabID;
}
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion dist/theme.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/theme.min.css.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@ To get the awesome designed content, install [2sxc](https://github.com/2sic/2sxc

## History

v5.0.0
v5.0.1
1. removed node-sass, added sass
2. removed unnecessary packages
3. fixed :visited link style in navigation
4. Renamed body classes
1. tab -> page
2. portal -> site
3. tab-level -> nav-level

## Love from Switzerland

Expand Down
11 changes: 6 additions & 5 deletions src/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@ $tosic-footer-color: #fff;

// ----------------------------------------------------------------------------------------------------
// 3. Special CSS for specific pages
// The body tag always has things like tab-xx to say what page it's on. Use these to target special CSS.
// The body tag always has things like page-xx to say what page it's on. Use these to target special CSS.
// Classes you can use are:
// - tab-##
// - tab-is-home (this class is only added on home)
// - root-tab-## the top level tab which is activated, to allow different colors across an entire section
// - page-##
// - page-is-home (this class is only added on home)
// - root-page-## the top level page which is activated, to allow different colors across an entire section
// - page-parent-## the parent page of the current page - If available
// - lang-en / lang-de etc.

// Set the width of the logo specifically for the home page only
// .tab-is-home {
// .page-is-home {
// header {
// .logo {
// width: 250px;
Expand Down
2 changes: 1 addition & 1 deletion src/scss/components/_nav-breadcrumb.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ---------- Breadcrumbs ---------- */
.tab-is-home .to-shine-page-breadcrumb {
.page-is-home .to-shine-page-breadcrumb {
display: none;
}
.to-shine-page-breadcrumb {
Expand Down
2 changes: 1 addition & 1 deletion src/scss/layout-variations/_variation-floatwideheader.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@media all {
/*layout floatwideheader*/
body.to-shine-variation-floatwideheader {
&.tab-2650 {
&.page-2650 {
main#to-shine-page-main {
@include media-breakpoint-up(xl) {
margin-top: -10vh!important;
Expand Down

0 comments on commit b8e41b6

Please sign in to comment.