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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="peSHIr.Web" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="peSHIr.Web" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="peSHIr.Web" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add peSHIr.Web --version 1.0.1
                    
#r "nuget: peSHIr.Web, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package peSHIr.Web@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=peSHIr.Web&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=peSHIr.Web&version=1.0.1
                    
Install as a Cake Tool

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:

  1. Make sure you include the <script> tag generated by Html.DynamicTimeScriptTag() in your HTML body somewhere.
  2. Insert any date into your HTML content using Html.DynamicDate().
  3. Insert any relative timespan to a DateTime into your HTML content using Html.DynamicTime()
  4. 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:

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

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 137 8/14/2025
1.0.0 87 8/1/2025

Just taking latest peSHIr.Core and peSHIr.Drawing package versions.