Added shortcodes, lots of improvements and content dump

This commit is contained in:
2022-06-07 13:54:07 +00:00
parent 6c98fcf57a
commit 9859c9e5ba
34 changed files with 448 additions and 59 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -0,0 +1,18 @@
param([String]$tid='', [String]$app='')
if ($tid -eq '' or $app -eq '') {
$name = [Environment]::GetCommandLineArgs()[0]
Write-Host "Usage: pwsh $name -tid [tenant id] -app [app id]"
exit
}
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
if ((Get-module -ListAvailable -name 'AzureAD') -eq $null) {
Install-Module 'AzureAD' -Scope CurrentUser
}
Import-Module AzureAD
Connect-AzureAD -TenantID "$tid"
New-AzureADServicePrincipal -AppId "$app"

View File

@@ -0,0 +1,62 @@
// This does mostly the same as that example from the official docs
let simple = () => {
let template = Handlebars.compile("Handlebars <b>{{doesWhat}}</b>")
let out = template({ doesWhat: "rocks!" })
console.log(out)
return out
}
let nested = () => {
}
let eval = () => {
}
// Simple helper
Handlebars.registerHelper('', (str) => {
return ''
})
// Block helper
Handlebars.registerHelper('', (items, options) => {
})
// Handlebars registered partial
Handlebars.registerPartial('', '')
inlinePartial = `
{{#*inline "inlinePartial"}}
{{/inline}}`
let advanced = () => {
}
// Run "main" after all is loaded
document.addEventListener("DOMContentLoaded", function() {
let output = document.createElement('div')
output.id = 'output'
document.getElementById('meta').append(output)
// Here we use those "triple mustaches"!
let template = Handlebars.compile(`
<br /><div>
<h4>Examples output:</h4>
<h5>Functions:</h5>
<p>Simple: {{{simple}}}</p>
<p>Nested: {{{nested}}}</p>
<p>Eval: {{{eval}}}</p></div>`)
// Render and insert the template above
document.getElementById('output').innerHTML = template({
simple: simple(), nested: nested(), eval: eval()})
})