mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-05 12:57:57 +02:00
Various fixes for top/dashboard/themes/plugins notifications styling
This commit is contained in:
@@ -1389,13 +1389,6 @@ class Admin
|
||||
|
||||
}
|
||||
|
||||
// // Process notifications dates
|
||||
// $notifications = array_map(function ($notification) {
|
||||
// $notification['nicetime'] = $this->adminNiceTime($notification['date']);
|
||||
//
|
||||
// return $notification;
|
||||
// }, $cleaned_notifications);
|
||||
|
||||
// reset notifications
|
||||
$notifications = [];
|
||||
|
||||
|
||||
@@ -843,7 +843,8 @@ class AdminController extends AdminBaseController
|
||||
|
||||
foreach ($notifications as $type => $type_notifications) {
|
||||
if (empty($filter) || in_array($type, $filter_types)) {
|
||||
$notification_data[$type] = $this->grav['twig']->processTemplate('partials/notification-block.html.twig', ['notifications' => $type_notifications]);
|
||||
$twig_template = 'partials/notification-' . $type . '-block.html.twig';
|
||||
$notification_data[$type] = $this->grav['twig']->processTemplate($twig_template, ['notifications' => $type_notifications]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
themes/grav/css-compiled/template.css
vendored
2
themes/grav/css-compiled/template.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -26,6 +26,7 @@ b, strong {
|
||||
.alert {
|
||||
font-size: 1rem;
|
||||
padding: 0.5rem $padding-default;
|
||||
position: relative;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
padding: 0.5rem 1rem;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
.dashboard-notifications-container, .plugins-notifications-container, .themes-notifications-container {
|
||||
|
||||
margin: 2rem 0 2rem 0;
|
||||
margin-bottom: 1rem;
|
||||
|
||||
.raw {
|
||||
position: relative;
|
||||
@@ -72,6 +72,8 @@
|
||||
|
||||
.top-notifications-container {
|
||||
|
||||
margin-bottom: 1rem;
|
||||
|
||||
.alert {
|
||||
a {
|
||||
cursor: pointer;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{% for entry_id, entry in notifications %}
|
||||
<div class="alert {{ entry.type }} position-dashboard">
|
||||
<a href="#" data-notification-action="hide-notification" data-notification-id="{{ entry_id }}" class="close hide-notification"><i class="fa fa-close"></i></a>
|
||||
{{ entry.message|raw }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -1,3 +1,3 @@
|
||||
{% for entry in notifications if 'feed' %}
|
||||
{% for entry in notifications %}
|
||||
<li class="single-notification {{ entry.type }}-notification"><span class="badge alert {{ entry.type }}">{{ entry.type|capitalize }}</span><a target="_blank" href="{{ entry.link }}" title="{{ entry.message|striptags|e('html_attr') }}">{{ entry.message|raw }}</a></li>
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% for entry_id, entry in notifications %}
|
||||
<div class="alert {{ entry.type }} position-plugins">
|
||||
<a href="#" data-notification-action="hide-notification" data-notification-id="{{ entry_id }}" class="close hide-notification"><i class="fa fa-close"></i></a>
|
||||
{{ entry.message|raw }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% for entry_id, entry in notifications %}
|
||||
<div class="alert {{ entry.type }} position-themes">
|
||||
<a href="#" data-notification-action="hide-notification" data-notification-id="{{ entry_id }}" class="close hide-notification"><i class="fa fa-close"></i></a>
|
||||
{{ entry.message|raw }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% for entry_id, entry in notifications %}
|
||||
<div class="alert {{ entry.type }} position-top">
|
||||
<a href="#" data-notification-action="hide-notification" data-notification-id="{{ entry_id }}" class="close hide-notification"><i class="fa fa-close"></i></a>
|
||||
{{ entry.message|raw }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user