diff --git a/hakyll-bootstrap/Main.hs b/hakyll-bootstrap/Main.hs index 0d9d50b5326113e0e1049e08a64fa4f610b1b435..a8484aa44c16f2dcd7f7b9428197aec85ed32349 100644 --- a/hakyll-bootstrap/Main.hs +++ b/hakyll-bootstrap/Main.hs @@ -78,7 +78,7 @@ main = hakyllWith config $ do compile $ do posts <- recentFirst =<< loadAll ("cours/isc_physics/*.markdown" .&&. hasNoVersion) makeItem "" - >>= loadAndApplyTemplate "templates/archive.html" (courseCtx posts "Physique appliquée" "cours/isc_physics/cours.pdf") + >>= loadAndApplyTemplate "templates/course.html" (courseCtx posts "Physique appliquée" "cours/isc_physics/cours.pdf") >>= relativizeUrls -- Math Tech Info posts @@ -104,7 +104,7 @@ main = hakyllWith config $ do compile $ do posts <- recentFirst =<< loadAll ("cours/math_tech_info/*.markdown" .&&. hasNoVersion) makeItem "" - >>= loadAndApplyTemplate "templates/archive.html" (courseCtx posts "Mathématiques en technologie de l'information" "cours/math_tech_info/cours.pdf") + >>= loadAndApplyTemplate "templates/course.html" (courseCtx posts "Mathématiques en technologie de l'information" "cours/math_tech_info/cours.pdf") >>= relativizeUrls -- Phys app posts @@ -167,7 +167,7 @@ main = hakyllWith config $ do compile $ do posts <- recentFirst =<< loadAll "posts/bachelor/*.md" makeItem "" - >>= loadAndApplyTemplate "templates/archive.html" (pagesCtx posts "Bachelor projects") + >>= loadAndApplyTemplate "templates/page.html" (pagesCtx posts "Bachelor projects") >>= relativizeUrls -- Render some static pages diff --git a/hakyll-bootstrap/templates/archive.html b/hakyll-bootstrap/templates/archive.html index c681d7026ead1f9f7951662436d2f8eac8a816b9..0ec1e09982b0094e2ac4fe255ff42dd3755bf71c 100644 --- a/hakyll-bootstrap/templates/archive.html +++ b/hakyll-bootstrap/templates/archive.html @@ -23,10 +23,6 @@ <div class="container"> <h1>$title$</h1> - $if(pdfurl)$ - <h3><a href="$pdfurl$">Le polycopié en entier [pdf]</a></h3> - $endif$ - <h2>Les chapitres</h2> <ul> $for(posts)$ <li> diff --git a/hakyll-bootstrap/templates/course.html b/hakyll-bootstrap/templates/course.html new file mode 100644 index 0000000000000000000000000000000000000000..c681d7026ead1f9f7951662436d2f8eac8a816b9 --- /dev/null +++ b/hakyll-bootstrap/templates/course.html @@ -0,0 +1,45 @@ +<!DOCTYPE HTML> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="description" content=""> + <meta name="author" content=""> + <title>$title$</title> + <link href="/css/bootstrap.css" rel="stylesheet"> + <link href="/css/syntax.css" rel="stylesheet"> + <link href="/css/carousel.css" rel="stylesheet"> + <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> + <style> + body { + font-family: 'Open Sans', sans-serif; + } + body { margin-top: 80px; } + footer { margin-top: 80px; } + </style> + </head> + <body> + $partial("templates/nav.html")$ + + <div class="container"> + <h1>$title$</h1> + $if(pdfurl)$ + <h3><a href="$pdfurl$">Le polycopié en entier [pdf]</a></h3> + $endif$ + <h2>Les chapitres</h2> + <ul> + $for(posts)$ + <li> + <a href="$url$">$title$</a> - $date$ + </li> + $endfor$ + </ul> + $partial("templates/footer.html")$ + </div> + + </div><!-- /.container --> + <script src="/js/jquery.js"></script> + <script src="/js/bootstrap.js"></script> + <script src="/js/holder.js"></script> + </body> +</html>