diff options
author | Vitaly Takmazov | 2017-10-04 15:31:44 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-10-04 17:29:14 +0300 |
commit | 45a8cd55e8b28abc36884a28527b58842c5cee10 (patch) | |
tree | d7973654cbaecf8e88b6d0863691cfb6efe4b58e /juick-www/src/main/webapp/WEB-INF/views | |
parent | a33ffed053db33a9abd425cd7d641f47e6ab8651 (diff) |
www: microdata
Diffstat (limited to 'juick-www/src/main/webapp/WEB-INF/views')
-rw-r--r-- | juick-www/src/main/webapp/WEB-INF/views/blog.html | 3 | ||||
-rw-r--r-- | juick-www/src/main/webapp/WEB-INF/views/partial/message.html | 16 | ||||
-rw-r--r-- | juick-www/src/main/webapp/WEB-INF/views/thread.html | 15 |
3 files changed, 21 insertions, 13 deletions
diff --git a/juick-www/src/main/webapp/WEB-INF/views/blog.html b/juick-www/src/main/webapp/WEB-INF/views/blog.html index 87007ea8..29b636dd 100644 --- a/juick-www/src/main/webapp/WEB-INF/views/blog.html +++ b/juick-www/src/main/webapp/WEB-INF/views/blog.html @@ -7,9 +7,12 @@ {% if paramTag | default('') is not empty %} <p class="page"><a href="/tag/{{ paramTag.name | urlencode }}">← {{ i18n("messages","blog.allPostsWithTag") }} <b>{{ paramTag.name | escape }}</b></a></p> {% endif %} +<div itemscope="" itemtype="http://schema.org/Blog"> + <meta itemprop="url" content="{{ pageUrl }}"/> {% for msg in msgs %} {% include "views/partial/message" %} {% endfor %} +</div> {% if nextpage | default('') is not empty %} <p class="page"><a href="{{ nextpage | raw }}" rel="prev">{{ i18n("messages","messages.next") }} →</a></p> {% endif %} diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/message.html b/juick-www/src/main/webapp/WEB-INF/views/partial/message.html index f3a42ff2..c0d345ba 100644 --- a/juick-www/src/main/webapp/WEB-INF/views/partial/message.html +++ b/juick-www/src/main/webapp/WEB-INF/views/partial/message.html @@ -1,26 +1,28 @@ -<article data-mid="{{ msg.mid }}"> +<article data-mid="{{ msg.mid }}" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting" itemref="org"> <header class="h"> - @<a href="/{{ msg.user.name }}/">{{ msg.user.name }}</a>: + <span itemprop="author" itemscope="" itemtype="http://schema.org/Person"> + @<a href="/{{ msg.user.name }}/" itemprop="url" rel="author"><span itemprop="name">{{ msg.user.name }}</span></a>: + </span> <div class="msg-avatar"><a href="/{{ msg.user.name }}/"> <img src="//i.juick.com/a/{{ msg.user.uid }}.png" alt="{{ msg.user.name }}"/></a> </div> <div class="msg-menu"><a href="#"><i data-icon="ei-link" data-size="s"></i></a></div> <div class="msg-ts"> <a href="/{{ msg.user.name }}/{{ msg.mid }}"> - <time datetime="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" + <time itemprop="datePublished dateModified" itemtype="http://schema.org/Date" datetime="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" title="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT"> {{ msg.timestamp | prettyTime }} </time> </a> </div> - <div class="msg-tags"> + <div class="msg-tags" itemprop="headline"> {{ tags(msg.user.name, msg.tags | tagsList) }} </div> </header> - <p>{{ msg | formatMessage }}</p> + <p itemprop="description">{{ msg | formatMessage }}</p> {% if msg.AttachmentType is not empty %} <p class="ir"><a href="//i.juick.com/p/{{ msg.mid }}.{{ msg.AttachmentType }}" data-fname="{{ msg.mid }}.{{ msg.AttachmentType }}"> - <img src="//i.juick.com/photos-512/{{ msg.mid }}.{{ msg.AttachmentType }}" alt=""/></a> + <img itemprop="image" src="//i.juick.com/photos-512/{{ msg.mid }}.{{ msg.AttachmentType }}" alt=""/></a> </p> {% endif %} <nav class="l"> @@ -52,7 +54,7 @@ {% endif %} {% if msg.Replies > 0 %} <a href="/{{ msg.user.name }}/{{ msg.mid }}" class="replies"> - <i data-icon="ei-comment" data-size="s"></i> {{ msg.Replies }}</a> + <i data-icon="ei-comment" data-size="s"></i> <span itemprop="commentCount">{{ msg.Replies }}</span></a> {% endif %} </nav> </article>
\ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/thread.html b/juick-www/src/main/webapp/WEB-INF/views/thread.html index 57d7e0a1..10fa9141 100644 --- a/juick-www/src/main/webapp/WEB-INF/views/thread.html +++ b/juick-www/src/main/webapp/WEB-INF/views/thread.html @@ -3,10 +3,10 @@ {% block content %} <ul> <li id="msg-{{ msg.mid }}" class="msg msgthread"> - <div class="msg-cont"> + <div class="msg-cont" itemscope="" itemtype="http://schema.org/BlogPosting" itemref="org"> <div class="msg-menu"><a href="#"><i data-icon="ei-link" data-size="s"></i></a></div> <div class="msg-ts"><a href="/{{ msg.user.name }}/{{ msg.mid }}"> - <time datetime="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" + <time itemprop="datePublished dateModified" datetime="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z" title="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT"> {{ msg.timestamp | prettyTime }} </time> @@ -16,16 +16,19 @@ <a href="/{{ msg.user.name }}/"> <img src="//i.juick.com/a/{{ msg.user.uid }}.png" alt="{{ msg.user.name }}"/></a> </div> - <div class="msg-header">@<a href="/{{ msg.user.name }}/">{{ msg.user.name }}</a>: - <div class="msg-tags"> + <div class="msg-header"> + <span itemprop="author" itemscope="" itemtype="http://schema.org/Person"> + @<a itemprop="url" rel="author" href="/{{ msg.user.name }}/"><span itemprop="name">{{ msg.user.name }}</span></a>: + </span> + <div class="msg-tags" itemprop="headline"> {{ tags(msg.user.name, msg.tags | tagsList) }} </div> </div> - <div class="msg-txt">{{ msg | formatMessage }}</div> + <div class="msg-txt" itemprop="articleBody">{{ msg | formatMessage }}</div> {% if msg.AttachmentType is not empty %} <div class="msg-media"> <a href="//i.juick.com/p/{{ msg.mid }}.{{ msg.AttachmentType }}" data-fname="{{ msg.mid }}.{{ msg.AttachmentType }}"> - <img src="//i.juick.com/photos-512/{{ msg.mid }}.{{ msg.AttachmentType }}" alt=""/> + <img itemprop="image" src="//i.juick.com/photos-512/{{ msg.mid }}.{{ msg.AttachmentType }}" alt=""/> </a> </div> {% endif %} |