www: Add dates RSS news

llvm-svn: 291388
This commit is contained in:
Tobias Grosser 2017-01-08 09:28:10 +00:00
parent be6f9f24ba
commit 9e2dceba19
2 changed files with 12 additions and 16 deletions

View File

@ -82,14 +82,10 @@ li.rss-item {
}
.rss-date {
font-size: 0.8em;
color: #f35555;
padding-left: 0.4em;
margin-bottom: 2em;
padding-bottom: 2em;
text-align: right;
float: right;
font-size: 0.6em;
color: gray;
}
h6 {
.rss-title {
font-size: 0.7em;
margin: 0px;
}

View File

@ -45,7 +45,6 @@ Optimizations</span></h2>
<div class="container" style="width: 240px">
<div class="inner_pollylabs" style="width: 240px"></div>
</div>
<br>
<a href="https://www.polyhedral.info">polyhedral.info</a>
<div class="container" style="width: 240px">
<div class="inner_polyinfo" style="width: 240px"></div>
@ -76,34 +75,35 @@ $(document).ready(function() {
"https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url%3D%22http%3A%2F%2Fpollylabs.org%2Frss.xml%22%20LIMIT%205&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys";
$.getJSON(yql, function(res) {
console.log(res);
str = "<div class=\"rss-box\"><ul>";
for (var i = 0; i < res.query.count; i++) {
var it = res.query.results.item[i];
var date = it.pubDate.substr(5, 11);
str = str + "<li class=\"rss-item\" ><a href=\"" + it.link + "\">";
str = str + "<h6>" + res.query.results.item[i].title + "</h6>";
str = str + "<span class=\"rss-title\">" + res.query.results.item[i].title + "</span> ";
str = str + "<span class=\"rss-date\">(" + date + ")</span>";
str = str + "</a></li>";
}
str = str + "<li class=\"rss-item\"><a href=\"http://pollylabs.org/blog.html\"><span class=\"rss-title\"> ... more news </span></a></li>";
str = str + "</ul></div>";
str = str + "<a href=\"http://pollylabs.org/blog.html\"><h6> ... more news </h6></a>";
$( ".inner_pollylabs" ).append(str);
console.log(str);
}, "jsonp");
var yql_polyinfo =
"https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url%3D%22http%3A%2F%2Fpolyhedral.info%2Frss.xml%22%20LIMIT%205&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys";
$.getJSON(yql_polyinfo, function(res) {
console.log(res);
str = "<div class=\"rss-box\"><ul>";
for (var i = 0; i < res.query.count; i++) {
var it = res.query.results.item[i];
var date = it.pubDate.substr(5, 11);
str = str + "<li class=\"rss-item\" ><a href=\"" + it.link + "\">";
str = str + "<h6>" + res.query.results.item[i].title + "</h6>";
str = str + "<span class=\"rss-title\">" + res.query.results.item[i].title + "</span> ";
str = str + "<span class=\"rss-date\">(" + date + ")</span>";
str = str + "</a></li>";
}
str = str + "<li class=\"rss-item\"><a href=\"http://polyhedral.info/blog.html\"><span class=\"rss-title\"> ... more news </span></a></li>";
str = str + "</ul></div>";
str = str + "<a href=\"http://pollylabs.org/blog.html\"><h6> ... more news </h6></a>";
$( ".inner_polyinfo" ).append(str);
console.log(str);
}, "jsonp");