Adding better Microdata

Also removiung alt texts from images
This commit is contained in:
Andreas Mieke 2015-09-29 20:01:20 +02:00
parent 95d710c7f9
commit 1ec04dcabd
9 changed files with 71 additions and 27 deletions

View file

@ -1,5 +1,7 @@
{{ template "header.html" . }} {{ template "header.html" . }}
<div class="row" itemscope itemtype="http://schema.org/Person"> <div class="row" itemscope itemtype="http://schema.org/Person">
<meta itemprop="url" content="/zeige/{{ .data.AT.Slug.String }}" />
<meta itemprop="image" content="{{ .data.AT.FanArtB.String }}" />
<h1 id="atName" class="small-12 columns" itemprop="name">{{ .data.AT.Name.String }}</h1> <h1 id="atName" class="small-12 columns" itemprop="name">{{ .data.AT.Name.String }}</h1>
<div class="medium-3 large-2 columns show-for-medium-up"> <div class="medium-3 large-2 columns show-for-medium-up">
<img alt="{{ .data.AT.Name.String }}'s Avatar" src="{{ .data.AT.AvatarB.String }}" itemprop="image" /> <img alt="{{ .data.AT.Name.String }}'s Avatar" src="{{ .data.AT.AvatarB.String }}" itemprop="image" />
@ -11,9 +13,9 @@
<li itemscope itemtype="http://schema.org/TVSeries"> <li itemscope itemtype="http://schema.org/TVSeries">
<a class="th" href="/lets-play/{{ .Slug.String }}/" itemprop="url"> <a class="th" href="/lets-play/{{ .Slug.String }}/" itemprop="url">
{{ if .PosterS.Valid }} {{ if .PosterS.Valid }}
<img alt="{{ .Name.String }} Cover" src="{{ .PosterS.String }}" itemprop="thumbnailUrl" /> <img alt="" src="{{ .PosterS.String }}" itemprop="thumbnailUrl" />
{{ else }} {{ else }}
<img alt="Kein Cover" src="https://placeholdit.imgix.net/~text?txtsize=12&txt=Kein%20Cover&w=178&h=265" /> <img alt="" src="https://placeholdit.imgix.net/~text?txtsize=12&txt=Kein%20Cover&w=178&h=265" />
{{ end }} {{ end }}
</a> </a>
<br /><a href="/lets-play/{{ .Slug.String }}/"><strong itemprop="name">{{ .Name.String }}</strong></a> <br /><a href="/lets-play/{{ .Slug.String }}/"><strong itemprop="name">{{ .Name.String }}</strong></a>
@ -25,9 +27,15 @@
{{ range .data.EPs }} {{ range .data.EPs }}
<li itemscope itemtype="http://schema.org/Episode"> <li itemscope itemtype="http://schema.org/Episode">
<a class="th" href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/" itemprop="url"> <a class="th" href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/" itemprop="url">
<img alt="{{ .EP.Name.String }} Thumbail" src="{{ if .EP.ThumbS.Valid }}{{ .EP.ThumbS.String }}{{ else }}https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149{{ end }}" itemprop="thumbnailUrl" /> {{ if .EP.ThumbS.Valid }}
<img alt="" src="{{ .EP.ThumbS.String }}" itemprop="thumbnailUrl" />
{{ else }}
<img alt="" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149" />
{{ end }}
</a> </a>
<a href="/lets-play/{{ .LP.Slug.String }}/"><strong>{{ .LP.Name.String }}</strong></a>: <span itemprop="partOfSeries" itemscope itemtype="http://schema.org/TVSeries">
<a href="/lets-play/{{ .LP.Slug.String }}/" itemprop="url"><strong itemprop="name">{{ .LP.Name.String }}</strong></a>:
</span>
<br /><a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/"><span itemprop="name">{{ .EP.Name.String }}</span></a> <br /><a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/"><span itemprop="name">{{ .EP.Name.String }}</span></a>
</li> </li>
{{ end }} {{ end }}
@ -36,9 +44,13 @@
<h2>Aktuelle Let's Tests</h2> <h2>Aktuelle Let's Tests</h2>
<ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-5"> <ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-5">
{{ range .data.LTs }} {{ range .data.LTs }}
<li itemscope itemtype="http://schema.org/Episode"> <li itemscope itemtype="http://schema.org/Movie">
<a class="th" href="/testet/{{ .Slug.String }}/" itemprop="url"> <a class="th" href="/testet/{{ .Slug.String }}/" itemprop="url">
<img alt="{{ .Name.String }} Thumbnail" src="{{ if .ThumbS.Valid }}{{ .ThumbS.String }}{{ else }}https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149{{ end }}" itemprop="thumbnailUrl" /> {{ if .ThumbS.Valid }}
<img alt="" src="{{ .ThumbS.String }}" itemprop="thumbnailUrl" />
{{ else }}
<img alt="" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149" />
{{ end }}
</a> </a>
<br /><a href="/testet/{{ .Slug.String }}/"><strong itemprop="name">{{ .Name.String }}</strong></a> <br /><a href="/testet/{{ .Slug.String }}/"><strong itemprop="name">{{ .Name.String }}</strong></a>
</li> </li>

