mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Refactoring ModalView Templates
This commit is contained in:
parent
29a88ee128
commit
41d26f5709
5 changed files with 95 additions and 97 deletions
|
@ -1,20 +1,18 @@
|
|||
extends /templates/modal/modal_base
|
||||
|
||||
block modal-header
|
||||
button(type='button', data-dismiss="modal", aria-hidden="true").close ×
|
||||
block modal-header-content
|
||||
h3(data-i18n="play_level.guide_title") Guide
|
||||
|
||||
block modal-body
|
||||
.modal-body
|
||||
ul.nav.nav-tabs
|
||||
for doc in docs
|
||||
li
|
||||
a(data-target="#docs_tab_#{doc.slug}", data-toggle="tab") #{doc.name}
|
||||
div.tab-content
|
||||
for doc in docs
|
||||
div.tab-pane(id="docs_tab_#{doc.slug}")!= doc.html
|
||||
block modal-body-content
|
||||
ul.nav.nav-tabs
|
||||
for doc in docs
|
||||
li
|
||||
a(data-target="#docs_tab_#{doc.slug}", data-toggle="tab") #{doc.name}
|
||||
div.tab-content
|
||||
for doc in docs
|
||||
div.tab-pane(id="docs_tab_#{doc.slug}")!= doc.html
|
||||
|
||||
block modal-footer
|
||||
block modal-footer-content
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn.btn-primary Close
|
||||
|
||||
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
.modal-dialog
|
||||
.modal-header
|
||||
button(type='button', data-dismiss="modal", aria-hidden="true").close ×
|
||||
h3(data-i18n="play_level.editor_config_title") Editor Configuration
|
||||
|
||||
.modal-body
|
||||
.form
|
||||
.form-group.select-group
|
||||
label.control-label(for="tome-key-bindings" data-i18n="play_level.editor_config_keybindings_label") Key Bindings
|
||||
select#tome-key-bindings(name="keyBindings", type="checkbox", checked=multiplayer)
|
||||
option(value="default" selected=(keyBindings === "default") data-i18n="play_level.editor_config_keybindings_default") Default (Ace)
|
||||
option(value="vim" selected=(keyBindings === "vim")) Vim
|
||||
option(value="emacs" selected=(keyBindings === "emacs")) Emacs
|
||||
span.help-block(data-i18n="play_level.editor_config_keybindings_description") Adds additional shortcuts known from the common editors.
|
||||
.form-group.checkbox
|
||||
label(for="tome-invisibles")
|
||||
input#tome-invisibles(name="invisibles", type="checkbox", checked=invisibles)
|
||||
span(data-i18n="play_level.editor_config_invisibles_label") Show Invisibles
|
||||
span.help-block(data-i18n="play_level.editor_config_invisibles_description") Displays invisibles such as spaces or tabs.
|
||||
.form-group.checkbox
|
||||
label(for="tome-indent-guides")
|
||||
input#tome-indent-guides(name="indentGuides", type="checkbox", checked=indentGuides)
|
||||
span(data-i18n="play_level.editor_config_indentguides_label") Show Indent Guides
|
||||
span.help-block(data-i18n="play_level.editor_config_indentguides_description") Displays vertical lines to see indentation better.
|
||||
.form-group.checkbox
|
||||
label(for="tome-behaviors")
|
||||
input#tome-behaviors(name="behaviors", type="checkbox", checked=behaviors)
|
||||
span(data-i18n="play_level.editor_config_behaviors_label") Smart Behaviors
|
||||
span.help-block(data-i18n="play_level.editor_config_behaviors_description") Autocompletes brackets, braces, and quotes.
|
||||
|
||||
.modal-footer
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn.btn-primary Close
|
||||
extends /templates/modal/modal_base
|
||||
|
||||
block modal-header-content
|
||||
h3(data-i18n="play_level.editor_config_title") Editor Configuration
|
||||
|
||||
block modal-body-content
|
||||
.form
|
||||
.form-group.select-group
|
||||
label.control-label(for="tome-key-bindings" data-i18n="play_level.editor_config_keybindings_label") Key Bindings
|
||||
select#tome-key-bindings(name="keyBindings", type="checkbox", checked=multiplayer)
|
||||
option(value="default" selected=(keyBindings === "default") data-i18n="play_level.editor_config_keybindings_default") Default (Ace)
|
||||
option(value="vim" selected=(keyBindings === "vim")) Vim
|
||||
option(value="emacs" selected=(keyBindings === "emacs")) Emacs
|
||||
span.help-block(data-i18n="play_level.editor_config_keybindings_description") Adds additional shortcuts known from the common editors.
|
||||
.form-group.checkbox
|
||||
label(for="tome-invisibles")
|
||||
input#tome-invisibles(name="invisibles", type="checkbox", checked=invisibles)
|
||||
span(data-i18n="play_level.editor_config_invisibles_label") Show Invisibles
|
||||
span.help-block(data-i18n="play_level.editor_config_invisibles_description") Displays invisibles such as spaces or tabs.
|
||||
.form-group.checkbox
|
||||
label(for="tome-indent-guides")
|
||||
input#tome-indent-guides(name="indentGuides", type="checkbox", checked=indentGuides)
|
||||
span(data-i18n="play_level.editor_config_indentguides_label") Show Indent Guides
|
||||
span.help-block(data-i18n="play_level.editor_config_indentguides_description") Displays vertical lines to see indentation better.
|
||||
.form-group.checkbox
|
||||
label(for="tome-behaviors")
|
||||
input#tome-behaviors(name="behaviors", type="checkbox", checked=behaviors)
|
||||
span(data-i18n="play_level.editor_config_behaviors_label") Smart Behaviors
|
||||
span.help-block(data-i18n="play_level.editor_config_behaviors_description") Autocompletes brackets, braces, and quotes.
|
||||
|
||||
block modal-footer-content
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn.btn-primary Close
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
.modal-dialog
|
||||
.modal-header
|
||||
button(type='button', data-dismiss="modal", aria-hidden="true").close ×
|
||||
h3(data-i18n="play_level.infinite_loop_title") Infinite Loop Detected
|
||||
|
||||
extends /templates/modal/modal_base
|
||||
|
||||
block modal-header-content
|
||||
h3(data-i18n="play_level.infinite_loop_title") Infinite Loop Detected
|
||||
|
||||
block modal-body-content
|
||||
.modal-body
|
||||
p(data-i18n="play_level.infinite_loop_explanation") The initial code to build the world never finished running. It's probably either really slow or has an infinite loop. Or there might be a bug. You can either try running this code again or reset the code to the default state. If that doesn't fix it, please let us know.
|
||||
|
||||
.modal-footer
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="play_level.infinite_loop_wait").btn#restart-level-infinite-loop-retry-button Try Again
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="play_level.infinite_loop_reload").btn.btn-primary#restart-level-infinite-loop-confirm-button Reset Level
|
||||
|
||||
block modal-footer-content
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="play_level.infinite_loop_wait").btn#restart-level-infinite-loop-retry-button Try Again
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="play_level.infinite_loop_reload").btn.btn-primary#restart-level-infinite-loop-confirm-button Reset Level
|
||||
|
|
|
@ -1,37 +1,36 @@
|
|||
// TODO: refactor to be like other modals
|
||||
.modal-dialog
|
||||
.modal-header
|
||||
button(type='button', data-dismiss="modal", aria-hidden="true").close ×
|
||||
h3(data-i18n="play_level.multiplayer_title") Multiplayer Settings
|
||||
|
||||
.modal-body
|
||||
if !ladderGame
|
||||
.form
|
||||
.form-group.checkbox
|
||||
label(for="multiplayer")
|
||||
input#multiplayer(name="multiplayer", type="checkbox", checked=multiplayer)
|
||||
| Multiplayer
|
||||
span.help-block Enable others to join your game.
|
||||
|
||||
hr
|
||||
|
||||
div#link-area
|
||||
p(data-i18n="play_level.multiplayer_link_description") Give this link to anyone to have them join you.
|
||||
|
||||
textarea.well#multiplayer-join-link(readonly=true)= joinLink
|
||||
|
||||
p
|
||||
strong(data-i18n="play_level.multiplayer_hint_label") Hint:
|
||||
span(data-i18n="play_level.multiplayer_hint") Click the link to select all, then press ⌘-C or Ctrl-C to copy the link.
|
||||
|
||||
p(data-i18n="play_level.multiplayer_coming_soon") More multiplayer features to come!
|
||||
extends /templates/modal/modal_base
|
||||
|
||||
if ladderGame
|
||||
if me.get('anonymous')
|
||||
p Sign in or create an account and get your solution on the leaderboard!
|
||||
else
|
||||
a#go-to-leaderboard-button.btn.btn-primary(href="/play/ladder/#{levelSlug}#my-matches") Go to the leaderboard!
|
||||
p You can submit your game to be ranked from the leaderboard page.
|
||||
block modal-header-content
|
||||
h3(data-i18n="play_level.multiplayer_title") Multiplayer Settings
|
||||
|
||||
block modal-body-content
|
||||
if !ladderGame
|
||||
.form
|
||||
.form-group.checkbox
|
||||
label(for="multiplayer")
|
||||
input#multiplayer(name="multiplayer", type="checkbox", checked=multiplayer)
|
||||
| Multiplayer
|
||||
span.help-block Enable others to join your game.
|
||||
|
||||
hr
|
||||
|
||||
.modal-footer
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn.btn-primary Close
|
||||
div#link-area
|
||||
p(data-i18n="play_level.multiplayer_link_description") Give this link to anyone to have them join you.
|
||||
|
||||
textarea.well#multiplayer-join-link(readonly=true)= joinLink
|
||||
|
||||
p
|
||||
strong(data-i18n="play_level.multiplayer_hint_label") Hint:
|
||||
span(data-i18n="play_level.multiplayer_hint") Click the link to select all, then press ⌘-C or Ctrl-C to copy the link.
|
||||
|
||||
p(data-i18n="play_level.multiplayer_coming_soon") More multiplayer features to come!
|
||||
|
||||
if ladderGame
|
||||
if me.get('anonymous')
|
||||
p Sign in or create an account and get your solution on the leaderboard!
|
||||
else
|
||||
a#go-to-leaderboard-button.btn.btn-primary(href="/play/ladder/#{levelSlug}#my-matches") Go to the leaderboard!
|
||||
p You can submit your game to be ranked from the leaderboard page.
|
||||
|
||||
block modal-footer-content
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn.btn-primary Close
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
.modal-dialog
|
||||
.modal-header
|
||||
button(type='button', data-dismiss="modal", aria-hidden="true").close ×
|
||||
h3(data-i18n="play_level.reload_title") Reload All Code?
|
||||
extends /templates/modal/modal_base
|
||||
|
||||
block modal-header-content
|
||||
h3(data-i18n="play_level.reload_title") Reload All Code?
|
||||
|
||||
.modal-body
|
||||
p(data-i18n="play_level.reload_really") Are you sure you want to reload this level back to the beginning?
|
||||
block modal-body-content
|
||||
p(data-i18n="play_level.reload_really") Are you sure you want to reload this level back to the beginning?
|
||||
|
||||
.modal-footer
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn Close
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="play_level.reload_confirm").btn.btn-primary#restart-level-confirm-button Reload All
|
||||
block modal-footer-content
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn Close
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="play_level.reload_confirm").btn.btn-primary#restart-level-confirm-button Reload All
|
||||
|
|
Loading…
Reference in a new issue