eidolon/templates/result.hamlet
2017-10-22 14:17:12 +02:00

48 lines
1.5 KiB
Text
Executable file

<div .subheader .item>
<h1>
Results for: #{query}
$if allEmpty
<div .subheader .item>
<h2>
Sorry, no results
$else
$if not $ null userList
<div .subheader .item>
<h2>
Results in Users:
$forall (Entity uId user) <- userList
<div .item>
<a .pagin href=@{ProfileR uId}>
#{userSlug user}
$if not $ null albumList
<div .subheader .item>
<h2>
Results in Albums:
$forall (Entity aId album) <- albumList
<div .item>
<a href=@{AlbumR aId}>
<figure>
$if (albumSamplePic album) == Nothing
<img src=@{StaticR img_album_jpg} title=#{albumTitle album}>
$else
<img src=@{StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ fromJust $ albumSamplePic album) []} title=#{albumTitle album}>
<figcaption>#{albumTitle album}
$if not $ null mediumList
<article .subheader .item>
<h2>
Results in Media:
$forall (Entity mId medium) <- mediumList
<div .item>
<a href=@{MediumR mId}>
<figure>
<img src=@{StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumThumb medium) []} title=#{mediumTitle medium}>
<figcaption>#{mediumTitle medium}
$if not $ null tagList
<article .subheader .item>
<h2>
Results in Tags:
$forall tag <- tagList
<div .item>
<a .pagin .tag href=@{TagR tag}>
#{tag}