diff --git a/assets/css/base.css b/assets/css/base.css index 31cb901..7c20f71 100644 --- a/assets/css/base.css +++ b/assets/css/base.css @@ -12,7 +12,7 @@ html, body { font-family: 'Roboto', 'Open Sans', sans-serif; - color: #000000; + color: #2d2d2d; } img { @@ -34,28 +34,6 @@ img { background-color: #337ab7; } -.wl-section-title { - position: absolute; - top: -15px; - font-size: 14px; - font-weight: bold; - color: #ffffff; - text-transform: uppercase; - text-align: center; - font-family: 'Oswald'; - z-index: 1; - width: 100%; - margin: 0 auto; -} - -.wl-section-title .title { - padding: 5px 0; - background-color: #0f78a7; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} - /* Header */ #wl-header { position: relative; @@ -151,6 +129,36 @@ img { cursor: pointer; } +/* Sections */ +.wl-section-title { + position: absolute; + top: -15px; + font-size: 14px; + font-weight: bold; + color: #ffffff; + text-transform: uppercase; + text-align: center; + font-family: 'Oswald'; + z-index: 1; + width: 100%; + margin: 0 auto; +} + +.wl-section-title .title { + padding: 5px 0; + background-color: #0f78a7; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.wl-section-description { + margin-top: 90px; + font-size: 14px; + line-height: 24px; + text-align: center; +} + /* Presentation Section */ #wl-presentation-video { height: 100vh; @@ -191,13 +199,6 @@ img { z-index: 1; } -.wl-overview-description { - margin-top: 90px; - font-size: 14px; - line-height: 24px; - text-align: center; -} - .wl-overview-progress-wrapper { padding-bottom: 20px; } @@ -362,11 +363,116 @@ img { width: 100%; } +/* Signs and Ranking Section */ +#wl-signs-and-ranking { + position: relative; + z-index: 1; + background: #ffffff; + height: 100vh; +} + +.wl-signs-and-ranking-container { + display: flex; + flex-direction: row; + flex-wrap: wrap; +} + +.wl-signs-and-ranking-wrapper { + flex: 1; + position: relative; + min-width: 330px; +} + +.wl-signs-and-ranking-wrapper .wl-section-title { + padding: 0 15px; +} + +.wl-signs-container { + display: flex; + flex-wrap: wrap; + margin-top: 30px; +} + +.wl-signs-wrapper { + flex: 1 0 33%; + padding: 3px; +} + +.wl-ranking-header-wrapper { + padding-left: 0; + padding-right: 0; + cursor: pointer; +} + +.wl-ranking-header-wrapper:first-child { + padding-left: 30px; +} + +.wl-ranking-header-wrapper:last-child { + padding-right: 15px; +} + +.wl-ranking-header-wrapper:last-child .title { + border-right: 0; +} + +.wl-ranking-header { + text-align: center; + line-height: 35px; + border-bottom: 1px solid #ccc; +} + +.wl-ranking-header.-active { + border-bottom: 1px solid #bb6a1a; +} + +.wl-ranking-header .title { + margin-bottom: 10px; + border-right: 1px solid #ccc; +} + +.wl-ranking-header.-active .title { + color: #bb6a1a; + font-weight: bold; +} + +.wl-ranking-container { + padding: 15px; + color: #bb6a1a; +} + +.wl-rank { + padding-bottom: 20px; +} + +.star-wrapper { + position: absolute; + margin-top: -2px; + height: 14px; +} + +.position-wrapper { + padding-left: 50px; +} + /* Responsiveness */ @media screen and (min-width: 768px) { + .wl-section-title { + top: -22px; + font-size: 24px; + } + .wl-section-title .title { + width: 360px; + margin: 0 auto; + padding: 6px 0; + } + + /* Overview */ #wl-overview { height: 100vh; } + + /* Features */ #wl-features { height: 100vh; } @@ -375,14 +481,20 @@ img { padding-top: 0; padding-bottom: 0; } - .wl-section-title { - top: -30px; - font-size: 26px; + + /* Volunteers */ + + /* Signs and Ranking */ + .wl-signs-and-ranking-wrapper .wl-section-title .title { + width: 100%; } - .wl-section-title .title { - width: 360px; - margin: 0 auto; - padding: 12px 0; + + .wl-signs-and-ranking-wrapper .wl-section-title { + padding: 0 50px; + } + + .wl-signs-and-ranking-wrapper { + padding: 0 15px; } } diff --git a/assets/img/bronze-star-icon.png b/assets/img/bronze-star-icon.png new file mode 100644 index 0000000..a557c14 Binary files /dev/null and b/assets/img/bronze-star-icon.png differ diff --git a/assets/img/gold-star-icon.png b/assets/img/gold-star-icon.png new file mode 100644 index 0000000..fbeb88a Binary files /dev/null and b/assets/img/gold-star-icon.png differ diff --git a/assets/img/sign-placeholder.png b/assets/img/sign-placeholder.png new file mode 100644 index 0000000..1c47769 Binary files /dev/null and b/assets/img/sign-placeholder.png differ diff --git a/assets/img/silver-star-icon.png b/assets/img/silver-star-icon.png new file mode 100644 index 0000000..03c06d9 Binary files /dev/null and b/assets/img/silver-star-icon.png differ diff --git a/assets/js/main.controller.js b/assets/js/main.controller.js index eefcf88..8168e3c 100644 --- a/assets/js/main.controller.js +++ b/assets/js/main.controller.js @@ -1,14 +1,5 @@ (function () { 'use strict'; - angular.module('wikilibras').controller('wikilibrasCtrl', ['$scope', function ($scope) { - var baseUrl = 'assets/img/user-avatar-'; - $scope.avatars = []; - for (var i = 0; i < 50; i++) { - $scope.avatars.push({ url: baseUrl + getRandomInt(1, 5) + '.png'}); - } - function getRandomInt(min, max) { - return Math.floor(Math.random() * (max - min + 1)) + min; - } - }]); + angular.module('wikilibras').controller('wikilibrasCtrl', ['$scope', function ($scope) {}]); }()); \ No newline at end of file diff --git a/assets/js/main.module.js b/assets/js/main.module.js index 9c2e852..faadee0 100644 --- a/assets/js/main.module.js +++ b/assets/js/main.module.js @@ -1,5 +1,5 @@ (function () { 'use strict'; - angular.module('wikilibras', ['wikilibras.progress', 'duScroll', 'angularMoment']).value('duScrollOffset', 70); + angular.module('wikilibras', ['wikilibras.progress', 'wikilibras.ranking', 'wikilibras.volunteers', 'duScroll', 'angularMoment']).value('duScrollOffset', 70); }()); \ No newline at end of file diff --git a/assets/js/progress/progress.controller.js b/assets/js/progress/progress.controller.js index 027b4ea..e355b0a 100644 --- a/assets/js/progress/progress.controller.js +++ b/assets/js/progress/progress.controller.js @@ -11,6 +11,7 @@ progressService.getProjectsProgressData().then(function(response) { angular.forEach(response, function(progress) { var projectProgress = $scope.progress[progress.short_name]; + if (!projectProgress || typeof projectProgress === "undefined") return; projectProgress.n_tasks = progress.n_tasks; projectProgress.n_task_runs = progress.n_task_runs; projectProgress.n_completed_tasks = progress.n_completed_tasks; diff --git a/assets/js/progress/progress.service.js b/assets/js/progress/progress.service.js index 7e21381..24688a3 100644 --- a/assets/js/progress/progress.service.js +++ b/assets/js/progress/progress.service.js @@ -1,12 +1,11 @@ (function () { 'use strict'; - angular.module('wikilibras.progress').service("progressService", ['$http', '$q', function ($http, $q) { - var API_ENDPOINT = 'http://localhost/pybossa/api'; - var PROJECTS_PROGRESS_API_URL = API_ENDPOINT + '/projects_progress'; - var PROJECTS_GOALS_URL = 'conf/goals.json'; + angular.module('wikilibras.progress').service("progressService", ['$http', function ($http) { + var PROJECT_CONF_URL = 'conf/app-conf.json'; + var PROJECTS_PROGRESS_ENDPOINT = '/api/projects_progress'; - function accesGoalsData(goals, projectName, param) { + function accessGoalsData(goals, projectName, param) { var projectGoals = goals[projectName]; if (!projectGoals || typeof projectGoals === 'undefined') return ''; var goal = projectGoals[param]; @@ -16,17 +15,19 @@ return { getProjectsProgressData: function() { - var requestProgress = $http.get(PROJECTS_PROGRESS_API_URL); - var requestGoals = $http.get(PROJECTS_GOALS_URL); - return $q.all([requestProgress, requestGoals]).then(function(responses) { - var responseProgress = responses[0].data; - var responseGoals = responses[1].data; - angular.forEach(responseProgress, function(progress) { - progress['goal_n_tasks'] = accesGoalsData(responseGoals, progress.short_name,'goal_n_tasks'); - progress['goal_deadline'] = moment(accesGoalsData(responseGoals, progress.short_name,'goal_deadline'), "DD/MM/YYYY"); - progress['last_activity'] = moment(progress['last_activity']); + return $http.get(PROJECT_CONF_URL).then(function(response) { + var baseApiUrl = response.data.pybossa_url; + var responseGoals = response.data.goals; + + return $http.get(baseApiUrl + PROJECTS_PROGRESS_ENDPOINT).then(function(response) { + var responseProgress = response.data; + angular.forEach(responseProgress, function(progress) { + progress['goal_n_tasks'] = accessGoalsData(responseGoals, progress.short_name,'goal_n_tasks'); + progress['goal_deadline'] = moment(accessGoalsData(responseGoals, progress.short_name,'goal_deadline'), "DD/MM/YYYY"); + progress['last_activity'] = moment(progress['last_activity']); + }); + return responseProgress; }); - return responseProgress; }); } }; diff --git a/assets/js/ranking/ranking.controller.js b/assets/js/ranking/ranking.controller.js new file mode 100644 index 0000000..3900aec --- /dev/null +++ b/assets/js/ranking/ranking.controller.js @@ -0,0 +1,17 @@ +(function () { + 'use strict'; + + angular.module('wikilibras.ranking').controller('rankingCtrl', ['$scope', 'rankingService', function ($scope, rankingService) { + $scope.activeTab = 0; + $scope.rankingData = {}; + + $scope.setActiveTab = function(tab) { + $scope.activeTab = tab; + }; + + rankingService.getRankingData().then(function(response) { + $scope.rankingData = response; + console.log(response); + }); + }]); +}()); \ No newline at end of file diff --git a/assets/js/ranking/ranking.module.js b/assets/js/ranking/ranking.module.js new file mode 100644 index 0000000..6ddd17b --- /dev/null +++ b/assets/js/ranking/ranking.module.js @@ -0,0 +1,5 @@ +(function () { + 'use strict'; + + angular.module('wikilibras.ranking', []); +}()); \ No newline at end of file diff --git a/assets/js/ranking/ranking.service.js b/assets/js/ranking/ranking.service.js new file mode 100644 index 0000000..123a359 --- /dev/null +++ b/assets/js/ranking/ranking.service.js @@ -0,0 +1,20 @@ +(function () { + 'use strict'; + + angular.module('wikilibras.ranking').service("rankingService", ['$http', '$q', function ($http, $q) { + var PROJECT_CONF_URL = 'conf/app-conf.json'; + var RANKING_ENDPOINT = '/api/leaderboard?limit=20'; + + return { + getRankingData: function() { + return $http.get(PROJECT_CONF_URL).then(function(response) { + var baseApiUrl = response.data.pybossa_url; + return $http.get(baseApiUrl + RANKING_ENDPOINT).then(function(response) { + console.log(response); + return response.data; + }); + }); + } + }; + }]); +}()); \ No newline at end of file diff --git a/assets/js/volunteers/volunteers.controller.js b/assets/js/volunteers/volunteers.controller.js new file mode 100644 index 0000000..627be0d --- /dev/null +++ b/assets/js/volunteers/volunteers.controller.js @@ -0,0 +1,10 @@ +(function () { + 'use strict'; + + angular.module('wikilibras.volunteers').controller('volunteersCtrl', ['$scope', 'volunteersService', function ($scope, volunteersService) { + $scope.volunteersData = {}; + volunteersService.getVolunteersData().then(function(response) { + $scope.volunteersData = response; + }); + }]); +}()); \ No newline at end of file diff --git a/assets/js/volunteers/volunteers.module.js b/assets/js/volunteers/volunteers.module.js new file mode 100644 index 0000000..2228060 --- /dev/null +++ b/assets/js/volunteers/volunteers.module.js @@ -0,0 +1,5 @@ +(function () { + 'use strict'; + + angular.module('wikilibras.volunteers', []); +}()); \ No newline at end of file diff --git a/assets/js/volunteers/volunteers.service.js b/assets/js/volunteers/volunteers.service.js new file mode 100644 index 0000000..f291693 --- /dev/null +++ b/assets/js/volunteers/volunteers.service.js @@ -0,0 +1,24 @@ +(function () { + 'use strict'; + + angular.module('wikilibras.volunteers').service("volunteersService", ['$http', function ($http) { + var PROJECT_CONF_URL = 'conf/app-conf.json'; + var VOLUNTEERS_ENDPOINT = '/api/user?limit=50'; + + return { + getVolunteersData: function() { + return $http.get(PROJECT_CONF_URL).then(function(response) { + var baseApiUrl = response.data.pybossa_url; + return $http.get(baseApiUrl + VOLUNTEERS_ENDPOINT).then(function(response) { + var volunteersData = response.data; + angular.forEach(volunteersData, function(data) { + data.info['avatar_url'] = data.info.container && data.info.avatar? baseApiUrl + '/uploads/' + data.info.container + '/' + data.info.avatar : ''; + }); + console.log(volunteersData); + return volunteersData; + }); + }); + } + }; + }]); +}()); \ No newline at end of file diff --git a/assets/templates/sections.html b/assets/templates/sections.html index 8af07b1..dfe990b 100644 --- a/assets/templates/sections.html +++ b/assets/templates/sections.html @@ -21,7 +21,7 @@ -
+

Lorem Ipsum é simplesmente uma simulação de texto da indústria tipográfica e de impressos, e vem sendo utilizado desde o século XVI, quando um impressor desconhecido pegou uma bandeja de tipos e os embaralhou para fazer um livro de modelos de tipos. Lorem Ipsum sobreviveu não só a cinco @@ -186,7 +186,7 @@

-
+
@@ -194,8 +194,8 @@ colaborando
-
- +
+
+
+
+
+
+
+
+
+
sinais + construídos +
+
+
+

Lorem Ipsum é simplesmente uma simulação de texto da indústria tipográfica e de impressos, e vem sendo utilizado desde o século XVI.

+
+
+
+ +
+
+
+
+
+
ranking + dos colaborandores +
+
+
+
+
+
+
+ Sinais construídos +
+
+
+
+
+
+ Sinais corrigidos +
+
+
+
+
+
+ Sinais avaliados +
+
+
+
+
+
+ Vídeos enviados +
+
+
+
+
+
+
+
+
+
+
+ +
+
+ {{ $index+1 }}. +
+
+
+ {{ user.name }} +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ {{ $index+1 }}. +
+
+
+ {{ user.name }} +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ {{ $index+1 }}. +
+
+
+ {{ user.fullname }} +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ {{ $index+1 }}. +
+
+
+ {{ 'Teste ' + (i + 1) }} +
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/conf/app-conf.json b/conf/app-conf.json new file mode 100644 index 0000000..3ca0016 --- /dev/null +++ b/conf/app-conf.json @@ -0,0 +1,17 @@ +{ + "pybossa_url": "http://localhost/pybossa", + "goals": { + "wikilibras": { + "goal_n_tasks": 20, + "goal_deadline": "30/09/2016" + }, + "corretor_sinais": { + "goal_n_tasks": 30, + "goal_deadline": "29/09/2016" + }, + "validador_sinais": { + "goal_n_tasks": 40, + "goal_deadline": "28/09/2016" + } + } +} \ No newline at end of file diff --git a/conf/goals.json b/conf/goals.json deleted file mode 100644 index 42e71f8..0000000 --- a/conf/goals.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "wikilibras": { - "goal_n_tasks": 20, - "goal_deadline": "30/09/2016" - }, - "corretor_sinais": { - "goal_n_tasks": 30, - "goal_deadline": "29/09/2016" - }, - "validador_sinais": { - "goal_n_tasks": 40, - "goal_deadline": "28/09/2016" - } -} \ No newline at end of file diff --git a/index.html b/index.html index d57d898..4a526fe 100644 --- a/index.html +++ b/index.html @@ -28,6 +28,12 @@ + + + + + + -- libgit2 0.21.2