Implement initial version of start page.
This commit is contained in:
61
src/Start/Custom.elm
Normal file
61
src/Start/Custom.elm
Normal file
@@ -0,0 +1,61 @@
|
||||
module Start.Custom exposing (tabs)
|
||||
import Start.Model exposing (Tab)
|
||||
import FeatherIcons
|
||||
|
||||
tabs : List Tab
|
||||
tabs =
|
||||
[
|
||||
{ name = "Gitea"
|
||||
, color = "#66c485"
|
||||
, icon = FeatherIcons.gitMerge
|
||||
, link = "https://dev.danilafe.com"
|
||||
}
|
||||
,
|
||||
{ name = "GitHub"
|
||||
, color = "#b188c9"
|
||||
, icon = FeatherIcons.github
|
||||
, link = "https://github.com"
|
||||
}
|
||||
,
|
||||
{ name = "Blog"
|
||||
, color = "#7dbce0"
|
||||
, icon = FeatherIcons.alignLeft
|
||||
, link = "https://danilafe.com"
|
||||
}
|
||||
,
|
||||
{ name = "Projects"
|
||||
, color = "#e08fa1"
|
||||
, icon = FeatherIcons.box
|
||||
, link = "http://project.danilafe.com"
|
||||
}
|
||||
,
|
||||
{ name = "Finance"
|
||||
, color = "#d7e076"
|
||||
, icon = FeatherIcons.dollarSign
|
||||
, link = "http://finance.danilafe.com"
|
||||
}
|
||||
,
|
||||
{ name = "Scylla"
|
||||
, color = "#efb05d"
|
||||
, icon = FeatherIcons.messageSquare
|
||||
, link = "https://scylla.danilafe.com"
|
||||
}
|
||||
,
|
||||
{ name = "Canvas"
|
||||
, color = "#ce665c"
|
||||
, icon = FeatherIcons.bookOpen
|
||||
, link = "https://oregonstate.instructure.com"
|
||||
}
|
||||
,
|
||||
{ name = "MyDegrees"
|
||||
, color = "#db8cc3"
|
||||
, icon = FeatherIcons.user
|
||||
, link = "https://mydegrees.oregonstate.edu"
|
||||
}
|
||||
,
|
||||
{ name = "Email"
|
||||
, color = "#7b77d6"
|
||||
, icon = FeatherIcons.mail
|
||||
, link = "https://mail.google.com/mail/u/0"
|
||||
}
|
||||
]
|
||||
@@ -1,5 +1,13 @@
|
||||
module Start.Model exposing (Flags, Model, Msg)
|
||||
module Start.Model exposing (Flags, Model, Msg, Tab)
|
||||
import FeatherIcons
|
||||
|
||||
type alias Flags = ()
|
||||
type alias Model = ()
|
||||
type alias Msg = ()
|
||||
|
||||
type alias Tab =
|
||||
{ name : String
|
||||
, color : String
|
||||
, icon : FeatherIcons.Icon
|
||||
, link : String
|
||||
}
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
module Start.View exposing (view)
|
||||
import Start.Model exposing (Model, Msg)
|
||||
import Html exposing (Html, text)
|
||||
import Start.Model exposing (Model, Msg, Tab)
|
||||
import Start.Custom exposing (tabs)
|
||||
import Html exposing (Html, text, div, span, h1, a)
|
||||
import Html.Attributes exposing (class, style, href)
|
||||
import Html.Events exposing (onClick)
|
||||
import FeatherIcons
|
||||
|
||||
view : Model -> List (Html Msg)
|
||||
view () = [ text "Hello, world!" ]
|
||||
view () =
|
||||
[ div [ class "tab-container" ] <|
|
||||
h1 [] [ text "Welcome." ] :: List.map viewTab tabs
|
||||
]
|
||||
|
||||
viewTab : Tab -> Html Msg
|
||||
viewTab t =
|
||||
a [ class "tab", style "border-color" t.color, href t.link ]
|
||||
[ FeatherIcons.toHtml [] t.icon
|
||||
, span [ class "tab-title" ] [ text t.name ]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user