diff --git a/app/assets/images/pages/about/matt_small.png b/app/assets/images/pages/about/matt_small.png index e1b03d8cb..42eb0f1d8 100644 Binary files a/app/assets/images/pages/about/matt_small.png and b/app/assets/images/pages/about/matt_small.png differ diff --git a/app/assets/images/pages/about/nick_small.png b/app/assets/images/pages/about/nick_small.png index fe9ae1bd8..7b66dff92 100644 Binary files a/app/assets/images/pages/about/nick_small.png and b/app/assets/images/pages/about/nick_small.png differ diff --git a/app/core/utils.coffee b/app/core/utils.coffee index 166db035e..ebeca671c 100644 --- a/app/core/utils.coffee +++ b/app/core/utils.coffee @@ -327,6 +327,7 @@ module.exports.capitalLanguages = capitalLanguages = 'python': 'Python' 'java': 'Java' 'lua': 'Lua' + 'html': 'HTML' module.exports.createLevelNumberMap = (levels) -> levelNumberMap = {} diff --git a/app/locale/en.coffee b/app/locale/en.coffee index 8a2e521db..09b17cf3e 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -436,6 +436,9 @@ done: "Done" next_level: "Next Level" next_game: "Next game" + language: "Language" + languages: "Languages" + programming_language: "Programming language" show_menu: "Show game menu" home: "Home" # Not used any more, will be removed soon. level: "Level" # Like "Level: Dungeons of Kithgard" diff --git a/app/styles/about.sass b/app/styles/about.sass index 16764e8de..1f0f479a0 100644 --- a/app/styles/about.sass +++ b/app/styles/about.sass @@ -128,9 +128,9 @@ .img-thumbnail border-radius: 50% padding: 0 - background-color: $burgandy - border: 5px solid $gold - + // background-color: $burgandy + // border: 5px solid $gold + // #community // margin-top: 100px diff --git a/app/styles/play/level/tome/spell.sass b/app/styles/play/level/tome/spell.sass index 222e0a765..cc49b2e07 100644 --- a/app/styles/play/level/tome/spell.sass +++ b/app/styles/play/level/tome/spell.sass @@ -28,7 +28,7 @@ border: 1px solid transparent span.code-background - border-width: 124px 76px 64px 40px + border-width: 115px 76px 64px 40px border-image: url(/images/level/code_editor_background_border.png) 124 76 64 40 fill stretch img.code-background @@ -38,8 +38,24 @@ .save-status display: none position: absolute - top: 1% - right: 4% + top: 10px + left: 20px + z-index: 4 + + .programming-language-container + position: absolute + top: 10px + right: 26px + z-index: 4 + font-family: "Open Sans Condensed", "Helvetica Neue", Helvetica, Arial, sans-serif + font-size: 14px + padding: 0px 10px + .programming-language-label + color: #6E654B + font-weight: bold + text-transform: uppercase + .programming-language + color: darkred .firepad // When Firepad is active, it wraps .ace_editor in .firepad. @@ -56,6 +72,7 @@ .ace_editor // When Firepad isn't active, .ace_editor needs the width/height set itself. @include editor-height(0px) + margin-top: 10px width: 94% position: relative background-color: transparent diff --git a/app/templates/play/level/tome/spell.jade b/app/templates/play/level/tome/spell.jade index b8e361e77..79370e536 100644 --- a/app/templates/play/level/tome/spell.jade +++ b/app/templates/play/level/tome/spell.jade @@ -1,6 +1,21 @@ img(src="/images/level/code_editor_background.png").code-background span.code-background - -div.ace - -.save-status(data-i18n="play_level.code_saved") Code Saved +.ace +.save-status(data-i18n="play_level.code_saved") +.programming-language-container + if view.spell.level.isType('web-dev') + - var campaign = view.spell.level.get('campaign') || ''; + if campaign.indexOf('web-dev-1') >= 0 + span.programming-language-label(data-i18n='play_level.language') + span.programming-language-label.spr : + span.programming-language HTML + else + span.programming-language-label(data-i18n='play_level.languages') + span.programming-language-label.spr : + span.programming-language.spr HTML + span.programming-language-label.spr / + span.programming-language JavaScript + else + span.programming-language-label(data-i18n='play_level.programming_language') + span.programming-language-label.spr : + span.programming-language= view.spell.displayCodeLanguage diff --git a/app/views/play/level/tome/Spell.coffee b/app/views/play/level/tome/Spell.coffee index ddd1f187c..cbdddda99 100644 --- a/app/views/play/level/tome/Spell.coffee +++ b/app/views/play/level/tome/Spell.coffee @@ -67,6 +67,7 @@ module.exports = class Spell setLanguage: (@language) -> @language = 'html' if @level.isType('web-dev') + @displayCodeLanguage = utils.capitalLanguages[@language] #console.log 'setting language to', @language, 'so using original source', @languages[language] ? @languages.javascript @originalSource = @languages[@language] ? @languages.javascript @originalSource = @addPicoCTFProblem() if window.serverConfig.picoCTF diff --git a/app/views/play/level/tome/SpellTopBarView.coffee b/app/views/play/level/tome/SpellTopBarView.coffee index 7c8051f86..a3cddf06e 100644 --- a/app/views/play/level/tome/SpellTopBarView.coffee +++ b/app/views/play/level/tome/SpellTopBarView.coffee @@ -39,7 +39,6 @@ module.exports = class SpellTopBarView extends CocoView afterRender: -> super() - @$el.addClass 'spell-tab' @attachTransitionEventListener() onDisableControls: (e) -> @toggleControls e, false diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index dd1c06572..537158ddf 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -629,7 +629,7 @@ module.exports = class SpellView extends CocoView # 2 lines buffer is nice @ace.setOptions minLines: lines, maxLines: lines # Move spell palette up, slightly overlapping us. - newTop = 175 + lineHeight * lines + newTop = 185 + lineHeight * lines spellPaletteView.css('top', newTop) # Expand it to bottom of tome if too short. newHeight = Math.max @spellPaletteHeight, tomeHeight - newTop + 10 @@ -942,7 +942,7 @@ module.exports = class SpellView extends CocoView @spellHasChanged = true onSessionWillSave: (e) -> - return unless @spellHasChanged + return unless @spellHasChanged and me.isAdmin() setTimeout(=> unless @destroyed or @spellHasChanged @$el.find('.save-status').finish().show().fadeOut(2000)