From 4701a0863f8260172c6f25583f325bd9bb3ded3e Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 18 Oct 2015 16:57:31 +0200 Subject: [PATCH] Overhauled ACP menu --- wcfsetup/install/files/acp/style/acpMenu.css | 99 +++++++++++++++++++ .../install/files/acp/templates/header.tpl | 46 +-------- .../files/acp/templates/pageHeader.tpl | 8 +- .../install/files/acp/templates/pageMenu.tpl | 46 +++++++++ .../{userPanel.tpl => pageMenuUser.tpl} | 0 .../{searchArea.tpl => pageSearchArea.tpl} | 6 +- 6 files changed, 157 insertions(+), 48 deletions(-) create mode 100644 wcfsetup/install/files/acp/style/acpMenu.css create mode 100644 wcfsetup/install/files/acp/templates/pageMenu.tpl rename wcfsetup/install/files/acp/templates/{userPanel.tpl => pageMenuUser.tpl} (100%) rename wcfsetup/install/files/acp/templates/{searchArea.tpl => pageSearchArea.tpl} (77%) diff --git a/wcfsetup/install/files/acp/style/acpMenu.css b/wcfsetup/install/files/acp/style/acpMenu.css new file mode 100644 index 0000000000..130db172d0 --- /dev/null +++ b/wcfsetup/install/files/acp/style/acpMenu.css @@ -0,0 +1,99 @@ +.wcfAcpMenu { + font-size: 13px; + font-weight: 400; + padding: 5px; +} + +.wcfAcpMenu.doubleColumned { + -webkit-columns: 2; + -moz-columns: 2; + columns: 2; + + /* 11px = 5px + border + 5px */ + -webkit-column-gap: 11px; + -moz-column-gap: 11px; + column-gap: 11px; + + -webkit-column-rule: 1px solid rgb(238, 238, 238); + -moz-column-rule: 1px solid rgb(238, 238, 238); + column-rule: 1px solid rgb(238, 238, 238); +} + +.wcfAcpMenu.doubleColumned > li { + -webkit-column-break-inside: avoid; + page-break-inside: avoid; + break-inside: avoid; +} + +.wcfAcpMenu > li { + min-width: 250px; +} + +.wcfAcpMenu > li:not(:first-child) { + border-top: 1px solid rgb(238, 238, 238); +} + +.wcfAcpMenu > li > span { + background-color: rgb(236, 240, 241); + color: rgb(127, 140, 141); + font-size: 11px; + display: block; + padding: 10px; + text-transform: uppercase; +} + +.menuItemList > li > a { + color: rgb(54, 54, 54); + display: block; + font-size: 13px; + padding: 10px 20px; + white-space: nowrap; +} + +.menuItemList > li > a:hover { + background-color: rgb(66, 129, 244); + color: #fff; + text-decoration: none; +} + +.menuItemList > li.active > a { + background-color: rgb(217, 237, 247); +} + +.menuItemWrapper { + display: flex; +} + +.menuItemWrapper:hover > a, +.menuItemWrapper > .active { + background-color: rgb(217, 237, 247); +} + +.menuItemWrapper > a { + color: rgb(54, 54, 54); + display: block; + flex: 0 auto; + padding: 10px; + white-space: nowrap; +} + +.menuItemWrapper > a:first-child { + flex: 1 auto; + padding: 10px 20px; +} + +.menuItemWrapper > a > .icon { + color: rgb(54, 54, 54); + opacity: .6; +} + +.menuItemList .menuItemWrapper > a:hover { + background-color: rgb(66, 129, 244); + color: #fff; + text-decoration: none; +} + +.menuItemList .menuItemWrapper > a:hover > .icon { + color: #fff; + opacity: 1; +} diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index 9545d28f47..792d9fd548 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -7,8 +7,9 @@ {if $pageTitle|isset}{@$pageTitle|language} - {/if}{lang}wcf.global.acp{/lang}{if PACKAGE_ID} - {PAGE_TITLE|language}{/if} - + {@$__wcf->getStyleHandler()->getStylesheet(true)} + {event name='stylesheets'} @@ -124,7 +125,7 @@ {if PACKAGE_ID} {assign var=activeMenuItems value=$__wcf->getACPMenu()->getActiveMenuItems()|array_reverse} var $activeMenuItems = [{implode from=$activeMenuItems item=_menuItem}'{$_menuItem}'{/implode}]; - new WCF.ACP.Menu($activeMenuItems); + //new WCF.ACP.Menu($activeMenuItems); {/if} if (jQuery.browser.touch) $('html').addClass('touch'); @@ -260,43 +261,6 @@ *} -
-
-
- {hascontent} - - {/hascontent} - -
+
+
diff --git a/wcfsetup/install/files/acp/templates/pageHeader.tpl b/wcfsetup/install/files/acp/templates/pageHeader.tpl index b7711fe473..a9ac2cb917 100644 --- a/wcfsetup/install/files/acp/templates/pageHeader.tpl +++ b/wcfsetup/install/files/acp/templates/pageHeader.tpl @@ -1,13 +1,13 @@ -