Commit b757703f authored by Jonne Haß's avatar Jonne Haß

Merge pull request #5763 from svbergerem/use-handlebars-helpers

Use handlebars helpers wherever possible
parents 4f960fd3 af9d6dda
......@@ -53,12 +53,12 @@
width: 50px;
}
}
.author {
.author-name {
font-weight: bold;
margin-bottom: 4px;
unicode-bidi: bidi-override;
}
a.author { color: $blue; }
a.author-name { color: $blue; }
.feedback {
margin-top: 5px;
font-size: 11px;
......
......@@ -20,16 +20,14 @@
{{/if}}
</div>
{{#with author}}
<a href="/people/{{guid}}" class="author author-name {{hovercardable this}}">
{{name}}
</a>
{{/with}}
{{#linkToAuthor author}}
{{name}}
{{/linkToAuthor}}
<div class="collapsible comment-content">
{{{text}}}
</div>
<div class="info">
<a href="/posts/{{parent.id}}#{{guid}}" class="permalink_comment">
<time class="timeago" data-original-title="{{{localTime created_at}}}" datetime="{{created_at}}"/>
......
......@@ -72,7 +72,7 @@
<div class="user-menu-more-indicator">
</div>
<img alt="{{current_user.name}}" class="avatar user-menu-avatar" src="{{current_user.avatar.small}}" title="{{current_user.name}}" />
{{{personImage current_user 'small' 'avatar user-menu-avatar'}}}
<a class="user-name" href="#">{{current_user.name}}</a>
</li>
<li class="user-menu-item"><a href="/people/{{current_user.guid}}">{{t "header.profile"}}</a></li>
......
......@@ -12,11 +12,9 @@
{{else}}
{{#each likes}}
{{#with author}}
<a href="/people/{{guid}}" class="{{hovercardable this}}">
<img src="{{avatar.small}}" class="avatar micro" title="{{name}}"/>
</a>
{{/with}}
{{#linkToAuthor author}}
{{{personImage this 'small' 'micro'}}}
{{/linkToAuthor}}
{{/each}}
{{/unless}}
</div>
......
......@@ -6,14 +6,16 @@
{{#with root}}
<a href="/people/{{author.guid}}" class="img {{{hovercardable this}}}">
<img src="{{author.avatar.small}}" class="avatar" />
{{{personImage author 'small'}}}
</a>
{{/with}}
{{#with root}}
<div class="bd">
<div>
<a href="/people/{{author.guid}}" class="author {{{hovercardable author}}}">{{author.name}}</a>
{{#linkToAuthor author}}
{{name}}
{{/linkToAuthor}}
<span class="details grey">
-
......
......@@ -37,9 +37,9 @@
{{/if}}
<div>
{{#with author}}
<a href="/people/{{guid}}" class="author {{{hovercardable this}}}">{{name}}</a>
{{/with}}
{{#linkToAuthor author}}
{{name}}
{{/linkToAuthor}}
<span class="details grey">
-
......
<div id="{{guid}}" data-id="{{id}}" data-target="#{{guid}}" class="stream-frame-wrapper">
<div class="permalink-wrapper info">
<a href="/posts/{{id}}" class="permalink">
<i class="icon-zoom-in icon-white"></i>
</a>
</div>
<div class="permalink-wrapper info">
<a href="/p/{{guid}}">
<i class="icon-zoom-in icon-white"></i>
</a>
</div>
<div class='stream-frame-feedback'></div>
<div class="media author">
{{#linkToAuthor author}}
<div class="img">
<div class="profile-image-container smaller" style="background-image : url('{{avatar.large}}')"></div>
</div>
{{/linkToAuthor}}
<div class="bd">
{{#linkToAuthor author}}
{{name}}
{{/linkToAuthor}}
</div>
</div>
<div class="small-frame"></div>
</div>
......@@ -16,6 +16,6 @@ end
When (/^I hover "([^"]*)" within "([^"]*)"$/) do |name, selector|
with_scope(selector) do
find(".author", text: name).hover
find(".author-name", text: name).hover
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment