hCalendar微格式 关于事件和基于时间或地点的活

2020-05-08 10:13:28易采站长站整理
>This year’s BarCamp is all about the web: design (visual, experience, information architecture), technology (infrastructure, programming), social and new media, and other stuff that is just plain cool.</p>
<p class=”location vcard”><a class=”fn org url” href=”http://www.chefwhite.com/cjw_cafe.php”>CJW Cafe</a> (on <a href=”http://maps.google.com/maps” class=”adr”><span class=”street-address”>4801 Alameda <abbr title=”Boulevard”>Blvd</abbr> <abbr title=”Northeast”>NE</abbr></span>, <span class=”locality”>Albuquerque</span>, <abbr class=”region” title=”New Mexico”>NM</abbr> <span class=”postal-code”>87113</span></a>) is hosting this event.</p>
</div>

添加到你的日历中

在BarCamp Albuquerque 3文章中,我提供给用户一个链接允许您直接添加到日历应用中:

Downloading BarCamp Albuquerque 3 event .ics

这个链接可以是直接到任何iCalendar文件的URL(例如,.ics, .ical, .ifb, .icalendar)。对我而言,我使用Technorati的事件服务。使用Technorati的技术,您可以在您hCalendar微格式存在的页面链接前加上http://feeds.technorati.com/events/,然后使用拼接好的字符串作为链接的目的地址:

<a href="http://feeds.technorati.com/events/http://www.ablognotlimited.com/articles/barcampalbuquerque-around-the-corner” title=”Download .ics file”>Add to your calendar</a>

当用户点击上面链接时,.ics文件会自动生成提供给用户下载:

Downloading BarCamp Albuquerque 3 event .ics file

外观很重要

前面说过很多次:标记元素并不重要(尽管他应该是有效并且具有语义的)。同时class的值对微格式来说非常的重要,您使用的CSS语句用来为hCalendar添加风格就仅仅是为了更好的展现。我会推荐在CSS中渲染这些hCalendar的class值,而不是为了风格添加更多的class值。例如,您可以参考Jeremy Keith非常棒的文章用来风格化您的日历信息。最终,您可以作任何想做的事情。the presentation of your hCalendar is only limited to your CSS skills

为什么这么麻烦?当然是有好处的

就像之前一遍一遍重复的,但还值得继续重复……主要是因为微格式非常简单的同时提供了非常强大的潜能。我希望更多的人能够了解并使用他们。这会增加使用微格式的工具和应用的出现。