From f6cb7c5649a7174854df803d6214ce9c2e9a4a77 Mon Sep 17 00:00:00 2001 From: Adam Driscoll Date: Thu, 21 May 2020 16:35:12 -0600 Subject: [PATCH] Update. --- src/v3/example/dashboard.ps1 | 41 +++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/src/v3/example/dashboard.ps1 b/src/v3/example/dashboard.ps1 index df3b59ba..a13207b3 100644 --- a/src/v3/example/dashboard.ps1 +++ b/src/v3/example/dashboard.ps1 @@ -104,7 +104,7 @@ function New-Example { } function New-AppBar { - param($title) + param($title, [Switch]$NoPadding) $Drawer = New-UDDrawer -Children { New-UDList -Children { @@ -173,22 +173,43 @@ function New-AppBar { New-UDElement -Tag 'div' -Content {$title} } -Drawer $Drawer - New-UDElement -Tag 'div' -Attributes @{ style = @{ paddingTop = '20px'}} -Content {} + if (-not $NoPadding) { + New-UDElement -Tag 'div' -Attributes @{ style = @{ paddingTop = '20px'}} -Content {} + } } $Pages = @() $Pages += New-UDPage @AdditionalParameters -Name "PowerShell Universal Dashboard" -Content { - New-AppBar -Title "PowerShell Universal Dashboard" + New-AppBar -Title "PowerShell Universal Dashboard" -NoPadding - New-UDContainer { - New-UDGrid -Container -Content { - New-UDGrid -Item -SmallSize 3 -Content { - New-UDImage -Url 'https://github.com/ironmansoftware/universal-dashboard/raw/master/images/logo.png' + New-UDElement -Tag 'div' -Content { + New-UDContainer { + New-UDGrid -Container -Content { + New-UDGrid -Item -SmallSize 3 -Content { + New-UDImage -Url 'https://github.com/ironmansoftware/universal-dashboard/raw/master/images/logo.png' + } + New-UDGrid -Item -SmallSize 9 -Content { + New-UDTypography -Text 'PowerShell Universal Dashboard' -Variant h2 + New-UDTypography -Text "The most popular web framework for PowerShell" -Variant h4 + } } - New-UDGrid -Item -SmallSize 9 -Content { - New-UDTypography -Text 'PowerShell Universal Dashboard' -Variant h2 - New-UDTypography -Text "The most popular web framework for PowerShell" -Variant h4 + } + } -Attributes @{ + style = @{ + width = '100%' + backgroundColor = 'white' + paddingBottom = '20px' + paddingTop = '20px' + } + } + + New-UDContainer { + New-UDElement -Tag 'div' -Content { + + } -Attributes @{ + style = @{ + height = '25px' } }