Merge branch 'landing-page' of github.com:travis-ci/travis-web into landing-page

This commit is contained in:
Justine Arreche 2015-04-07 15:02:55 +02:00
commit 8751635071
7 changed files with 38 additions and 19 deletions

View File

@ -108,12 +108,12 @@ Repo = Model.extend
).property('_lastBuildDuration', 'lastBuildStartedAt', 'lastBuildFinishedAt')
sortOrder: (->
# cuz sortAscending seems buggy when set to false
if lastBuildFinishedAt = @get('lastBuildFinishedAt')
- new Date(lastBuildFinishedAt).getTime()
state = @get('lastBuildState')
if state != 'passed' && state != 'failed'
0
else
- new Date('9999').getTime() - parseInt(@get('lastBuildId'))
).property('lastBuildFinishedAt', 'lastBuildId')
parseInt(@get('lastBuildId'))
).property('lastBuildId', 'lastBuildState')
stats: (->
if @get('slug')

View File

@ -9,10 +9,14 @@ Route = BasicRoute.extend
isLoadedBinding: 'repos.isLoaded'
repos: @store.filter 'repo', (repo) ->
buildId = repo.get('lastBuildId')
store.hasRecordForId('build', buildId)
sorted: Ember.computed.sort('repos', 'sortedReposKeys')
if store.hasRecordForId('build', buildId)
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')
sortedReposKeys: ['sortOrder:asc']
sortedReposKeys: ['sortOrder:desc']
limit: 3
).create()
@ -22,6 +26,12 @@ Route = BasicRoute.extend
@set('letMoreReposThrough', true)
, 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
activate: ->
@ -40,7 +50,9 @@ Route = BasicRoute.extend
if @get('repos.length') < 3
return true
if event == 'build:started' && @get('letMoreReposThrough')
if event == 'build:finished' &&
['passed', 'failed'].indexOf(data.build.state) != -1 &&
@get('letMoreReposThrough')
@set('letMoreReposThrough', false)
return true

View File

@ -340,14 +340,20 @@
padding-left: 30px
ul
list-style-image: url('../images/landing-page/features-check.svg')
padding-left: 1.5em
@include resetul
margin-top: 1.6rem;
li
font-color: #606162
font-size: 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
text-align: center

View File

@ -52,9 +52,6 @@
margin-bottom: -99999px
padding-bottom: 100034px
#left
z-index: -1
@media #{$large-up}
#left, #right, .wrapper-main

View File

@ -7,6 +7,7 @@ a
text-decoration : none
footer
position: relative
padding : 20px 0
background-color : $footer-bg-color
min-height : 334px

View File

@ -1,11 +1,14 @@
.icon
width: 1em
height: 1em
%icon
display: inline-block
background:
size: 100%
repeat: no-repeat
.icon
width: 1em
height: 1em
@extend %icon
.icon-cal,
.icon--cal
background-image: inline-image('svg/finished-icon.svg')

View File

@ -169,7 +169,7 @@ class Travis::Web::App
end
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
end