diff --git a/app/core/Router.coffee b/app/core/Router.coffee index f083ae0c4..c083e408d 100644 --- a/app/core/Router.coffee +++ b/app/core/Router.coffee @@ -158,6 +158,8 @@ module.exports = class CocoRouter extends Backbone.Router 'teachers/licenses': go('courses/EnrollmentsView', { teachersOnly: true }) 'teachers/freetrial': go('teachers/RequestQuoteView') 'teachers/quote': redirect('/teachers/demo') + 'teachers/resources': go('teachers/ResourceHubView') + 'teachers/resources/:name': go('teachers/MarkdownResourceView') 'teachers/signup': -> return @routeDirectly('teachers/CreateTeacherAccountView', []) if me.isAnonymous() @navigate('/teachers/update-account', {trigger: true, replace: true}) diff --git a/app/styles/teachers/ResourceHubView.sass b/app/styles/teachers/ResourceHubView.sass new file mode 100644 index 000000000..dae0d105d --- /dev/null +++ b/app/styles/teachers/ResourceHubView.sass @@ -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 diff --git a/app/templates/courses/teacher-dashboard-nav.jade b/app/templates/courses/teacher-dashboard-nav.jade index 6ee1bb32b..21118822a 100644 --- a/app/templates/courses/teacher-dashboard-nav.jade +++ b/app/templates/courses/teacher-dashboard-nav.jade @@ -21,6 +21,9 @@ li(class= path.indexOf('/teachers/licenses') === 0 ? 'active' : '') a(href='/teachers/licenses') small.label(data-i18n='teacher.enrollments') + li(class= path.indexOf('/teachers/resources') === 0 ? 'active' : '') + a(href='/teachers/resources') + small.label Resource Hub //- li(class= path.indexOf('TODO') === 0 ? 'active' : '') //- a(href='TODO') //- small.label(data-i18n='teacher.resources') diff --git a/app/templates/teachers/markdown-resource-view.jade b/app/templates/teachers/markdown-resource-view.jade new file mode 100644 index 000000000..ab06644ed --- /dev/null +++ b/app/templates/teachers/markdown-resource-view.jade @@ -0,0 +1,8 @@ +extends /templates/base-flat + +block page_nav + include ../courses/teacher-dashboard-nav.jade + +block content + + .container!=view.content diff --git a/app/templates/teachers/resource-hub-view.jade b/app/templates/teachers/resource-hub-view.jade new file mode 100644 index 000000000..fc7808f59 --- /dev/null +++ b/app/templates/teachers/resource-hub-view.jade @@ -0,0 +1,49 @@ +extends /templates/base-flat + +block page_nav + include ../courses/teacher-dashboard-nav.jade + +block content + + .container + + .content + h1 Resource Hub + + + h4 Getting Started + ul + li + a(href="http://files.codecombat.com/docs/resources/StudentQuickStartGuide.pdf" target="blank") Teacher Getting Started Guide [PDF] + p 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. + li + a(href="http://files.codecombat.com/docs/resources/StudentQuickStartGuide.pdf" target="blank") Student Quick Start Guide [PDF] + p 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. + + // + li + a(href="http://example.com") Teacher Debugging Guide (3 types of problems) + + h4 Introduction to Computer Science + ul + + li + a(href="http://files.codecombat.com/docs/resources/Course1PythonSyntaxGuide.pdf" target="blank") Course 1 Python Syntax Guide [PDF] + p Cheatsheet with references to common Python syntax that students will learn in Introduction to Computer Science. + li + a(href="http://files.codecombat.com/docs/resources/Course1JavaScriptSyntaxGuide.pdf" target="blank") Course 1 JavaScript Syntax Guide [PDF] + p Cheatsheet with references to common JavaScript syntax that students will learn in Introduction to Computer Science. + + // + h4 Computer Science 2 + ul + li + a(href="http://example.com") Course 2 Lesson Plans + li + a(href="http://example.com") Course 2 Python Syntax Guide [PDF] + li + a(href="http://example.com") Course 2 JavaScript Syntax Guide [PDF] + + h4 + .comingsoon + i Additional guides coming soon! diff --git a/app/views/teachers/MarkdownResourceView.coffee b/app/views/teachers/MarkdownResourceView.coffee new file mode 100644 index 000000000..8a46fd04d --- /dev/null +++ b/app/views/teachers/MarkdownResourceView.coffee @@ -0,0 +1,16 @@ +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) => + console.log typeof data, data + if data.indexOf('') is -1 + @content = marked(data, sanitize: false) + else + @content = "