Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit d41c608

Browse files
committed
Rough version of loading thumbnail
1 parent deb7e4b commit d41c608

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

app/directives/challenge-tiles/challenge-tile.directive.jade

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
a(ng-href="http://apps.{{DOMAIN}}/forums//?module=Category&categoryID={{challenge.forumId}}")
1111
i.fa.fa-comment
1212

13+
div.thumbnail(ng-if="challenge.track === 'DESIGN'")
14+
img(ng-src="http://studio.topcoder.com/studio.jpg?module=DownloadSubmission&sbmid={{challenge.thumbnailId}}&sbt=full")
15+
1316
p.roles Roles: {{challenge.userDetails.roles | listRoles}}
1417

1518
.challenge-status

app/directives/challenge-tiles/challenge-tile.directive.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@
3838
challenge.registrationTimeLeft = (registrationDate - now)/(24*60*60*1000);
3939
challenge.submissionTimeLeft = (submissionDate - now)/(24*60*60*1000);
4040
// temporary...right now many challenges have a `null` track
41-
challenge.track = challenge.track ? challenge.track.trim() : 'DEVELOP';
41+
challenge.track = challenge.track ? challenge.track.trim() : 'DESIGN';
42+
if (challenge.track == 'DESIGN' && challenge.userDetails.submissions && challenge.userDetails.submissions.length > 0) {
43+
console.log('FLONKY');
44+
challenge.thumbnailId = challenge.userDetails.submissions[0].id;
45+
}
4246

4347
// challenge.phaseMsg = preparePhaseMessage(challenge);
4448

assets/css/directives/challenge-tiles.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@
3838
line-height: 25px;
3939
}
4040
}
41+
42+
.thumbnail {
43+
display: flex;
44+
flex-direction: row;
45+
justify-content: center;
46+
margin: 20px 0;
47+
img {
48+
width: 170px;
49+
height: 170px;
50+
}
51+
}
52+
4153
.roles {
4254
margin-top: 10px;
4355
margin-bottom: 20px;

0 commit comments

Comments
 (0)