Permalink
Browse files

Display red border around candidate photo if designated as winner

  • Loading branch information...
jzblee committed Apr 7, 2017
1 parent 74e64d6 commit afeea5f2360ba8c64deecf327f24d2623f3a28a6
View
@@ -100,6 +100,7 @@ connection.query("CREATE TABLE IF NOT EXISTS " + db_name + ".`candidates` (" +
"`election_id` INT NOT NULL," +
"`party_id` INT NULL," +
"`nominations` INT NOT NULL DEFAULT 0," +
+ "`winner` TINYINT(1) NOT NULL DEFAULT 0," +
"PRIMARY KEY (`rcs_id`, `office_id`) ," +
"INDEX `candidates_fk2_idx` (`election_id` ASC) ," +
"CONSTRAINT `candidates_fk1`" +
@@ -51,7 +51,8 @@ app.controller('OfficesController', ['$scope', '$route', '$routeParams', '$locat
twitter: c_elem.twitter,
newType: "", // Don't ask. it's a long story.
profile_url: c_elem.profile_url,
- cover_url: c_elem.cover_url
+ cover_url: c_elem.cover_url,
+ winner: c_elem.winner
});
}
});
@@ -101,6 +101,10 @@
background-position-x: center;
}
+.card .winner {
+ border: 4px solid #EB5E66;
+}
+
.card .content{
background-color: rgba(0, 0, 0, 0);
box-shadow: none;
@@ -57,7 +57,7 @@ <h2 class="fa fa-info-circle"></h2>
<div class="cover" ng-if="!c.cover_url"></div>
<div class="cover" ng-if="c.cover_url" ng-style="{'background-image': 'url(' + c.cover_url + ')'}"></div>
<a class="user" ng-href="/candidate/{{c.rcsId}}"
- ng-style="{'background-image': profileCSS(c)}"></a>
+ ng-style="{'background-image': profileCSS(c)}" ng-class="{'winner': c.winner}"></a>
<div class="content">
<div class="main">
<h3 class="name" id="name{{c.rcsId}}{{o.id}}">{{c.name}}</h3>

0 comments on commit afeea5f

Please sign in to comment.