Merge branch 'master' into production

This commit is contained in:
Rob 2016-08-19 17:46:35 -07:00
commit c320e3d3a0
10 changed files with 111 additions and 3 deletions

View file

@ -158,6 +158,8 @@ module.exports = class CocoRouter extends Backbone.Router
'teachers/licenses': go('courses/EnrollmentsView', { teachersOnly: true }) 'teachers/licenses': go('courses/EnrollmentsView', { teachersOnly: true })
'teachers/freetrial': go('teachers/RequestQuoteView') 'teachers/freetrial': go('teachers/RequestQuoteView')
'teachers/quote': redirect('/teachers/demo') 'teachers/quote': redirect('/teachers/demo')
'teachers/resources': go('teachers/ResourceHubView')
'teachers/resources/:name': go('teachers/MarkdownResourceView')
'teachers/signup': -> 'teachers/signup': ->
return @routeDirectly('teachers/CreateTeacherAccountView', []) if me.isAnonymous() return @routeDirectly('teachers/CreateTeacherAccountView', []) if me.isAnonymous()
@navigate('/teachers/update-account', {trigger: true, replace: true}) @navigate('/teachers/update-account', {trigger: true, replace: true})

View file

@ -888,6 +888,7 @@
more_info_3: "is a good place to connect with fellow educators who are using CodeCombat." more_info_3: "is a good place to connect with fellow educators who are using CodeCombat."
licenses_needed: "Licenses needed" licenses_needed: "Licenses needed"
teachers_quote: teachers_quote:
name: "Demo Form" name: "Demo Form"
title: "Request a Demo" title: "Request a Demo"
@ -1508,6 +1509,18 @@
project: "Project" project: "Project"
view_student_project: "View Student Project" view_student_project: "View Student Project"
view_arena_ladder: "View Arena Ladder" view_arena_ladder: "View Arena Ladder"
resource_hub: "Resource Hub"
getting_started: "Getting Started"
teacher_getting_started: "Teacher Getting Started Guide"
teacher_getting_started_desc: "New to CodeCombat? Download this Teacher Getting Started Guide to set up your account, create your first class, and invite students to the first course."
student_getting_started: "Student Quick Start Guide"
student_getting_started_desc: "You can distribute this guide to your students before starting CodeCombat so that they can familiarize themselves with the code editor. This guide can be used for both Python and JavaScript classrooms."
cs1: "Introduction to Computer Science"
cs1_syntax_python: "Course 1 Python Syntax Guide"
cs1_syntax_python_desc: "Cheatsheet with references to common Python syntax that students will learn in Introduction to Computer Science."
cs1_syntax_javascript: "Course 1 JavaScript Syntax Guide"
cs1_syntax_javascript_desc: "Cheatsheet with references to common JavaScript syntax that students will learn in Introduction to Computer Science."
coming_soon: "Additional guides coming soon!"
sharing: sharing:
game: "Game" game: "Game"

View file

@ -260,7 +260,6 @@
min-width: 34px min-width: 34px
height: 34px height: 34px
border-radius: 16px border-radius: 16px
padding: 0 10px
// margin-top: 23px // margin-top: 23px
// margin-bottom: 23px // margin-bottom: 23px
background: $gray-light background: $gray-light

View file

@ -0,0 +1,20 @@
#resource-hub-view, #markdown-resource-view
.content
margin: 0 auto 0 auto
// padding: 50px
.content
h4
margin: 20px 0 0 0
ul
margin: 0 0 50px 0
h4
.comingsoon
text-align: center
margin: 0 auto 0 auto
color: #666
margin: 30px 0 0 0

View file

@ -21,6 +21,9 @@
li(class= path.indexOf('/teachers/licenses') === 0 ? 'active' : '') li(class= path.indexOf('/teachers/licenses') === 0 ? 'active' : '')
a(href='/teachers/licenses') a(href='/teachers/licenses')
small.label(data-i18n='teacher.enrollments') small.label(data-i18n='teacher.enrollments')
li(class= path.indexOf('/teachers/resources') === 0 ? 'active' : '')
a(href='/teachers/resources')
small.label(data-i18n='teacher.resource_hub')
//- li(class= path.indexOf('TODO') === 0 ? 'active' : '') //- li(class= path.indexOf('TODO') === 0 ? 'active' : '')
//- a(href='TODO') //- a(href='TODO')
//- small.label(data-i18n='teacher.resources') //- small.label(data-i18n='teacher.resources')

View file

@ -0,0 +1,8 @@
extends /templates/base-flat
block page_nav
include ../courses/teacher-dashboard-nav.jade
block content
.container!=view.content

View file

@ -0,0 +1,43 @@
extends /templates/base-flat
block page_nav
include ../courses/teacher-dashboard-nav.jade
block content
.container
.content
h1(data-i18n="teacher.resource_hub")
h4(data-i18n="teacher.getting_started")
ul
li
a(href="http://files.codecombat.com/docs/resources/TeacherGettingStartedGuide.pdf" target="blank")
span(data-i18n="teacher.teacher_getting_started")
span.spl [PDF]
p(data-i18n="teacher.teacher_getting_started_desc")
li
a(href="http://files.codecombat.com/docs/resources/StudentQuickStartGuide.pdf" target="blank")
span(data-i18n="teacher.student_getting_started")
span.spl [PDF]
p(data-i18n="teacher.student_getting_started_desc")
h4(data-i18n="teacher.cs1")
ul
li
a(href="http://files.codecombat.com/docs/resources/Course1PythonSyntaxGuide.pdf" target="blank")
span(data-i18n="teacher.cs1_syntax_python")
span.spl [PDF]
p(data-i18n="teacher.cs1_syntax_python_desc")
li
a(href="http://files.codecombat.com/docs/resources/Course1JavaScriptSyntaxGuide.pdf" target="blank")
span(data-i18n="teacher.cs1_syntax_javascript")
span.spl [PDF]
p(data-i18n="teacher.cs1_syntax_javascript_desc")
h4
.comingsoon
i(data-i18n="teacher.coming_soon")

View file

@ -0,0 +1,15 @@
RootView = require 'views/core/RootView'
module.exports = class MarkdownResourceView extends RootView
id: 'markdown-resource-view'
template: require 'templates/teachers/markdown-resource-view'
initialize: (options, @name) ->
super(options)
@content = ''
$.get '/markdown/' + @name + '.md', (data) =>
if data.indexOf('<!doctype html>') is -1
@content = marked(data, sanitize: false)
else
@content = "<h1>Not Found</h1>"
@render()

View file

@ -0,0 +1,5 @@
RootView = require 'views/core/RootView'
module.exports = class ResourceHubView extends RootView
id: 'resource-hub-view'
template: require 'templates/teachers/resource-hub-view'

View file

@ -64,7 +64,7 @@ var courses =
description: "Learn more advanced game development.", description: "Learn more advanced game development.",
duration: NumberInt(2), duration: NumberInt(2),
free: false, free: false,
releasePhase: 'beta' releasePhase: 'released'
}, },
{ {
name: "Web Development 2", name: "Web Development 2",
@ -73,7 +73,7 @@ var courses =
description: "Learn more advanced web development, including scripting to make interactive webpages.", description: "Learn more advanced web development, including scripting to make interactive webpages.",
duration: NumberInt(2), duration: NumberInt(2),
free: false, free: false,
releasePhase: 'beta' releasePhase: 'released'
}, },
{ {
name: "Computer Science 4", name: "Computer Science 4",