mirror of
https://github.com/avinal/avinal.github.io.git
synced 2026-07-03 23:30:09 +05:30
@@ -3,7 +3,7 @@
|
||||
"title": "The Big Red Ants",
|
||||
"date": "2012-02-27 22:47",
|
||||
"category": "article",
|
||||
"description": "The Big Red Ants",
|
||||
"description": "As I observed them making and reparing their nests, I concluded that they are laborious and intellectual. They create their nests bybinding two or more leaves (maybe up to 500) together. They stich the leaves using a stinky white substance either excreted by themselves or from trees.",
|
||||
"slug": "big-red-ants"
|
||||
},
|
||||
{
|
||||
@@ -31,7 +31,7 @@
|
||||
"title": "Google Summer of Code 2021",
|
||||
"date": "2021-08-19 23:07",
|
||||
"category": "development",
|
||||
"description": "This is the final report of my Google Summer of Code 2021 at The FOSSology Project.",
|
||||
"description": "This is the final report of my Google Summer of Code 2021 at The FOSSology Project. One of the major improvements over the previous build system is faster build times. CMake generates parallel build-enabled configurations for all generators.",
|
||||
"slug": "final-evaulation"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"dependencies": {
|
||||
"direct": {
|
||||
"MaybeJustJames/yaml": "2.1.2",
|
||||
"NoRedInk/elm-json-decode-pipeline": "1.0.1",
|
||||
"elm/browser": "1.0.2",
|
||||
"elm/core": "1.0.5",
|
||||
"elm/html": "1.0.0",
|
||||
|
||||
+8
-11
@@ -5,7 +5,6 @@ import Html exposing (..)
|
||||
import Html.Attributes exposing (class, datetime, href, id, src, style)
|
||||
import Http exposing (Error(..))
|
||||
import Json.Decode as Json
|
||||
import Json.Decode.Pipeline exposing (required)
|
||||
import Url exposing (Protocol(..))
|
||||
import Yaml.Decode as Yaml
|
||||
|
||||
@@ -166,20 +165,18 @@ viewBlogListItem meta =
|
||||
, div [ class "foo-term-story" ]
|
||||
[ div []
|
||||
[ span []
|
||||
[ i [ class "fa-regular fa-clock" ] []
|
||||
[ i [ class "fa-regular fa-clock" ] [ text " " ]
|
||||
, time [ datetime meta.date ] [ text meta.date ]
|
||||
, text " in "
|
||||
, i [ class "fa-regular fa-folder-open" ] []
|
||||
, i [ class "fa-regular fa-folder-open" ] [ text " " ]
|
||||
, a [ href ("/posts/" ++ meta.category) ]
|
||||
[ text meta.category ]
|
||||
]
|
||||
]
|
||||
, br [] []
|
||||
, h2 []
|
||||
[ a [ href ("/posts/" ++ meta.category ++ "/" ++ meta.slug) ]
|
||||
[ text meta.title ]
|
||||
]
|
||||
, br [] []
|
||||
, p [] [ text meta.description ]
|
||||
]
|
||||
]
|
||||
@@ -303,12 +300,12 @@ getPostLists url =
|
||||
|
||||
jsonMetaDecoder : Json.Decoder JsonMeta
|
||||
jsonMetaDecoder =
|
||||
required "title" Json.string <|
|
||||
required "date" Json.string <|
|
||||
required "description" Json.string <|
|
||||
required "category" Json.string <|
|
||||
required "slug" Json.string <|
|
||||
Json.succeed JsonMeta
|
||||
Json.map5 JsonMeta
|
||||
(Json.field "title" Json.string)
|
||||
(Json.field "date" Json.string)
|
||||
(Json.field "description" Json.string)
|
||||
(Json.field "category" Json.string)
|
||||
(Json.field "slug" Json.string)
|
||||
|
||||
|
||||
getMarkdown : String -> Cmd Msg
|
||||
|
||||
Reference in New Issue
Block a user