some beautyfication

This commit is contained in:
nek0 2014-09-05 21:00:03 +02:00
parent 55e7cfac0f
commit 4ff66317fa
4 changed files with 28 additions and 18 deletions

View file

@ -12,6 +12,8 @@ getMediumR mediumId = do
ownerId <- return $ mediumOwner medium ownerId <- return $ mediumOwner medium
owner <- runDB $ getJust ownerId owner <- runDB $ getJust ownerId
ownerName <- return $ userName owner ownerName <- return $ userName owner
albumId <- return $ mediumAlbum medium
album <- runDB $ getJust albumId
msu <- lookupSession "userId" msu <- lookupSession "userId"
presence <- case msu of presence <- case msu of
Just tempUserId -> do Just tempUserId -> do

View file

@ -11,8 +11,10 @@ by <a href=@{UserR ownerName}>#{ownerName}</a>
This album is empty This album is empty
$else $else
Images in this album: Images in this album:
$forall (Entity mediumId medium) <- media <ul class="media">
<div class="thumbnails"> <li>
<a href=@{MediumR mediumId}> $forall (Entity mediumId medium) <- media
<img src=#{mediumPath medium}><br> <div class="thumbnails">
#{mediumTitle medium} <a href=@{MediumR mediumId}>
<img src=#{mediumPath medium}><br>
#{mediumTitle medium}

View file

@ -1,6 +1,6 @@
<h3>#{mediumTitle medium} <h3>#{mediumTitle medium}
by <a href=@{UserR ownerName}>#{ownerName}</a> by <a href=@{UserR ownerName}>#{ownerName}</a> from album <a href=@{AlbumR albumId}>#{albumTitle album}</a>

View file

@ -4,23 +4,29 @@ $if presence == True
<a href=@{ProfileSettingsR ownerId}>Change your profile settings <a href=@{ProfileSettingsR ownerId}>Change your profile settings
$if null userAlbs $if null userAlbs
This user has no albums yet <ul class="noalbum">
<li>
This user has no albums yet
$else $else
Albums of this user: Albums of this user:
$forall (Entity albumId album) <- userAlbs $forall (Entity albumId album) <- userAlbs
<div class="thumbnails"> <ul class="albums">
<a href=@{AlbumR albumId}> <li>
$if (albumSamplePic album) == Nothing <div class="thumbnails">
<img width="200px" src="/static/img/album.jpg"><br> <a href=@{AlbumR albumId}>
$else $if (albumSamplePic album) == Nothing
<img width="200px" src=#{T.pack $ fromJust $ albumSamplePic album}><br> <img width="200px" src="/static/img/album.jpg"><br>
#{albumTitle album} $else
<img width="200px" src=#{T.pack $ fromJust $ albumSamplePic album}><br>
#{albumTitle album}
$if null recentMedia $if null recentMedia
This user has not uploaded any images This user has not uploaded any images
$else $else
Newest images: Newest images:
$forall (Entity mediumId medium) <- take 10 recentMedia <ul class="media">
<div class="thumbnails"> <li>
<a href=@{MediumR mediumId}> $forall (Entity mediumId medium) <- take 10 recentMedia
<img src=#{mediumPath medium}> <div class="thumbnails">
<a href=@{MediumR mediumId}>
<img src=#{mediumPath medium}>