-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
fixed Get-HTMLLogos missing $LogoPath #466
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You do know you have more control using New-HTMLImage? The Get-HTMLLogos is legacy way to build header logo. I guess I could accept this PR, but still using this way has more options? $ProcessSmaller = Get-Process | Select-Object -First 5
New-HTML {
New-HTMLTabStyle -BorderRadius 0px -TextTransform capitalize -BackgroundColorActive SlateGrey
New-HTMLSectionStyle -BorderRadius 0px -HeaderBackGroundColor Grey -RemoveShadow
New-HTMLPanelStyle -BorderRadius 0px
New-HTMLTableOption -DataStore JavaScript -BoolAsString -ArrayJoinString ', ' -ArrayJoin
New-HTMLHeader {
New-HTMLSection -Invisible {
New-HTMLPanel -Invisible {
New-HTMLImage -Source 'https://evotec.pl/wp-content/uploads/2015/05/Logo-evotec-012.png' -UrlLink 'https://evotec.pl/' -AlternativeText 'My other text' -Class 'otehr' -Width '50%'
}
New-HTMLPanel -Invisible {
New-HTMLImage -Source 'https://evotec.pl/wp-content/uploads/2015/05/Logo-evotec-012.png' -UrlLink 'https://evotec.pl/' -AlternativeText 'My other text' -Width '20%'
} -AlignContentText right
}
}
New-HTMLSection {
New-HTMLSection -HeaderText 'Test 1' {
New-HTMLTable -DataTable $ProcessSmaller
}
New-HTMLSection -HeaderText 'Test 2' {
New-HTMLCalendar {
New-CalendarEvent -Title 'Active Directory Meeting' -Description 'We will talk about stuff' -StartDate (Get-Date)
New-CalendarEvent -Title 'Lunch' -StartDate (Get-Date).AddDays(2).AddHours(-3) -EndDate (Get-Date).AddDays(3) -Description 'Very long lunch'
}
}
}
New-HTMLSection -Invisible {
New-HTMLTabPanel {
New-HTMLTab -Name 'PSWriteHTML from File' {
# as a file
New-HTMLSection {
New-HTMLMarkdown -FilePath "$PSScriptRoot\..\..\readme.md"
}
}
New-HTMLTab -Name 'ADEssentials from File' {
New-HTMLSection {
New-HTMLMarkdown -FilePath "C:\Support\GitHub\ADEssentials\readme.md"
}
}
} -Theme elite
}
New-HTMLFooter {
New-HTMLSection -Invisible {
New-HTMLPanel -Invisible {
New-HTMLImage -Source 'https://evotec.pl/wp-content/uploads/2015/05/Logo-evotec-012.png' -UrlLink 'https://evotec.pl/' -AlternativeText 'My other text' -Class 'otehr' -Width '50%'
}
New-HTMLPanel -Invisible {
New-HTMLImage -Source 'https://evotec.pl/wp-content/uploads/2015/05/Logo-evotec-012.png' -UrlLink 'https://evotec.pl/' -AlternativeText 'My other text' -Width '20%'
} -AlignContentText right
}
}
} -ShowHTML:$true -Online -FilePath $PSScriptRoot\Example-Markdown1.html |
Thank you very much, we will have a look into New-HTMLImage as well. We were not aware of this way yetOn 17 Dec 2024 20:05, Przemysław Kłys ***@***.***> wrote:
You do know you have more control using New-HTMLImage? The Get-HTMLLogos is legacy way to build header logo. I guess I could accept this PR, but still using this way has more options?
$ProcessSmaller = Get-Process | Select-Object -First 5
New-HTML {
New-HTMLTabStyle -BorderRadius 0px -TextTransform capitalize -BackgroundColorActive SlateGrey
New-HTMLSectionStyle -BorderRadius 0px -HeaderBackGroundColor Grey -RemoveShadow
New-HTMLPanelStyle -BorderRadius 0px
New-HTMLTableOption -DataStore JavaScript -BoolAsString -ArrayJoinString ', ' -ArrayJoin
New-HTMLHeader {
New-HTMLSection -Invisible {
New-HTMLPanel -Invisible {
New-HTMLImage -Source 'https://evotec.pl/wp-content/uploads/2015/05/Logo-evotec-012.png' -UrlLink 'https://evotec.pl/' -AlternativeText 'My other text' -Class 'otehr' -Width '50%'
}
New-HTMLPanel -Invisible {
New-HTMLImage -Source 'https://evotec.pl/wp-content/uploads/2015/05/Logo-evotec-012.png' -UrlLink 'https://evotec.pl/' -AlternativeText 'My other text' -Width '20%'
} -AlignContentText right
}
}
New-HTMLSection {
New-HTMLSection -HeaderText 'Test 1' {
New-HTMLTable -DataTable $ProcessSmaller
}
New-HTMLSection -HeaderText 'Test 2' {
New-HTMLCalendar {
New-CalendarEvent -Title 'Active Directory Meeting' -Description 'We will talk about stuff' -StartDate (Get-Date)
New-CalendarEvent -Title 'Lunch' -StartDate (Get-Date).AddDays(2).AddHours(-3) -EndDate (Get-Date).AddDays(3) -Description 'Very long lunch'
}
}
}
New-HTMLSection -Invisible {
New-HTMLTabPanel {
New-HTMLTab -Name 'PSWriteHTML from File' {
# as a file
New-HTMLSection {
New-HTMLMarkdown -FilePath "$PSScriptRoot\..\..\readme.md"
}
}
New-HTMLTab -Name 'ADEssentials from File' {
New-HTMLSection {
New-HTMLMarkdown -FilePath "C:\Support\GitHub\ADEssentials\readme.md"
}
}
} -Theme elite
}
New-HTMLFooter {
New-HTMLSection -Invisible {
New-HTMLPanel -Invisible {
New-HTMLImage -Source 'https://evotec.pl/wp-content/uploads/2015/05/Logo-evotec-012.png' -UrlLink 'https://evotec.pl/' -AlternativeText 'My other text' -Class 'otehr' -Width '50%'
}
New-HTMLPanel -Invisible {
New-HTMLImage -Source 'https://evotec.pl/wp-content/uploads/2015/05/Logo-evotec-012.png' -UrlLink 'https://evotec.pl/' -AlternativeText 'My other text' -Width '20%'
} -AlignContentText right
}
}
} -ShowHTML:$true -Online -FilePath $PSScriptRoot\Example-Markdown1.html
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Przemysław,
the LogoPath parameter seemed to be missing for "Get-HTMLLogos" to be able to use logos as binary from custom locations.
I added a few lines to make it work for our use case and wanted to provide that to you.
Greetings,
Fabian