Merge branch 'master' into guardians

Conflicts:
	controllers/backpack.js
This commit is contained in:
Andrew Hayward 2013-06-04 21:54:00 +01:00
Родитель 9a0c260ade 23d5b6cfa5
Коммит e353308741
18 изменённых файлов: 807 добавлений и 100 удалений

Просмотреть файл

@ -141,9 +141,24 @@ var aestimia = new Api(ENDPOINT, {
var state = satisfied ? 'accepted' : 'rejected';
if (state !== application.state) {
// TO DO - email applicant about change of application state
}
if (state !== application.state)
if (state === 'accepted')
application.getLearner()
.complete(function (err, learner) {
if (err || !learner) return;
openbadger.awardBadge({
email: learner.email,
badge: application.badgeId
}, function (err, assertionUrl) {
if (err)
return console.log(err); // Should probably log this
// TO DO - email applicant about change of application state
console.log('Badge awarded:', assetionUrl);
});
});
application.updateAttributes({
state: state,

Просмотреть файл

@ -1,11 +1,16 @@
const _ = require('underscore');
const openbadger = require('../openbadger');
const db = require('../db');
const claim = db.model('Claim');
const isLearner = require('../middleware').isLearner;
const claim = db.model('Claim');
const applications = db.model('Application');
module.exports = function (app) {
app.get('/claim', [isLearner], function (req, res, next) {
app.get('/claim', [
isLearner
], function (req, res, next) {
var claimCode = req.query.code;
var user = res.locals.user;
@ -38,7 +43,9 @@ module.exports = function (app) {
});
app.post('/claim', [isLearner], function (req, res, next) {
app.post('/claim', [
isLearner
], function (req, res, next) {
var claimCode = req.query.code;
var user = res.locals.user;
@ -70,7 +77,7 @@ module.exports = function (app) {
});
app.get('/mybadges', [
isLearner,
isLearner,
openbadger.middleware('getUserBadges')
], function (req, res, next) {
var data = req.remote;
@ -125,6 +132,39 @@ module.exports = function (app) {
});
});
app.get('/myapplications', [
isLearner
], function (req, res, next) {
var user = req.session.user;
applications.findAll({where: ['LearnerId = ? AND State != ?', user.id, 'accepted']}).success(function (applications) {
openbadger.getBadges(function (err, data) {
_.each(applications, function(app) {
_.extend(app, _.findWhere(data.badges, {id: app.badgeId}));
});
res.render('user/applications.html', {
items: _.map(applications, function(badge) {
badge.url = '/myapplications/' + badge.id;
return badge;
})
});
});
});
});
app.get('/myapplications/:id', [
isLearner
], function (req, res, next) {
var user = req.session.user;
openbadger.getBadge({id: req.params.id}, function(err, data) {
var badge = data.badge;
applications.find({where: {LearnerId: user.id, BadgeId: req.params.id}}).success(function (application) {
res.render('user/application.html', {
badge: _.extend(badge, application)
});
});
});
});
app.get('/favorites/:view?', function (req, res, next) {
var badge = {
thumbnail: '/media/images/badge.png',

Просмотреть файл

@ -218,7 +218,7 @@ module.exports = function (app) {
});
});
app.get('/earn/:badgeName', badger.middleware('getBadgeRecommendations'), function (req, res, next) {
app.get('/earn/:badgeName', badger.middleware('getBadgeRecommendations', {limit:4}), function (req, res, next) {
var data = req.remote;
res.render('badges/single.html', {
badge: req.params.badge,

Просмотреть файл

@ -33,6 +33,8 @@ function normalizeBadgeInstance (badge, id) {
if (!badge.url)
badge.url = '/mybadges/' + id;
badge.id = id;
return badge;
}
@ -310,6 +312,25 @@ var openbadger = new Api(ENDPOINT, {
});
},
awardBadge: function awardBadge (query, callback) {
var email = query.email || query.session.user.email;
var shortname = query.badge;
var params = {
auth: getJWTToken(email),
email: email
}
this.post('/user/badge/' + shortname, { form: params }, function(err, data) {
if (err)
return callback(err, data);
return callback(null, {
assetionUrl: data.url
});
});
},
getBadgeFromCode: function getBadgeFromCode (query, callback) {
var email = query.email;
var code = query.code;
@ -339,11 +360,15 @@ var openbadger = new Api(ENDPOINT, {
getBadgeRecommendations: function getBadgeRecommendations (query, callback) {
var id = query.badgeName;
var limit = query.limit;
var params = {
limit: limit
};
if (!id)
return callback(new errors.BadRequest('Invalid badge key'));
this.get('/badge/' + id + '/recommendations', function(err, data) {
this.get('/badge/' + id + '/recommendations', { qs: params }, function(err, data) {
if (err)
return callback(err, data);

Просмотреть файл

@ -12,7 +12,7 @@
"knox": "~0.8.2",
"mime": "~1.2.9",
"mysql": "~2.0.0-alpha7",
"nunjucks": "~0.1.8a",
"nunjucks": "~0.1.9",
"request": "~2.21.0",
"sequelize": "~1.6.0",
"tap": "~0.4.1",

Просмотреть файл

@ -3,10 +3,18 @@
html,
body {
height: 100%;
font-family: 'Open Sans', sans-serif;
font-weight: 300;
line-height: 18px;
}
html,
body,
h1,
h2,
h3,
h4,
p {
font-family: 'Open Sans', sans-serif;
}
body {
margin: 0px;
padding: 0px;
@ -125,6 +133,11 @@ ol {
.navbar .nav-wrap ul.nav > li > a:hover {
color: #c0c0c0;
}
.navbar .nav-wrap ul.nav > li.active a,
.navbar .nav-wrap ul.nav > li.active a:hover {
border-left: none;
border-right: none;
}
.navbar .nav-wrap ul.nav > li:last-child {
border-right: none;
}
@ -241,7 +254,7 @@ nav.pagination ul li a {
overflow: hidden;
}
/*mobile*/
@media only screen and (min-width: 320px) and (max-width: 599px) {
@media only screen and (max-width: 599px) {
.container p,
.container h1,
.container h2,
@ -251,15 +264,16 @@ nav.pagination ul li a {
#main {
padding-top: 15px;
}
#main .navbar-form select {
margin: 0 auto;
display: block;
}
.form-search label,
.form-inline label,
.form-search .btn-group,
.form-inline .btn-group {
display: block;
}
.filter label {
display: none;
}
.navbar .nav-wrap,
.container,
.navbar-static-top .container,
@ -272,6 +286,14 @@ nav.pagination ul li a {
margin-left: auto;
margin-right: auto;
}
.navbar .brand {
background-image: url('../img/csol_logo_sm.png');
height: 150px;
background-position: top center;
}
.navbar-inner > .container {
width: 100%;
}
.form-horizontal .control-label {
text-align: left;
float: none;
@ -293,16 +315,41 @@ nav.pagination ul li a {
.navbar .nav-wrap {
width: 90%;
margin: 0 auto;
border-radius: 5px;
}
.navbar .nav-wrap ul.nav li {
.navbar .nav-wrap ul.nav li,
.navbar .nav-wrap #dynWrap li,
.navbar .nav-wrap ul.nav li.active,
.navbar .nav-wrap #dynWrap li.active {
display: block;
}
.navbar .nav-wrap ul.nav li a {
padding: 5px 0;
.navbar .nav-wrap ul.nav li a,
.navbar .nav-wrap #dynWrap li a,
.navbar .nav-wrap ul.nav li.active a,
.navbar .nav-wrap #dynWrap li.active a,
.navbar .nav-wrap ul.nav li a:visited,
.navbar .nav-wrap #dynWrap li a:visited,
.navbar .nav-wrap ul.nav li.active a:visited,
.navbar .nav-wrap #dynWrap li.active a:visited,
.navbar .nav-wrap ul.nav li a:hover,
.navbar .nav-wrap #dynWrap li a:hover,
.navbar .nav-wrap ul.nav li.active a:hover,
.navbar .nav-wrap #dynWrap li.active a:hover {
font-size: 14px;
padding: 7px 0;
text-transform: capitalize;
line-height: 16px;
color: #000;
text-decoration: none;
display: block;
font-weight: 400;
}
.navbar .nav-wrap ul.nav li:nth-child(even),
.navbar .nav-wrap #dynWrap li:nth-child(even),
.navbar .nav-wrap ul.nav > .active > a,
.navbar .nav-wrap ul.nav > .active > a:hover {
.navbar .nav-wrap #dynWrap > .active > a,
.navbar .nav-wrap ul.nav > .active > a:hover,
.navbar .nav-wrap #dynWrap > .active > a:hover {
border-left: none;
border-right: none;
}
@ -600,26 +647,51 @@ input[type="password"].metered:focus:invalid:focus + .password-meter {
border-color: #e9322d;
}
/* ------------------------------ */
/* Mobile : width > iphone ------ */
/* ------------------------------ */
@media only screen and (min-width: 321px) and (max-width: 940px) {
.navbar .brand {
background-image: url('../img/csol_logo_480.png');
height: 166px;
}
}
/* ------------------------------ */
/* Mobile : width <= iphone ----- */
/* ------------------------------ */
@media only screen and (max-width: 320px) {
.navbar .brand {
background-image: url('../img/csol_logo_320.png');
height: 116px;
}
}
/* ------------------------------ */
/* CSOL-site SPECIFIC ----------- */
/* ------------------------------ */
body .navbar.filter label,
body .navbar.filter select,
body .navbar.filter input {
display: block;
float: left;
}
body .navbar.filter select {
margin-right: 25px;
}
body .navbar.filter label {
background: url('../img/icon-sprite.png') no-repeat top left;
width: 30px;
height: 30px;
text-indent: -9000px;
margin-bottom: 0px;
margin-top: 5px;
}
body .navbar.filter label.filter-age {
background-position: 0 -160px;
}
body .navbar.filter label.filter-category {
background-position: 0 -640px;
}
body .navbar.filter label.filter-org {
background-position: 0 -480px;
}
body .navbar.filter label.filter-activity {
background-position: 0 -720px;
}
/* ------------------------------ */
/* Mobile : general ------------ */
/* ------------------------------ */
@media only screen and (max-width: 599px) {
body .navbar.filter .selectWrapper,
body .navbar.filter input {
clear: left;
margin: auto;
text-align: center;
width: 180px;
display: block;
float: none;
}
}
/* ------------------------------ */
/* Mobile : width <= iphone ---- */
/* ------------------------------ */
@ -665,9 +737,15 @@ body.home .navbar .navbar-inner {
overflow: visible;
max-height: 515px;
}
body.home .navbar .nav > li {
font-weight: 400;
}
body.home .navbar .nav > li.dropdown.open > .dropdown-toggle {
color: #fff;
}
body.home .navbar .nav > li span {
font-weight: 300;
}
body.home .navbar .brand {
background-image: url('../img/csol_logo_sm.png');
position: absolute;
@ -905,7 +983,7 @@ body.home .navbar .nav-wrap ul.nav > li:nth-child(even) {
/* ------------------------------ */
/* Landing page : mobile -------- */
/* ------------------------------ */
@media only screen and (min-width: 320px) and (max-width: 599px) {
@media only screen and (max-width: 599px) {
body.home {
background-image: url('../img/chalkboard_bg.jpg');
}
@ -952,3 +1030,98 @@ body.home .navbar .nav-wrap ul.nav > li:nth-child(even) {
margin: 0 auto;
}
}
/* ------------------------------ */
/* Filter sprite positions ------ */
/* ------------------------------ */
.sprite-activitylines {
background-position: 0 0;
width: 30px;
height: 30px;
}
.sprite-activitytype {
background-position: 0 -80px;
width: 30px;
height: 30px;
}
.sprite-age {
background-position: 0 -160px;
width: 30px;
height: 30px;
}
.sprite-badgetype {
background-position: 0 -240px;
width: 30px;
height: 30px;
}
.sprite-date {
background-position: 0 -320px;
width: 30px;
height: 30px;
}
.sprite-location {
background-position: 0 -400px;
width: 30px;
height: 30px;
}
.sprite-organization {
background-position: 0 -480px;
width: 30px;
height: 30px;
}
.sprite-search {
background-position: 0 -560px;
width: 30px;
height: 30px;
}
.sprite-topic {
background-position: 0 -640px;
width: 30px;
height: 30px;
}
.sprite-type {
background-position: 0 -720px;
width: 30px;
height: 30px;
}
/* FAQ MAKE LOOK GOOD STYLES HERE */
.faq {
/* "Split numbering" is what I'm calling the following
ordered list numbering:
1. ...
2a. ...
2b. ...
where 2 is the "split item"
*/
}
.faq ol,
.faq ul {
margin-bottom: 10px;
}
.faq ol li,
.faq ul li {
list-style-position: inside;
}
.faq .split-numbering,
.faq .split-numbering ol {
counter-reset: section;
list-style-type: none;
}
.faq .split-numbering li ol {
counter-reset: subsection;
}
.faq .split-numbering li:before {
counter-increment: section;
content: counter(section) ". ";
width: 2em;
display: inline-block;
}
.faq li.split-item:before {
visibility: hidden;
position: absolute;
left: -999em;
}
.faq li.split-item li:before {
counter-increment: subsection;
content: counter(section) counter(subsection, lower-alpha) ". ";
}

Двоичные данные
static/media/img/chi.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 15 KiB

После

Ширина:  |  Высота:  |  Размер: 20 KiB

Двоичные данные
static/media/img/icon-sprite.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 10 KiB

Двоичные данные
static/media/img/mac.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.8 KiB

После

Ширина:  |  Высота:  |  Размер: 4.7 KiB

Двоичные данные
static/media/img/moz.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 743 B

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

Просмотреть файл

@ -5,8 +5,21 @@ var mob = 0;
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) mob = 1
$('.show-tooltip').tooltip();
/*move filter labels into the selectors*/
if($('.navbar.filter').length != 0) {
$('.navbar.filter form label').each(function(){
var selectID = ($(this).attr('for'));
var selectEle = $('#' + selectID);
$('#' + selectID + ' option:first').text($(this).text());
var selectWrap = $('<div class="selectWrapper"></div>').append(this,selectEle);
$('.navbar.filter form').prepend(selectWrap);
});
}
/*landing page overrides*/
if($('body.home').length != 0) {
var vidLink = $('<a href="#">watch video</a>').click(function(){
if($('#i_vid').length == 0) {
var bkgFade = $('<div id="bkg_fade" style="display:none;"></div>');
@ -28,8 +41,9 @@ if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) mob
/*landing page menu rearrange*/
$('<p id="rahm">This summer Mayor Rahm Emanuel is challenging all Chicago youth to participate in the Summer of Learning. School stops for the summer, but learning never should.</p>').prependTo('.footer .upper');
$('<div id="bubbles"><span class="lt">join the conversation on <a href="#">Facebook</a>.</span><span class="rt">share stories</span></div>').appendTo('.footer .upper');
$('<div id="bubbles"><span class="lt">Join the conversation on <a href="https://www.facebook.com/ChicagoSummerOfLearning" target="_blank">Facebook</a>.</span><span class="rt">share stories</span></div>').appendTo('.footer .upper');
/*landing page mobile overrides*/
if(mob) {
vidLink = '<a href="http://www.youtube.com/v/6WwpwtYNsNk">watch video</a>';
}
@ -43,5 +57,24 @@ if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) mob
$('li.badges a').append('<span> Badges &</span>');
$('li.about a').append('<span> the program</span>')
$('li.challenges a').append('<span> your future.</span>');
} else {
/*non-landing page overrides*/
if(mob) {
var dynWrap = $('<div id="dynWrap" style="display:none;"></div>');
var dynList = $('<li id="dyn"></li>');
var dynLink = $('<a href="#" title="">Menu</a>').click(function(){
$('#dynWrap').slideToggle();
return false;
});
$('ul.nav').prepend(dynList.append(dynLink), dynWrap);
//dynLink.appendTo(dynWrap.prependTo());
$('ul.nav li').each(function(){
if ($(this).attr("id") != "dyn") {
$(this).appendTo("#dynWrap");
}
});
}
}
});

Просмотреть файл

@ -6,10 +6,12 @@
/*general*/
html, body {
height:100%;
font-family:'Open Sans', sans-serif;
font-weight:300;
line-height:18px;
}
html, body, h1, h2, h3, h4, p {
font-family:'Open Sans', sans-serif;
}
body {
margin:0px;
padding:0px;
@ -124,11 +126,16 @@ ol {
& > a {
text-shadow:none;
color:#333333;
text-transform:uppercase;
}
& > a:focus, & > a:hover {
color:#c0c0c0;
}
&.active {
a, a:hover {
border-left:none;
border-right:none;
}
}
}
& > li:last-child {
border-right:none;
@ -270,21 +277,23 @@ nav.pagination {
}
/*mobile*/
@media only screen
and (min-width : 320px)
@media only screen
and (max-width : 599px) {
.container p, .container h1, .container h2, .footer .upper p {
width:inherit;
}
#main {
padding-top:15px;
.navbar-form {
select {
margin:0 auto;
display:block;
}
}
}
.form-search label, .form-inline label, .form-search .btn-group, .form-inline .btn-group {
display:block;
}
.filter label {
display:none;
}
.navbar .nav-wrap,
.container,
.navbar-static-top .container,
@ -297,7 +306,15 @@ and (max-width : 599px) {
margin-left:auto;
margin-right:auto;
}
.form-horizontal {
.navbar .brand {
background-image:url('../img/csol_logo_sm.png');
height:150px;
background-position:top center;
}
.navbar-inner > .container {
width:100%;
}
.form-horizontal {
.control-label {
text-align:left;
float:none;
@ -310,9 +327,9 @@ and (max-width : 599px) {
width:inherit;
}
/*mobile navbar*/
.navbar {
.navbar {
div.navbar-inner {
padding-left:0px;
padding-right:0px;
@ -323,11 +340,19 @@ and (max-width : 599px) {
.nav-wrap {
width:90%;
margin:0 auto;
ul.nav {
li {
border-radius:5px;
ul.nav, #dynWrap {
li, li.active {
display:block;
a {
padding: 5px 0;
a, a:visited, a:hover {
font-size:14px;
padding: 7px 0;
text-transform:capitalize;
line-height:16px;
color:#000;
text-decoration:none;
display:block;
font-weight:400;
}
}
li:nth-child(even),
@ -347,7 +372,7 @@ and (max-width : 599px) {
p {
width:inherit;
background-image:none;
padding-left:0px;
padding-left:0px;
}
ul.pull-right {
width:270px;
@ -619,7 +644,7 @@ and (max-width : 599px) {
}
}
ul.thumbnails {
li {
li {
figure.thumbnail {
margin:0 0 0 0;
& > a img {
@ -704,37 +729,64 @@ input[type="password"].metered {
}
}
/* ------------------------------ */
/* Mobile : width > iphone ------ */
/* ------------------------------ */
@media only screen
and (min-width : 321px)
and (max-width : 940px ) {
.navbar .brand {
background-image: url('../img/csol_logo_480.png');
height:166px;
}
}
/* ------------------------------ */
/* Mobile : width <= iphone ----- */
/* ------------------------------ */
@media only screen
and (max-width : 320px) {
.navbar .brand {
background-image: url('../img/csol_logo_320.png');
height:116px;
}
}
/* ------------------------------ */
/* CSOL-site SPECIFIC ----------- */
/* ------------------------------ */
body {
.navbar.filter {
label, select, input {
display:block;
float:left;
}
select {
margin-right:25px;
}
label {
background: url('../img/icon-sprite.png') no-repeat top left;
width:30px;
height:30px;
text-indent:-9000px;
margin-bottom:0px;
margin-top:5px;
&.filter-age {
background-position: 0 -160px;
}
&.filter-category {
background-position: 0 -640px;
}
&.filter-org {
background-position: 0 -480px;
}
&.filter-activity {
background-position: 0 -720px;
}
}
}
}
/* ------------------------------ */
/* Mobile : general ------------ */
/* ------------------------------ */
@media only screen
and (max-width : 599px) {
body {
.navbar.filter {
.selectWrapper, input {
clear:left;
margin:auto;
text-align:center;
width:180px;
display:block;
float:none;
}
}
}
}
/* ------------------------------ */
/* Mobile : width <= iphone ---- */
/* ------------------------------ */
@media only screen
@media only screen
and (max-width : 320px) {
.span3 {
width:150px;
@ -743,7 +795,7 @@ and (max-width : 320px) {
width:140px;
}
ul.thumbnails {
li {
li {
figure.thumbnail {
margin:0 0 0 0;
& > a img {
@ -797,9 +849,13 @@ body.home {
}
.nav {
& > li {
font-weight:400;
&.dropdown.open > .dropdown-toggle {
color:#fff;
}
span {
font-weight:300;
}
}
}
.brand {
@ -906,12 +962,12 @@ body.home {
background-size:cover;
padding-top:0px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/spacedimg.png', sizingMethod='scale');
-ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/spacedimg.png', sizingMethod='scale')";
-ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/spacedimg.png', sizingMethod='scale')";
& > .container {
background-image:url('../img/home_drawing.png');
background-position:top center;
background-repeat:no-repeat;
}
}
}
}
background-image:url('../img/background-chalkboard-green.jpg');
@ -921,7 +977,7 @@ body.home {
-o-background-size:cover;
background-size:cover;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/background-chalkboard-green.jpg', sizingMethod='scale');
-ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/background-chalkboard-green.jpg', sizingMethod='scale')";
-ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/background-chalkboard-green.jpg', sizingMethod='scale')";
overflow:visible;
.container {
width:960px;
@ -998,7 +1054,7 @@ body.home {
a {
color:#3B5998;
}
}
}
&.rt {
margin-top:52px;
margin-right:7px;
@ -1049,8 +1105,7 @@ body.home {
/* ------------------------------ */
/* Landing page : mobile -------- */
/* ------------------------------ */
@media only screen
and (min-width : 320px)
@media only screen
and (max-width : 599px) {
body.home {
background-image:url('../img/chalkboard_bg.jpg');
@ -1102,3 +1157,64 @@ and (max-width : 599px) {
}
}
}
/* ------------------------------ */
/* Filter sprite positions ------ */
/* ------------------------------ */
.sprite-activitylines{ background-position: 0 0; width: 30px; height: 30px; }
.sprite-activitytype{ background-position: 0 -80px; width: 30px; height: 30px; }
.sprite-age{ background-position: 0 -160px; width: 30px; height: 30px; }
.sprite-badgetype{ background-position: 0 -240px; width: 30px; height: 30px; }
.sprite-date{ background-position: 0 -320px; width: 30px; height: 30px; }
.sprite-location{ background-position: 0 -400px; width: 30px; height: 30px; }
.sprite-organization{ background-position: 0 -480px; width: 30px; height: 30px; }
.sprite-search{ background-position: 0 -560px; width: 30px; height: 30px; }
.sprite-topic{ background-position: 0 -640px; width: 30px; height: 30px; }
.sprite-type{ background-position: 0 -720px; width: 30px; height: 30px; }
/* FAQ MAKE LOOK GOOD STYLES HERE */
.faq {
ol, ul {
margin-bottom: 10px;
li {
list-style-position: inside;
}
}
/* "Split numbering" is what I'm calling the following
ordered list numbering:
1. ...
2a. ...
2b. ...
where 2 is the "split item"
*/
.split-numbering,
.split-numbering ol {
counter-reset: section;
list-style-type: none;
}
.split-numbering li ol {
counter-reset: subsection;
}
.split-numbering li:before {
counter-increment: section;
content: counter(section) ". ";
width: 2em;
display: inline-block;
}
li.split-item:before {
visibility: hidden;
position: absolute;
left: -999em;
}
li.split-item li:before {
counter-increment: subsection;
content: counter(section) counter(subsection, lower-alpha) ". ";
}
}

Просмотреть файл

@ -2,7 +2,7 @@
{% set pageTitle = badge.name %}
{% block content %}
<div class="row">
<div class="row-fluid">
<div class="span4">
<img src="{{ badge.image }}">
</div>
@ -10,15 +10,17 @@
<h3>What is this badge about?</h3>
<p>{{ badge.description }}</p>
<h3>How can you earn it?</h3>
{% if not user or user.type == 'learner' %}
<h3>How can you earn it?</h3>
<p class="text-right">
{% if badge.activityType == 'offline' %}
<a href="/claim" class="btn">Claim this badge</a>
{% else %}
<a href="{{ badge.url }}/apply" class="btn">Apply</a>
{% endif %}
</p>
<p class="text-right">
{% if badge.activityType == 'offline' %}
<a href="/claim" class="btn">Claim this badge</a>
{% else %}
<a href="{{ badge.url }}/apply" class="btn">Apply</a>
{% endif %}
</p>
{% endif %}
</div>
</div>

Просмотреть файл

@ -4,13 +4,13 @@
<h2>Challenges</h2>
<div class="row text-center">
<img src="/media/img/badge-graphic.png">
<h4>First you do activities and then earn org level badges</h4>
<h4>First you do activities and then earn organization level badges.</h4>
<img src="/media/img/steam.png">
<h4>By doing different combinations of badges you can earn the city STEAM badges</h4>
<h4>By doing different combinations of badges you can earn the city STEAM badges.</h4>
<br>
<img src="/media/img/challengebadges.png">
<br><br>
<h4>The STEAM badges unlock special citywide challenges:<br>these are the highest achievement for the Chicago Summer of Learning</h4>
<h4>The STEAM badges unlock special citywide challenges:<br>these are the highest achievement for the Chicago Summer of Learning.</h4>
</div>
{% endblock %}

Просмотреть файл

@ -1,3 +1,194 @@
{% extends 'info/layout.html' %}
{% set pageTitle = 'FAQ' %}
{% set navItem = 'faq' %}
{% set bodyClass = 'faq' %}
{% block content %}
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/HgLLq7ybDtc" frameborder="0" allowfullscreen></iframe>
<h3>Learners</h3>
<dl>
<dt>How do I get started?</dt>
<dd>
<p>After you sign up, you can:
</p>
<ul>
<li>Look at the various badges available to earn.</li>
<li>Learn about the programs you can sign up to do.</li>
<li>See the online, self-paced learning activities that you can dive into right away.</li>
</ul>
</dd>
<dt>How do I set up an account?</dt>
<dd>
<p>Setting up an account is easy:
</p>
<ul>
<li>Click on the log in/sign up button.</li>
<li>Enter an email address or a unique nickname and a password.</li>
<li>Click Submit.</li>
</ul>
<p>If you are younger than 13 years old, you will need to enter your parents or guardians email address as well to confirm that its okay for you to be visiting this website.
</p>
</dd>
<dt>There are a lot of things to do here. How do I find the right one for me?</dt>
<dd>
<p>Use the filter on the Learn page to narrow down the list of learning opportunities.
</p>
<p>You can filter the badges available based on the topic, the organization offering the badge, the age group best suited for the badge, the badge type (Participation, Skill, or Achievement), and activity type (online or offline).
</p>
<p>The badges fall into at least one topic in the following STEAM categories: Science, Technology, Engineering, the Arts, or Math. Some badges fit in more than one category – for example, a badge may apply to both science and math. Filter by topic to see the badges by these different areas of interest.
</p>
<p>Filter by organization to see the group offering the badge. The Chicago Summer of Learning has more than 100 organizations offering opportunities to earn badges, with more than 1,000 badges available.
</p>
<p>The age filter helps you find badges that are appropriate for your age group.
</p>
<p>The badge type filter helps you find badges that are based on skills, achievements, or participation.
</p>
<p>Finally, the activity type notes whether the activity takes place online or offline.
</p>
<p>After youve applied for and earned a badge, well recommend other badges to you, too. You can click on those suggestions to get more information and see if any of them are interesting to you. Apply for as many as youd like!
</p>
</dd>
<dt>How do I earn a badge?</dt>
<dd>
<p>Click any badge to read details about the badge, including information on how to earn it. Some badges are awarded by local organizations based on work you do in their programs, others are available after completing activities online. The badge helps recognize what you learned and the work you did.
</p>
<p>You can show off all the badges you earned to your teachers, parents, and friends. Some badges are great to show when youre applying for jobs!
</p>
</dd>
<dt>How do I apply for a badge?</dt>
<dd>
<p>Each badge has different requirements and criteria, so read carefully and find out what you need to do to earn the badge. You might have to enter a code or create a piece of work. Follow the steps and let us know if you have any trouble with them – were here to help. You can email us at <a href="mailto:support@chicagosummeroflearning.org">support@chicagosummeroflearning.org</a> with any questions.
</p>
</dd>
<dt>What happens after I apply for a badge?</dt>
<dd>
<p>A mentor will review your work and approve your application if you meet the criteria to earn the badge. If your work is approved, youll earn the badge and see it on your dashboard page.
</p>
</dd>
<dt>After I apply for a badge, can a mentor decide not to award me the badge?</dt>
<dd>
<p>Yes, a mentor can decide not to award you the badge if you dont meet all the requirements to earn it. This is why its important to make sure you follow all the steps necessary to earn each badge.
</p>
</dd>
<dt>Can I reapply for a badge?</dt>
<dd>
<p>Yes, you can reapply as many times as you like.
</p>
</dd>
<dt>Where can I see the badges that Ive earned?</dt>
<dd>
<p>Go to your dashboard page to see all your badges. This includes badges you have applied for, those waiting for review, those already reviewed, and those favorited.
</p>
</dd>
<dt>What can I do with the badges in my dashboard?</dt>
<dd>
<p>If youre younger than 13 years old, you can see all that youve done during the summer and be proud!
</p>
<p>If youre 13 years old or more, you can share all the badges you earned on Facebook or Twitter or send them to your Mozilla Backpack. Theres no need to humblebrag – show the world what you know!
</p>
</dd>
<dt>Why should I display my badges?</dt>
<dd>
<p>Some of these badges show that youve learned skills that are valuable for internships and jobs. Others show skills that are specific to industries like music, the arts, technology, science, theater, and more. You can demonstrate all the things you know by making sure others can see your badges. You might also find others who share your interests!
</p>
</dd>
<dt>Will my badges count for school credit in the fall?</dt>
<dd>
<p>Badges show the learning youve accomplished over the summer, not school credit. However, you can show the badges you earned throughout the summer to your teachers – some may count for credit, while others may unlock additional opportunities elsewhere.
</p>
</dd>
<dt>Do I have to go enroll in an organizations program to participate in Chicago Summer of Learning?</dt>
<dd>
<p>No, you do not. Chicago Summer of Learning offers a variety of online activities that you can do on your own and at your own pace. This way, the program celebrates learning in all forms and offers multiple ways for you to explore the city and learn and earn badges.
</p>
</dd>
</dl>
<h3>Parents</h3>
<dl>
<dt>How do I sign up my child?</dt>
<dd>
<p>Signing up your child(ren) is easy:
</p>
<style>
</style>
<ol class="split-numbering">
<li>Have your child sign up for an account by going to <a href="//chicagosummeroflearning.org">chicagosummeroflearning.org</a> and clicking log in/sign up.</li>
<li class="split-item">
<ol>
<li>If your child is older than 13, s/he will be able to provide an email address and sign up to use the site without your approval.</li>
<li>If your child is 13 years old or younger, s/he will be required to add the email address of a parent or guardian. You will be notified and asked to approve letting your child have an account on the Chicago Summer of Learning before we activate that account.</li>
</ol>
</li>
</ol>
</dd>
<dt>What are the summer learning opportunities within Chicago Summer of Learning?</dt>
<dd>
<p>The site offers a wide variety of learning opportunities, including trips to museums, summer camps, and concert halls; activities involving civics, music, technology, and theater; and challenges to help develop your childs self-confidence, leadership skills, and more.
</p>
<p>Nearly 100 Chicago-area organizations are participating by offering unique badges that fall into at least one of five categories: Science, Technology, Engineering, the Arts, and Mathematics. Some badges even span more than one category! In addition, a variety of online learning opportunities provide Chicago youth the chance to engage in learning at their own pace, whenever and wherever they can.
</p>
<p>Each badge includes specific information on the work necessary for badge achievement and the criteria assigned to it. This means your child will have very specific guidelines on what to do to earn the badge – and what it means once s/he has earned it.
</p>
</dd>
<dt>How can I find programs and activities that my child will enjoy?</dt>
<dd>
<p>Go to the Learn page and use the filters in the dropdown menus to narrow down the list of learning opportunities. You and your child can filter the badges available based on the topic, the organization offering the badge, the age group best suited for the badge, the badge type (Participation, Skill, or Achievement), and activity type (online or offline).
</p>
<p>The badges fall into at least one topic in the following STEAM categories: Science, Technology, Engineering, the Arts, or Math. Some badges fit in more than one category – for example, a badge may apply to both science and math. Filter by topic to see the badges by these different areas of interest.
</p>
<p>Filter by organization to see the group offering the badge. The Chicago Summer of Learning has more than 100 organizations offering opportunities to earn badges, with more than 1,000 badges available.
</p>
<p>The age filter helps you find badges that are appropriate for your childs age group.
</p>
<p>The badge type filter helps you find badges that are based on skills, achievements, or participation.
</p>
<p>Finally, the activity type notes whether the activity takes place online or offline.
</p>
</dd>
<dt>Why badges?</dt>
<dd>
<p>Badges are a fun way to show off detailed learning, skills, and accomplishments in a very specific, unique way. Each badge has particular criteria that show what was learned, as well as what action was taken or project created as part of that learning.
</p>
<p>Badges also can be displayed on Facebook, Twitter, and other social profiles to encourage sharing (and a little bit of bragging).
</p>
</dd>
<dt>Will my childs badges count for school credit in the fall?</dt>
<dd>
<p>Badges show the learning your child has accomplished over the summer, not school credit. However, some badges may count for credit, while others may unlock additional opportunities elsewhere. To find out if any opportunities are available at school, your child should show all his/her summer badges to his/her teachers and ask if either of these is an option.
</p>
</dd>
<dt>Can I delete badges from my childs account?</dt>
<dd>
<p>If your child is younger than 13 years old, you may delete content from your childs account at any time.
</p>
</dd>
<dt>Can I cancel my childs account with Chicago Summer of Learning?</dt>
<dd>
<p>If your child is younger than 13 years old, you may cancel your childs account at any time.
</p>
</dd>
</dl>
<h3>Contact</h3>
<p>Do you have a question that wasnt answered here? Email us at <a href="mailto:support@chicagosummeroflearning.org">support@chicagosummeroflearning.org</a> and well help you as soon as we can.
</p>
{% endblock %}

Просмотреть файл

@ -17,7 +17,7 @@
</p>
</div>
</div>
<h3><a href="/badges">Badges</a></h3>
<h3>Badges You Can Earn through this Program</h3>
<ul class="thumbnails">
{% for shortname,badge in program.earnableBadges %}
<li class="span3">

Просмотреть файл

@ -0,0 +1,43 @@
{% extends 'layout.html' %}
{% set navitem = 'backpack' %}
{% set pageTitle = badge.name %}
{% block content %}
<div class="row">
<div class="span4">
<img class="{{ badge.state }}" src="{{ badge.image }}">
</div>
<div class="span8">
<p>
<b>Issued by:</b>
{% if badge.program.issuer.url %}
<a href="{{ badge.program.issuer.url }}">
{% endif %}
{{ badge.program.issuer.name }}
{% if badge.program.issuer.url %}
</a>
{% endif %}
</p>
<p>
<b>Issued to:</b> {{ user.email }}
</p>
<h3>What is this badge about?</h3>
<p>{{ badge.description }}</p>
</div>
</div>
<div class="row">
<h3>Similar Badges</h3>
<p>Cupcake <a href="#">link to Badges page</a> something about badges
should go here.</p>
{% for item in similar %}
<div class="span3">
{% include "includes/badge-thumbnail.html" %}
</div>
{% endfor %}
</div>
{% endblock %}

Просмотреть файл

@ -0,0 +1,69 @@
{% extends 'filter.html' %}
{% set pageTitle = 'My Applications' %}
{% set navItem = 'backpack' %}
{% block item %}
<li class="span3">
<figure class="thumbnail {{ item.state }}">
<a href="{{ item.url }}"><img src="{{ item.image }}"></a>
<figcaption class="caption">
<p>{{ item.name }}</p>
{% block item_actions_wrapper %}
<p class="text-right">
{% block item_actions %}
<a href="{{ item.url }}" class="btn">Details</a>
{% endblock %}
</p>
{% endblock %}
</figcaption>
</figure>
</li>
{% endblock %}
{% block list %}
{{ super() }}
<li class="span3">
<figure class="thumbnail">
<a href="/claim"><img src="/media/images/add-badge.png"></a>
<figcaption class="caption">
<p>Claim another badge!</p>
<p class="text-right"><a href="/claim" class="btn">+1</a></p>
</figcaption>
</figure>
</li>
{% endblock %}
{% block item_actions %}
{#
{{ super() }}
<a class="btn show-tooltip" title="Add to your favorites" href="{{ item.url }}/favorite"><i class="icon-heart"></i></a>
#}
{% endblock %}
{% block modal %}
<!-- Modal -->
<div id="shareModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Share This Badge</h3>
</div>
<div class="modal-body">
<a href="#" class="btn btn-block"><i class="icon-twitter"></i> Twitter</a>
<a href="#" class="btn btn-block"><i class="icon-facebook"></i> Facebook</a>
<a href="#" class="btn btn-block">Mozilla Backpack</a>
</div>
</div>
<div id="trashModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Are you sure you want to delete this badge?</h3>
</div>
<div class="modal-body">
<a href="#" class="btn btn-block">Cancel</a>
<a href="#" class="btn btn-block">Yes</a>
</div>
</div>
{% endblock %}