mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Reworked the nav bars in the level editor.
This commit is contained in:
parent
02a7381fa9
commit
8859405e18
12 changed files with 198 additions and 142 deletions
|
@ -17,6 +17,7 @@
|
|||
retry: "Retry"
|
||||
watch: "Watch"
|
||||
unwatch: "Unwatch"
|
||||
submit_patch: "Submit Patch"
|
||||
|
||||
units:
|
||||
second: "second"
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
left: 0
|
||||
right: 0
|
||||
bottom: 0
|
||||
top: 50px
|
||||
top: 35px
|
||||
border: 2px solid black
|
||||
border-top: none
|
||||
|
||||
.active > a, .active > a:hover, .active > a:focus
|
||||
background-color: white !important
|
||||
border-top: none
|
|
@ -1,4 +1,6 @@
|
|||
#editor-level-components-tab-view
|
||||
h3
|
||||
margin-top: 0
|
||||
|
||||
.components-container
|
||||
position: absolute
|
||||
|
@ -7,7 +9,7 @@
|
|||
|
||||
.treema-root
|
||||
position: absolute
|
||||
top: 50px
|
||||
top: 35px
|
||||
bottom: 0
|
||||
width: 250px
|
||||
overflow: scroll
|
||||
|
@ -25,13 +27,13 @@
|
|||
|
||||
.treema-root
|
||||
position: absolute
|
||||
top: 50px
|
||||
top: 35px
|
||||
right: 0
|
||||
left: 0px
|
||||
bottom: 0
|
||||
overflow: scroll
|
||||
|
||||
#create-new-component-button
|
||||
#create-new-component-button-no-select
|
||||
position: absolute
|
||||
top: 0
|
||||
right: 0
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#top-nav
|
||||
display: none
|
||||
|
||||
|
||||
position: absolute
|
||||
top: 0px
|
||||
left: 0px
|
||||
|
@ -12,17 +12,45 @@
|
|||
bottom: 0px
|
||||
|
||||
$BG: rgba(228, 207, 140, 1.0)
|
||||
$NAVBG: #2f261d
|
||||
|
||||
li.navbar-btn
|
||||
margin-right: 5px
|
||||
|
||||
#level-editor-top-nav
|
||||
.nav-tabs
|
||||
border-bottom: 0 !important
|
||||
.active > a, .active > a:hover, .active > a:focus
|
||||
background-color: $BG !important
|
||||
border-color: darken($BG, 50%)
|
||||
border-bottom: 0
|
||||
// custom navbar height rules
|
||||
.navbar-nav > li > a
|
||||
padding: 7px 8px 8px
|
||||
&:hover
|
||||
background-color: lighten($NAVBG, 10%)
|
||||
.navbar
|
||||
min-height: 0px
|
||||
border-radius: 0
|
||||
.navbar-right // not sure why bootstrap puts a big negative margin in, but this overrides it
|
||||
margin-right: 10px
|
||||
|
||||
// custom navbar styling
|
||||
.navbar-brand
|
||||
padding-top: 7px
|
||||
padding-bottom: 7px
|
||||
color: lighten(gold, 30%)
|
||||
.navbar-header
|
||||
border-left: 2px solid lighten($NAVBG, 20%)
|
||||
border-right: 2px solid lighten($NAVBG, 20%)
|
||||
background: lighten($NAVBG, 10%)
|
||||
margin-left: 20px
|
||||
.nav-tabs
|
||||
margin-left: 5px
|
||||
border-bottom: 0 !important
|
||||
.active > a, .active > a:hover, .active > a:focus
|
||||
background-color: $BG !important
|
||||
border-color: darken($BG, 50%)
|
||||
border-bottom: 0
|
||||
a
|
||||
padding: 7px 5px !important
|
||||
.dropdown-menu a
|
||||
cursor: pointer
|
||||
&:hover
|
||||
background-color: #d3d3d3
|
||||
|
||||
.outer-content
|
||||
background-color: $BG
|
||||
|
@ -47,7 +75,7 @@
|
|||
position: absolute
|
||||
left: 20px
|
||||
right: 20px
|
||||
top: 66px
|
||||
top: 46px
|
||||
bottom: 20px
|
||||
|
||||
.treema-root
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
left: 0
|
||||
right: 0
|
||||
bottom: 0
|
||||
top: 50px
|
||||
top: 35px
|
||||
border: 2px solid black
|
||||
border-top: none
|
||||
|
||||
.active > a, .active > a:hover, .active > a:focus
|
||||
background-color: white !important
|
|
@ -1,4 +1,6 @@
|
|||
#editor-level-systems-tab-view
|
||||
h3
|
||||
margin-top: 0
|
||||
|
||||
.systems-container
|
||||
position: absolute
|
||||
|
@ -7,7 +9,7 @@
|
|||
|
||||
.treema-root
|
||||
position: absolute
|
||||
top: 50px
|
||||
top: 35px
|
||||
bottom: 0
|
||||
width: 250px
|
||||
overflow: scroll
|
||||
|
@ -30,7 +32,7 @@
|
|||
|
||||
.treema-root
|
||||
position: absolute
|
||||
top: 50px
|
||||
top: 35px
|
||||
right: 0
|
||||
left: 0px
|
||||
bottom: 0
|
||||
|
|
|
@ -1,32 +1,44 @@
|
|||
nav.navbar.navbar-default(role='navigation')
|
||||
.container-fluid
|
||||
.navbar-header
|
||||
span.navbar-brand
|
||||
span(data-i18n="editor.level_component_edit_title")
|
||||
| Edit Component
|
||||
span :
|
||||
| "#{editTitle}"
|
||||
.collapse.navbar-collapse
|
||||
ul.nav.navbar-nav.nav-tabs
|
||||
li.active
|
||||
a(href="#component-code" data-toggle="tab" data-i18n="general.code") Code
|
||||
li
|
||||
a(href="#component-config-schema" data-toggle="tab" data-i18n="editor.level_component_config_schema") Config Schema
|
||||
li
|
||||
a(href="#component-settings" data-toggle="tab" data-i18n="editor.level_component_settings") Settings
|
||||
li
|
||||
a(href="#component-patches" data-toggle="tab" data-i18n="resources.patches")#component-patches-tab Patches
|
||||
ul.nav.navbar-nav.navbar-left
|
||||
li(data-i18n="general.version_history").btn.btn-primary.navbar-btn#history-button Version History
|
||||
li(data-i18n="editor.level_component_btn_new").btn.btn-primary.navbar-btn#create-new-component-button Create New Component
|
||||
li.btn.btn-primary.navbar-btn#patch-component-button Patch
|
||||
li#watch-component-button.btn.btn-primary.navbar-btn
|
||||
span.watch
|
||||
span.spr Watch
|
||||
span.glyphicon.glyphicon-eye-open
|
||||
span.unwatch.secret
|
||||
span.spr Unwatch
|
||||
span.glyphicon.glyphicon-eye-close
|
||||
ul.nav.navbar-nav.nav-tabs
|
||||
li.active
|
||||
a(href="#component-code" data-toggle="tab" data-i18n="general.code") Code
|
||||
li
|
||||
a(href="#component-config-schema" data-toggle="tab" data-i18n="editor.level_component_config_schema") Config Schema
|
||||
li
|
||||
a(href="#component-settings" data-toggle="tab" data-i18n="editor.level_component_settings") Settings
|
||||
li
|
||||
a(href="#component-patches" data-toggle="tab" data-i18n="resources.patches")#component-patches-tab Patches
|
||||
|
||||
.navbar-header
|
||||
span.navbar-brand= editTitle
|
||||
|
||||
ul.nav.navbar-nav.navbar-right
|
||||
li.dropdown
|
||||
a(data-toggle='dropdown')
|
||||
span.glyphicon-chevron-down.glyphicon
|
||||
|
||||
ul.dropdown-menu
|
||||
li.dropdown-header Actions
|
||||
li#watch-component-button
|
||||
a
|
||||
span.watch
|
||||
span.glyphicon.glyphicon-eye-open
|
||||
span.spl Watch
|
||||
span.unwatch.secret
|
||||
span.glyphicon.glyphicon-eye-close
|
||||
span.spl Unwatch
|
||||
|
||||
li#patch-component-button
|
||||
a(data-i18n="common.submit_patch") Submit Patch
|
||||
|
||||
li#create-new-component-button
|
||||
a(data-i18n="editor.level_component_btn_new") Create New Component
|
||||
|
||||
li.divider
|
||||
li.dropdown-header Info
|
||||
|
||||
li#history-button
|
||||
a(data-i18n="general.version_history") Version History
|
||||
|
||||
.tab-content
|
||||
.tab-pane.active#component-code
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
|
||||
.edit-component-container
|
||||
if me.isAdmin()
|
||||
button(data-i18n="editor.level_component_btn_new").btn.btn-primary#create-new-component-button Create New Component
|
||||
button(data-i18n="editor.level_component_btn_new").btn.btn-primary#create-new-component-button-no-select Create New Component
|
||||
|
||||
#editor-level-component-edit-view
|
||||
|
|
|
@ -3,90 +3,88 @@ extends /templates/base
|
|||
block outer_content
|
||||
.outer-content
|
||||
|
||||
if level.loading
|
||||
if false
|
||||
nav.navbar.navbar-default(role='navigation')#level-editor-top-nav
|
||||
.container-fluid
|
||||
ul.nav.navbar-nav
|
||||
li
|
||||
a(href="/editor/level", data-i18n="editor.back") Back
|
||||
a(href="/editor/level")
|
||||
span.glyphicon-home.glyphicon
|
||||
|
||||
else
|
||||
nav.navbar.navbar-default(role='navigation')#level-editor-top-nav
|
||||
.container-fluid
|
||||
ul.nav.navbar-nav
|
||||
li
|
||||
a(href="/editor/level", data-i18n="editor.back") Back
|
||||
.navbar-header
|
||||
span.navbar-brand
|
||||
span(data-i18n="editor.level_title") Level Editor
|
||||
span :
|
||||
span.level-title #{level.attributes.name}
|
||||
.collapse.navbar-collapse
|
||||
ul.nav.navbar-nav.nav-tabs
|
||||
|
||||
li.active
|
||||
a(href="#editor-level-thangs-tab-view", data-toggle="tab", data-i18n="editor.level_tab_thangs") Thangs
|
||||
li
|
||||
a(href="#editor-level-scripts-tab-view", data-toggle="tab", data-i18n="editor.level_tab_scripts") Scripts
|
||||
li
|
||||
a(href="#editor-level-settings-tab-view", data-toggle="tab", data-i18n="editor.level_tab_settings") Settings
|
||||
li
|
||||
a(href="#editor-level-components-tab-view", data-toggle="tab", data-i18n="editor.level_tab_components") Components
|
||||
li
|
||||
a(href="#editor-level-systems-tab-view", data-toggle="tab", data-i18n="editor.level_tab_systems") Systems
|
||||
li
|
||||
a(href="#editor-level-patches", data-toggle="tab")#patches-tab
|
||||
span(data-i18n="resources.patches").spr Patches
|
||||
- var patches = level.get('patches')
|
||||
if patches && patches.length
|
||||
span.badge= patches.length
|
||||
|
||||
ul.nav.navbar-nav.navbar-right
|
||||
li#watch-button.btn.btn-primary.navbar-btn
|
||||
span.watch
|
||||
span.spr Watch
|
||||
span.glyphicon.glyphicon-eye-open
|
||||
span.unwatch.secret
|
||||
span.spr Unwatch
|
||||
span.glyphicon.glyphicon-eye-close
|
||||
li(data-toggle="coco-modal", data-target="modal/revert", data-i18n="editor.revert", disabled=anonymous ? "true": undefined).btn.btn-primary.navbar-btn#revert-button Revert
|
||||
if authorized
|
||||
li(data-i18n="common.save").btn.btn-primary.navbar-btn#commit-level-start-button Save
|
||||
else
|
||||
li(data-i18n="common.patch").btn.btn-primary.navbar-btn#commit-level-patch-button Patch
|
||||
li(data-i18n="common.fork", disabled=anonymous ? "true": undefined).btn.btn-primary.navbar-btn#fork-level-start-button Fork
|
||||
li(title="⌃↩ or ⌘↩: Play preview of current level", data-i18n="common.play")#play-button.btn.btn-inverse.banner.navbar-btn Play!
|
||||
|
||||
li.divider
|
||||
|
||||
li.dropdown
|
||||
a.dropdown-toggle(href='#', data-toggle='dropdown', data-i18n="editor.more")
|
||||
| More
|
||||
b.caret
|
||||
ul.dropdown-menu
|
||||
li#history-button
|
||||
a(href='#', data-i18n="general.version_history") Version History
|
||||
li
|
||||
a(href='https://github.com/codecombat/codecombat/wiki/Artisan-Home', data-i18n="editor.wiki") Wiki
|
||||
li
|
||||
a(href='http://www.hipchat.com/g3plnOKqa', data-i18n="editor.live_chat") Live Chat
|
||||
li
|
||||
a(href='http://discourse.codecombat.com/category/artisan', data-i18n="nav.forum") Forum
|
||||
li
|
||||
a(data-toggle="coco-modal", data-target="modal/contact", data-i18n="nav.contact") Email
|
||||
|
||||
|
||||
ul.nav.navbar-nav
|
||||
li
|
||||
a(href="/editor/level")
|
||||
span.glyphicon-home.glyphicon
|
||||
ul.nav.navbar-nav.nav-tabs
|
||||
|
||||
li.active
|
||||
a(href="#editor-level-thangs-tab-view", data-toggle="tab", data-i18n="editor.level_tab_thangs") Thangs
|
||||
li
|
||||
a(href="#editor-level-scripts-tab-view", data-toggle="tab", data-i18n="editor.level_tab_scripts") Scripts
|
||||
li
|
||||
a(href="#editor-level-settings-tab-view", data-toggle="tab", data-i18n="editor.level_tab_settings") Settings
|
||||
li
|
||||
a(href="#editor-level-components-tab-view", data-toggle="tab", data-i18n="editor.level_tab_components") Components
|
||||
li
|
||||
a(href="#editor-level-systems-tab-view", data-toggle="tab", data-i18n="editor.level_tab_systems") Systems
|
||||
li
|
||||
a(href="#editor-level-patches", data-toggle="tab")#patches-tab
|
||||
span(data-i18n="resources.patches").spr Patches
|
||||
- var patches = level.get('patches')
|
||||
if patches && patches.length
|
||||
span.badge= patches.length
|
||||
|
||||
.navbar-header
|
||||
span.navbar-brand #{level.attributes.name}
|
||||
|
||||
ul.nav.navbar-nav.navbar-right
|
||||
if authorized
|
||||
li
|
||||
a
|
||||
span.glyphicon-floppy-disk.glyphicon
|
||||
else
|
||||
li
|
||||
a
|
||||
span.glyphicon-floppy-disk.glyphicon
|
||||
|
||||
li(title="⌃↩ or ⌘↩: Play preview of current level")
|
||||
a
|
||||
span.glyphicon-play.glyphicon
|
||||
li.dropdown
|
||||
a(data-toggle='dropdown')
|
||||
span.glyphicon-chevron-down.glyphicon
|
||||
ul.dropdown-menu
|
||||
li
|
||||
span(data-i18n="editor.level_some_options").dropdown-menu-header Some Options?
|
||||
li.dropdown-header Actions
|
||||
li#watch-button
|
||||
a
|
||||
span.watch
|
||||
span.glyphicon.glyphicon-eye-open
|
||||
span.spl Watch
|
||||
span.unwatch.secret
|
||||
span.glyphicon.glyphicon-eye-close
|
||||
span.spl Unwatch
|
||||
|
||||
li(class=anonymous ? "disabled": "")
|
||||
a(data-i18n="common.fork")#fork-level-start-button Fork
|
||||
li(class=anonymous ? "disabled": "")
|
||||
a(data-toggle="coco-modal", data-target="modal/revert", data-i18n="editor.revert")#revert-button Revert
|
||||
li.divider
|
||||
li.dropdown-header Info
|
||||
li#history-button
|
||||
a(href='#', data-i18n="general.version_history") Version History
|
||||
li.divider
|
||||
li.dropdown-header Help
|
||||
li
|
||||
a(data-delay="1000", href="#", data-i18n="common.delay_1_sec") 1 second
|
||||
a(data-delay="3000", href="#", data-i18n="common.delay_3_sec") 3 seconds
|
||||
a(data-delay="5000", href="#", data-i18n="common.delay_5_sec") 5 seconds
|
||||
a(data-delay="90019001", href="#", data-i18n="common.manual") Manual
|
||||
|
||||
a(href='https://github.com/codecombat/codecombat/wiki/Artisan-Home', data-i18n="editor.wiki", target="_blank") Wiki
|
||||
li
|
||||
a(href='http://www.hipchat.com/g3plnOKqa', data-i18n="editor.live_chat", target="_blank") Live Chat
|
||||
li
|
||||
a(href='http://discourse.codecombat.com/category/artisan', data-i18n="nav.forum", target="_blank") Forum
|
||||
li
|
||||
a(data-toggle="coco-modal", data-target="modal/contact", data-i18n="nav.contact") Email
|
||||
|
||||
div.tab-content#level-editor-tabs
|
||||
div.tab-pane.active#editor-level-thangs-tab-view
|
||||
|
||||
|
|
|
@ -1,21 +1,38 @@
|
|||
nav.navbar.navbar-default(role='navigation')
|
||||
.container-fluid
|
||||
.navbar-header
|
||||
span.navbar-brand
|
||||
span(data-i18n="editor.level_system_edit_title")
|
||||
| Edit System
|
||||
span :
|
||||
| "#{editTitle}"
|
||||
.collapse.navbar-collapse
|
||||
ul.nav.navbar-nav.nav-tabs
|
||||
li.active
|
||||
a(href="#system-code" data-toggle="tab") Code
|
||||
li
|
||||
a(href="#system-config-schema" data-toggle="tab") Config Schema
|
||||
li
|
||||
a(href="#system-settings" data-toggle="tab") Settings
|
||||
ul.nav.navbar-nav.navbar-right
|
||||
li(data-i18n="editor.level_system_btn_new").btn.btn-primary.navbar-btn#create-new-system-button Create New System
|
||||
|
||||
ul.nav.navbar-nav.nav-tabs
|
||||
li.active
|
||||
a(href="#system-code" data-toggle="tab") Code
|
||||
li
|
||||
a(href="#system-config-schema" data-toggle="tab") Config Schema
|
||||
li
|
||||
a(href="#system-settings" data-toggle="tab") Settings
|
||||
|
||||
ul.nav.navbar-nav.navbar-right
|
||||
li.dropdown
|
||||
a(data-toggle='dropdown')
|
||||
span.glyphicon-chevron-down.glyphicon
|
||||
ul.dropdown-menu
|
||||
li.dropdown-header Actions
|
||||
li#watch-component-button
|
||||
a
|
||||
span.watch
|
||||
span.glyphicon.glyphicon-eye-open
|
||||
span.spl Watch
|
||||
span.unwatch.secret
|
||||
span.glyphicon.glyphicon-eye-close
|
||||
span.spl Unwatch
|
||||
li#patch-component-button
|
||||
a(data-i18n="common.submit_patch") Submit Patch
|
||||
li#create-new-system
|
||||
a(data-i18n="editor.level_system_btn_new") Create New System
|
||||
li.divider
|
||||
li.dropdown-header Info
|
||||
li#system-history-button
|
||||
a(data-i18n="general.version_history") Version History
|
||||
|
||||
.navbar-header
|
||||
span.navbar-brand= editTitle
|
||||
|
||||
.tab-content
|
||||
.tab-pane.active#system-code
|
||||
|
|
|
@ -21,6 +21,7 @@ module.exports = class ComponentsTabView extends View
|
|||
|
||||
events:
|
||||
'click #create-new-component-button': 'createNewLevelComponent'
|
||||
'click #create-new-component-button-no-select': 'createNewLevelComponent'
|
||||
|
||||
onLevelThangsChanged: (e) ->
|
||||
thangsData = e.thangsData
|
||||
|
|
|
@ -23,6 +23,7 @@ module.exports = class SystemsTabView extends View
|
|||
events:
|
||||
'click #add-system-button': 'addLevelSystem'
|
||||
'click #create-new-system-button': 'createNewLevelSystem'
|
||||
'click #create-new-system': 'createNewLevelSystem'
|
||||
|
||||
constructor: (options) ->
|
||||
super options
|
||||
|
|
Loading…
Reference in a new issue