1
0
mirror of https://github.com/avinal/avinal.github.io.git synced 2026-07-03 23:30:09 +05:30

fix url resolution error

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
2022-09-13 02:59:39 +05:30
parent 5fd42929ae
commit d71d020d85
2 changed files with 18 additions and 9 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ jobs:
- name: checkout
uses: actions/checkout@v3
- name: build
run: elm make src/Main.elm --output public/app.js --optimize
run: elm make src/Main.elm --output public/app.js --debug
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
+17 -8
View File
@@ -50,7 +50,7 @@ view model =
[ div [ class "main-wrapper" ]
[ viewToc model.success
, main_ [ class "main-content", id "content" ]
[ viewArticle ]
[ viewArticle model.success ]
]
]
]
@@ -83,18 +83,27 @@ viewToc show =
div [] []
viewArticle : Html Msg
viewArticle =
viewArticle : Bool -> Html Msg
viewArticle show =
article
[ class "main-page-content" ]
[ div [ id "insert-here" ] []
, viewMetadata
, viewMetadata show
]
viewMetadata : Html Msg
viewMetadata =
aside [ class "metadata" ]
viewMetadata : Bool -> Html Msg
viewMetadata show =
aside
[ class "metadata"
, style "display"
(if show then
"block"
else
"none"
)
]
[ div [ class "metadata-content-container" ]
[ div [ class "on-github" ]
[ h3 [] [ text "Found a problem" ]
@@ -150,7 +159,7 @@ finalUrl slug =
_ ->
"https://raw.githubusercontent.com/avinal/"
++ urlPrefix
++ "/content/posts/"
++ "/main/content/posts/"
++ resolvedSlug
++ ".md"