Skip to content

Commit

Permalink
fix generated CSS path
Browse files Browse the repository at this point in the history
  • Loading branch information
monofon committed Jan 10, 2025
1 parent 6fb89f2 commit 163e842
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Text/Decker/Exam/Render.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import Text.Decker.Writer.Layout

compileQuestionToHtml :: Meta -> FilePath -> Question -> Action Question
compileQuestionToHtml meta base quest = do
traverseOf qstTitle render
traverseOf qstTitle render
=<< traverseOf qstQuestion render
=<< traverseOf qstAnswer (compileAnswerToHtml meta base) quest
where
Expand All @@ -68,6 +68,7 @@ renderSnippetToHtml meta base markdown = do
filtered <-
mergeDocumentMeta (setMetaValue "decker.use-data-src" False meta) pandoc
>>= adjustResourcePathsA base
-- >>= (\p -> print p >> return p)
>>= deckerMediaFilter (Disposition Page Html) base
liftIO $ handleError $ runPure $ writeHtml45String options meta $ walk dropPara filtered

Expand Down Expand Up @@ -168,7 +169,7 @@ renderQuestionBrowser base questions = do
H.script ! A.type_ "module" ! A.src "/support/js/catalog.js" $ ""
H.script ! A.src "/support/vendor/mathjax/tex-svg.js" $ ""
H.script ! A.src "/support/js/reload.js" $ ""
H.link ! A.rel "stylesheet" ! A.href "/support/js/catalog.css"
H.link ! A.rel "stylesheet" ! A.href "/support/css/catalog.css"
H.body $ do
H.header $ do
H.h1 ("Question Browser (" <> show (length questions) <> ")")
Expand Down Expand Up @@ -214,7 +215,7 @@ renderQuestionBrowser base questions = do
H.div
! A.dataAttribute "lecture" (toValue lid)
! A.dataAttribute "topic" (toValue tid)
$ toHtml $ map (questButton) quests
$ toHtml $ map questButton quests

groupQuestions :: [Question] -> [(Text, [(Text, [Question])])]
groupQuestions questions = sorted
Expand Down Expand Up @@ -255,6 +256,5 @@ renderCatalog meta files out =
putInfo $ "# catalog (for " <> out <> ")"
questions <- liftIO $ mapM readQuestion files
mapM (compileQuestionToHtml meta base) questions
-- >>= renderQuestionCatalog base
>>= renderQuestionBrowser base
>>= (liftIO . Text.writeFile out)

0 comments on commit 163e842

Please sign in to comment.