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

added hakyll images. don't know hot to use it yet...

parent db8a1b92
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,9 @@ import Text.Pandoc
import qualified Data.Map as M
import Data.Maybe (isJust)
import Text.Pandoc.Highlighting
import Hakyll.Images ( loadImage
, scaleImageCompiler
)
--------------------------------------------------------------------
-- Contexts
......@@ -67,6 +69,13 @@ static = do
route idRoute
compile $ copyFileCompiler
resize :: Rules ()
resize = do
match "img/**.png" $ do
route idRoute
compile $ loadImage
>>= scaleImageCompiler 140 140
pages :: Rules ()
pages = do
match "pages/*" $ do
......@@ -184,7 +193,6 @@ cfg = defaultConfiguration
main :: IO ()
main = hakyllWith cfg $ do
static
pages
posts
cours
......@@ -192,3 +200,5 @@ main = hakyllWith cfg $ do
archive
index
templates
static
......@@ -3,8 +3,8 @@ version: 0.1.0.0
license: MIT
license-file: LICENSE
category: Web
author: Stephen Diehl
maintainer: stephen.m.diehl@gmail.com
author: Orestis Malaspinas
maintainer: orestis.malaspinas@hesge.ch
build-type: Simple
cabal-version: >=1.16
......@@ -17,3 +17,4 @@ executable blog
, pandoc
, pandoc-crossref
, hakyll
, hakyll-images
......@@ -35,7 +35,7 @@
<div class="carousel-caption">
<h1></h1>
<p></p>
<p><a class="btn btn-lg btn-primary" href="/pages/signup.html" role="button">Sign up today</a></p>
<p><a class="btn btn-lg btn-primary" href="https://www.palabos.org" role="button">Palabos</a></p>
</div>
</div>
</div>
......@@ -45,7 +45,7 @@
<div class="carousel-caption">
<h1></h1>
<p></p>
<p><a class="btn btn-lg btn-primary" href="#" role="button">Learn more</a></p>
<p><a class="btn btn-lg btn-primary" href="https://www.mixer.com/omhepia" role="button">Live stream</a></p>
</div>
</div>
</div>
......@@ -71,8 +71,8 @@
<div class="row">
<div class="col-lg-4">
<img class="img-circle" data-src="holder.js/140x140" alt="Generic placeholder image">
<h2>Heading 1</h2>
<img src="img/boltzmann.png" class="img-circle" data-src="img/boltzmann.png" alt="Generic placeholder image" src='./boltzmann.png'>
<h2>Palabos</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Nullam non est in neque luctus eleifend. Sed
tincidunt vestibulum facilisis. Aenean ut pulvinar massa.
......
......@@ -43,6 +43,7 @@ extra-deps:
- pandoc-crossref-0.3.6.2
- data-accessor-template-0.2.1.16
- roman-numerals-0.5.1.5
- hakyll-images-0.4.4
# Override default flag values for local packages and extra-deps
# flags: {}
......
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