better preview image integration

This commit is contained in:
nek0 2015-09-28 01:23:08 +02:00
parent 8a191cd529
commit 7e52a12226
2 changed files with 1 additions and 2 deletions

View file

@ -59,7 +59,6 @@ getMediumR mediumId = do
, CommentParent !=. Nothing ]
[ Desc CommentTime ]
let dataWidth = if mediumWidth medium >= 850 then 850 else mediumWidth medium
let tr = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumThumb medium) []
let pr = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumPreview medium) []
let ir = StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumPath medium) []
formLayout $ do

View file

@ -7,7 +7,7 @@
<div id="header" class="item image" data-width=#{dataWidth}>
<div class="inner">
<a href=@{ir}>
<img sizes="(min-width: 40em) 80vw, 100vw" srcset="@{tr} 1x, @{pr} 2x, @{ir} 3x" title=#{mediumTitle medium}>
<img sizes="(min-width: 40em) 80vw, 100vw" srcset="@{pr} 1x, @{ir} 2x" title=#{mediumTitle medium}>
<div id="header" class="item" data-width="400">
<div class="inner">