View file

@ -7,9 +7,9 @@
<li itemscope itemtype="http://schema.org/Person"> <li itemscope itemtype="http://schema.org/Person">
<a class="th" href="/zeige/{{ .AT.Slug.String }}/" itemprop="url"> <a class="th" href="/zeige/{{ .AT.Slug.String }}/" itemprop="url">
{{ if .AT.AvatarB.Valid }} {{ if .AT.AvatarB.Valid }}
<img alt="{{ .AT.Name.String }}'s Avatar" src="{{ .AT.AvatarB.String }}" itemprop="image" /> <img alt="" src="{{ .AT.AvatarB.String }}" itemprop="image" />
{{ else }} {{ else }}
<img alt="Kein Avatar" src="https://placeholdit.imgix.net/~text?txtsize=24&txt=Kein%20Avatar&w=240&h=240" /> <img alt="" src="https://placeholdit.imgix.net/~text?txtsize=24&txt=Kein%20Avatar&w=240&h=240" />
{{ end }} {{ end }}
</a> </a>
<br /><a href="/zeige/{{ .AT.Slug.String }}/"><strong itemprop="name">{{ .AT.Name.String }}</strong></a> <br /><a href="/zeige/{{ .AT.Slug.String }}/"><strong itemprop="name">{{ .AT.Name.String }}</strong></a>

View file

@ -1,11 +1,15 @@
{{ template "header.html" . }} {{ template "header.html" . }}
<div class="row" itemscope itemtype="http://schema.org/Episode"> <div class="row" itemscope itemtype="http://schema.org/Episode">
<meta itemprop="thumbnailUrl" content="{{ .data.EP.ThumbS.String }}" />
<meta itemprop="datePublished" content="{{ .data.EP.Aired }}" />
<meta itemprop="timeRequired" content="{{ .data.EP.Duration.Int64 }}" />
<meta itemprop="episodeNumber" content="{{ .data.EP.Episode.Int64 }}" />
<div class="flex-video widescreen vimeo"> <div class="flex-video widescreen vimeo">
<iframe width="213" height="120" src="//www.youtube.com/embed/{{ .data.EP.Youtube.String }}" frameborder="0" allowfullscreen></iframe> <iframe width="213" height="120" src="//www.youtube.com/embed/{{ .data.EP.Youtube.String }}" frameborder="0" allowfullscreen></iframe>
</div> </div>
<div class="medium-3 medium-push-9 columns"> <div class="medium-3 medium-push-9 columns">
<h5 itemscope itemtype="http://schema.org/TVSeries"><i class="fa fa-gamepad fix-icon"></i> <a href="/lets-play/{{ .data.LP.Slug.String}}/" itemprop="url"><span itemprop="name">{{ .data.LP.Name.String }}</span></a></h5> <h5 itemprop="partOfSeries" itemscope itemtype="http://schema.org/TVSeries"><i class="fa fa-gamepad fix-icon"></i> <a href="/lets-play/{{ .data.LP.Slug.String}}/" itemprop="url"><span itemprop="name">{{ .data.LP.Name.String }}</span></a></h5>
<h5 itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5> <h5 itemprop="director" itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="bestRating" content="10" /> <meta itemprop="bestRating" content="10" />
<meta itemprop="worstRating" content="0" /> <meta itemprop="worstRating" content="0" />

