aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/templates/appnavigation.php7
-rw-r--r--core/css/apps.scss7
2 files changed, 8 insertions, 6 deletions
diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php
index c6c0ba36518..09b02943688 100644
--- a/apps/files/templates/appnavigation.php
+++ b/apps/files/templates/appnavigation.php
@@ -1,7 +1,10 @@
<div id="app-navigation">
<ul class="with-icon">
- <?php foreach ($_['navigationItems'] as $item) { ?>
- <li data-id="<?php p($item['id']) ?>" class="nav-<?php p($item['id']) ?> <?php p($item['classes']) ?>">
+ <?php $pinned = 0 ?>
+ <?php foreach ($_['navigationItems'] as $item) {
+ strpos($item['classes'], 'pinned')!==false ? $pinned++ : '';
+ ?>
+ <li data-id="<?php p($item['id']) ?>" class="nav-<?php p($item['id']) ?> <?php p($item['classes']) ?> <?php p($pinned===1?'first-pinned':'') ?>">
<a href="<?php p(isset($item['href']) ? $item['href'] : '#') ?>"
class="nav-icon-<?php p($item['icon'] !== '' ? $item['icon'] : $item['id']) ?> svg">
<?php p($item['name']);?>
diff --git a/core/css/apps.scss b/core/css/apps.scss
index a1723bb818f..461ddbb5065 100644
--- a/core/css/apps.scss
+++ b/core/css/apps.scss
@@ -111,10 +111,9 @@ kbd {
/* Pinned-to-bottom entries */
&.pinned {
order: 2;
- }
- /* hack, select first occurence of class */
- &[class*='pinned']:not(:last-of-type) {
- margin-top: auto !important;
+ &.first-pinned {
+ margin-top: auto !important;
+ }
}
> a,