Skip to content

Commit

Permalink
New Version based on AdminThemeUikit
Browse files Browse the repository at this point in the history
  • Loading branch information
noelboss committed Oct 11, 2018
1 parent f86f9f1 commit acd000e
Show file tree
Hide file tree
Showing 210 changed files with 77,887 additions and 1,634 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ node_modules/
/uikit/.gitignore
/git


.php_cs.cache
4 changes: 2 additions & 2 deletions AdminThemeBoss.info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"title": "Admin Theme Boss",
"summary": "A light and clear theme based on Uikit 3, extending AdminThemeUikit",
"href": "https://github.com/noelboss/AdminThemeBoss",
"version": "0.3.0",
"version": "0.4.0",
"author": "Noël Bossart",
"autoload": "template=admin",
"icon": "diamond",
"requires": "ProcessWire>=3.0.94,AdminThemeUikit"
"requires": "ProcessWire>=3.0.98,AdminThemeUikit"
}
26 changes: 11 additions & 15 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-10-09T17:01:34+02:00
* File created/changed: 2018-10-11T14:25:54+02:00
*/

namespace ProcessWire;
Expand Down Expand Up @@ -70,7 +70,7 @@ public function init()

$this->addHookAfter('Modules::saveConfig', function (HookEvent $event) {
$class = $event->arguments(0);
bd($event->arguments(1));
// bd($event->arguments(1));

if ($class == 'AdminThemeBoss') {
foreach ($event->arguments(1) as $key => $value) {
Expand Down Expand Up @@ -201,20 +201,16 @@ private function getVariant()
$variant = $this->get('variant');

$version = $moduleInfo['version'];
$url = $this->wire('config')->urls->AdminThemeBoss;

switch ($variant) {
case 'pw':
case 'black':
case 'vibrant':
$variant = $url.'uikit/dist/css/uikit.'.$variant.'.min.css?'.$version;
break;

default:
$variant = $url.'uikit/dist/css/uikit.pw.min.css?'.$version;
break;
$url = $this->config->urls->AdminThemeBoss;

// default
$file = $url.'uikit/dist/css/uikit.pw.min.css?'.$version;

$exists = is_file($this->config->paths->AdminThemeBoss.'uikit/dist/css/uikit.'.$variant.'.min.css');
if ($exists) {
$file = $url.'uikit/dist/css/uikit.'.$variant.'.min.css?'.$version;
}

return $variant;
return $file;
}
}
23 changes: 12 additions & 11 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-10-09T15:35:44+02:00
* File created/changed: 2018-10-11T14:17:03+02:00
*/

namespace ProcessWire;
Expand Down Expand Up @@ -48,18 +48,9 @@ public function __construct()
'pw' => $this->_('ProcessWire Blue'),
'vibrant' => $this->_('Vibrant Blue'),
'black' => $this->_('Dark Black'),
'pink' => $this->_('Happy Pink'),
],
],
[
'name' => 'extendedbreadcrumb',
'type' => 'checkbox',
'icon' => 'link',
'label' => $this->_('Extended Breadcrumb'),
'checkboxLabel' => $this->_('Yes, use extended breadcrumb'),
'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 All @@ -70,6 +61,16 @@ public function __construct()
'collapsed' => Inputfield::collapsedYes,
//'showIf' => 'enablemodule=1',
'children' => [
[
'name' => 'extendedbreadcrumb',
'type' => 'checkbox',
'icon' => 'link',
'label' => $this->_('Extended Breadcrumb'),
'checkboxLabel' => $this->_('Yes, use extended breadcrumb'),
'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'),
],
[
'name' => 'allusers',
'type' => 'checkbox',
Expand Down
1 change: 1 addition & 0 deletions AdminThemeUikit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit acd000e

Please sign in to comment.