Skip to content

Commit 40a4fd5

Browse files
committed
Commit unmerged files
2 parents 14e05bb + c6d5607 commit 40a4fd5

File tree

7 files changed

+573
-322
lines changed

7 files changed

+573
-322
lines changed

.DS_Store

0 Bytes
Binary file not shown.

css/styles.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ ul {
3737
width: 100%;
3838
}
3939

40+
.fade.show {
41+
opacity: 1;
42+
}
4043
/* Splash Page */
4144

4245
.splash.page {
@@ -57,4 +60,10 @@ ul {
5760

5861
.splash.page .subtitle {
5962
font-size: 32px;
63+
}
64+
65+
/* YouTube Modal */
66+
.youtube-modal-embed {
67+
width: 468px;
68+
height: 234px;
6069
}

index.html

Lines changed: 278 additions & 272 deletions
Large diffs are not rendered by default.

js/resources.js

Lines changed: 149 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,9 @@ function create_handout_tr(ho) {
205205
return $tr;
206206
}
207207

208-
function create_showcase_tr(project) {
208+
function create_showcase_card(project) {
209209
/*
210+
<<<<<<< HEAD
210211
<tr>
211212
<td scope="row">
212213
<b>Sample Project Title</b> <br>
@@ -215,33 +216,144 @@ function create_showcase_tr(project) {
215216
</td>
216217
<td> (Image, if applicable) </td>
217218
</tr>
219+
=======
220+
<div class="card" style="width: 18rem;">
221+
<div class="card-body">
222+
<h5 class="card-title">{ project.title }</h5>
223+
<h6 class="card-subtitle mb-2 text-muted">{ project.authors }</h6>
224+
<a href="{ project.codeLink }" class="card-link">{ project.codeSource }</a>
225+
{ project.ext }
226+
<button
227+
type="button"
228+
class="btn btn-link card-link"
229+
data-toggle="modal"
230+
data-target="#{ project.uid }-modal"
231+
>
232+
{ project.mediaType }
233+
</button>
234+
</div>
235+
</div>
236+
<div
237+
class="modal fade"
238+
id="{ project.uid }-modal"
239+
tabindex="-1"
240+
role="dialog"
241+
aria-labelledby="{ project.uid }-modalTitle"
242+
aria-hidden="true"
243+
>
244+
<div class="modal-dialog" role="document">
245+
<div class="modal-content">
246+
<div class="modal-header">
247+
<h5 class="modal-title" id="{ project.uid }-title">Video for "{ project.title }"</h5>
248+
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
249+
<span aria-hidden="true">&times;</span>
250+
</button>
251+
</div>
252+
<div class="modal-body">
253+
{ project.rightColMedia }
254+
</div>
255+
<div class="modal-footer">
256+
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
257+
</div>
258+
</div>
259+
</div>
260+
</div>
261+
262+
>>>>>>> navbar-fix
218263
*/
219-
var $tr = $('<tr>').append(
220-
$('<td>').append(
221-
// $('<center>').attr('scope', 'row').append(
222-
$('<b>').append(
223-
project.Title.concat("<br>"))).append(
224-
project.Authors.concat("<br>")).append(
225-
create_anchor(project.href, project.DemoType, "None", gtag_trackShowcaseLink)
226-
// )
227-
));
228-
229-
// Add images if they're applicable
230-
if (project.img.length > 0){
231-
$tr.append(
232-
$('<td>').append(
233-
'<img src="'.concat(project.img, '"">')
234-
));
235-
}
236-
else {
237-
// Occupy the right hand column with something.
238-
$tr.append(
239-
$('<td>').append(
240-
""
241-
));
242-
}
264+
var $card = $('<div>').attr({'class': 'col mb-2'})
265+
.append(
266+
$('<div>').attr({
267+
'class': 'card',
268+
'style': 'width: 20rem; height: 100%;'
269+
})
270+
.append(
271+
$('<div>').attr('class', 'card-body')
272+
.append(
273+
$('<h5>').attr('class', 'card-title').append(project.title)
274+
).append(
275+
$('<h6>').attr('class', 'card-subtitle mb-2 text-muted').append(project.authors)
276+
).append(
277+
create_anchor(project.codeLink, project.codeSource, "None", gtag_trackShowcaseLink)
278+
.attr('class', 'mr-3')
279+
).append(
280+
(project.rightColMedia ? $('<a>').attr({
281+
'class': 'mr-3',
282+
'data-toggle': 'modal',
283+
'data-target': `#modal-${project.uid}`,
284+
'href': `#modal-${ project.uid }`
285+
}).append('Video') : null)
286+
).append(
287+
(project.ext ? '<br />' + project.ext : null)
288+
)
289+
)
290+
).append(
291+
(project.rightColMedia ?
292+
$('<div>').attr({
293+
'class': 'modal',
294+
'id': `modal-${ project.uid }`,
295+
'tabindex': '-1',
296+
'role': 'dialog',
297+
'aria-labelledby': `modalTitle-${ project.uid }`,
298+
'aria-hidden': 'true'
299+
})
300+
.append(
301+
$('<div>').attr({'class': 'modal-dialog modal-dialog-centered', 'role': 'document'})
302+
.append(
303+
$('<div>').attr('class', 'modal-content')
304+
.append(
305+
/* BEGIN MODAL HEADER */
306+
$('<div>').attr('class', 'modal-header')
307+
.append(
308+
$('<h5>').attr({'class': 'modal-title', 'id': `modalTitle-${ project.uid }`})
309+
.append(`Video for "${project.title}"`)
310+
)
311+
.append(
312+
$('<button>').attr({
313+
'type': 'button',
314+
'class': 'close',
315+
'data-dismiss': 'modal',
316+
'aria-label': "Close"
317+
})
318+
.append(
319+
$('<span>').attr('aria-hidden', 'true')
320+
.append('&times;')
321+
)
322+
)
323+
/* END MODAL HEADER */
324+
)
325+
.append(
326+
/* BEGIN MODAL BODY */
327+
$('<div>').attr('class', 'modal-body')
328+
.append(project.rightColMedia)
329+
/* END MODAL BODY */
330+
)
331+
.append(
332+
/* BEGIN MODAL FOOTER */
333+
$('<div>').attr('class', 'modal-footer')
334+
.append(
335+
$('<button>').attr({
336+
'type': 'button',
337+
'class': 'btn btn-default',
338+
'data-dismiss': 'modal'
339+
}).append('Close')
340+
)
341+
/* END MODAL FOOTER */
342+
)
343+
)
344+
)
345+
: null)
346+
);
243347

244-
return $tr;
348+
// if (project.rightColMedia.length > 0) {
349+
// $tr = $tr.append(
350+
// $("<td>").append(
351+
// project.rightColMedia
352+
// )
353+
// )
354+
// }
355+
356+
return $card;
245357
}
246358

247359
function create_announcement(announcement) {
@@ -325,8 +437,13 @@ function create_week_heading_tr(week) {
325437
}
326438

327439
// Actually fetch all the resources
440+
<<<<<<< HEAD
328441
//var RESOURCES_DIR = 'http://localhost:8000/res'
329442
var RESOURCES_DIR = 'https://stanfordpython.com/res'
443+
=======
444+
//var RESOURCES_DIR = 'https://stanfordpython.com/res'
445+
var RESOURCES_DIR = 'http://localhost:8000/res'
446+
>>>>>>> navbar-fix
330447

331448
$.when(
332449
// Before we can do anything, make sure we have the proper data!
@@ -398,9 +515,9 @@ $.when(
398515

399516
for (var i = 0; i < projects.length; i++) {
400517
var proj = projects[i];
401-
var markup = create_showcase_tr(proj);
518+
var markup = create_showcase_card(proj);
402519
if (markup !== null) {
403-
$(".projects tbody").append(markup);
520+
$("#final-showcase").append(markup);
404521
}
405522
}
406523

@@ -423,4 +540,8 @@ $.when(
423540
var day = days[j];
424541
}
425542
}
543+
}).then(function () {
544+
$(".modal").on('hidden.bs.modal', function (e) {
545+
$(this).find(".youtube-modal-embed").attr("src", $(this).find(".youtube-modal-embed").attr("src"));
546+
});
426547
});

res/.DS_Store

2 KB
Binary file not shown.

res/projectimages/erickha.png

210 KB
Loading

res/projects.json

Lines changed: 137 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,138 @@
11
[
2-
{
3-
"uid": "4d4fd06d-adf8-4161-8fb0-27a9590231c2",
4-
"Title": "Project Title",
5-
"Authors": "Author1, Author2",
6-
"DemoType": "GitHub",
7-
"href": "https://google.com",
8-
"img": "",
9-
"imgAlt": "altText",
10-
"ext": ""
11-
},
12-
{
13-
"uid": "4d4fd06d-adf8-4161-8fb0-27a9590231c2",
14-
"Title": "Project Title2",
15-
"Authors": "Author1, Author2",
16-
"DemoType": "GitHub",
17-
"href": "https://google.com",
18-
"img": "https://www.python.org/static/community_logos/python-logo.png",
19-
"imgAlt": "altText",
20-
"ext": ""
21-
22-
}
23-
]
2+
{
3+
"uid": "24fcbe48-9b21-4612-a228-ab3c975d4791",
4+
"title": "&#x1F4F1; TweetInsight - Twitter Analytics Tool",
5+
"authors": "AJ Arnolie",
6+
"codeSource": "GitHub",
7+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/ajarno",
8+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/sWLWG9jubqg\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
9+
"ext": ""
10+
11+
},
12+
{
13+
"uid": "b8a41718-5458-43ae-aa77-d5523b0a0432",
14+
"title": "&#x1F30E; Fault Triangle",
15+
"authors": "Anatoly Aseev",
16+
"codeSource": "GitHub",
17+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/aaseev",
18+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/Pa8gztQ-DlM\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
19+
"ext": ""
20+
},
21+
{
22+
"uid": "f4577760-e010-4725-a5d4-45ba45f14444",
23+
"title": "&#x1F5BC; Reddit Wallscraper",
24+
"authors": "Elizabeth Fitzgerald, Chris Moffitt",
25+
"codeSource": "GitHub",
26+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/cmoffitt_elizfitz",
27+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/52I2SWYAUeQ\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
28+
"ext": ""
29+
},
30+
{
31+
"uid": "16ded6ec-c8d6-4166-a380-81dad6fb903b",
32+
"title": "&#x1F926; The Florida Man",
33+
"authors": "Corbin Schmeil, Dylan Ly",
34+
"codeSource": "GitHub",
35+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/dylanly9_jcorbin",
36+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/nXj9R4v0K70\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
37+
"ext": "<a target=\"_blank\" href=\"https://floridamanapp.herokuapp.com\">Online App Demo</a>"
38+
},
39+
{
40+
"uid": "e099f244-91da-424e-9adb-993585e8e450",
41+
"title": "&#x1f9ec; OpenDNA",
42+
"authors": "Daniel Martin Marin Quiroz",
43+
"codeSource": "GitHub",
44+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/danielmq",
45+
"rightColMedia": "",
46+
"ext": ""
47+
},
48+
{
49+
"uid": "bc889a0b-2842-472a-8f37-b50d6b7bc2dd",
50+
"title": "&#x1F5BC; Wallscraper",
51+
"authors": "Danny Du",
52+
"codeSource": "GitHub",
53+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/dannydu",
54+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/JQ-UmssE4vk\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
55+
"ext": ""
56+
},
57+
{
58+
"uid": "ac52edde-d538-4166-b2c7-7ff3bf960e1f",
59+
"title": "&#x1F3AD; Tweet Sentiment Analysis",
60+
"authors": "Erick Hernandez-Ascencio, Ruben Sanchez",
61+
"codeSource": "GitHub",
62+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/erickha_rubensan",
63+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/e7AWQJKWMYs\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
64+
"ext": ""
65+
},
66+
{
67+
"uid": "bbe3ec95-1910-46de-a311-c02791c0d23c",
68+
"title": "&#x1F4AA; Weight Room Data Logger",
69+
"authors": "Franklin Tarke",
70+
"codeSource": "GitHub",
71+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/ftarke",
72+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/b74z9mngAno\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
73+
"ext": ""
74+
},
75+
{
76+
"uid": "2863f2d1-96cd-4ac2-841c-de9dc711d549",
77+
"title": "&#x1F9E0; EEG Classifier",
78+
"authors": "Grant Sheen",
79+
"codeSource": "GitHub",
80+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/gsheen",
81+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/XplWugcaX2M\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
82+
"ext": ""
83+
},
84+
{
85+
"uid": "99394185-31a4-4911-a5d7-2dd1f131b2f6",
86+
"title": "&#x1F4B5; Wage Predictor",
87+
"authors": "Isabel Gallegos",
88+
"codeSource": "GitHub",
89+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/iogalle",
90+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/3LJavuRQMPo\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
91+
"ext": ""
92+
},
93+
{
94+
"uid": "a497d571-b411-45c3-8f6a-b10156c848f2",
95+
"title": "&#x1F4B0; Wheel! Of! Fortune! (Python Edition)",
96+
"authors": "Jose Francisco, Helena Vasconcelos",
97+
"codeSource": "Github",
98+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/helenav_josencf",
99+
"rightColMedia": "",
100+
"ext": ""
101+
},
102+
{
103+
"uid": "eb2e277a-958b-407a-b978-0df551f37133",
104+
"title": "&#x1F9E0; Reading Your Mind: Predicting Choice Based On Brain Activity",
105+
"authors": "Leili Mortazavi",
106+
"codeSource": "Github",
107+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/leilimor",
108+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/IcPpzS51fHw\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
109+
"ext": ""
110+
},
111+
{
112+
"uid": "7a740a13-3d9b-42cb-bb43-f7569740aeaf",
113+
"title": "&#x1F4A1; Combined Gas and Steam Cycle Analysis",
114+
"authors": "Lindsey Engel",
115+
"codeSource": "Github",
116+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/lindseye",
117+
"rightColMedia": "",
118+
"ext": ""
119+
},
120+
{
121+
"uid": "70114eee-37c2-4014-af47-21a86f800cb3",
122+
"title": "&#x26BE; My Assistant GM",
123+
"authors": "Max Pike",
124+
"codeSource": "Github",
125+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/mpike27",
126+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/DWg0N-W-bAs\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
127+
"ext": ""
128+
},
129+
{
130+
"uid": "286a7731-b614-4f95-b951-e3b69eb8c4e7",
131+
"title": "&#x1F4BB; Establishments of Large US Companies",
132+
"authors": "Anonymous",
133+
"codeSource": "Github",
134+
"codeLink": "https://github.com/stanfordpython/final-projects-win20/tree/master/anon1",
135+
"rightColMedia": "<iframe class=\"youtube-modal-embed\" src=\"https://www.youtube-nocookie.com/embed/I3i8HWBxFDg\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
136+
"ext": ""
137+
}
138+
]

0 commit comments

Comments
 (0)