medium site now looks fine
This commit is contained in:
parent
e1d4e45f85
commit
e2608ad2ce
3 changed files with 83 additions and 57 deletions
|
@ -33,9 +33,9 @@ getMediumR mediumId = do
|
||||||
(commentWidget, enctype) <- generateFormPost $ commentForm userId userSl mediumId Nothing
|
(commentWidget, enctype) <- generateFormPost $ commentForm userId userSl mediumId Nothing
|
||||||
comments <- runDB $ selectList [CommentOrigin ==. mediumId, CommentParent ==. Nothing] [Desc CommentTime]
|
comments <- runDB $ selectList [CommentOrigin ==. mediumId, CommentParent ==. Nothing] [Desc CommentTime]
|
||||||
replies <- runDB $ selectList [CommentOrigin ==. mediumId, CommentParent !=. Nothing] [Desc CommentTime]
|
replies <- runDB $ selectList [CommentOrigin ==. mediumId, CommentParent !=. Nothing] [Desc CommentTime]
|
||||||
dataWidth <- case mediumWidth medium >= 750 of
|
dataWidth <- case mediumWidth medium >= 850 of
|
||||||
True -> return 750
|
True -> return 850
|
||||||
False -> return $ (mediumWidth medium) + 53
|
False -> return $ (mediumWidth medium)
|
||||||
formLayout $ do
|
formLayout $ do
|
||||||
setTitle $ toHtml ("Eidolon :: Medium " `T.append` (mediumTitle medium))
|
setTitle $ toHtml ("Eidolon :: Medium " `T.append` (mediumTitle medium))
|
||||||
$(widgetFile "medium")
|
$(widgetFile "medium")
|
||||||
|
|
|
@ -1,15 +1,39 @@
|
||||||
|
/*templates/medium.cassius*/
|
||||||
|
|
||||||
img
|
img
|
||||||
position: relative !important
|
position: relative !important
|
||||||
max-width: 100% !important
|
max-width: 100% !important
|
||||||
max-height: 28em !important
|
|
||||||
width: auto !important
|
width: auto !important
|
||||||
|
display: block !important
|
||||||
|
margin-left: auto !important
|
||||||
|
margin-right: auto !important
|
||||||
|
|
||||||
.comment
|
.comment
|
||||||
|
border: 5px solid rgb(255, 255, 255)
|
||||||
|
padding: 2em 3em
|
||||||
background: #d64760 url('/static/css/images/overlay.png')
|
background: #d64760 url('/static/css/images/overlay.png')
|
||||||
|
|
||||||
.reply
|
.reply
|
||||||
background: #47d65f url('/static/css/images/overlay.png')
|
background: #47d65f url('/static/css/images/overlay.png')
|
||||||
|
|
||||||
|
.image
|
||||||
|
width: 100% !important
|
||||||
|
|
||||||
|
#wrapper
|
||||||
|
overflow: auto !important
|
||||||
|
|
||||||
|
#reel
|
||||||
|
width: 90% !important
|
||||||
|
max-height: auto !important
|
||||||
|
|
||||||
|
#reel .item
|
||||||
|
float: none !important
|
||||||
|
display: inline-block !important
|
||||||
|
width: 100% !important
|
||||||
|
|
||||||
div #main
|
div #main
|
||||||
margin-top: 0 !important
|
margin-top: 60px !important
|
||||||
top : 20% !important
|
position: static !important
|
||||||
|
|
||||||
|
#footer
|
||||||
|
position: static !important
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
<div id="header" class="item" data-width=#{dataWidth}>
|
<div data-width="1000">
|
||||||
|
<div id="header" class="item" data-width="1000">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h1>#{mediumTitle medium}
|
<h1>#{mediumTitle medium}
|
||||||
<p>
|
<p>
|
||||||
by <a href=@{UserR ownerName}>#{ownerName}</a> from album <a href=@{AlbumR albumId}>#{albumTitle album}</a>
|
by <a href=@{UserR ownerName}>#{ownerName}</a> from album <a href=@{AlbumR albumId}>#{albumTitle album}</a>
|
||||||
|
<div id="header" class="item image" data-width=#{dataWidth}>
|
||||||
|
<div class="inner">
|
||||||
<img src=#{mediumPath medium}>
|
<img src=#{mediumPath medium}>
|
||||||
|
|
||||||
<div id="header" class="item" data-width="400">
|
<div id="header" class="item" data-width="400">
|
||||||
|
@ -14,6 +16,7 @@
|
||||||
#{mediumDescription medium}
|
#{mediumDescription medium}
|
||||||
|
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
|
<p>
|
||||||
Tags:
|
Tags:
|
||||||
<ul>
|
<ul>
|
||||||
$if null (mediumTags medium)
|
$if null (mediumTags medium)
|
||||||
|
@ -29,9 +32,9 @@ $if null comments
|
||||||
<div id="header" class="item" data-width="300">
|
<div id="header" class="item" data-width="300">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<p>There are no Comments yet
|
<p>There are no Comments yet
|
||||||
$else
|
|
||||||
$forall (Entity commentId comment) <- comments
|
$forall (Entity commentId comment) <- comments
|
||||||
<article class="item comment" data-width="300">
|
<article class="comment" data-width="300">
|
||||||
<a href=@{ProfileR $ fromJust $ commentAuthor comment}>#{fromJust $ commentAuthorSlug comment}</a> wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
|
<a href=@{ProfileR $ fromJust $ commentAuthor comment}>#{fromJust $ commentAuthorSlug comment}</a> wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime comment}:
|
||||||
<hr>
|
<hr>
|
||||||
#{commentContent comment}
|
#{commentContent comment}
|
||||||
|
@ -42,8 +45,8 @@ $else
|
||||||
<a href=@{CommentDeleteR commentId}>Delete this comment
|
<a href=@{CommentDeleteR commentId}>Delete this comment
|
||||||
$forall (Entity replyId reply) <- replies
|
$forall (Entity replyId reply) <- replies
|
||||||
$if commentParent reply == Just commentId
|
$if commentParent reply == Just commentId
|
||||||
<article class="item reply">
|
<article class="comment reply">
|
||||||
<a href=@{ProfileR $ fromJust $ commentAuthor reply}>#{fromJust $ commentAuthorSlug reply}</a> wrote on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime reply}:
|
<a href=@{ProfileR $ fromJust $ commentAuthor reply}>#{fromJust $ commentAuthorSlug reply}</a> replied on #{formatTime defaultTimeLocale "%A %F %H:%M" $ commentTime reply}:
|
||||||
<hr>
|
<hr>
|
||||||
#{commentContent reply}
|
#{commentContent reply}
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -51,19 +54,18 @@ $else
|
||||||
<a href=@{CommentDeleteR replyId}>Delete this comment
|
<a href=@{CommentDeleteR replyId}>Delete this comment
|
||||||
|
|
||||||
$if userId /= Nothing
|
$if userId /= Nothing
|
||||||
<div id="header" class="item" data-width="300">
|
<div id="header" class="item" data-width="1000">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<form method=post enctype=#{enctype}>
|
<form method=post enctype=#{enctype}>
|
||||||
^{commentWidget}
|
^{commentWidget}
|
||||||
<div>
|
<div>
|
||||||
<input type=submit value="Post comment">
|
<input type=submit value="Post comment">
|
||||||
|
|
||||||
<div id="header" class="item">
|
<div id="header" class="item">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3>
|
<h3>
|
||||||
get a feed from this:
|
Get a feed from this:
|
||||||
<a href=@{CommentFeedAtomR mediumId}>Atom
|
<a href=@{CommentFeedAtomR mediumId}>Atom
|
||||||
<a href=@{CommentFeedRssR mediumId}>RSS
|
<a href=@{CommentFeedRssR mediumId}>RSS
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{background-image: url('/static/css/images/overlay.png'), -webkit-linear-gradient(top, rgba(0,0,0,0) 75%, rgba(0,0,0,0.65)), url('#{mediumPath medium}');}
|
body{background-image: url('/static/css/images/overlay.png'), -webkit-linear-gradient(top, rgba(0,0,0,0) 75%, rgba(0,0,0,0.65)), url('#{mediumPath medium}');background-attachment:fixed;}
|
||||||
|
|
Loading…
Reference in a new issue