Skip to content
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.

Commit

Permalink
adding microdata from schema.org to store page, #138
Browse files Browse the repository at this point in the history
  • Loading branch information
giggio committed Oct 27, 2013
1 parent ecd4b94 commit 10bc522
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div id="productInfo">
<div id="product" data-id="{{product._id}}" itemscope itemtype="http://schema.org/Product">
<meta itemprop="productID" content="{{product.id}}"/>
<img id="picture" src="{{product.picture}}" alt="{{product.name}}" itemprop="image"/>
<div class="nameHolder">
<h2><span id="name" itemprop="name">{{product.name}}</span>
Expand Down
24 changes: 18 additions & 6 deletions public/javascripts/areas/store/views/templates/store.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
<div id="storeHeader" class="row">
<div id="storeHeader" class="row" itemscope itemtype="http://schema.org/Store">
<meta itemprop="name" content="{{store.name}}" />
<div id="homePageImageHolder">
<img id="homePageImage" src="{{store.homePageImage}}"/>
<img id="homePageImage" src="{{store.homePageImage}}" itemprop="image"/>
</div>
<div id="storeDescription">
{{#if hasEvaluations}}
<div id="evaluation">
<div id="evaluation" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<div id="ratingStars" data-average="{{evaluationAvgRating}}" data-id="1"></div>
<div id="ratingDescription">({{numberOfEvaluations}} avaliações, <a href="evaluations">veja todas</a>)</div>
<meta itemprop="ratingValue" content="{{evaluationAvgRating}}" />
<meta itemprop="worstRating" content="1" />
<meta itemprop="bestRating" content="5" />
<div id="ratingDescription">(<span itemprop="ratingCount">{{numberOfEvaluations}}</span> avaliações, <a href="evaluations">veja todas</a>)</div>
</div>
{{/if}}
{{#if userOwned}}
<p>
<a class="btn btn-primary" href="/admin/store/{{store.slug}}" data-not-push-state="true">Editar sua loja</a>
</p>
{{/if}}
<div id="homePageDescription">{{{homePageDescription}}}</div>
<div id="homePageDescription" itemprop="description">{{{homePageDescription}}}</div>
{{#if store.urlFacebook}}
<a id="urlFacebook" class="social" href="//www.facebook.com/{{store.urlFacebook}}" title="{{store.name}} no Facebook" target="_blank" data-not-push-state="true"><img class="img-circle" src="{{staticPath}}/images/facebook.png" /></a>
{{/if}}
Expand All @@ -23,9 +27,17 @@
{{/if}}
{{#if store.otherUrl}}
<div>
<a id="otherUrl" href="{{store.otherUrl}}" title="Outro site de {{store.name}}" data-not-push-state="true">{{store.otherUrl}}</a>
<a id="otherUrl" href="{{store.otherUrl}}" itemprop="sameAs" title="Outro site de {{store.name}}" data-not-push-state="true">{{store.otherUrl}}</a>
</div>
{{/if}}
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<meta itemprop="addressLocality" content="{{store.city}}" />
<meta itemprop="addressRegion" content="{{store.state}}" />
<meta itemprop="postalCode" content="{{store.zip}}" />
<meta itemprop="addressCountry" content="BR" />
<meta itemprop="email" content="{{store.email}}" />
<meta itemprop="telephone" content="{{store.phoneNumber}}" />
</div>
</div>
</div>
<hr />
Expand Down

0 comments on commit 10bc522

Please sign in to comment.