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
import Head.Seo as Seo import Head.Seo as Seo
import Html.Styled exposing (..) import Html.Styled exposing (..)
import Html.Styled.Attributes exposing (style)
import Json.Decode as Decode exposing (Decoder) import Json.Decode as Decode exposing (Decoder)
import Json.Decode.Extra import Json.Decode.Extra
import Pages.Url import Pages.Url
@ -85,16 +86,24 @@ view app shared =
, body = , body =
[ Link.link (Link.internal (Route.Index)) [] [ Link.link (Link.internal (Route.Index)) []
[ text "Home" ] [ 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.ArticleMetadata) -> Html msg
renderBlogItem (route_, article) = renderBlogItem (route_, article) =
Link.link (Link.internal route_) [] Link.link (Link.internal route_) [ style "text-decoration" "none" ]
[ div [] [ div
[ div [] [ style "display" "flex"
[ text article.title , 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 " , text "You can find out more about me in my "
, Link.link (Link.external cvpdf) [Attributes.target "_blank"] [text "CV."] , Link.link (Link.external cvpdf) [Attributes.target "_blank"] [text "CV."]
, br [] [] , 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 " , text "You can find my blogs "
, Link.link (Link.internal (Route.Blog__Slug_ { slug = "" })) [] [ text "here." ] , Link.link (Link.internal (Route.Blog__Slug_ { slug = "" })) [] [ text "here." ]
, br [] [] , br [] []

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B