Bootstrap is also supported within New-Region by using -AsCarousel , -AsHeadline, -AsFeaturette or -AsRow.
This example will create a new module for bootstrap, and a page featuring some of the stuff you can do with Bootstrap:
# Remove any old copy of the module
Remove-Item -Path "$home\Documents\WindowsPowerShell\Modules\BootStrapper" -Recurse -Force
# Create a folder for the module
New-Item -Path "$home\Documents\WindowsPowerShell\Modules\BootStrapper\Pages" -ItemType Directory -ErrorAction SilentlyContinue -Force |
Out-Null
# Create the pipeworks manifest
New-PipeworksManifest -UseBootstrap -ForegroundColor "#012456" -Backgroundcolor "#ffdddd" -Name BootStrapper |
Set-Content "$home\Documents\WindowsPowerShell\Modules\BootStrapper\BootStrapper.Pipeworks.psd1"
@'
@{
ModuleVersion = 0.1
}
'@ |
Set-Content "$home\Documents\WindowsPowerShell\Modules\BootStrapper\BootStrapper.psd1"
{
New-Region -AsFeaturette -LayerId Features -Layer @{
Slides =
New-Region -AsCarousel -LayerId Carousel -Layer @{
"Slide 1" = "This is the first slide"
"Slide 2" = "This is the <b>second</b> slide"
"Slide 3" = "This is the <i>third</i> slide"
}
Headlines =
New-Region -AsHeadline -LayerId Headlines -Layer @{
"Headline 1" =
New-Region -AsRow -LayerID Row1 -Layer @{
"d" = "D"
"e" = "e"
"f" = "f"
}
"Headline 2" =
New-Region -AsRow -LayerID Row2 -Layer @{
"d" = "D"
"e" = "e"
"f" = "f"
}
}
Rows =
New-Region -AsRow -RowSpan span1, span2, span3, span4, span5, span6, span7, span8, span9 -Order Row1, Row2, Row3, Row4, Row5, Row6, Row7, Row8, Row9 -LayerID Rows -Layer @{
Row1 = "Span 1"
Row2 = "Span 2"
Row3 = "Span 3"
Row4 = "Span 4"
Row5 = "Span 5"
Row6 = "Span 6"
Row7 = "Span 7"
Row8 = "Span 8"
Row9 = "Span 9"
}
} -Order Headlines, Slides, Rows
New-WebPage -Title "Bootstrap Example"
} |
Set-Content "$home\Documents\WindowsPowerShell\Modules\BootStrapper\Pages\Default.ps1"
Import-Module BootStrapper -Force -PassThru | ConvertTo-ModuleService -Force -Show