Skip to content

Commit

Permalink
Merge pull request #9 from stevie-mayhew/pulls/3.2
Browse files Browse the repository at this point in the history
UPDATE: base functionality for working with SilverStripe 3.2
  • Loading branch information
stevie-mayhew committed Oct 13, 2015
2 parents 3b2e03e + d342e19 commit 880c598
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 6 deletions.
2 changes: 2 additions & 0 deletions code/extensions/CMSBrandingLeftAndMainExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public function init()
. '.cms-menu .cms-menu-list li a, .cms-menu .cms-menu-list li.children li a {color: ' . $this->owner->config()->cms_menu_color . '}'
. '.cms-menu .cms-menu-list li > a .icon.icon-16::before, .cms-menu .cms-menu-list li.children .grouped-cms-menu::after {color: ' . $this->owner->config()->cms_menu_color . '}'
. '.cms-menu {background: ' . $this->owner->config()->cms_menu_background . ';}'
. '.cms-menu .cms-menu-list li ul.collapsed-flyout {background: ' . $this->owner->config()->cms_menu_background . ';}'
. '.cms-menu .cms-menu-list li .child-flyout-indicator {border-right-color: ' . $this->owner->config()->cms_menu_color . ';border-bottom-color: ' . $this->owner->config()->cms_menu_color . ';}'
. '.cms-menu .cms-menu-list li.current a, .cms-menu .cms-menu-list li.children ul li.current a {background: ' . $this->owner->config()->cms_menu_active_background_color . '; color: ' . $this->owner->config()->cms_menu_active_text_color . '}'
. '.cms-menu .cms-menu-list li.current.children > a {color: ' . $this->owner->config()->cms_menu_color . '}'
. '.cms-menu .cms-menu-list li.current.children > a .grouped-cms-menu::after {color: ' . $this->owner->config()->cms_menu_color . '}'
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"silverstripe-australia/grouped-cms-menu": "Group CMS menus to provide a better UX"
},
"require": {
"silverstripe/framework": ">=3.0.1,<3.2",
"silverstripe/framework": "~3.1",
"composer/installers": "*"
},
"support": {
Expand Down
22 changes: 21 additions & 1 deletion css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
.cms .defaultSkin .mceToolbar,
.cms .defaultSkin .mceStatusbar {
background: #f9f9f9;
background: linear-gradient(#f9f9f9, #f1f1f1);
background: linear-gradient(#f9f9f9, #f2f2f2);
border-color: #BDBDBD !important;
}

Expand Down Expand Up @@ -376,6 +376,13 @@
.cms-menu .cms-panel-toggle.south {
border-color: rgba(0, 0, 0, 0.3);
box-shadow: none;
}

.cms-menu.collapsed {
width: 49px !important;
}

.cms-menu.collapsed .cms-logo-header.north {
display: none;
}

Expand Down Expand Up @@ -534,6 +541,7 @@

.cms-menu .cms-menu-list li.children .grouped-cms-menu.text {
margin-left: 32px;
display: block;
}

.cms-menu .cms-menu-list li.children .grouped-cms-menu::after {
Expand Down Expand Up @@ -565,6 +573,14 @@
background: rgba(0, 0, 0, 0.2);
}

.cms-menu .cms-menu-list li.children ul.collapsed-flyout {
left: 50px;
}

.cms-menu .cms-menu-list li.children ul.collapsed-flyout li a {
border-top: none;
}

.cms-menu .cms-menu-list li.children li {
background: transparent none;
}
Expand Down Expand Up @@ -643,6 +659,10 @@
content: '\f0d7';
}

.cms-menu .cms-menu-list.collapsed li.children > a {
padding-right: 0;
}

/** =========================================
* Loading Logo
===========================================*/
Expand Down
2 changes: 1 addition & 1 deletion css/main.css.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion css/main.min.css

This file was deleted.

8 changes: 6 additions & 2 deletions scss/components/_cms-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ $sidebar-color: $brand-primary-color;
.cms-panel-toggle.south {
border-color: rgba(0, 0, 0, $opacity-base);
box-shadow: none;
// Disallow toggling
display: none;
}
&.collapsed {
width: 49px !important;
.cms-logo-header.north {
display: none;
}
}
}
18 changes: 18 additions & 0 deletions scss/components/_grouped-cms-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
.grouped-cms-menu {
&.text {
margin-left: $gap-lg;
display: block;
}
&::after {
@include icon-base;
Expand All @@ -50,6 +51,14 @@
}
}
}
&.collapsed-flyout {
left: 50px;
li {
a {
border-top: none;
}
}
}
}
li {
background: transparent none;
Expand Down Expand Up @@ -119,5 +128,14 @@
}
}
}
&.collapsed {
li {
&.children {
> a {
padding-right: 0;
}
}
}
}
}
}
2 changes: 2 additions & 0 deletions templates/LeftAndMain_Menu.ss
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
</ul>
</div>
<div class="cms-panel-toggle south">
<button class="sticky-toggle" type="button" title="Sticky nav">Sticky nav</button>
<span class="sticky-status-indicator">auto</span>
<a class="toggle-expand" href="#"><span>&raquo;</span></a>
<a class="toggle-collapse" href="#"><span>&laquo;</span></a>
</div>
Expand Down

0 comments on commit 880c598

Please sign in to comment.