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({
tagName: "tr",
click: showEntrance,
classBindings: ['topic.archived'],
attributeBindings: ['topic.id:data-topic-id']
});

View File

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

View File

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