aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/User.java1
-rw-r--r--juick-www/src/main/webapp/WEB-INF/layouts/content.html17
-rw-r--r--juick-www/src/main/webapp/WEB-INF/views/blog.html3
-rw-r--r--juick-www/src/main/webapp/WEB-INF/views/partial/message.html16
-rw-r--r--juick-www/src/main/webapp/WEB-INF/views/thread.html15
5 files changed, 36 insertions, 16 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/User.java b/juick-www/src/main/java/com/juick/www/controllers/User.java
index 8b7f2e09..d42d3ed3 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/User.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/User.java
@@ -142,6 +142,7 @@ public class User {
} else if (before > 0 || paramShow != null) {
head += "<meta name=\"robots\" content=\"noindex\"/>";
}
+ model.addAttribute("pageUrl", "http://juick.com/" + user.getName());
model.addAttribute("title", title);
model.addAttribute("headers", head);
model.addAttribute("visitor", visitor);
diff --git a/juick-www/src/main/webapp/WEB-INF/layouts/content.html b/juick-www/src/main/webapp/WEB-INF/layouts/content.html
index 74146a0b..4e8073ce 100644
--- a/juick-www/src/main/webapp/WEB-INF/layouts/content.html
+++ b/juick-www/src/main/webapp/WEB-INF/layouts/content.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
-<head>
+<head id="org" itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<script type="text/javascript" src="/{{ beans.webApp.scriptsUrl }}"></script>
@@ -8,7 +8,8 @@
{% block headers %}
{{ headers | default('') | raw }}
{% endblock %}
- <title>{{ title | default('Juick') }}</title>
+ <title itemprop="name">{{ title | default('Juick') }}</title>
+ <meta itemprop="url" content="https://juick.com/" />
<meta property="og:type" content="{{ ogtype | default('website') }}" />
<meta property="fb:app_id" content="130568668304" />
<meta name="viewport" content="width=device-width,initial-scale=1"/>
@@ -26,11 +27,21 @@
<link rel="apple-touch-icon" sizes="144x144" href="//i.juick.com/apple-icon-144x144.png"/>
<link rel="apple-touch-icon" sizes="152x152" href="//i.juick.com/apple-icon-152x152.png"/>
<link rel="apple-touch-icon" sizes="180x180" href="//i.juick.com/apple-icon-180x180.png"/>
- <link rel="icon" type="image/png" sizes="192x192" href="//i.juick.com/android-icon-192x192.png"/>
+ <link itemprop="logo" href="http://juick.com/#juick-logo" itemtype="http://schema.org/ImageObject" />
<link rel="icon" type="image/png" sizes="32x32" href="//i.juick.com/favicon-32x32.png"/>
<link rel="icon" type="image/png" sizes="96x96" href="//i.juick.com/favicon-96x96.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="//i.juick.com/favicon-16x16.png"/>
<link rel="manifest" href="//i.juick.com/manifest.json"/>
+ <script type="application/ld+json">
+{
+ "@context": "http://schema.org",
+ "@id": "http://juick.com/#juick-logo",
+ "@type": "ImageObject",
+ "url": "http://juick.com/logo.png",
+ "width": 110,
+ "height": 36
+}
+ </script>
</head>
<body id="body" {% if visitor.uid > 0 %}data-hash="{{visitor.authHash}}"{% endif %}>
{% include "views/partial/navigation" %}
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>&nbsp;&nbsp;{{ msg.Replies }}</a>
+ <i data-icon="ei-comment" data-size="s"></i>&nbsp;&nbsp;<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 %}