1
0
mirror of https://github.com/Hutchy68/pivot.git synced 2024-11-21 18:09:03 +01:00

Sidebar improvements

This commit is contained in:
MW install maintain even with core development 2018-03-28 17:43:26 -04:00
parent 15cce18901
commit 5b1a0c025e
4 changed files with 39 additions and 4 deletions

View File

@ -300,10 +300,14 @@ class pivotTemplate extends BaseTemplate {
function renderSidebar() { function renderSidebar() {
$sidebar = $this->getSidebar(); $sidebar = $this->getSidebar();
foreach ($sidebar as $boxName => $box) { foreach ($sidebar as $boxName => $box) {
echo '<li><label class="sidebar" id="'.Sanitizer::escapeId( $box['id'] ).'"';echo Linker::tooltip( $box['id'] ).'>'.htmlspecialchars( $box['header'] ).'</label></li>'; echo '<ul class="portal" role="navigation">';
echo '<li><label class="sidebar active" id="'.Sanitizer::escapeId( $box['id'] ).'"';echo Linker::tooltip( $box['id'] ).'>'.htmlspecialchars( $box['header'] ).'</label>';
if ( is_array( $box['content'] ) ) { if ( is_array( $box['content'] ) ) {
echo '<ul class="portal-content">';
foreach ($box['content'] as $key => $item) { echo $this->makeListItem($key, $item); } foreach ($box['content'] as $key => $item) { echo $this->makeListItem($key, $item); }
echo '</ul>';
} }
echo '</li></ul>';
} }
return; } return; }
} }

View File

@ -11,4 +11,10 @@ jQuery(document).ready(function() {
jQuery("#pt-notifications-alert").prependTo("#echo-notifications-alerts"); jQuery("#pt-notifications-alert").prependTo("#echo-notifications-alerts");
jQuery("#pt-notifications-notice").prependTo("#echo-notifications-notice"); jQuery("#pt-notifications-notice").prependTo("#echo-notifications-notice");
});
jQuery('.portal > li label').click(function() {
$(this).parent().find('ul').toggle();
$( this ).toggleClass( "active" );
}); });

View File

@ -740,7 +740,14 @@ margin: 0;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
border-right: 1px solid #ccc; border-right: 1px solid #ccc;
} }
ul.portal,
ul.portal-content {
margin: 0;
list-style: none;
}
ul.portal-content {
margin: .75em 0;
}
ul.side-nav .button { ul.side-nav .button {
margin: 0; margin: 0;
} }
@ -785,6 +792,24 @@ ul.side-nav label {
color: #fff; color: #fff;
padding: .25em .5em; padding: .25em .5em;
} }
#sidebar label.sidebar.active:after {
font: normal normal normal 14px/1 FontAwesome;
line-height:2em;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
content: '\f068'; /* Unicode character for "plus" sign (+) */
color: #fff;
float: right;
}
#sidebar label.sidebar:after {
font: normal normal normal 14px/1 FontAwesome;
line-height:2em;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
content: '\f067'; /* Unicode character for "plus" sign (+) */
color: #fff;
float: right;
}
body { body {
background-color: #DCEAEA; background-color: #DCEAEA;
} }

View File

@ -6,7 +6,7 @@
"..." "..."
], ],
"license-name": "BSD-2-Clause", "license-name": "BSD-2-Clause",
"url": "http://github.com/hutchy68/pivot", "url": "https://github.com/hutchy68/pivot",
"descriptionmsg": "pivot-desc", "descriptionmsg": "pivot-desc",
"type": "skin", "type": "skin",
"ValidSkinNames": { "ValidSkinNames": {