eidolon/templates/result.hamlet
2016-09-02 15:55:50 +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 href=@{ProfileR uId}>
#{userSlug user}
$if not $ null albumList
<div .subheader .item>
<h2>
Results in Albums:
$forall (Entity aId album) <- albumList
<div .item data-width="#{albumSampleWidth album}">
<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 commentList
<div .subheader .item>
<h2>
Results in Comments:
$forall (Entity _ comment) <- commentList
<div .item>
<a href=@{MediumR $ commentOrigin comment}>
#{commentContent comment}