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
......@@ -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>"
else ""
courseCtx posts title =
listField "posts" postCtx (return posts)
`mappend` constField "title" title
`mappend` defaultContext
archiveCtx posts =
listField "posts" postCtx (return posts)
`mappend` constField "title" "Archives"
......@@ -71,7 +76,7 @@ static = do
resize :: Rules ()
resize = do
match "img/thumbnails/**" $ do
match "img/thumbnails/**.png" $ do
route idRoute
compile $ loadImage
>>= scaleImageCompiler 140 140
......@@ -119,7 +124,7 @@ conc = do
compile $ do
posts <- recentFirst =<< loadAll "cours/*"
makeItem ""
>>= loadAndApplyTemplate "templates/archive.html" (archiveCtx posts)
>>= loadAndApplyTemplate "templates/archive.html" (courseCtx posts "Programmation concurrente")
>>= relativizeUrls
index :: Rules ()
......
......@@ -19,7 +19,7 @@
<ul class="dropdown-menu">
<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 concurrente</a></li>
<li><a href="/prog_conc.html">Programmation concurrente</a></li>
<li class="divider"></li>
<li class="dropdown-header">Archivés</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