peSHIr.Web
1.0.1
Prefix Reserved
dotnet add package peSHIr.Web --version 1.0.1
NuGet\Install-Package peSHIr.Web -Version 1.0.1
<PackageReference Include="peSHIr.Web" Version="1.0.1" />
<PackageVersion Include="peSHIr.Web" Version="1.0.1" />
<PackageReference Include="peSHIr.Web" />
paket add peSHIr.Web --version 1.0.1
#r "nuget: peSHIr.Web, 1.0.1"
#:package peSHIr.Web@1.0.1
#addin nuget:?package=peSHIr.Web&version=1.0.1
#tool nuget:?package=peSHIr.Web&version=1.0.1
About
What's this?
This library contains some code that could help with very simple code generated static HTML content.
Who created this?
My name is Jarno Peschier. I started programming on a Commodore 64 in high school, got a masters degree in Computer Science at Utrecht University at the end of the last century, specializing in GIS algorithms, and I have been developing software all my professional life.
You might also know me by my online name of peSHIr
, which is basically the way you write my last name phonetically in Klingon.
At the start of 2025 I worked as a software engineer at Dutch engineering firm Iv, where I personally handled all software development around our scan vehicle (YouTube) using multiple third party software packages, C#, and PowerShell.
The laserscan and photo data Iv collects using this vehicle is used in infrastructure projects all over the Netherlands, but also for monitoring things like trees or quay walls in Amsterdam.
How do I use it?
Call static methods on Html
to generate small snippets of HTML markup that you can then string together to form HTML content from code.
using peSHIr.Web;
//...
string list = Html.List(["one","two"]); // should result in "<ul><li>one</li><li>two</li></ul>"
That's it, really.
Is that all..?
Well, no.. One feature I think is kind of cool are the dynamic dates and timestamps:
- Make sure you include the
<script>
tag generated byHtml.DynamicTimeScriptTag()
in your HTML body somewhere. - Insert any date into your HTML content using
Html.DynamicDate()
. - Insert any relative timespan to a
DateTime
into your HTML content usingHtml.DynamicTime()
- See the browser either render these dates/times dynamically each second in browsers that support JavaScript, or just leave them static in the format you specified.
Just be sure to supply the correct culture to any of the above methods, for either the format you specify for the default rendering of the dates/times in your HTML (things like names of months and such), but also for the language elements (like 'today', 'tomorrow', and units like 'hour(s)', 'minute(s), etc.) used in the dynamic formatting in the JavaScript code. In this last case you will get language elements as supported by peSHIr.Text.LanguageSupport
(from our core package, or English when the culture is not yet supported there.
Download
This library is available as a NuGet package on https://nuget.org. To install it, use the following command-line:
dotnet add package peSHIr.Web
License and Versioning
This library is licensed under the MIT License - please see the LICENSE file for details - and makes use of Semantic Versioning to try and give meaning to the version numbers, at least for the non-prereleased stuff.
Credits
This library wouldn't have been possible without the following:
- xUnit - Community-focused unit testing tool for .NET by Brad Wilson
- FluentAssertions - Support library for using fluent unit test assertions by Dennis Doomen
- Polysharp - Generated, source-only polyfills for C# language features by Sergio Pedri
- peSHIr.Core - Hey, that sounds familiar...? It's by this guy 😉
Show your appreciation for my work
If you like what you see/use you could try one of these links to let me know:
You may also like
- My Link Tree
- My NuGet packages
- My English blog (long dead at the moment..)
- My Dutch blog (long dead at the moment..)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- peSHIr.Core (>= 1.0.1)
- peSHIr.Drawing (>= 1.0.1)
-
net8.0-windows7.0
- peSHIr.Core (>= 1.0.1)
- peSHIr.Drawing (>= 1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Just taking latest peSHIr.Core and peSHIr.Drawing package versions.