Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dashboards-3349570
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
dashboards-3349570
Commits
b383ab9e
Commit
b383ab9e
authored
1 year ago
by
Rajab Natshah
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3349570
: Fix Gin layer wrapper style for Dashboards with style overrides method
parent
6323c575
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
css/dashboard.css
+21
-0
21 additions, 0 deletions
css/dashboard.css
dashboards.module
+17
-11
17 additions, 11 deletions
dashboards.module
with
38 additions
and
11 deletions
css/dashboard.css
+
21
−
0
View file @
b383ab9e
...
...
@@ -75,3 +75,24 @@
html
.dashboard
.toolbar
.toolbar-bar
.home-toolbar-tab
{
display
:
block
;
}
.gin-layer-wrapper
.gin-layer-wrapper
{
padding
:
0
;
border
:
0
;
box-shadow
:
none
;
}
.gin-layer-wrapper
.gin-layer-wrapper
.gin-table-scroll-wrapper
{
padding-bottom
:
0
;
margin-bottom
:
0
;
}
.gin-layer-wrapper
.panel__content
,
.gin-layer-wrapper
.panel__description
{
padding
:
var
(
--gin-spacing-m
);
}
.gin-layer-wrapper
.panel__content
.status-report-card
,
.gin-layer-wrapper
.panel__description
.status-report-card
{
text-align
:
center
;
}
This diff is collapsed.
Click to expand it.
dashboards.module
+
17
−
11
View file @
b383ab9e
...
...
@@ -155,17 +155,23 @@ function dashboards_form_dashboard_form_alter(&$form, FormStateInterface $form_s
* Implements hook_preprocess_block().
*/
function
dashboards_preprocess_block
(
&
$variables
)
{
if
(
isset
(
$variables
[
'attributes'
])
&&
isset
(
$variables
[
'attributes'
][
'class'
])
&&
in_array
(
'dashboard-gin-panel'
,
$variables
[
'attributes'
][
'class'
])
)
{
$variables
[
'title_attributes'
]
=
[
'class'
=>
[
'panel__title'
]];
$variables
[
'content'
]
=
[
'#type'
=>
'container'
,
'#attributes'
=>
[
'class'
=>
[
'panel__content'
]],
'content'
=>
$variables
[
'content'
],
];
$active_theme
=
\Drupal
::
theme
()
->
getActiveTheme
();
$base_themes
=
(
array
)
$active_theme
->
getBaseThemeExtensions
();
if
(
$active_theme
->
getName
()
===
'gin'
||
array_key_exists
(
'gin'
,
$base_themes
))
{
if
(
isset
(
$variables
[
'attributes'
])
&&
isset
(
$variables
[
'attributes'
][
'class'
])
&&
in_array
(
'dashboard-gin-panel'
,
$variables
[
'attributes'
][
'class'
])
)
{
$variables
[
'title_attributes'
]
=
[
'class'
=>
[
'panel__title'
]];
$variables
[
'content'
]
=
[
'#type'
=>
'container'
,
'#attributes'
=>
[
'class'
=>
[
'panel__content'
]],
'content'
=>
$variables
[
'content'
],
];
$variables
[
'attributes'
][
'class'
][]
=
'gin-layer-wrapper'
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment