diff --git a/public/css/style.less b/public/css/style.less index 843655f481..4ddb0fee5b 100644 --- a/public/css/style.less +++ b/public/css/style.less @@ -170,70 +170,65 @@ footer.footer { } } - @media (max-width: 767px) - { - - } - -} - -.category { ul { margin-left: 0; } -} -.topic-row { - border-radius: 5px; -} -.latest-post { - float: right; - padding-top: 2px; - margin-right: 30px; - width: 50%; - .pull-right { + .topic-row { + border-radius: 5px; width: 100%; - height: 50px; - line-height: 16px; - margin-left: 1px; - padding: 5px; - border-left: 1px solid #bbb; padding-left: 20px; - img { - display: block; - float: left; - } - p { - display: block; - float: left; - width: 70%; - margin-left: 10px; - overflow: hidden; - height: 50px; + h3 { + padding: 0; + margin: 0; + margin-top: 4px; + line-height: 30px; + color: rgb(0, 136, 204); + + small { + vertical-align: 2px; + strong { + color: #666; + } + } } } -} -.topic-row { - width: 100%; - padding-left: 20px; - - h3 { - padding: 0; - margin: 0; - margin-top: 4px; - line-height: 30px; - color: rgb(0, 136, 204); + .latest-post { + float: right; + padding-top: 2px; + margin-right: 30px; + width: 50%; - small { - vertical-align: 3px; + .pull-right { + width: 100%; + height: 50px; + line-height: 16px; + margin-left: 1px; + padding: 5px; + border-left: 1px solid #bbb; + padding-left: 20px; + + img { + display: block; + float: left; + } + p { + display: block; + float: left; + width: 70%; + margin-left: 10px; + overflow: hidden; + height: 50px; + } } } } + .post-container { list-style-type: none; padding: 0; diff --git a/public/templates/category.tpl b/public/templates/category.tpl index 148c328788..0b5e1f7bae 100644 --- a/public/templates/category.tpl +++ b/public/templates/category.tpl @@ -13,15 +13,17 @@
  • -
    +
    - -

    psychobunny: Some post content goes here, the latest posts of course blah blahposts of course blah blahposts of course blah blahposts of course blah blah

    + +

    {topics.recent_author}: {topics.recent_post}

    -

    {topics.post_count} {topics.title} 24
    Posted {topics.relativeTime} ago by - {topics.username}.

    +

    {topics.post_count} {topics.title} 24
    + + Posted {topics.relativeTime} ago by + {topics.username}.

    diff --git a/src/posts.js b/src/posts.js index bc5d531343..ff8baab9a3 100644 --- a/src/posts.js +++ b/src/posts.js @@ -212,6 +212,14 @@ marked.setOptions({ RDB.set('pid:' + pid + ':tid', tid); RDB.incr('tid:' + tid + ':postcount'); + + + user.getUserFields(uid, ['username','picture'], function(data){ + RDB.set('tid:' + tid + ':recent:post', content); + RDB.set('tid:' + tid + ':recent:author', data.username); + RDB.set('tid:' + tid + ':recent:picture', data.picture); + }); + // User Details - move this out later RDB.lpush('uid:' + uid + ':posts', pid); diff --git a/src/topics.js b/src/topics.js index 05d3127135..74e44e182c 100644 --- a/src/topics.js +++ b/src/topics.js @@ -27,7 +27,10 @@ var RDB = require('./redis.js'), postcount = [], locked = [], deleted = [], - pinned = []; + pinned = [], + recent_post = [], + recent_author = [], + recent_picture = []; for (var i=0, ii=tids.length; i