Skip to content

Commit

Permalink
Added compatibility with BreadcrumbDropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
noelboss committed Jul 18, 2018
1 parent 6e11e56 commit 508ec90
Show file tree
Hide file tree
Showing 11 changed files with 234 additions and 41 deletions.
2 changes: 1 addition & 1 deletion AdminThemeBoss.info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Admin Theme Boss",
"summary": "A light and clear theme based on Uikit 3, extending AdminThemeUikit",
"href": "https://github.com/noelboss/AdminThemeBoss",
"version": "0.2.3",
"version": "0.2.4",
"author": "Noël Bossart",
"autoload": "template=admin",
"icon": "diamond",
Expand Down
4 changes: 2 additions & 2 deletions AdminThemeBoss.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This source file is subject to the license file that is bundled
* with this source code in the file LICENSE.
*
* File created/changed: 2018-07-11T14:49:18+02:00
* File created/changed: 2018-07-18T11:34:58+02:00
*/

namespace ProcessWire;
Expand Down Expand Up @@ -126,7 +126,7 @@ public function init()
$this->user->setAndSave('admin_theme', 'AdminThemeUikit');
}

if ($this->get('extendedbreadcrumb')) {
if ($this->get('extendedbreadcrumb') && !$this->wire('modules')->isInstalled('BreadcrumbDropdowns')) {
$this->addHookAfter('AdminThemeUikit::renderBreadcrumbs', $this, 'renderBreadcrumbs');
}

Expand Down
5 changes: 3 additions & 2 deletions AdminThemeBossConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This source file is subject to the license file that is bundled
* with this source code in the file LICENSE.
*
* File created/changed: 2018-07-11T09:56:38+02:00
* File created/changed: 2018-07-18T11:36:17+02:00
*/

namespace ProcessWire;
Expand Down Expand Up @@ -61,7 +61,8 @@ public function __construct()
'type' => 'checkbox',
'icon' => 'link',
'label' => $this->_('Extended Breadcrumb'),
'description' => $this->_('If set, the default breadcrumb will be extended with edit links.'),
'description' => $this->_('If set, the default breadcrumb will be extended with edit links'),
'notes' => $this->_('Only applies if Module BreadcrumbDropdowns is not installed.'),
'value' => $this->get('extendedbreadcrumb'),
],
],
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

© 2018 noelboss.com

## Version 0.2.4

