From b1740fbfcfc1d4c2e03520282b8bfd1cb8c15000 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 19 Oct 2013 20:05:03 +0200 Subject: [PATCH] Closed #29 --- public_html/media/css/comment-list.css | 7 ++-- public_html/media/css/post-list.css | 3 +- public_html/media/css/post-small.css | 56 +++++++++++++++++++++---- public_html/media/img/icons.png | Bin 322 -> 612 bytes src/Controllers/PostController.php | 2 +- src/Views/post-list.phtml | 13 +++--- src/Views/post-small.phtml | 12 ++++-- 7 files changed, 73 insertions(+), 20 deletions(-) diff --git a/public_html/media/css/comment-list.css b/public_html/media/css/comment-list.css index ce00d486..c03a478b 100644 --- a/public_html/media/css/comment-list.css +++ b/public_html/media/css/comment-list.css @@ -2,15 +2,16 @@ float: left; } .comment-group .comments { - float: left; + margin-left: 170px; + overflow: hidden; } -.comment-group .post img { +.comment-group .post { margin-right: 1em; margin-bottom: 1em; } -.comment-group { +.comment-group:not(:last-child) { border-bottom: 1px solid #eee; margin-bottom: 1em; } diff --git a/public_html/media/css/post-list.css b/public_html/media/css/post-list.css index 56502c3e..aa57269f 100644 --- a/public_html/media/css/post-list.css +++ b/public_html/media/css/post-list.css @@ -1,3 +1,4 @@ -.posts img { +.post { margin: 0.5em; + float: left; } diff --git a/public_html/media/css/post-small.css b/public_html/media/css/post-small.css index 1a32c960..6b24ee4a 100644 --- a/public_html/media/css/post-small.css +++ b/public_html/media/css/post-small.css @@ -1,19 +1,61 @@ -.post img { +.post { border: 1px solid #ddd; box-shadow: 0.25em 0.25em #eee; padding: 0; - width: 140px; - height: 140px; + position: relative; } - -.post-type-flash img { +.post-type-flash { border-color: #dd5; box-shadow: 0.25em 0.25em #eeb, 0.1em 0.1em 0.5em 0.1em rgba(238,238,187,0.5); } -.post:focus img, -.post:hover img { +.post:focus, +.post:hover { border: 1px solid firebrick; box-shadow: 0.25em 0.25em pink; +} +.post:focus img.thumb, +.post:hover img.thumb { opacity: .9; } + +.post img.thumb { + width: 140px; + height: 140px; + display: block; +} + +.post .info-bar { + display: none; + height: 20px; + width: 100%; + border-top: 1px solid firebrick; + background: rgba(255, 128, 128, 0.75); + position: absolute; + bottom: 0; +} +.post:hover .info-bar { + display: block; +} + +.post .icon-comments { + margin-left: 3px; + background-position: -64px -1px; +} +.post .icon-favs { + background-position: -43px -1px; +} +.post [class^='icon-'] { + opacity: .75; + width: 20px; + height: 20px; + line-height: 20px; + vertical-align: top; +} +.post span { + vertical-align: top; + font-size: small; + line-height: 20px; + margin-right: 0.5em; + display: inline-block; +} diff --git a/public_html/media/img/icons.png b/public_html/media/img/icons.png index 3490c265ee11f189c7a42808327eddffaabc0130..96d633fa9645040946b2f46536ec310be6d1e069 100644 GIT binary patch delta 586 zcmV-Q0=50Z0^|fCiBL{Q4GJ0x0000DNk~Le000100000M2nGNE0I@mHn2{kTe*y+c zL_t(|+U!}qPQx$|P7n{!2ViJd2Go(EmDpK2guN`REU;5nrj86%*gB+AAE5&SBU4#} zL?3`RFc;}6nIyLF&Q57dKj~8<|0Vu%KHoX90z^B47_bZPd1R@Z0XxXPR^HdjXVC#H zQODZ-t>J#`@$62CdoOBXfh)W}e*q?1U4ms1wmDcUQB;$ahPGB8Tma|51#*sM)cP`p zKqchx*GQ_04A@5Ylo>s(U8eYGm*|A{+5^i32ZZ{Nf>wl$Yj*#>w)CG$OTX+Q?ll+j zD)6Z~a>njov~3%jed5(tUw(F|2q>--l`9nW1B4b;g_yiS)GOv#nM+ize@H&ox~-ym zk9$nq@l8l@qgrW^KoT{NZ(z%#uMIwyTJfpUrA)QfOW+4_%yZz>VyS6m$ED*1c)cl0 zZ5mS)cI9Yy3Ve378R0J85?JZT(^50%Qv{)uPiVCSp4Eg?YZi51gpf)a2AQl|1!8TS z%8flGAL7j-=#m(xMw%O-e@-}UDDba-Fi(-B2|!jOYQ_luxx%Id*U)H2MHNcwF4lO| z`cIe{6-U@q;Qt?L#-RJ}KTJ~#+yL*WjRlq_jSv>tzqoeUy@i5Ng(v6rl>UV26au^> zyB?8BZa5?G64fOd)k-%l>UR90u)M4(8Q`R*p$?z(efgbYIx}^hAhrH`#D^b$;qfED Y0PENX)2^Wx9{>OV07*qoM6N<$g74@G*#H0l delta 293 zcmV+=0owlL1i}I#iBL{Q4GJ0x0000DNk~Le0000h0000M2nGNE09m?LfB&GaZlNFmh!cn|?r7PNA*Bo@Mn6rPi1czSRT|&a r?jSIbk%5R#tJHQZ<521_0t6TUuFx-VKRJB500000NkvXXu0mjf;0tpZ diff --git a/src/Controllers/PostController.php b/src/Controllers/PostController.php index 1e20021d..5e753f0b 100644 --- a/src/Controllers/PostController.php +++ b/src/Controllers/PostController.php @@ -501,7 +501,7 @@ class PostController $this->context->stylesheets []= 'post-view.css'; $this->context->stylesheets []= 'comment-small.css'; $this->context->scripts []= 'post-view.js'; - $this->context->subTitle = 'showing @' . $post->id; + $this->context->subTitle = 'showing @' . $post->id . ' - ' . join(', ', array_map(function($x) { return $x['name']; }, $post->sharedTag)); $this->context->favorite = $favorite; $this->context->transport->post = $post; $this->context->transport->prevPostId = $prevPost ? $prevPost['id'] : null; diff --git a/src/Views/post-list.phtml b/src/Views/post-list.phtml index e2e4908b..cf3d490c 100644 --- a/src/Views/post-list.phtml +++ b/src/Views/post-list.phtml @@ -1,11 +1,14 @@ context->transport->posts)): ?>

No posts to show.

-
- context->transport->posts as $post): ?> - context->post = $post ?> - renderFile('post-small') ?> - +
+
+ context->transport->posts as $post): ?> + context->post = $post ?> + renderFile('post-small') ?> + +
+
context->post->type)) ?>" href=" $this->context->post->id]) ?>"> - @<?php echo $this->context->post->id ?> - +
+ + @<?php echo $this->context->post->id ?> + +
+ context->post->countOwn('comment') ?> + context->post->countOwn('favoritee') ?> +
+