Skip to content

Commit af073f4

Browse files
authored
Update index.php
1 parent 15a8173 commit af073f4

File tree

1 file changed

+36
-26
lines changed

1 file changed

+36
-26
lines changed

web/index.php

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -305,32 +305,42 @@
305305
<script src="https://d3js.org/d3.v4.min.js"></script>
306306
<script type="text/javascript">
307307
var func = function(window, d3, $) {
308-
d3.json("./data.json?q=2016", function(data) {
309-
d3.select("#projects-container").selectAll(".project-content-container")
310-
.data(data)
311-
.enter()
312-
.append("div")
313-
.attr("class", "project-content-container col-lg-4 col-sm-6")
314-
.html(function(d) {
315-
316-
var owner = d.owner_url != "" ? "<a target=\"_blank\" href='" + d.owner_url + "'>" + d.owner + "</a>" : d.owner;
317-
var channel_button = d.channel && d.channel != "" ? "<a target=\"_blank\" href='//progco.de/join'\n data-toggle=\"tooltip\"\n title=\"" + d.channel + "\"\n data-placement=\"top\"\n class='proj-links'><img src='./img/slack.png' height='20' width='20'></a>" : "";
318-
319-
var project_button = d.project_url && d.project_url != "" ? "\n <a target=\"_blank\" href='" + d.project_url + "'\n data-toggle=\"tooltip\"\n title=\"Contribute\"\n data-placement=\"top\"\n class='proj-links'><i class='fa fa-github fa-fw' aria-hidden='true'></i></a>\n " : "";
320-
var ret = "\n <div class='project-item'>\n <div class='project-image' style='background-image: url(" + d.site_image + ")'>\n <div class=''>\n \n <div class='clearfix'></div>\n </div>\n </div>\n <div class='project-details'>\n <div>\n <span class='owner-image' style='background-image: url(" + d.owner_image + ")'></span>\n <h4><a target=\"_blank\" href='" + d.site_url + "'>" + d.name + "</a></h4>\n <h5>" + d.description + "</h5>\n </div>\n <div class='clearfix'></div>\n <div class='links-area'>\n " + channel_button + "&nbsp;" + project_button + "\n </div>\n </div>\n </div>\n "
321-
;
322-
323-
return ret;
324-
});
325-
326-
$(function () {
327-
$('[data-toggle="tooltip"]').tooltip()
328-
})
329-
});
330-
331-
}(window, d3, jQuery);
332-
333-
308+
d3.json("./data.json?q=2016", function(data) {
309+
d3.select("#projects-container").selectAll(".project-content-container").data(data).enter().append("div").attr("class", "project-content-container col-lg-4 col-sm-6").html(function(d) {
310+
var ret = "";
311+
ret += "<div class='project-item'>";
312+
//ret += "<a target=\"_blank\" href=\"" + d.site_url + "\">";
313+
ret += "<div class='project-image' style='background-image: url(";
314+
ret += d.site_image;
315+
ret += ")'>";
316+
//ret += "</a>";
317+
ret += "<div class='clearfix'></div></div><div class='project-details'>";
318+
ret += "<div>";
319+
if (notEmpty(d.owner_image)) {
320+
ret += "<span class='owner-image' style='background-image: url(" + d.owner_image + ")'></span>";
321+
}
322+
ret += "<h4><a target=\"_blank\" href='" + d.site_url + "'>" + d.name + "</a></h4>";
323+
ret += "<h5>" + d.description + "</h5>";
324+
ret += "</div>";
325+
ret += "<div class='clearfix'></div>";
326+
var owner = d.owner_url != "" ? "<a target=\"_blank\" href='" + d.owner_url + "'>" + d.owner + "</a>" : d.owner;
327+
var channel_button = "";
328+
if (notEmpty(d.channel)) {
329+
channel_button = "<a target=\"_blank\" href='//progco.de/join' data-toggle=\"tooltip\" title=\"" + d.channel + "\" data-placement=\"top\" class='proj-links'>" + "<img src='./img/slack.png' height='20' width='20'></a>";
330+
}
331+
var project_button = "";
332+
if (notEmpty(d.project_url)) {
333+
project_button = "<a target=\"_blank\" href='" + d.project_url + "' data-toggle=\"tooltip\" title=\"Contribute\" data-placement=\"top\" class='proj-links'>" + "<i class='fa fa-github fa-fw' aria-hidden='true'></i></a>";
334+
}
335+
ret += "<div class='links-area'>" + channel_button + "&nbsp;" + project_button + "</div></div></div>";
336+
console.log(ret);
337+
return ret;
338+
});
339+
$(function() {
340+
$('[data-toggle="tooltip"]').tooltip()
341+
})
342+
});
343+
}(window, d3, jQuery);
334344
</script>
335345
<script>
336346
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

0 commit comments

Comments
 (0)