chg: [layout:header] UI improvements

pull/72/head
mokaddem 2021-09-10 09:22:08 +02:00
parent 82b6bfccb9
commit 91db0afd9a
3 changed files with 26 additions and 12 deletions

View File

@ -30,7 +30,7 @@
if (!empty($entry['url_vars'])) {
$entry['url'] = $this->DataFromPath->buildStringFromDataPath($entry['url'], $entity, $entry['url_vars']);
}
$this->Breadcrumbs->add($entry['label'], Router::url($entry['url']));
$this->Breadcrumbs->add(h($entry['label']), Router::url($entry['url']), ['title' => h($entry['label'])]);
}
$lastCrumb = $breadcrumb[count($breadcrumb)-1];
@ -47,7 +47,7 @@
$breadcrumbLinks .= sprintf('<a class="btn btn-%s btn-sm text-nowrap" role="button" href="%s">%s</a>',
$active ? 'secondary' : $navbarVariant,
Router::url($linkEntry['url']),
$linkEntry['label']
h($linkEntry['label'])
);
}
}
@ -56,7 +56,7 @@
if (!empty($actionEntry['url_vars'])) {
$actionEntry['url'] = $this->DataFromPath->buildStringFromDataPath($actionEntry['url'], $entity, $actionEntry['url_vars']);
}
$breadcrumbAction .= sprintf('<a class="dropdown-item" href="%s">%s</a>', Router::url($actionEntry['url']), $actionEntry['label']);
$breadcrumbAction .= sprintf('<a class="dropdown-item" href="%s">%s</a>', Router::url($actionEntry['url']), h($actionEntry['label']));
}
}
}
@ -76,7 +76,7 @@
<?php endif; ?>
<?php if (!empty($breadcrumbAction)): ?>
<div class="dropdown ml-3 d-flex align-items-center">
<div class="header-breadcrumb-actions dropdown d-flex align-items-center">
<a class="btn btn-primary dropdown-toggle" href="#" role="button" id="dropdownMenuBreadcrumbAction" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<?= __('Actions') ?>
</a>

View File

@ -1,7 +1,12 @@
<div class="d-flex">
<div class="global-search-container d-md-block d-none">
<input type="text" class="form-control d-inline-block" id="globalSearch" placeholder="<?= __('Search in Cerebrate') ?>">
<i class="icon <?= $this->FontAwesome->getClass('search') ?>"></i>
<span class="search-input-container">
<input type="text" class="form-control d-inline-block" id="globalSearch" placeholder="<?= __('Search in Cerebrate...') ?>">
<i class="icon <?= $this->FontAwesome->getClass('search') ?>"></i>
</span>
<div class="global-search-result-container dropdown-menu p-0">
<?= __('- No result -') ?>
</div>
</div>
<div class="header-menu d-flex ml-1">
<?= $this->element('layouts/header/header-notifications') ?>
@ -14,14 +19,11 @@
position: relative;
}
#globalSearch {
padding-right: 26px;
}
#globalSearch {
padding-right: 26px;
}
.top-navbar .global-search-container > i.icon {
.top-navbar .global-search-container .search-input-container > i.icon {
position: absolute;
right: 8px;
line-height: 38px;

View File

@ -49,6 +49,13 @@ body {
}
}
@media (max-width: 768px) {
.header-breadcrumb-actions > a {
border-top-left-radius: 0.25rem !important;
border-bottom-left-radius: 0.25rem !important;
}
}
.main-wrapper {
min-height: 100%;
/* padding-top: var(--navbar-height); */
@ -394,6 +401,11 @@ header.navbar-light.top-navbar .header-breadcrumb .header-breadcrumb-item > a:ho
margin-right: 0.5rem;
}
.header-breadcrumb-actions > a {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.navbar-dark .right-navbar .header-menu a.nav-link {
color: white;
}
@ -409,9 +421,9 @@ header.navbar-light.top-navbar .header-breadcrumb .header-breadcrumb-item > a:ho
}
.navbar-dark .left-navbar .navbar-brand:hover img {
filter: invert(1) drop-shadow(0px 0px 4px #fff);
filter: invert(1) drop-shadow(0px 0px 3px #fff);
}
.navbar-light .left-navbar .navbar-brand:hover img {
filter: invert(0) drop-shadow(0px 0px 4px #000);
filter: invert(0) drop-shadow(0px 0px 3px #000);
}