Skip to content

Commit

Permalink
enhancement(builds): tweak no builds message (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3r authored Feb 13, 2020
1 parent 322f07c commit a4fad1d
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 13 deletions.
53 changes: 43 additions & 10 deletions src/elm/Pages/Builds.elm
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,62 @@ Use of this source code is governed by the LICENSE file in this repository.

module Pages.Builds exposing (view)

import Html exposing (Html, div, h1, p, text)
import Html.Attributes exposing (class)
import Html
exposing
( Html
, a
, br
, code
, div
, em
, h1
, li
, ol
, p
, text
)
import Html.Attributes exposing (class, href)
import Pages.Build exposing (viewPreview)
import RemoteData exposing (RemoteData(..))
import Time exposing (Posix)
import Util exposing (largeLoader)
import Vela exposing (BuildsModel)
import Vela exposing (BuildsModel, Org, Repo)


{-| view : takes org and repo and renders build previews
-}
view : BuildsModel -> Posix -> String -> String -> Html msg
view : BuildsModel -> Posix -> Org -> Repo -> Html msg
view buildsModel now org repo =
let
settingsLink : String
settingsLink =
"/" ++ String.join "/" [ org, repo ] ++ "/settings"

none : Html msg
none =
div []
[ h1 []
[ text "No Builds Found"
]
, p []
[ text <|
"Builds sent to Vela will show up here."
[ h1 [] [ text "Your respository has been added!" ]
, p [] [ text "Builds will show up here once you have:" ]
, ol [ class "list" ]
[ li []
[ text "A "
, code [] [ text ".vela.yml" ]
, text " file that describes your build pipeline in the root of your repository."
, br [] []
, a [ href "https://go-vela.github.io/docs/usage/getting-started/write_pipeline/" ] [ text "Review the documentation" ]
, text " for help or "
, a [ href "https://go-vela.github.io/docs/usage/pipeline/examples/" ] [ text "check some of the pipeline examples" ]
, text "."
]
, li []
[ text "Triggered one of the "
, a [ href settingsLink ] [ text "configured webhook events" ]
, text " by performing the respective action via "
, em [] [ text "Git" ]
, text "."
]
]
, p [] [ text "Happy building!" ]
]
in
case buildsModel.builds of
Expand Down
15 changes: 12 additions & 3 deletions src/scss/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,8 @@ nav {
align-items: center;

&.-no-pad {
padding: 0;
margin: 0;
padding: 0;
}
}

Expand All @@ -569,8 +569,8 @@ nav {
}

.recent-build-link {
/*
maintain link functionality when
/*
maintain link functionality when
using pointer-events: none; on the container
*/
pointer-events: initial;
Expand Down Expand Up @@ -1166,3 +1166,12 @@ nav {

background: var(--color-bg-light);
}

// class for basic list styling
.list {
font-size: 1rem;

li {
margin-bottom: 1rem;
}
}

0 comments on commit a4fad1d

Please sign in to comment.