View file

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Gronkh.DE Mirror{{ if .title }}{{ .title }}{{ end }}</title> <title>{{ if .title }}{{ .title }} {{ end }}Gronkh.de Mirror</title>
<link rel="stylesheet" href="/assets/css/foundation.min.css" /> <link rel="stylesheet" href="/assets/css/foundation.min.css" />
<link rel="stylesheet" href="/assets/css/font-awesome.min.css" /> <link rel="stylesheet" href="/assets/css/font-awesome.min.css" />
<link rel="stylesheet" href="/assets/css/gronkh.css" /> <link rel="stylesheet" href="/assets/css/gronkh.css" />
@ -14,7 +14,7 @@
<nav class="top-bar" data-topbar data-options="sticky_on: large"> <nav class="top-bar" data-topbar data-options="sticky_on: large">
<ul class="title-area"> <ul class="title-area">
<li class="name"> <li class="name">
<h1><a href="/">Gronkh.DE <sub>Mirror</sub></a></h1> <h1><a href="/">Gronkh.de <sub>Mirror</sub></a></h1>
</li> </li>
<li class="toggle-topbar menu-icon"><a href="/"><span>Menu</span></a></li> <li class="toggle-topbar menu-icon"><a href="/"><span>Menu</span></a></li>
</ul> </ul>

View file

@ -6,11 +6,19 @@
{{ range .data }} {{ range .data }}
<li itemscope itemtype="http://schema.org/Episode"> <li itemscope itemtype="http://schema.org/Episode">
<a class="th" href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/" itemprop="url"> <a class="th" href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/" itemprop="url">
<img alt="{{ .EP.Name.String }} Thumbnail" src="{{ if .EP.ThumbS.Valid }}{{ .EP.ThumbS.String }}{{ else }}https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149{{ end }}" itemprop="thumbnailUrl"> {{ if .EP.ThumbS.Valid }}
<img alt="" src="{{ .EP.ThumbS.String }}" itemprop="thumbnailUrl" />
{{ else }}
<img alt="" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149" />
{{ end }}
</a> </a>
<a href="/lets-play/{{ .LP.Slug.String }}/"><strong>{{ .LP.Name.String }}</strong></a>: <span itemprop="partOfSeries" itemscope itemtype="http://schema.org/TVSeries">
<a href="/lets-play/{{ .LP.Slug.String }}/" itemprop="url"><strong itemprop="name">{{ .LP.Name.String }}</strong></a>:
</span>
<br /><a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/"><span itemprop="name">{{ .EP.Name.String }}</span></a> <br /><a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}/"><span itemprop="name">{{ .EP.Name.String }}</span></a>
<br />von <a href="/zeige/{{ .AT.Slug.String }}/">{{ .AT.Name.String }}</a> <span itemprop="director" itemscope itemtype="http://schema.org/Person">
<br />von <a href="/zeige/{{ .AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .AT.Name.String }}</span></a>
</span>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>

View file

