Revert "Add striped category badges under title"

This reverts commit 331e63e3af.
This commit is contained in:
Robin Ward 2014-10-06 16:13:30 -04:00
parent 379b810397
commit 85b6b2550e
3 changed files with 13 additions and 28 deletions

View File

@ -92,9 +92,6 @@ Discourse.HTML = {
html = "<" + elem + " href=\"" + (opts.link === false ? '' : url) + "\" ",
categoryStyle;
// Parent stripe implies onlyStripe
if (opts.onlyStripe) { opts.showParent = true; }
html += "data-drop-close=\"true\" class=\"badge-category" + (restricted ? ' restricted' : '' ) +
(opts.onlyStripe ? ' clear-badge' : '') +
extraClasses + "\" ";
@ -116,10 +113,8 @@ Discourse.HTML = {
html += ">" + name + "</" + elem + ">";
}
if (opts.onlyStripe || (opts.showParent && category.get('parent_category_id'))) {
if (opts.showParent && category.get('parent_category_id')) {
var parent = Discourse.Category.findById(category.get('parent_category_id'));
if (!parent) { parent = category; }
categoryStyle = Discourse.HTML.categoryStyle(opts.onlyStripe ? category : parent) || '';
html = "<span class='badge-wrapper'><" + elem + " class='badge-category-parent" + extraClasses + "' style=\"" + categoryStyle +
"\" href=\"" + (opts.link === false ? '' : url) + "\"><span class='category-name'>" +

View File

@ -94,7 +94,7 @@
{{#if showExtraInfo}}
<div class="extra-info-wrapper">
<div {{bind-attr class=":extra-info topic.category.isUncategorizedCategory::has-category"}}>
<div class="extra-info">
{{#if showStarButton}}
<a {{bind-attr class=":star topic.starred:starred"}} {{action "toggleStar"}} href='#' {{bind-attr title="topic.starTooltip"}}></a>
{{/if}}
@ -116,9 +116,9 @@
{{/if}}
</h1>
{{#if topic.category.parentCategory}}
{{bound-category-link topic.category.parentCategory onlyStripe="true"}}
{{bound-category-link topic.category.parentCategory}}
{{/if}}
{{bound-category-link topic.category onlyStripe="true"}}
{{bound-category-link topic.category}}
</div>
</div>
</div>

View File

@ -540,17 +540,12 @@ iframe {
}
}
.extra-info.has-category {
h1 {
line-height: 1.0em;
}
}
.extra-info {
h1 {
margin: 5px 0 0 0;
font-size: 1.6em;
line-height: 1.3em;
}
a.star {
@ -566,20 +561,15 @@ iframe {
margin-top: -2px;
}
.badge-wrapper {
margin: 0;
padding: 0;
.badge-category {
color: $primary;
padding: 0 0 0 3px;
margin-right: 5px;
}
border-left: 5px solid;
border-color: #aaa;
font-weight: normal;
text-transform: lowercase;
padding: 0 0 0 5px;
margin: 0 5px 0 1px;
vertical-align: top;
.badge-category-parent {
margin: 0;
padding: 0px 1px;
}
}
.title-wrapper {