Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AdminLTE renderer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
AdminLTE renderer
Commits
cc64eaa8
Commit
cc64eaa8
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
add shadows on card + callout
parent
4abcea10
Branches
Branches containing commit
No related tags found
1 merge request
!5
add shadow for card and callout
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
public_html/classes/render-adminlte.class.php
+12
-10
12 additions, 10 deletions
public_html/classes/render-adminlte.class.php
with
12 additions
and
10 deletions
public_html/classes/render-adminlte.class.php
+
12
−
10
View file @
cc64eaa8
...
@@ -7,6 +7,8 @@ require_once 'htmlelements.class.php';
...
@@ -7,6 +7,8 @@ require_once 'htmlelements.class.php';
* DOCS: https://adminlte.io/docs/3.2/
* DOCS: https://adminlte.io/docs/3.2/
* https://adminlte.io/themes/v3/index3.html
* https://adminlte.io/themes/v3/index3.html
*
*
* ----------------------------------------------------------------------
* 2023-09-11 <axel.hahn@unibe.ch> add shadows on card + callout
* ======================================================================
* ======================================================================
*
*
* @author Axel
* @author Axel
...
@@ -262,6 +264,7 @@ class renderadminlte {
...
@@ -262,6 +264,7 @@ class renderadminlte {
'params'
=>
[
'params'
=>
[
'type'
=>
[
'select'
=>
$this
->
aPresets
[
'type'
],
'example_value'
=>
'danger'
],
'type'
=>
[
'select'
=>
$this
->
aPresets
[
'type'
],
'example_value'
=>
'danger'
],
'shadow'
=>
[
'select'
=>
$this
->
aPresets
[
'shadow'
],
'example_value'
=>
''
],
'class'
=>
[
'class'
=>
[
'group'
=>
'styling'
,
'group'
=>
'styling'
,
'description'
=>
'optional: css classes'
,
'description'
=>
'optional: css classes'
,
...
@@ -288,6 +291,7 @@ class renderadminlte {
...
@@ -288,6 +291,7 @@ class renderadminlte {
'params'
=>
[
'params'
=>
[
'type'
=>
[
'select'
=>
$this
->
aPresets
[
'type'
],
'example_value'
=>
'primary'
],
'type'
=>
[
'select'
=>
$this
->
aPresets
[
'type'
],
'example_value'
=>
'primary'
],
'variant'
=>
[
'select'
=>
$this
->
aPresets
[
'variant'
],
'example_value'
=>
'outline'
],
'variant'
=>
[
'select'
=>
$this
->
aPresets
[
'variant'
],
'example_value'
=>
'outline'
],
'shadow'
=>
[
'select'
=>
$this
->
aPresets
[
'shadow'
],
'example_value'
=>
''
],
'class'
=>
[
'class'
=>
[
'group'
=>
'styling'
,
'group'
=>
'styling'
,
'description'
=>
'optional: css classes'
,
'description'
=>
'optional: css classes'
,
...
@@ -868,7 +872,7 @@ class renderadminlte {
...
@@ -868,7 +872,7 @@ class renderadminlte {
* >> styling
* >> styling
* - type - one of [none]|danger|dark|info|primary|secondary|success|warning
* - type - one of [none]|danger|dark|info|primary|secondary|success|warning
* - class - optional css class
* - class - optional css class
*
* - shadow - size of shadow; one of [none] (=default: between small and regular)|none|small|regular|large
*
* >> texts/ html content
* >> texts/ html content
* - title - text: title of the card
* - title - text: title of the card
* - text - text: content of the card
* - text - text: content of the card
...
@@ -879,6 +883,8 @@ class renderadminlte {
...
@@ -879,6 +883,8 @@ class renderadminlte {
$sClass
=
'callout'
$sClass
=
'callout'
.
$this
->
_addClassValue
(
$aOptions
[
'type'
],
'callout-'
)
.
$this
->
_addClassValue
(
$aOptions
[
'type'
],
'callout-'
)
.
$this
->
_addClassValue
(
$aOptions
[
'class'
],
''
)
.
$this
->
_addClassValue
(
$aOptions
[
'class'
],
''
)
.
(
$aOptions
[
'shadow'
]
&&
isset
(
$this
->
_aValueMappings
[
'shadow'
][
$aOptions
[
'shadow'
]])
?
' '
.
$this
->
_aValueMappings
[
'shadow'
][
$aOptions
[
'shadow'
]]
:
''
)
;
;
return
$this
->
addWrapper
(
return
$this
->
addWrapper
(
...
@@ -900,6 +906,7 @@ class renderadminlte {
...
@@ -900,6 +906,7 @@ class renderadminlte {
* "solid" - whole card is colored
* "solid" - whole card is colored
* "gradient" - whole card is colored with a gradient
* "gradient" - whole card is colored with a gradient
* - type - one of [none]|danger|dark|info|primary|secondary|success|warning
* - type - one of [none]|danger|dark|info|primary|secondary|success|warning
* - shadow - size of shadow; one of [none] (=default: between small and regular)|none|small|regular|large
* - class - any css class for customizing, eg. "disabled"
* - class - any css class for customizing, eg. "disabled"
* - state - one of [none]|collapsed|maximized
* - state - one of [none]|collapsed|maximized
*
*
...
@@ -947,6 +954,8 @@ class renderadminlte {
...
@@ -947,6 +954,8 @@ class renderadminlte {
$sVariantPrefix
=
$aVariants
[
$aOptions
[
'variant'
]]
?
$aVariants
[
$aOptions
[
'variant'
]]
:
$aVariants
[
'default'
];
$sVariantPrefix
=
$aVariants
[
$aOptions
[
'variant'
]]
?
$aVariants
[
$aOptions
[
'variant'
]]
:
$aVariants
[
'default'
];
$sClass
=
'card'
$sClass
=
'card'
.
$this
->
_addClassValue
(
$aOptions
[
'type'
],
$sVariantPrefix
)
.
$this
->
_addClassValue
(
$aOptions
[
'type'
],
$sVariantPrefix
)
.
(
$aOptions
[
'shadow'
]
&&
isset
(
$this
->
_aValueMappings
[
'shadow'
][
$aOptions
[
'shadow'
]])
?
' '
.
$this
->
_aValueMappings
[
'shadow'
][
$aOptions
[
'shadow'
]]
:
''
)
.
$this
->
_addClassValue
(
$aOptions
[
'class'
],
''
)
.
$this
->
_addClassValue
(
$aOptions
[
'class'
],
''
)
;
;
...
@@ -1032,7 +1041,7 @@ class renderadminlte {
...
@@ -1032,7 +1041,7 @@ class renderadminlte {
/**
/**
* return a
n info-
box:
* return a
small
box:
* A colored box with large icon, text and a value.
* A colored box with large icon, text and a value.
* https://adminlte.io/docs/3.2/components/boxes.html
* https://adminlte.io/docs/3.2/components/boxes.html
* https://adminlte.io/themes/v3/pages/widgets.html
* https://adminlte.io/themes/v3/pages/widgets.html
...
@@ -1040,7 +1049,7 @@ class renderadminlte {
...
@@ -1040,7 +1049,7 @@ class renderadminlte {
* @param type $aOptions hash with keys for all options
* @param type $aOptions hash with keys for all options
* styling:
* styling:
* - type - color of the box; one of [none]|danger|dark|info|primary|secondary|success|warning
* - type - color of the box; one of [none]|danger|dark|info|primary|secondary|success|warning
* - shadow - size of shadow; one of [none] (=default: between small and regular)|none|small|regular|large
* content
* content
* - icon - icon class for icon on the right
* - icon - icon class for icon on the right
* - text - information text
* - text - information text
...
@@ -1051,13 +1060,6 @@ class renderadminlte {
...
@@ -1051,13 +1060,6 @@ class renderadminlte {
*/
*/
public
function
getSmallbox
(
$aOptions
){
public
function
getSmallbox
(
$aOptions
){
$aOptions
=
$this
->
_ensureOptions
(
'smallbox'
,
$aOptions
);
$aOptions
=
$this
->
_ensureOptions
(
'smallbox'
,
$aOptions
);
$aShadows
=
[
'default'
=>
''
,
'none'
=>
'shadow-none'
,
'small'
=>
'shadow-small'
,
'regular'
=>
'shadow'
,
'large'
=>
'shadow-lg'
,
];
// print_r($aOptions);
// print_r($aOptions);
$sClass
=
'small-box'
$sClass
=
'small-box'
.
$this
->
_addClassValue
(
$aOptions
[
'type'
],
'bg-'
)
.
$this
->
_addClassValue
(
$aOptions
[
'type'
],
'bg-'
)
...
...
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