Sure, here’s the top left with the 4 links
$CardSplat = @{
BackgroundColor = "#eeeeee"
Image = (New-UDImage -Url (Get-ImageBase64Uri -Path '.\assets\image01.svg'))
}
New-UDCard @CardSplat -Endpoint {
New-UDButton -Flat -Text "Website 1" -IconAlignment left -Icon dot_circle_o -OnClick {
Invoke-UDRedirect -Url 'https://website01'
}
New-UDButton -Flat -Text "Website 2" -IconAlignment left -Icon dot_circle_o -OnClick {
Invoke-UDRedirect -Url 'https://website02'
}
New-UDButton -Flat -Text "Website 3" -IconAlignment left -Icon dot_circle_o -OnClick {
Invoke-UDRedirect -Url 'https://website03'
}
New-UDButton -Flat -Text "Website 4" -IconAlignment left -Icon dot_circle_o -OnClick {
Invoke-UDRedirect -Url 'https://website04'
}
}
For that exact code, you’ll need a helper function that converts the .svg image to base64 (Get-ImageBase64Uri)
Function Get-ImageBase64Uri {
param(
[Parameter(Mandatory=$True)]
[string]
$Path
)
"data:image/svg+xml;base64," + [convert]::ToBase64String((get-content $Path -encoding byte))
}