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,14 +1,11 @@
<table> <td class="topic-poster">
<tbody>
<tr data-topic-id={{topic.id}} class="{{if topic.archived 'archived'}}">
<td class="topic-poster">
{{#with topic.lastPoster as |lastPoster|}} {{#with topic.lastPoster as |lastPoster|}}
{{#user-link user=lastPoster}} {{#user-link user=lastPoster}}
{{avatar lastPoster imageSize="large"}} {{avatar lastPoster imageSize="large"}}
{{/user-link}} {{/user-link}}
{{/with}} {{/with}}
</td> </td>
<td class="main-link"> <td class="main-link">
<tr> <tr>
{{raw "topic-status" topic=topic}} {{raw "topic-status" topic=topic}}
{{topic-link topic}} {{topic-link topic}}
@ -21,13 +18,10 @@
{{category-link topic.category}} {{category-link topic.category}}
{{discourse-tags topic mode="list"}} {{discourse-tags topic mode="list"}}
</tr> </tr>
</td> </td>
<td class="topic-stats"> <td class="topic-stats">
{{raw "list/posts-count-column" topic=topic tagName="div"}} {{raw "list/posts-count-column" topic=topic tagName="div"}}
<div class="topic-last-activity"> <div class="topic-last-activity">
<a href="{{topic.lastPostUrl}}" title="{{topic.bumpedAtTitle}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a> <a href="{{topic.lastPostUrl}}" title="{{topic.bumpedAtTitle}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a>
</div> </div>
</td> </td>
</tr>
</tbody>
</table>

View File

@ -115,24 +115,13 @@
} }
} }
.categories-and-latest { .topic-list-latest {
.category-list,
.topic-list-latest {
width: 48%;
}
.category-list {
float: left;
}
.topic-list-latest {
float: right;
th.latest { th.latest {
line-height: 19px; line-height: 19px;
} }
} }
.categories-and-latest, .topic-list-latest {
.main-link { .main-link {
width: 100%; width: 100%;
} }
@ -158,7 +147,6 @@
padding-left: 8px; padding-left: 8px;
} }
.topic-list {
.posts { .posts {
width: 100%; width: 100%;
text-align: right; text-align: right;
@ -177,5 +165,16 @@
color: $primary; color: $primary;
} }
} }
}
.categories-and-latest {
.category-list {
width: 48%;
float: left;
}
.topic-list-latest {
width: 48%;
float: right;
} }
} }