From ecbd8a0b8723c719c60a049bc88ff171816e181f Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 29 Sep 2012 20:14:31 +0200 Subject: [PATCH] Added basic style; CSS/LESS overhaul --- com.woltlab.wcf/template/footer.tpl | 7 +- com.woltlab.wcf/template/header.tpl | 20 +- wcfsetup/install/files/acp/js/WCF.ACP.js | 13 +- .../install/files/acp/templates/header.tpl | 67 +- .../lib/system/style/StyleCompiler.class.php | 2 +- wcfsetup/install/files/style/acl.less | 79 -- .../files/style/{alerts.less => alert.less} | 2 +- wcfsetup/install/files/style/attachment.less | 110 -- wcfsetup/install/files/style/badge.less | 84 -- .../bootstrap/{mixins.less => mixin.less} | 0 .../files/style/bootstrap/variables.less | 145 --- wcfsetup/install/files/style/breadcrumbs.less | 90 -- wcfsetup/install/files/style/button.less | 23 +- wcfsetup/install/files/style/codebox.less | 203 --- wcfsetup/install/files/style/comments.less | 111 -- wcfsetup/install/files/style/content.less | 50 - .../install/files/style/conversation.less | 41 - wcfsetup/install/files/style/dialog.less | 12 - wcfsetup/install/files/style/footer.less | 20 - wcfsetup/install/files/style/form.less | 404 ++++++ wcfsetup/install/files/style/forms.less | 224 ---- wcfsetup/install/files/style/global.less | 235 ++++ wcfsetup/install/files/style/imageViewer.less | 2 +- wcfsetup/install/files/style/inputs.less | 184 --- wcfsetup/install/files/style/label.less | 117 -- wcfsetup/install/files/style/layout.less | 1098 ++++++++++++++--- wcfsetup/install/files/style/like.less | 33 - wcfsetup/install/files/style/logo.less | 19 - wcfsetup/install/files/style/message.less | 453 ------- wcfsetup/install/files/style/navigation.less | 204 --- .../install/files/style/notification.less | 102 -- wcfsetup/install/files/style/pagination.less | 98 -- wcfsetup/install/files/style/poll.less | 63 - wcfsetup/install/files/style/popover.less | 54 - wcfsetup/install/files/style/sidebar.less | 165 --- wcfsetup/install/files/style/sitemap.less | 7 - wcfsetup/install/files/style/tabs.less | 172 --- wcfsetup/install/files/style/tabular.less | 219 ---- wcfsetup/install/files/style/tooltip.less | 24 - wcfsetup/install/files/style/user.less | 168 --- wcfsetup/install/files/style/userPanel.less | 79 -- wcfsetup/install/files/style/wbb.less | 337 ----- 42 files changed, 1628 insertions(+), 3912 deletions(-) delete mode 100644 wcfsetup/install/files/style/acl.less rename wcfsetup/install/files/style/{alerts.less => alert.less} (97%) delete mode 100644 wcfsetup/install/files/style/attachment.less delete mode 100644 wcfsetup/install/files/style/badge.less rename wcfsetup/install/files/style/bootstrap/{mixins.less => mixin.less} (100%) delete mode 100644 wcfsetup/install/files/style/bootstrap/variables.less delete mode 100644 wcfsetup/install/files/style/breadcrumbs.less delete mode 100644 wcfsetup/install/files/style/codebox.less delete mode 100644 wcfsetup/install/files/style/comments.less delete mode 100644 wcfsetup/install/files/style/content.less delete mode 100644 wcfsetup/install/files/style/conversation.less delete mode 100644 wcfsetup/install/files/style/footer.less create mode 100644 wcfsetup/install/files/style/form.less delete mode 100644 wcfsetup/install/files/style/forms.less create mode 100644 wcfsetup/install/files/style/global.less delete mode 100644 wcfsetup/install/files/style/inputs.less delete mode 100644 wcfsetup/install/files/style/label.less delete mode 100644 wcfsetup/install/files/style/like.less delete mode 100644 wcfsetup/install/files/style/logo.less delete mode 100644 wcfsetup/install/files/style/message.less delete mode 100644 wcfsetup/install/files/style/navigation.less delete mode 100644 wcfsetup/install/files/style/notification.less delete mode 100644 wcfsetup/install/files/style/pagination.less delete mode 100644 wcfsetup/install/files/style/poll.less delete mode 100644 wcfsetup/install/files/style/popover.less delete mode 100644 wcfsetup/install/files/style/sidebar.less delete mode 100644 wcfsetup/install/files/style/sitemap.less delete mode 100644 wcfsetup/install/files/style/tabs.less delete mode 100644 wcfsetup/install/files/style/tabular.less delete mode 100644 wcfsetup/install/files/style/tooltip.less delete mode 100644 wcfsetup/install/files/style/user.less delete mode 100644 wcfsetup/install/files/style/userPanel.less delete mode 100644 wcfsetup/install/files/style/wbb.less diff --git a/com.woltlab.wcf/template/footer.tpl b/com.woltlab.wcf/template/footer.tpl index 3a5811b066..f08940a680 100644 --- a/com.woltlab.wcf/template/footer.tpl +++ b/com.woltlab.wcf/template/footer.tpl @@ -1,14 +1,10 @@ {if $skipBreadcrumbs|empty}{include file='breadcrumbs' __microdata=false}{/if} - - - - + diff --git a/com.woltlab.wcf/template/header.tpl b/com.woltlab.wcf/template/header.tpl index 5bec63f84a..2bf8862ba3 100644 --- a/com.woltlab.wcf/template/header.tpl +++ b/com.woltlab.wcf/template/header.tpl @@ -1,8 +1,7 @@ - + - -
{if $sidebar|isset} @@ -59,7 +44,6 @@ {/if} -
{if $skipBreadcrumbs|empty}{include file='breadcrumbs'}{/if} diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index be267ab325..64c877c4e8 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -25,7 +25,7 @@ WCF.ACP.Menu.prototype = { */ init: function(activeMenuItems) { this._headerNavigation = $('nav#mainMenu'); - this._sidebarNavigation = $('nav#sidebarContent'); + this._sidebarNavigation = $('aside.collapsibleMenu'); this._prepareElements(activeMenuItems); }, @@ -36,12 +36,12 @@ WCF.ACP.Menu.prototype = { _prepareElements: function(activeMenuItems) { this._headerNavigation.find('li').removeClass('active'); - this._sidebarNavigation.find('div h1').each($.proxy(function(index, menuHeader) { + this._sidebarNavigation.find('legend').each($.proxy(function(index, menuHeader) { $(menuHeader).click($.proxy(this._toggleItem, this)); }, this)); // close all navigation groups - this._sidebarNavigation.find('div div').each(function() { + this._sidebarNavigation.find('nav ul').each(function() { $(this).hide(); }); @@ -61,7 +61,8 @@ WCF.ACP.Menu.prototype = { _toggleItem: function(event) { var $menuItem = $(event.target); - $menuItem.next().stop(true, true).toggle('blind', { }, 200).end().toggleClass('active'); + $menuItem.parent().find('nav ul').stop(true, true).toggle('blind', { }, 200).end(); + $menuItem.toggleClass('active'); }, /** @@ -91,7 +92,7 @@ WCF.ACP.Menu.prototype = { _renderSidebar: function(menuItem, activeMenuItems) { // reset visible and active items this._headerNavigation.find('li').removeClass('active'); - this._sidebarNavigation.find('div.menuGroup').hide(); + this._sidebarNavigation.find('> div').hide(); if (activeMenuItems.length === 0) { // show active menu @@ -112,7 +113,7 @@ WCF.ACP.Menu.prototype = { var $menuItem = $('#' + $.wcfEscapeID($item)); if ($menuItem.getTagName() === 'ul') { - $menuItem.parent('div').show().prev().addClass('active'); + $menuItem.show().parents('fieldset').children('legend').addClass('active'); } else { $menuItem.addClass('active'); diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index 9fe7b8e231..2e4d27a757 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -19,7 +19,7 @@ - +