Open Skrypt opened 10 months ago
Looks complicated just to save writing a tag directly. From your examples I couldn't figure out if these were actual html tags or tag helpers in razor. I would assume people would also be confused.
Or maybe create new shapes that render specific tags, like TimeShape
Yeah, somehow DateTime and TimeSpan are distinct in C# but maybe it is not in HTML. So a TimeShapes that would render a <time></time>
tag but that would take a TimeSpan or DateTime as parameter.
The other idea was to simply add a param to the actual taghelpers and add an alternate render.
The Datetime and TimeSpan shapes are currently rendering as strings but in an HTML context we should try to render it wrapped with a
<time />
tag.We should probably allow to use a W3C accepted HTML element to make this easier for everyone. It should use
<time />
tag in which we can pass/render a datetime or a timespan. At least make it an option to render as a HTML element or a date text but in the end the first should be used more often.Examples:
For a Datetime shape
Liquid:
Razor:
Should render optionally as :
For a timeSpan
Liquid:
Razor:
Should render optionally as :
It should render a
<time>
tag optionally only and it should be backward compatible with what we currently have. Meaning that by default it should not render a time tag.