working on medium site
This commit is contained in:
parent
4a4815bbe3
commit
bba4db7795
11 changed files with 68 additions and 72 deletions
|
@ -83,8 +83,9 @@ renderLayout widget = do
|
|||
, js_init_js
|
||||
])
|
||||
$(combineStylesheets 'StaticR
|
||||
[ css_normalize_css
|
||||
, css_bootstrap_css
|
||||
[
|
||||
-- css_normalize_css
|
||||
css_bootstrap_css
|
||||
])
|
||||
$(widgetFile "default-layout")
|
||||
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")
|
||||
|
|
|
@ -28,7 +28,7 @@ getAdminMediumSettingsR mediumId = do
|
|||
case tempMedium of
|
||||
Just medium -> do
|
||||
(adminMediumSetWidget, enctype) <- generateFormPost $ adminMediumSetForm medium
|
||||
defaultLayout $ do
|
||||
formLayout $ do
|
||||
setTitle "Administration: Medium Settings"
|
||||
$(widgetFile "adminMediumSet")
|
||||
Nothing -> do
|
||||
|
|
|
@ -33,7 +33,7 @@ getMediumR mediumId = do
|
|||
(commentWidget, enctype) <- generateFormPost $ commentForm userId userSl mediumId Nothing
|
||||
comments <- runDB $ selectList [CommentOrigin ==. mediumId, CommentParent ==. Nothing] [Desc CommentTime]
|
||||
replies <- runDB $ selectList [CommentOrigin ==. mediumId, CommentParent !=. Nothing] [Desc CommentTime]
|
||||
defaultLayout $ do
|
||||
formLayout $ do
|
||||
setTitle $ toHtml ("Eidolon :: Medium " `T.append` (mediumTitle medium))
|
||||
$(widgetFile "medium")
|
||||
Nothing -> do
|
||||
|
|
|
@ -499,7 +499,7 @@ console.log(itemsWidth,itemHeight)
|
|||
overlayColor: _.settings.popupOverlayColor,
|
||||
overlayOpacity: _.settings.popupOverlayOpacity,
|
||||
popupCloserText: '',
|
||||
popupLoaderText: '',
|
||||
popupLoaderText: 'loading',
|
||||
selector: '.thumb a',
|
||||
usePopupCaption: true,
|
||||
usePopupCloser: false,
|
||||
|
|
|
@ -6,8 +6,8 @@ $newline always
|
|||
<p>#{albumTitle album} has no media yet
|
||||
|
||||
$forall (Entity mId m) <- media
|
||||
<article class="item" data-width="200">
|
||||
<a href=@{AdminMediumSettingsR mId}>#{mediumTitle m}
|
||||
<article class="item" data-width=#{mediumThumbWidth m}>
|
||||
<a href=@{AdminMediumSettingsR mId}>
|
||||
<figure class="thumbnail">
|
||||
<img src=#{mediumThumb m}>
|
||||
<figcaption>#{mediumTitle m}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
$newline always
|
||||
<h3>Medium settings
|
||||
|
||||
<div class="left">
|
||||
<form method="post" enctype=#{enctype}>
|
||||
<div id="header" class="item" data-width="300">
|
||||
<form class="inner" method="post" enctype=#{enctype}>
|
||||
<h1>Medium settings
|
||||
^{adminMediumSetWidget}
|
||||
<div>
|
||||
<input type=submit value="Change settings">
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
.right
|
||||
float:right
|
||||
width:50%
|
||||
|
||||
.left
|
||||
float:left
|
||||
width:50%
|
||||
|
||||
footer
|
||||
clear:both
|
|
@ -1,7 +1,7 @@
|
|||
$newline always
|
||||
<div id="header" class="item" data-width="300">
|
||||
<form class="inner" method="post" enctype=#{enctype}>
|
||||
<h3>Album settings
|
||||
<h1>Album settings
|
||||
^{albumSettingsWidget}
|
||||
<div>
|
||||
<input type=submit value="Change settings">
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
color: #d64760
|
||||
font-size: 1.5em
|
||||
|
||||
.item
|
||||
background: #1a1f2c;
|
||||
background: rgba(255,255,255,0.25);
|
||||
|
||||
nav li
|
||||
display: inline-block
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
img
|
||||
position: relative !important
|
||||
width: 100%
|
||||
|
||||
.reply
|
||||
|
|
|
@ -1,58 +1,59 @@
|
|||
<h3>#{mediumTitle medium}
|
||||
|
||||
by <a href=@{UserR ownerName}>#{ownerName}</a> from album <a href=@{AlbumR albumId}>#{albumTitle album}</a>
|
||||
<div id="header" class="item" data-width="800">
|
||||
<div class="inner">
|
||||
<h1>#{mediumTitle medium}
|
||||
|
||||
by <a href=@{UserR ownerName}>#{ownerName}</a> from album <a href=@{AlbumR albumId}>#{albumTitle album}</a>
|
||||
|
||||
|
||||
|
||||
<div class="image">
|
||||
<img src=#{mediumPath medium}>
|
||||
<img src=#{mediumPath medium}>
|
||||
|
||||
|
||||
<div class="desc">
|
||||
Uploaded on: #{formatTime defaultTimeLocale "%A %F %H:%M" (mediumTime medium)}<br>
|
||||
Description:<br>
|
||||
#{mediumDescription medium}
|
||||
<br>
|
||||
<div class="tags">
|
||||
Tags:
|
||||
<ul>
|
||||
$if null (mediumTags medium)
|
||||
none
|
||||
<div class="desc">
|
||||
Uploaded on: #{formatTime defaultTimeLocale "%A %F %H:%M" (mediumTime medium)}<br>
|
||||
Description:<br>
|
||||
#{mediumDescription medium}
|
||||
|
||||
<div class="tags">
|
||||
Tags:
|
||||
<ul>
|
||||
$if null (mediumTags medium)
|
||||
none
|
||||
$else
|
||||
$forall tag <- mediumTags medium
|
||||
<li>
|
||||
<a href=@{TagR tag}>#{tag}
|
||||
$if presence == True
|
||||
<a href=@{MediumSettingsR mediumId}>Change medium settings
|
||||
|
||||
$if null comments
|
||||
<p>There are no Comments yet
|
||||
$else
|
||||
$forall tag <- mediumTags medium
|
||||
<li>
|
||||
<a href=@{TagR tag}>#{tag}
|
||||
$if presence == True
|
||||
<a href=@{MediumSettingsR mediumId}>Change medium settings
|
||||
|
||||
$if null comments
|
||||
<p>There are no Comments yet
|
||||
$else
|
||||
$forall (Entity commentId comment) <- comments
|
||||
<div #comment>
|
||||
<a href=@{ProfileR $ fromJust $ commentAuthor comment}>#{fromJust $ commentAuthorSlug comment}</a> wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
|
||||
<hr>
|
||||
#{commentContent comment}
|
||||
$if userId /= Nothing
|
||||
<hr>
|
||||
<a href=@{CommentReplyR commentId}>Reply to this comment
|
||||
$if userId == (commentAuthor comment)
|
||||
<a href=@{CommentDeleteR commentId}>Delete this comment
|
||||
$forall (Entity _ reply) <- replies
|
||||
$if commentParent reply == Just commentId
|
||||
<div #comment class="reply">
|
||||
<a href=@{ProfileR $ fromJust $ commentAuthor reply}>#{fromJust $ commentAuthorSlug reply}</a> wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime reply}:
|
||||
$forall (Entity commentId comment) <- comments
|
||||
<div #comment>
|
||||
<a href=@{ProfileR $ fromJust $ commentAuthor comment}>#{fromJust $ commentAuthorSlug comment}</a> wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
|
||||
<hr>
|
||||
#{commentContent reply}
|
||||
$if userId == (commentAuthor comment)
|
||||
<a href=@{CommentDeleteR commentId}>Delete this comment
|
||||
#{commentContent comment}
|
||||
$if userId /= Nothing
|
||||
<hr>
|
||||
<a href=@{CommentReplyR commentId}>Reply to this comment
|
||||
$if userId == (commentAuthor comment)
|
||||
<a href=@{CommentDeleteR commentId}>Delete this comment
|
||||
$forall (Entity _ reply) <- replies
|
||||
$if commentParent reply == Just commentId
|
||||
<div #comment class="reply">
|
||||
<a href=@{ProfileR $ fromJust $ commentAuthor reply}>#{fromJust $ commentAuthorSlug reply}</a> wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime reply}:
|
||||
<hr>
|
||||
#{commentContent reply}
|
||||
$if userId == (commentAuthor comment)
|
||||
<a href=@{CommentDeleteR commentId}>Delete this comment
|
||||
|
||||
$if userId /= Nothing
|
||||
<form method=post enctype=#{enctype}>
|
||||
^{commentWidget}
|
||||
<div>
|
||||
<input type=submit value="Post comment">
|
||||
|
||||
get a feed from this:
|
||||
<a href=@{CommentFeedAtomR mediumId}>Atom
|
||||
<a href=@{CommentFeedRssR mediumId}>RSS
|
||||
$if userId /= Nothing
|
||||
<form method=post enctype=#{enctype}>
|
||||
^{commentWidget}
|
||||
<div>
|
||||
<input type=submit value="Post comment">
|
||||
|
||||
get a feed from this:
|
||||
<a href=@{CommentFeedAtomR mediumId}>Atom
|
||||
<a href=@{CommentFeedRssR mediumId}>RSS
|
||||
|
|
Loading…
Reference in a new issue