Fix up some markup to making styling latest categories easier

This commit is contained in:
Robin Ward 2017-08-11 16:48:58 -04:00
parent c924975086
commit 2589b59f39
3 changed files with 60 additions and 65 deletions

View File

@ -3,4 +3,6 @@ import { showEntrance } from "discourse/components/topic-list-item";
export default Ember.Component.extend({ export default Ember.Component.extend({
tagName: "tr", tagName: "tr",
click: showEntrance, click: showEntrance,
classBindings: ['topic.archived'],
attributeBindings: ['topic.id:data-topic-id']
}); });

View File

@ -1,33 +1,27 @@
<table> <td class="topic-poster">
<tbody> {{#with topic.lastPoster as |lastPoster|}}
<tr data-topic-id={{topic.id}} class="{{if topic.archived 'archived'}}"> {{#user-link user=lastPoster}}
<td class="topic-poster"> {{avatar lastPoster imageSize="large"}}
{{#with topic.lastPoster as |lastPoster|}} {{/user-link}}
{{#user-link user=lastPoster}} {{/with}}
{{avatar lastPoster imageSize="large"}} </td>
{{/user-link}} <td class="main-link">
{{/with}} <tr>
</td> {{raw "topic-status" topic=topic}}
<td class="main-link"> {{topic-link topic}}
<tr> {{#if topic.featured_link}}
{{raw "topic-status" topic=topic}} {{topic-featured-link topic}}
{{topic-link topic}} {{/if}}
{{#if topic.featured_link}} {{topic-post-badges newPosts=topic.totalUnread unseen=topic.unseen url=topic.lastUnreadUrl}}
{{topic-featured-link topic}} </tr>
{{/if}} <tr>
{{topic-post-badges newPosts=topic.totalUnread unseen=topic.unseen url=topic.lastUnreadUrl}} {{category-link topic.category}}
</tr> {{discourse-tags topic mode="list"}}
<tr> </tr>
{{category-link topic.category}} </td>
{{discourse-tags topic mode="list"}} <td class="topic-stats">
</tr> {{raw "list/posts-count-column" topic=topic tagName="div"}}
</td> <div class="topic-last-activity">
<td class="topic-stats"> <a href="{{topic.lastPostUrl}}" title="{{topic.bumpedAtTitle}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a>
{{raw "list/posts-count-column" topic=topic tagName="div"}} </div>
<div class="topic-last-activity"> </td>
<a href="{{topic.lastPostUrl}}" title="{{topic.bumpedAtTitle}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a>
</div>
</td>
</tr>
</tbody>
</table>

View File

@ -115,24 +115,13 @@
} }
} }
.categories-and-latest { .topic-list-latest {
th.latest {
.category-list, line-height: 19px;
.topic-list-latest {
width: 48%;
}
.category-list {
float: left;
}
.topic-list-latest {
float: right;
th.latest {
line-height: 19px;
}
} }
}
.categories-and-latest, .topic-list-latest {
.main-link { .main-link {
width: 100%; width: 100%;
} }
@ -158,24 +147,34 @@
padding-left: 8px; padding-left: 8px;
} }
.topic-list { .posts {
.posts { width: 100%;
width: 100%; text-align: right;
text-align: right; margin-bottom: 10px;
margin-bottom: 10px; }
}
.num.posts a { .num.posts a {
padding: 0; padding: 0;
} }
.more-topics, .more-topics,
.no-topics { .no-topics {
border-bottom: none; border-bottom: none;
td { td {
padding-right: 0; padding-right: 0;
color: $primary; color: $primary;
}
} }
} }
} }
.categories-and-latest {
.category-list {
width: 48%;
float: left;
}
.topic-list-latest {
width: 48%;
float: right;
}
}