Add part7
This commit is contained in:
16
part7/src/Views/Author.elm
Normal file
16
part7/src/Views/Author.elm
Normal file
@@ -0,0 +1,16 @@
|
||||
module Views.Author exposing (view)
|
||||
|
||||
{-| View an author. We basically render their username and a link to their
|
||||
profile, and that's it.
|
||||
-}
|
||||
|
||||
import Data.User as User exposing (Username)
|
||||
import Html exposing (Html, a)
|
||||
import Html.Attributes exposing (attribute, class, href, id, placeholder)
|
||||
import Route exposing (Route)
|
||||
|
||||
|
||||
view : Username -> Html msg
|
||||
view username =
|
||||
a [ class "author", Route.href (Route.Profile username) ]
|
||||
[ User.usernameToHtml username ]
|
||||
Reference in New Issue
Block a user