* Added compatibility to [BreadcrumbDropdowns module](https://modules.processwire.com/modules/breadcrumb-dropdowns/)


## Version 0.2.3

Expand Down
62 changes: 50 additions & 12 deletions uikit/custom/pw/custom-theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
@pw-dropdown-list-padding-vertical: 0px;
@pw-dropdown-list-padding-horizontal: 0;
@pw-dropdown-item-padding-vertical: 0.5em;
@pw-dropdown-list-border-radius: 0;
@pw-dropdown-list-border-radius: 15px;

@navbar-nav-item-text-transform: uppercase;
@navbar-nav-item-font-size: 18px;
Expand Down Expand Up @@ -479,6 +479,7 @@ sans-serif;

// rounded corners and triangle
body>ul.ui-autocomplete,
ul.breadcrumb-dropdown,
li.aos_adminLangSwitcher>ul,
body>ul.pw-dropdown-ready {
&:before {
Expand All @@ -495,20 +496,25 @@ body>ul.pw-dropdown-ready {
z-index: 99;
}

border-radius: 15px;
border-radius: @pw-dropdown-list-border-radius;
>li:first-child,
>li:first-child>a {
border-top-left-radius: 15px;
border-top-right-radius: 15px;
>li:first-child>a,
ul>li:first-child,
ul>li:first-child>a {
border-top-left-radius: @pw-dropdown-list-border-radius;
border-top-right-radius: @pw-dropdown-list-border-radius;
}
>li:last-child,
>li:last-child>a {
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
>li:last-child>a,
ul>li:last-child,
ul>li:last-child>a {
border-bottom-left-radius: @pw-dropdown-list-border-radius;
border-bottom-right-radius: @pw-dropdown-list-border-radius;
}

}

ul.breadcrumb-dropdown,
ul.pw-dropdown-menu,
ul.ui-menu {
border: @theme-dropdown-border;
Expand All @@ -523,7 +529,6 @@ li.aos_adminLangSwitcher {
>a:after {
display: none;
}

>ul {
&:before {
left: auto;
Expand Down Expand Up @@ -556,6 +561,42 @@ body>ul.ui-autocomplete,
}


.uk-breadcrumb {
padding-bottom: 0;

>li {
font-size: .875rem;
color: @theme-muted-text-color;
}

ul.breadcrumb-dropdown {
&:before {
display: none;
}

background: @pw-dropdown-background;
box-shadow: @pw-dropdown-box-shadow;
border: @theme-dropdown-border;

li.current {
a {
color: @theme-link-color;
}
}

>li>a {
color: @pw-dropdown-nav-item-color;
background: @pw-dropdown-background;
border-bottom-width: 0px;
padding: 5px 15px;
&:active,
&:hover {
background: @theme-dropdown-hover-background;
color: @pw-dropdown-highlight-color;
}
}
}
}

// Notices ----------------------------------------------------
.pw-notices {
Expand Down Expand Up @@ -674,9 +715,6 @@ img.pw-logo-native {
}
}

.uk-breadcrumb {
padding-bottom: 0;
}

#main .notes {
color: @theme-notes-text-color !important;
Expand Down
64 changes: 57 additions & 7 deletions uikit/dist/css/uikit.black.css
Original file line number Diff line number Diff line change
Expand Up @@ -13726,7 +13726,7 @@ a.tooltip:hover {
font-size: 0.875rem;
line-height: 1.2em;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
border-radius: 0;
border-radius: 15px;
display: none;
border: none;
}
Expand Down Expand Up @@ -13794,7 +13794,7 @@ a.tooltip:hover {
display: none;
border: none;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
border-radius: 0;
border-radius: 15px;
font-size: 0.875rem;
}
.ui-menu .ui-menu-item .ui-menu.navJSON .ui-menu-item:not(.add):not(.highlight) {
Expand Down Expand Up @@ -15657,11 +15657,13 @@ ul.uk-navbar-nav ul {
}
/* Dropdowns ------------------------------------------------------------*/
body > ul.ui-autocomplete,
ul.breadcrumb-dropdown,
li.aos_adminLangSwitcher > ul,
body > ul.pw-dropdown-ready {
border-radius: 15px;
}
body > ul.ui-autocomplete:before,
ul.breadcrumb-dropdown:before,
li.aos_adminLangSwitcher > ul:before,
body > ul.pw-dropdown-ready:before {
content: " ";
Expand All @@ -15676,28 +15678,50 @@ body > ul.pw-dropdown-ready:before {
z-index: 99;
}
body > ul.ui-autocomplete > li:first-child,
ul.breadcrumb-dropdown > li:first-child,
li.aos_adminLangSwitcher > ul > li:first-child,
body > ul.pw-dropdown-ready > li:first-child,
body > ul.ui-autocomplete > li:first-child > a,
ul.breadcrumb-dropdown > li:first-child > a,
li.aos_adminLangSwitcher > ul > li:first-child > a,
body > ul.pw-dropdown-ready > li:first-child > a {
body > ul.pw-dropdown-ready > li:first-child > a,
body > ul.ui-autocomplete ul > li:first-child,
ul.breadcrumb-dropdown ul > li:first-child,
li.aos_adminLangSwitcher > ul ul > li:first-child,
body > ul.pw-dropdown-ready ul > li:first-child,
body > ul.ui-autocomplete ul > li:first-child > a,
ul.breadcrumb-dropdown ul > li:first-child > a,
li.aos_adminLangSwitcher > ul ul > li:first-child > a,
body > ul.pw-dropdown-ready ul > li:first-child > a {
border-top-left-radius: 15px;
border-top-right-radius: 15px;
}
body > ul.ui-autocomplete > li:last-child,
ul.breadcrumb-dropdown > li:last-child,
li.aos_adminLangSwitcher > ul > li:last-child,
body > ul.pw-dropdown-ready > li:last-child,
body > ul.ui-autocomplete > li:last-child > a,
ul.breadcrumb-dropdown > li:last-child > a,
li.aos_adminLangSwitcher > ul > li:last-child > a,
body > ul.pw-dropdown-ready > li:last-child > a {
body > ul.pw-dropdown-ready > li:last-child > a,
body > ul.ui-autocomplete ul > li:last-child,
ul.breadcrumb-dropdown ul > li:last-child,
li.aos_adminLangSwitcher > ul ul > li:last-child,
body > ul.pw-dropdown-ready ul > li:last-child,
body > ul.ui-autocomplete ul > li:last-child > a,
ul.breadcrumb-dropdown ul > li:last-child > a,
li.aos_adminLangSwitcher > ul ul > li:last-child > a,
body > ul.pw-dropdown-ready ul > li:last-child > a {
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
}
ul.breadcrumb-dropdown,
ul.pw-dropdown-menu,
ul.ui-menu {
border: 1px solid #eee;
margin-top: -2px;
}
ul.breadcrumb-dropdown > li.ui-menu-item > ul.ui-menu,
ul.pw-dropdown-menu > li.ui-menu-item > ul.ui-menu,
ul.ui-menu > li.ui-menu-item > ul.ui-menu {
border: 1px solid #eee !important;
Expand Down Expand Up @@ -15729,6 +15753,35 @@ body > ul.ui-autocomplete:before,
.pw-button-dropdown:before {
display: none !important;
}
.uk-breadcrumb {
padding-bottom: 0;
}
.uk-breadcrumb > li {
font-size: .875rem;
color: #777;
}
.uk-breadcrumb ul.breadcrumb-dropdown {
background: rgba(250, 250, 250, 0.95);
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
border: 1px solid #eee;
}
.uk-breadcrumb ul.breadcrumb-dropdown:before {
display: none;
}
.uk-breadcrumb ul.breadcrumb-dropdown li.current a {
color: #333335;
}
.uk-breadcrumb ul.breadcrumb-dropdown > li > a {
color: #575555;
background: rgba(250, 250, 250, 0.95);
border-bottom-width: 0px;
padding: 5px 15px;
}
.uk-breadcrumb ul.breadcrumb-dropdown > li > a:active,
.uk-breadcrumb ul.breadcrumb-dropdown > li > a:hover {
background: rgba(0, 0, 2, 0.6);
color: #fff;
}
.pw-notices {
margin-top: 0;
box-shadow: 0 10px 30px -10px rgba(0, 0, 2, 0.2);
Expand Down Expand Up @@ -15828,9 +15881,6 @@ img.pw-logo-native:hover {
#pw-content-head h1 {
color: #131111;
}
.uk-breadcrumb {
padding-bottom: 0;
}
#main .notes {
color: #777 !important;
background: transparent;
Expand Down
2 changes: 1 addition & 1 deletion uikit/dist/css/uikit.black.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 508ec90

Please sign in to comment.