@ -1,16 +1,23 @@
{{ template "header.html" . }} {{ template "header.html" . }}
<div class="row" itemscope itemtype="http://schema.org/TVSeries"> <div class="row" itemscope itemtype="http://schema.org/TVSeries">
<meta itemprop="url" content="/lets-play/{{ .data.LP.Slug.String }}" />
<meta itemprop="datePublished" content="{{ .data.LP.Aired }}" />
<meta itemprop="thumbnailUrl" content="{{ .data.LP.PosterB.String }}" />
<h1 id="lpName" class="small-12 columns" itemprop="name">{{ .data.LP.Name.String }}</h1> <h1 id="lpName" class="small-12 columns" itemprop="name">{{ .data.LP.Name.String }}</h1>
<div class="medium-3 large-2 columns"> <div class="medium-3 large-2 columns">
{{ if .data.LP.PosterB.Valid }}<a class="th show-for-medium-up" href="{{ .data.LP.PosterB.String }}" data-reveal-id="coverModal">{{ end }}<img alt="{{ .data.LP.Name.String }} Cover" src="{{ .data.LP.PosterS.String }}" itemprop="thumbnailUrl" />{{ if .data.LP.PosterB.Valid }}</a>{{ end }} {{ if .data.LP.PosterB.Valid }}<a class="th show-for-medium-up" href="{{ .data.LP.PosterB.String }}" data-reveal-id="coverModal">{{ end }}<img alt="" src="{{ .data.LP.PosterS.String }}" itemprop="thumbnailUrl" />{{ if .data.LP.PosterB.Valid }}</a>{{ end }}
<h5 itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5> <h5 itemprop="director" itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5>
</div> </div>
<div class="small-12 medium-9 large-10 columns"> <div class="small-12 medium-9 large-10 columns">
{{ range .data.EPs }} {{ range .data.EPs }}
<div class="row entry" itemscope itemtype="http://schema.org/Episode"> <div class="row entry" itemscope itemtype="http://schema.org/Episode">
<div class="large-12 columns"> <div class="large-12 columns">
<a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}" itemprop="url"> <a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}" itemprop="url">
<img alt="{{ .EP.Name.String }} Thumbnail" src="{{ if .EP.ThumbS.Valid }}{{ .EP.ThumbS.String }}{{ else }}https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149{{ end }}" itemprop="thumbnailUrl" /> {{ if .EP.ThumbS.Valid }}
<img alt="" src="{{ .EP.ThumbS.String }}" itemprop="thumbnailUrl" />
{{ else }}
<img alt="" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149" />
{{ end }}
</a> </a>
<h4><a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}"><span itemprop="name">{{ .EP.Name.String }}</span></a></h4> <h4><a href="/lets-play/{{ .LP.Slug.String }}/{{ .EP.Slug.String }}"><span itemprop="name">{{ .EP.Name.String }}</span></a></h4>
<p class="show-for-medium-up" itemprop="description">{{ .EP.Descr.String }}</p> <p class="show-for-medium-up" itemprop="description">{{ .EP.Descr.String }}</p>
@ -20,7 +27,7 @@
</div> </div>
</div> </div>
<div id="coverModal" class="reveal-modal" data-reveal aria-labelledby="lpName" aria-hidden="true" role="dialog"> <div id="coverModal" class="reveal-modal" data-reveal aria-labelledby="lpName" aria-hidden="true" role="dialog">
<img alt="{{ .data.LP.Name.String }} Cover groß" src="{{ .data.LP.PosterB.String }}"> <img alt="{{ .data.LP.Name.String }} Cover groß" src="{{ .data.LP.PosterB.String }}" />
<a class="close-reveal-modal" aria-label="Close">&#215;</a> <a class="close-reveal-modal" aria-label="Close">&#215;</a>
</div> </div>
{{ template "footer.html" . }} {{ template "footer.html" . }}

View file

@ -7,13 +7,15 @@
<li itemscope itemtype="http://schema.org/TVSeries"> <li itemscope itemtype="http://schema.org/TVSeries">
<a class="th" href="/lets-play/{{ .LP.Slug.String }}/" itemprop="url"> <a class="th" href="/lets-play/{{ .LP.Slug.String }}/" itemprop="url">
{{ if .LP.PosterS.Valid }} {{ if .LP.PosterS.Valid }}
<img alt="{{ .LP.Name.String }} Cover" src="{{ .LP.PosterS.String }}" itemprop="thumbnailUrl" /> <img alt="" src="{{ .LP.PosterS.String }}" itemprop="thumbnailUrl" />
{{ else }} {{ else }}
<img alt="Kein Cover" src="https://placeholdit.imgix.net/~text?txtsize=24&txt=Kein%20Cover&w=178&h=265" /> <img alt="" src="https://placeholdit.imgix.net/~text?txtsize=24&txt=Kein%20Cover&w=178&h=265" />
{{ end }} {{ end }}
</a> </a>
<br /><a href="/lets-play/{{ .LP.Slug.String }}/"><strong itemprop="name">{{ .LP.Name.String }}</strong></a> <br /><a href="/lets-play/{{ .LP.Slug.String }}/"><strong itemprop="name">{{ .LP.Name.String }}</strong></a>
<br />von <a href="/zeige/{{ .AT.Slug.String }}/">{{ .AT.Name.String }}</a> <span itemprop="director" itemscope itemtype="http://schema.org/Person">
<br />von <a href="/zeige/{{ .AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .AT.Name.String }}</span></a>
</span>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>

