2020-11-16 02:52:38 +00:00
|
|
|
module Layout exposing (basic, template)
|
2020-11-15 21:53:45 +00:00
|
|
|
|
|
|
|
import Browser exposing (Document)
|
|
|
|
import Html exposing (Html, a, div, h1, main_, nav, text)
|
|
|
|
import Html.Attributes exposing (class, href)
|
|
|
|
|
|
|
|
|
2020-11-16 02:52:38 +00:00
|
|
|
basic : String -> List (Html msg) -> Document msg
|
|
|
|
basic title body =
|
|
|
|
{ title = title
|
|
|
|
, body =
|
|
|
|
[ main_
|
|
|
|
[]
|
|
|
|
([ nav
|
|
|
|
[ class "nav" ]
|
|
|
|
[ a [ href "/" ] [ text "Mi" ]
|
|
|
|
, text " - "
|
|
|
|
, a [ href "/login" ] [ text "Login" ]
|
|
|
|
]
|
|
|
|
, h1 [] [ text title ]
|
|
|
|
]
|
|
|
|
++ body
|
|
|
|
)
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-15 21:53:45 +00:00
|
|
|
template : String -> List (Html msg) -> Document msg
|
|
|
|
template title body =
|
|
|
|
{ title = title
|
|
|
|
, body =
|
|
|
|
[ main_
|
|
|
|
[]
|
|
|
|
([ nav
|
|
|
|
[ class "nav" ]
|
|
|
|
[ a [ href "/" ] [ text "Mi" ]
|
|
|
|
, text " - "
|
|
|
|
, a [ href "/posse" ] [ text "POSSE" ]
|
|
|
|
, text " - "
|
|
|
|
, a [ href "/switches" ] [ text "Switches" ]
|
2020-12-31 04:23:12 +00:00
|
|
|
, text " - "
|
|
|
|
, a [ href "/packages" ] [ text "Packages" ]
|
|
|
|
, text " - "
|
|
|
|
, a [ href "/webmentions" ] [ text "WebMentions" ]
|
2020-11-15 21:53:45 +00:00
|
|
|
]
|
|
|
|
, h1 [] [ text title ]
|
|
|
|
]
|
|
|
|
++ body
|
|
|
|
)
|
|
|
|
]
|
|
|
|
}
|