Merge branch 'landing-page' of github.com:travis-ci/travis-web into landing-page
This commit is contained in:
commit
8751635071
|
@ -108,12 +108,12 @@ Repo = Model.extend
|
||||||
).property('_lastBuildDuration', 'lastBuildStartedAt', 'lastBuildFinishedAt')
|
).property('_lastBuildDuration', 'lastBuildStartedAt', 'lastBuildFinishedAt')
|
||||||
|
|
||||||
sortOrder: (->
|
sortOrder: (->
|
||||||
# cuz sortAscending seems buggy when set to false
|
state = @get('lastBuildState')
|
||||||
if lastBuildFinishedAt = @get('lastBuildFinishedAt')
|
if state != 'passed' && state != 'failed'
|
||||||
- new Date(lastBuildFinishedAt).getTime()
|
0
|
||||||
else
|
else
|
||||||
- new Date('9999').getTime() - parseInt(@get('lastBuildId'))
|
parseInt(@get('lastBuildId'))
|
||||||
).property('lastBuildFinishedAt', 'lastBuildId')
|
).property('lastBuildId', 'lastBuildState')
|
||||||
|
|
||||||
stats: (->
|
stats: (->
|
||||||
if @get('slug')
|
if @get('slug')
|
||||||
|
|
|
@ -9,10 +9,14 @@ Route = BasicRoute.extend
|
||||||
isLoadedBinding: 'repos.isLoaded'
|
isLoadedBinding: 'repos.isLoaded'
|
||||||
repos: @store.filter 'repo', (repo) ->
|
repos: @store.filter 'repo', (repo) ->
|
||||||
buildId = repo.get('lastBuildId')
|
buildId = repo.get('lastBuildId')
|
||||||
store.hasRecordForId('build', buildId)
|
if store.hasRecordForId('build', buildId)
|
||||||
sorted: Ember.computed.sort('repos', 'sortedReposKeys')
|
state = repo.get('lastBuild.state')
|
||||||
|
state == 'passed' || state == 'failed'
|
||||||
|
external: []
|
||||||
|
withExternal: Ember.computed.union('repos', 'external')
|
||||||
|
sorted: Ember.computed.sort('withExternal', 'sortedReposKeys')
|
||||||
content: limit('sorted', 'limit')
|
content: limit('sorted', 'limit')
|
||||||
sortedReposKeys: ['sortOrder:asc']
|
sortedReposKeys: ['sortOrder:desc']
|
||||||
limit: 3
|
limit: 3
|
||||||
).create()
|
).create()
|
||||||
|
|
||||||
|
@ -22,6 +26,12 @@ Route = BasicRoute.extend
|
||||||
@set('letMoreReposThrough', true)
|
@set('letMoreReposThrough', true)
|
||||||
, 5000
|
, 5000
|
||||||
|
|
||||||
|
setTimeout =>
|
||||||
|
unless repos.get('length')
|
||||||
|
@store.find('repo').then (reposFromRequest) ->
|
||||||
|
repos.get('external').pushObjects reposFromRequest.toArray().slice(0, 3)
|
||||||
|
, 10000
|
||||||
|
|
||||||
@_super.apply this, arguments
|
@_super.apply this, arguments
|
||||||
|
|
||||||
activate: ->
|
activate: ->
|
||||||
|
@ -40,7 +50,9 @@ Route = BasicRoute.extend
|
||||||
if @get('repos.length') < 3
|
if @get('repos.length') < 3
|
||||||
return true
|
return true
|
||||||
|
|
||||||
if event == 'build:started' && @get('letMoreReposThrough')
|
if event == 'build:finished' &&
|
||||||
|
['passed', 'failed'].indexOf(data.build.state) != -1 &&
|
||||||
|
@get('letMoreReposThrough')
|
||||||
@set('letMoreReposThrough', false)
|
@set('letMoreReposThrough', false)
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
|
|
@ -340,14 +340,20 @@
|
||||||
padding-left: 30px
|
padding-left: 30px
|
||||||
|
|
||||||
ul
|
ul
|
||||||
list-style-image: url('../images/landing-page/features-check.svg')
|
@include resetul
|
||||||
padding-left: 1.5em
|
margin-top: 1.6rem;
|
||||||
|
|
||||||
li
|
li
|
||||||
font-color: #606162
|
font-color: #606162
|
||||||
font-size: 1.7em
|
font-size: 1.7em
|
||||||
line-height: 1.7em
|
line-height: 1.7em
|
||||||
font-weight: 300
|
&:before
|
||||||
|
@extend %icon
|
||||||
|
content: ""
|
||||||
|
background-image: url('../images/landing-page/features-check.svg')
|
||||||
|
width: 0.7em
|
||||||
|
height: 0.7em
|
||||||
|
margin-right: .3em
|
||||||
|
|
||||||
.build-flows
|
.build-flows
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
|
@ -52,9 +52,6 @@
|
||||||
margin-bottom: -99999px
|
margin-bottom: -99999px
|
||||||
padding-bottom: 100034px
|
padding-bottom: 100034px
|
||||||
|
|
||||||
#left
|
|
||||||
z-index: -1
|
|
||||||
|
|
||||||
@media #{$large-up}
|
@media #{$large-up}
|
||||||
|
|
||||||
#left, #right, .wrapper-main
|
#left, #right, .wrapper-main
|
||||||
|
|
|
@ -7,6 +7,7 @@ a
|
||||||
text-decoration : none
|
text-decoration : none
|
||||||
|
|
||||||
footer
|
footer
|
||||||
|
position: relative
|
||||||
padding : 20px 0
|
padding : 20px 0
|
||||||
background-color : $footer-bg-color
|
background-color : $footer-bg-color
|
||||||
min-height : 334px
|
min-height : 334px
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
.icon
|
%icon
|
||||||
width: 1em
|
|
||||||
height: 1em
|
|
||||||
display: inline-block
|
display: inline-block
|
||||||
background:
|
background:
|
||||||
size: 100%
|
size: 100%
|
||||||
repeat: no-repeat
|
repeat: no-repeat
|
||||||
|
|
||||||
|
.icon
|
||||||
|
width: 1em
|
||||||
|
height: 1em
|
||||||
|
@extend %icon
|
||||||
|
|
||||||
.icon-cal,
|
.icon-cal,
|
||||||
.icon--cal
|
.icon--cal
|
||||||
background-image: inline-image('svg/finished-icon.svg')
|
background-image: inline-image('svg/finished-icon.svg')
|
||||||
|
|
|
@ -169,7 +169,7 @@ class Travis::Web::App
|
||||||
end
|
end
|
||||||
|
|
||||||
def title
|
def title
|
||||||
default_title = "Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community"
|
default_title = "Travis CI - Test and deploy your code in confidence"
|
||||||
ENV['SITE_TITLE'] || default_title
|
ENV['SITE_TITLE'] || default_title
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user