Skip to content

Instantly share code, notes, and snippets.

@rogargon
Last active May 21, 2016 17:36
Show Gist options
  • Save rogargon/5664984 to your computer and use it in GitHub Desktop.
Save rogargon/5664984 to your computer and use it in GitHub Desktop.
Example of restaurant_detail.html page including RDFa
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-2.2.3.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/static/style/base.css" />
<title>MyRestaurants - La Taberna de la Cuarta Esquina</title>
</head>
<body>
<div id="header">
<p>User roberto (<a href="/accounts/logout/?next=/myrestaurants/">logout</a>)</p>
</div>
<div id="sidebar">
<ul>
<li><a href="/myrestaurants/">Home</a></li>
</ul>
</div>
<div id="content">
<span vocab="http://schema.org/" typeof="Restaurant">
<h1>
<span property="name">La Taberna de la Cuarta Esquina</span>
(<a href="/myrestaurants/restaurants/1/edit/">edit</a>)
</h1>
<h2>Address:</h2>
<p>
Las Cuatro Esquinas, 16 <br/>
Calahorra <br/>
La Rioja (Spain)
</p>
<h2>Dishes (<a href="/myrestaurants/restaurants/1/dishes/create/">add</a>)</h2>
<ul>
<li><a href="/myrestaurants/restaurants/1/dishes/1/">Parrillada de verduras</a></li>
<li><a href="/myrestaurants/restaurants/1/dishes/3/">Risotto con bacalao y borraja</a></li>
<li><a href="/myrestaurants/restaurants/1/dishes/4/">Chuletón</a></li>
</ul>
<h2>Reviews</h2>
<span rel="aggregateRating">
<p typeof="AggregateRating">
Average rating <span property="ratingValue">4.5</span>
from <span property="reviewCount">2</span> reviews
</p>
</span>
<ul rel="review">
<li typeof="Review">
<p rel="reviewRating" typeof="Rating">
<span property="worstRating" content="1"></span>
<span property="ratingValue">5</span> stars
<span property="bestRating" content="5"></span>
</p>
<p property="description"> La parrillada de verduras es excelente. </p>
<p>Created by <span property="author">roberto</span> on
<span property="datePublished">March 31, 2014</span></p>
</li>
<li typeof="Review">
<p rel="reviewRating" typeof="Rating">
<span property="worstRating" content="1"></span>
<span property="ratingValue">4</span> stars
<span property="bestRating" content="5"></span>
</p>
<p property="description">No está mal el chuletón :-)</p>
<p>Created by <span property="author">roberto</span> on
<span property="datePublished">May 10, 2014</span></p>
</li>
</ul>
</span>
<h3>Add Review</h3>
<form action="/myrestaurants/restaurants/1/reviews/create/" method="post">
<input type='hidden' name='csrfmiddlewaretoken' value='Tv06LVn4oRZceUIGVpkN7RfBwhdxKyYb' />
Message: <textarea name="comment" id="comment" rows="4"></textarea>
<p>Rating:</p>
<p>
<input type="radio" name="rating" id="rating1" value="1" />
<label for="choice1">1 star</label><br />
<input type="radio" name="rating" id="rating2" value="2" />
<label for="choice2">2 stars</label><br />
<input type="radio" name="rating" id="rating3" value="3" />
<label for="choice3">3 stars</label><br />
<input type="radio" name="rating" id="rating4" value="4" />
<label for="choice4">4 stars</label><br />
<input type="radio" name="rating" id="rating5" value="5" />
<label for="choice5">5 stars</label><br />
</p>
<input type="submit" value="Review" />
</form>
</div>
<div id="footer">
Created by roberto on March 24, 2013
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment