update app css

This commit is contained in:
nganhkhoa 2023-12-17 04:04:06 +07:00
parent 325d674114
commit 2e7b2ac37d
3 changed files with 16 additions and 7 deletions

View File

@ -7,6 +7,7 @@ import FatalError exposing (FatalError)
import Head
import Head.Seo as Seo
import Html.Styled exposing (..)
import Html.Styled.Attributes exposing (style)
import Json.Decode as Decode exposing (Decoder)
import Json.Decode.Extra
import Pages.Url
@ -85,16 +86,24 @@ view app shared =
, body =
[ Link.link (Link.internal (Route.Index)) []
[ text "Home" ]
, div [] (app.data |> List.map renderBlogItem)
, div
[ style "margin-top" "10px" ]
(app.data |> List.map renderBlogItem)
]
}
renderBlogItem : (Route, Article.ArticleMetadata) -> Html msg
renderBlogItem (route_, article) =
Link.link (Link.internal route_) []
[ div []
[ div []
[ text article.title
]
Link.link (Link.internal route_) [ style "text-decoration" "none" ]
[ div
[ style "display" "flex"
, style "justify-content" "space-between"
-- , style "margin-left" "50px"
-- , style "margin-right" "50px"
-- , style "margin" "auto"
, style "max-width" "550px"
]
[ p [] [text article.title]
, p [] [text (Date.toIsoString article.published)]
]
]

View File

@ -112,7 +112,7 @@ view app shared =
, text "You can find out more about me in my "
, Link.link (Link.external cvpdf) [Attributes.target "_blank"] [text "CV."]
, br [] []
, text "I often write blogs, most of them are based on my research knowledge."
, text "I often write blogs, most of them are based on my research knowledge. "
, text "You can find my blogs "
, Link.link (Link.internal (Route.Blog__Slug_ { slug = "" })) [] [ text "here." ]
, br [] []

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B