mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Try to keep learn more above the fold.
This commit is contained in:
parent
51003d21dd
commit
f39cac3abf
3 changed files with 22 additions and 7 deletions
|
@ -17,7 +17,6 @@
|
|||
background-size: 1200px auto
|
||||
|
||||
.container
|
||||
min-height: 720px
|
||||
background-repeat: no-repeat
|
||||
|
||||
.btn
|
||||
|
@ -25,7 +24,6 @@
|
|||
|
||||
h1
|
||||
color: white
|
||||
margin-top: 130px
|
||||
@media (max-width: $screen-md-min)
|
||||
margin-top: 60px
|
||||
font-size: 33px
|
||||
|
@ -35,7 +33,7 @@
|
|||
border: none
|
||||
border-radius: 8px
|
||||
background: rgba(255, 255, 255, 0.5)
|
||||
margin-top: 170px
|
||||
margin-top: 10px
|
||||
#classroom-edition-header
|
||||
margin-top: 10px
|
||||
#educator-header
|
||||
|
@ -58,6 +56,8 @@
|
|||
|
||||
#learn-more-row
|
||||
margin-top: 80px
|
||||
@media (max-height: 700px)
|
||||
margin-top: 10px
|
||||
h2, h6
|
||||
color: white
|
||||
h6
|
||||
|
@ -76,12 +76,13 @@
|
|||
margin-top: 0px
|
||||
|
||||
.container h1
|
||||
margin-top: 420px
|
||||
margin-top: 260px
|
||||
margin-bottom: 20px
|
||||
@media (max-width: $screen-md-min)
|
||||
margin-top: 380px
|
||||
margin-top: 60px
|
||||
margin-bottom: 60px
|
||||
@media (max-width: $screen-sm-min)
|
||||
margin-top: 360px
|
||||
margin-top: 60px
|
||||
|
||||
#classroom-in-box-row
|
||||
margin: 40px 0
|
||||
|
|
|
@ -111,6 +111,7 @@ mixin box
|
|||
block content
|
||||
.container-fluid#jumbotron-container-fluid.alt-image
|
||||
.container
|
||||
.row.hidden-xs.top-spacer(style="height: 160px")
|
||||
.row.hidden-sm.hidden-xs
|
||||
case view.variation
|
||||
when 'home-legacy-left'
|
||||
|
@ -125,7 +126,7 @@ block content
|
|||
+box
|
||||
.row.hidden-lg.hidden-md
|
||||
.col-lg-7.col-md-8
|
||||
h1(data-i18n="new_home.slogan",style="margin-top: 200px")
|
||||
h1(data-i18n="new_home.slogan")
|
||||
.col
|
||||
div(style="margin: auto; max-width: 300px")
|
||||
+box
|
||||
|
|
|
@ -97,6 +97,9 @@ module.exports = class NewHomeView extends RootView
|
|||
interval: 0
|
||||
keyboard: false
|
||||
})
|
||||
$(window).on 'resize', @fitToPage
|
||||
@fitToPage()
|
||||
setTimeout(@fitToPage, 0)
|
||||
super()
|
||||
|
||||
logoutAccount: ->
|
||||
|
@ -159,3 +162,13 @@ module.exports = class NewHomeView extends RootView
|
|||
event.preventDefault()
|
||||
# Modal opening happens automatically from bootstrap
|
||||
$('#screenshot-carousel').carousel($(event.currentTarget).data("index"))
|
||||
|
||||
fitToPage: =>
|
||||
windowHeight = $(window).height()
|
||||
linkBox = @$("#learn-more-link").parent()
|
||||
linkOffset = linkBox.offset()
|
||||
adjustment = windowHeight - (linkOffset.top + linkBox.height())
|
||||
target = @$('.top-spacer').first()
|
||||
newOffset = parseInt(target.css('height') || 0) + adjustment
|
||||
newOffset = Math.min(Math.max(0, newOffset), 170)
|
||||
target.css(height: "#{newOffset}px")
|
||||
|
|
Loading…
Reference in a new issue