View file

@ -1,10 +1,15 @@
{{ template "header.html" . }} {{ template "header.html" . }}
<div class="row" itemscope itemtype="http://schema.org/Episode"> <div class="row" itemscope itemtype="http://schema.org/Movie">
<meta itemprop="url" content="/testet/{{ .data.LT.Slug.String }}" />
<meta itemprop="thumbnailUrl" content="{{ .data.LT.PosterS.String }}" />
<meta itemprop="thumbnailUrl" content="{{ .data.LT.ThumbS.String }}" />
<meta itemprop="datePublished" content="{{ .data.LT.Aired }}" />
<meta itemprop="timeRequired" content="{{ .data.LT.Duration.Int64 }}" />
<div class="flex-video widescreen vimeo"> <div class="flex-video widescreen vimeo">
<iframe width="213" height="120" src="//www.youtube.com/embed/{{ .data.LT.Youtube.String }}" frameborder="0" allowfullscreen></iframe> <iframe width="213" height="120" src="//www.youtube.com/embed/{{ .data.LT.Youtube.String }}" frameborder="0" allowfullscreen></iframe>
</div> </div>
<div class="medium-3 medium-push-9 columns"> <div class="medium-3 medium-push-9 columns">
<h5 itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5> <h5 itemprop="director" itemscope itemtype="http://schema.org/Person"><i class="fa fa-user fix-icon"></i> <a href="/zeige/{{ .data.AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .data.AT.Name.String }}</span></a></h5>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="bestRating" content="10" /> <meta itemprop="bestRating" content="10" />
<meta itemprop="worstRating" content="0" /> <meta itemprop="worstRating" content="0" />

View file

@ -4,12 +4,18 @@
<h1>{{ .title }}</h1> <h1>{{ .title }}</h1>
<ul class="small-block-grid-2 medium-block-grid-4 large-block-grid-5"> <ul class="small-block-grid-2 medium-block-grid-4 large-block-grid-5">
{{ range .data }} {{ range .data }}
<li itemscope itemtype="http://schema.org/Episode"> <li itemscope itemtype="http://schema.org/Movie">
<a class="th" href="/testet/{{ .LT.Slug.String }}/" itemprop="url"> <a class="th" href="/testet/{{ .LT.Slug.String }}/" itemprop="url">
<img alt="{{ .LT.Name.String }} Thumbnail" src="{{ if .LT.ThumbS.Valid }}{{ .LT.ThumbS.String }}{{ else }}https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149{{ end }}" itemprop="thumbnailUrl" /></a> {{ if .LT.ThumbS.Valid }}
<img alt="" src="{{ .LT.ThumbS.String }}" itemprop="thumbnailUrl" />
{{ else }}
<img alt="" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Kein%20Thumbnail&w=265&h=149" />
{{ end }}
</a> </a>
<br /><a href="/testet/{{ .LT.Slug.String }}/"><strong itemprop="name">{{ .LT.Name.String }}</strong></a> <br /><a href="/testet/{{ .LT.Slug.String }}/"><strong itemprop="name">{{ .LT.Name.String }}</strong></a>
<br />von <a href="/zeige/{{ .AT.Slug.String }}/">{{ .AT.Name.String }}</a> <span itemprop="director" itemscope itemtype="http://schema.org/Person">
<br />von <a href="/zeige/{{ .AT.Slug.String }}/" itemprop="url"><span itemprop="name">{{ .AT.Name.String }}</span></a>
</span>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>