Microformats in .NET
I recently came across Microformats and wanted to create a set of .NET controls which will output Microformat controls.
So this afternoon I made a start and created a hCard and XFN control.
I've applied for a Codeplex workspace called nMicroformats and will upload the code as soon as possible. For now here's a preview: -
<Microformat:hCard
ID="PhilshCard"
runat="server"
Photo="http://static.flickr.com/33/46195571_f9b700742f_m.jpg"
FirstName="Phil"
MiddleName=""
LastName="Winstanley"
Url="http://weblogs.asp.net/plip"
Organization=""
Email="phil@winstanley.name"
Street="91 Billinge Road"
Town="Wigan"
County="Lancashire"
Country="United Kingdom"
Phone="+44 (0) 7753 747 991"
AolInstantMessenger="plipster"
YahooInstantMessenger="plipster"
/>
This produces the following markup: -
<span id="PhilshCard"><div class="vcard">
<img style="float:left; margin-right:4px" src="http://static.flickr.com/33/46195571_f9b700742f_m.jpg" alt="photo" class="photo"/>
<a class="url fn n" href="http://weblogs.asp.net/plip">
<span class="given-name">Phil</span>
<span class="family-name">Winstanley</span>
</a>
<a class="email" href="mailto:phil@winstanley.name">phil@winstanley.name</a>
<div class="adr">
<div class="street-address">91 Billinge Road</div>
<span class="locality">Wigan</span>
<span class="region">Lancashire</span>
<span class="country-name">United Kingdom</span>
</div>
<div class="tel">+44 (0) 7753 747 991</div>
<a class="url" href="aim:goim?screenname=plipster">AIM</a>
<a class="url" href="ymsgr:sendIM?screenname=plipster">YIM</a>
</div>
</span>
Which in turn looks like this: -
Using the Firefox Tails plugin, the markup is picked up and looks like this: -
