eidolon/templates/result.hamlet

49 lines
1.5 KiB
Text
Raw Normal View History

2016-09-02 13:55:50 +00:00
<div .subheader .item>
<h1>
Results for: #{query}
2015-10-17 01:09:04 +00:00
$if allEmpty
2016-09-02 13:55:50 +00:00
<div .subheader .item>
<h2>
Sorry, no results
2015-10-17 01:09:04 +00:00
$else
$if not $ null userList
2016-09-02 13:55:50 +00:00
<div .subheader .item>
<h2>
Results in Users:
2015-10-17 01:09:04 +00:00
$forall (Entity uId user) <- userList
2016-09-02 13:55:50 +00:00
<div .item>
<a href=@{ProfileR uId}>
#{userSlug user}
2015-10-17 01:09:04 +00:00
$if not $ null albumList
2016-09-02 13:55:50 +00:00
<div .subheader .item>
<h2>
Results in Albums:
2015-10-17 01:09:04 +00:00
$forall (Entity aId album) <- albumList
2016-09-02 13:55:50 +00:00
<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}
2015-10-17 01:09:04 +00:00
$if not $ null mediumList
2016-09-02 13:55:50 +00:00
<article .subheader .item>
<h2>
Results in Media:
2015-10-17 01:09:04 +00:00
$forall (Entity mId medium) <- mediumList
2016-09-02 13:55:50 +00:00
<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}
2015-10-17 01:09:04 +00:00
$if not $ null commentList
2016-09-02 13:55:50 +00:00
<div .subheader .item>
<h2>
Results in Comments:
2015-10-17 01:09:04 +00:00
$forall (Entity _ comment) <- commentList
2016-09-02 13:55:50 +00:00
<div .item>
<a href=@{MediumR $ commentOrigin comment}>
#{commentContent comment}