Skip to content
Snippets Groups Projects
Commit 8550442d authored by orestis.malaspin's avatar orestis.malaspin
Browse files

added class ctxt

parent 59d3b861
No related branches found
No related tags found
No related merge requests found
Pipeline #11541 passed
...@@ -40,6 +40,11 @@ mathCtx = field "mathjax" $ \item -> do ...@@ -40,6 +40,11 @@ mathCtx = field "mathjax" $ \item -> do
then "<script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML\"></script>" then "<script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML\"></script>"
else "" else ""
courseCtx posts title =
listField "posts" postCtx (return posts)
`mappend` constField "title" title
`mappend` defaultContext
archiveCtx posts = archiveCtx posts =
listField "posts" postCtx (return posts) listField "posts" postCtx (return posts)
`mappend` constField "title" "Archives" `mappend` constField "title" "Archives"
...@@ -71,7 +76,7 @@ static = do ...@@ -71,7 +76,7 @@ static = do
resize :: Rules () resize :: Rules ()
resize = do resize = do
match "img/thumbnails/**" $ do match "img/thumbnails/**.png" $ do
route idRoute route idRoute
compile $ loadImage compile $ loadImage
>>= scaleImageCompiler 140 140 >>= scaleImageCompiler 140 140
...@@ -119,7 +124,7 @@ conc = do ...@@ -119,7 +124,7 @@ conc = do
compile $ do compile $ do
posts <- recentFirst =<< loadAll "cours/*" posts <- recentFirst =<< loadAll "cours/*"
makeItem "" makeItem ""
>>= loadAndApplyTemplate "templates/archive.html" (archiveCtx posts) >>= loadAndApplyTemplate "templates/archive.html" (courseCtx posts "Programmation concurrente")
>>= relativizeUrls >>= relativizeUrls
index :: Rules () index :: Rules ()
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="#">Mathématiques en technologie de l'information</a></li> <li><a href="#">Mathématiques en technologie de l'information</a></li>
<li><a href="#">Programmation séquentielle en C</a></li> <li><a href="#">Programmation séquentielle en C</a></li>
<li><a href="#">Programmation concurrente</a></li> <li><a href="/prog_conc.html">Programmation concurrente</a></li>
<li class="divider"></li> <li class="divider"></li>
<li class="dropdown-header">Archivés</li> <li class="dropdown-header">Archivés</li>
<li><a href="#">Sciences orientation logicielle</a></li> <li><a href="#">Sciences orientation logicielle</a></li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment