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