diff --git a/hakyll-bootstrap/Main.hs b/hakyll-bootstrap/Main.hs index 6780e311555b87e9650da3e533b264074201beb5..4874edd97cfd8f2fb2fc1237da2ffeb4fc72b1ba 100644 --- a/hakyll-bootstrap/Main.hs +++ b/hakyll-bootstrap/Main.hs @@ -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 + diff --git a/hakyll-bootstrap/hakyll-bootstrap.cabal b/hakyll-bootstrap/hakyll-bootstrap.cabal index 84928cdabfa3804c70c5cc2c74fcd818af4ea1a2..47a2a24625ba00f54fca3dc95b0422d689700b3c 100644 --- a/hakyll-bootstrap/hakyll-bootstrap.cabal +++ b/hakyll-bootstrap/hakyll-bootstrap.cabal @@ -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 diff --git a/hakyll-bootstrap/index.html b/hakyll-bootstrap/index.html index da626039489cc18090023566df0cb5143e26b07f..85f77ad33715b4f6035e3613532c5a35cca507a8 100644 --- a/hakyll-bootstrap/index.html +++ b/hakyll-bootstrap/index.html @@ -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. diff --git a/hakyll-bootstrap/stack.yaml b/hakyll-bootstrap/stack.yaml index 7a0950d4822bbe21a55b276f1bc8b27dcbbcee17..7a0e8add753e09754880decce57360e2c63c8205 100644 --- a/hakyll-bootstrap/stack.yaml +++ b/hakyll-bootstrap/stack.yaml @@ -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: {}