mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-01 16:33:38 -04:00
Made item shop fit on iPad and small screens.
This commit is contained in:
parent
ff1f9d488c
commit
b776350e6a
4 changed files with 50 additions and 8 deletions
app
assets/images/pages/play/modal
styles/play/modal
templates/play/modal
views/play/modal
Binary file not shown.
After ![]() (image error) Size: 157 KiB |
|
@ -15,14 +15,18 @@
|
||||||
//- Clear modal defaults
|
//- Clear modal defaults
|
||||||
.modal-dialog
|
.modal-dialog
|
||||||
padding: 0
|
padding: 0
|
||||||
|
width: 1230px
|
||||||
|
height: 660px
|
||||||
|
background: none
|
||||||
|
|
||||||
//- Background
|
//- Background
|
||||||
#play-items-modal-bg
|
#play-items-modal-bg, #play-items-modal-narrow-bg
|
||||||
position: absolute
|
position: absolute
|
||||||
top: -69px
|
top: -69px
|
||||||
left: -8px
|
left: -8px
|
||||||
|
|
||||||
|
#play-items-modal-narrow-bg
|
||||||
|
display: none
|
||||||
|
|
||||||
//- Header
|
//- Header
|
||||||
|
|
||||||
|
@ -44,6 +48,7 @@
|
||||||
top: 10px
|
top: 10px
|
||||||
width: 160px
|
width: 160px
|
||||||
height: 66px
|
height: 66px
|
||||||
|
@include rotate(5deg)
|
||||||
|
|
||||||
#gems-count
|
#gems-count
|
||||||
position: absolute
|
position: absolute
|
||||||
|
@ -66,7 +71,8 @@
|
||||||
font-size: 30px
|
font-size: 30px
|
||||||
padding-top: 7px
|
padding-top: 7px
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
@include rotate(-3deg)
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color: yellow
|
color: yellow
|
||||||
|
|
||||||
|
@ -114,7 +120,7 @@
|
||||||
width: 669px
|
width: 669px
|
||||||
height: 507px
|
height: 507px
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
|
|
||||||
.tab-pane
|
.tab-pane
|
||||||
height: 100%
|
height: 100%
|
||||||
|
|
||||||
|
@ -350,3 +356,41 @@
|
||||||
background: rgb(72, 106, 113)
|
background: rgb(72, 106, 113)
|
||||||
opacity: 1
|
opacity: 1
|
||||||
color: rgba(255,255,255, 0.4)
|
color: rgba(255,255,255, 0.4)
|
||||||
|
|
||||||
|
@media only screen and (max-width: 1300px)
|
||||||
|
#play-items-modal
|
||||||
|
overflow-x: hidden
|
||||||
|
|
||||||
|
.tab-content
|
||||||
|
width: 469px
|
||||||
|
|
||||||
|
#play-items-modal-bg
|
||||||
|
display: none
|
||||||
|
|
||||||
|
#play-items-modal-narrow-bg
|
||||||
|
display: block
|
||||||
|
|
||||||
|
.modal-dialog
|
||||||
|
width: 1024px
|
||||||
|
left: 25px
|
||||||
|
|
||||||
|
h1
|
||||||
|
display: none
|
||||||
|
|
||||||
|
#gems-count-container
|
||||||
|
left: 213px
|
||||||
|
|
||||||
|
#close-modal
|
||||||
|
left: 390px
|
||||||
|
|
||||||
|
.nano-content
|
||||||
|
padding-left: 20px
|
||||||
|
|
||||||
|
#item-title
|
||||||
|
left: 698px
|
||||||
|
|
||||||
|
#item-details-body
|
||||||
|
left: 648px
|
||||||
|
|
||||||
|
#selected-item-unlock-button
|
||||||
|
left: 645px
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
.modal-dialog
|
.modal-dialog
|
||||||
.modal-content
|
.modal-content
|
||||||
img(src="/images/pages/play/modal/play-items-modal-background.png")#play-items-modal-bg
|
img(src="/images/pages/play/modal/play-items-modal-background.png")#play-items-modal-bg
|
||||||
|
img(src="/images/pages/play/modal/play-items-modal-background-narrow.png")#play-items-modal-narrow-bg
|
||||||
|
|
||||||
h1.big-font(data-i18n="play.items")
|
h1.big-font(data-i18n="play.items")
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,6 @@ module.exports = class PlayItemsModal extends ModalView
|
||||||
model.silhouetted = model.isSilhouettedItem()
|
model.silhouetted = model.isSilhouettedItem()
|
||||||
model.equippable = 'Warrior' in model.getAllowedHeroClasses() # Temp: while there are no wizards/rangers
|
model.equippable = 'Warrior' in model.getAllowedHeroClasses() # Temp: while there are no wizards/rangers
|
||||||
model.comingSoon = not model.getFrontFacingStats().props.length and not _.size model.getFrontFacingStats().stats # Temp: while there are placeholder items
|
model.comingSoon = not model.getFrontFacingStats().props.length and not _.size model.getFrontFacingStats().stats # Temp: while there are placeholder items
|
||||||
console.log model.name, 'is comingSoon?', model.comingSoon, model.getFrontFacingStats()
|
|
||||||
@idToItem[model.id] = model
|
@idToItem[model.id] = model
|
||||||
|
|
||||||
if needMore
|
if needMore
|
||||||
|
@ -110,8 +109,6 @@ module.exports = class PlayItemsModal extends ModalView
|
||||||
super()
|
super()
|
||||||
return unless @supermodel.finished()
|
return unless @supermodel.finished()
|
||||||
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'game-menu-open', volume: 1
|
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'game-menu-open', volume: 1
|
||||||
@$el.find('.modal-dialog').css({width: "1230px", height: "660px", background: 'none'})
|
|
||||||
@$el.find('.background-wrapper').css({'background', 'none'})
|
|
||||||
@$el.find('.nano:visible').nanoScroller({alwaysVisible: true})
|
@$el.find('.nano:visible').nanoScroller({alwaysVisible: true})
|
||||||
@itemDetailsView = new ItemDetailsView()
|
@itemDetailsView = new ItemDetailsView()
|
||||||
@insertSubView(@itemDetailsView)
|
@insertSubView(@itemDetailsView)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue