Skip to content

Includes improvements #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions PSHTML/Examples/Example19/AssetContent.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This example highlight how to write assets directly as content.
# This is useful when you want to write the asset content directly in the HTML document so that they can be shared with all the dynamic content.
import-module pshtml -Force

$html = html {
head {
title "Asset Content"
#Use -AsContent to write the asset content directly in the HTML document
Write-PSHTMLAsset -AsContent
}
body {
h1 "Asset Content"
p "This is the asset content"
$PieCanvasID = "piecanvas"
canvas -Height 400px -Width 400px -Id $PieCanvasID {

}
Script -content {

$Data1 = @(34,7,11,19)
$Labels = @("Closed","Unresolved","Pending","Open")
$colors = @("Lightgreen","red","Blue","Yellow")
$dsp1 = New-PSHTMLChartPieDataSet -Data $data1 -label "March" -BackgroundColor $colors
New-PSHTMLChart -type pie -DataSet $dsp1 -title "Pie Chart v2" -Labels $Labels -CanvasID $PieCanvasID
}
}
}

Out-PSHTMLDocument -HTMLDocument $html -OutPath "C:\Users\Stephane\Code\PSHTML\PSHTML\Examples\Example19\AssetContent.html" -Show
4 changes: 2 additions & 2 deletions PSHTML/PSHTML.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'PSHTML.psm1'

# Version number of this module.
ModuleVersion = '0.8.2'
ModuleVersion = '0.9.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -128,7 +128,7 @@ PrivateData = @{
ReleaseNotes = 'https://github.com/Stephanevg/PSHTML/blob/master/Change_Log.md'

# Prerelease string of this module
# Prerelease = ''
Prerelease = 'alpha'

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
Expand Down
Loading
Loading