-
Notifications
You must be signed in to change notification settings - Fork 0
/
project_data.js
74 lines (70 loc) · 3.77 KB
/
project_data.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
var access_key = "30b43d760d7f4920bee1855c31bd9d1c";
var projects = [{"name": "Project 1",
description: "Basic HTML Page",
projectUrl: "https://dxu23.github.io/IT202/project1/index.html",
repoUrl: "https://github.com/dXu23/IT202/tree/master/project1",
tools: "html, css",
img: "https://apileap.com/api/screenshot/v1/urltoimage?access_key=30b43d760d7f4920bee1855c31bd9d1c&format=jpeg&html=https://dxu23.github.io/IT202/project1/index.html"
},
{name: "Project 2",
description: "Company HTML page incorporating bootstrap into design.",
projectUrl: "https://dxu23.github.io/IT202/project2/index.html",
repoUrl: "https://github.com/dXu23/IT202/tree/master/project2",
tools: "html, css, bootstrap",
img: "https://apileap.com/api/screenshot/v1/urltoimage?access_key=30b43d760d7f4920bee1855c31bd9d1c&format=jpeg&html=https://dxu23.github.io/IT202/project2/index.html"
},
{name: "Project 3",
description: "A food inspection website that uses the City of Chicago food inspection " +
"Socrata API. It filters by inspection date, facility, zipcode, status, and zipcode.",
projectUrl: "https://dxu23.github.io/IT202/project3/index.html",
repoUrl: "https://github.com/dXu23/IT202/tree/master/project3",
tools: "html, css, bootstrap, API",
img: "https://apileap.com/api/screenshot/v1/urltoimage?access_key=30b43d760d7f4920bee1855c31bd9d1c&format=jpeg&html=https://dxu23.github.io/IT202/project3/index.html"
},
{name: "Project 4",
description: "HTML Canvas game. ",
projectUrl: "https://dxu23.github.io/IT202/project4/index.html",
repoUrl: "https://github.com/dXu23/IT202/tree/master/project4",
tools: "html, canvas",
img: "https://apileap.com/api/screenshot/v1/urltoimage?access_key=30b43d760d7f4920bee1855c31bd9d1c&format=jpeg&html=https://dxu23.github.io/IT202/project4/index.html"
},
{name: "Project 5",
description: "Weather app with service worker",
projectUrl: "https://dxu23.github.io/IT202/project5/index.html",
repoUrl: "https://github.com/dXu23/IT202/tree/master/project5",
tools: "html, service workers",
img: "https://apileap.com/api/screenshot/v1/urltoimage?access_key=30b43d760d7f4920bee1855c31bd9d1c&format=jpeg&html=https://dxu23.github.io/IT202/project5/index.html"
},
{name: "Project 7",
description: "Airhorn web app with service worker",
projectUrl: "https://dxu23.github.io/IT202/project7/index.html",
repoUrl: "https://github.com/dXu23/IT202/tree/master/project7",
tools: "html, service workers",
img: "https://apileap.com/api/screenshot/v1/urltoimage?access_key=30b43d760d7f4920bee1855c31bd9d1c&format=jpeg&html=https://dxu23.github.io/IT202/project7/index.html"
}];
//console.log("Hello, world!");
var card = "<div class='card col-lg-3 col-sm-6' style='width: 20rem;'>" +
"<img class='card-img-top' src='' alt='Card image cap'>" +
"<div class='card-body'>" +
"<h4 class='card-title'></h4>" +
"<p class='card-text'></p><br>" +
"<a href='' id = 'project-link' class='card-link'>Link to project</a>" +
"<a href='' id = 'repo-link' class='card-link'>Link to project</a>" +
"</div>" +
"</div>";
console.log(projects.length);
for (var i = 0; i < projects.length; i++) {
var cardjs = $(card);
console.log("i: " + i);
console.log("projects.length: " + projects.length);
console.log(projects[i].name);
console.log(projects[i].description);
cardjs.find(".card-title").append(projects[i].name);
cardjs.find("img").attr("src", projects[i].img);
cardjs.find(".card-body").append(projects[i].description);
cardjs.find("#project-link").attr("href", projects[i].projectUrl);
cardjs.find("#repo-link").attr("href", projects[i].repoUrl);
$("#Projects").find("#it202-projects").append(cardjs);
console.log(cardjs);
//console.log(projects[i].name);
}