markdownify text; better folder structure for photo-viewer templates
This commit is contained in:
parent
3d1ac7ed55
commit
f83b82902c
12 changed files with 26 additions and 13 deletions
|
|
@ -17,11 +17,9 @@
|
|||
= person_link(@post.author, :class => 'author-name')
|
||||
|
||||
- if @post.is_a?(Reshare) && @post.root.present?
|
||||
reshared via
|
||||
%i.icon-retweet
|
||||
= person_link(@post.root.author, :class => "author-name")
|
||||
|
||||
|
||||
|
||||
.post-time
|
||||
%i.icon-time
|
||||
= time_ago_in_words(@post.created_at) + ' ago'
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
var text = model.get("text");
|
||||
var mentions = model.get("mentioned_people");
|
||||
|
||||
return textFormatter.mentionify(
|
||||
return $(textFormatter.mentionify(
|
||||
textFormatter.hashtagify(
|
||||
textFormatter.markdownify(text)
|
||||
), mentions
|
||||
)
|
||||
)).html()
|
||||
};
|
||||
|
||||
textFormatter.markdownify = function markdownify(text){
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ app.pages.PostViewer = app.views.Base.extend({
|
|||
return new app.views.Post({
|
||||
model : this.model,
|
||||
className : "loaded",
|
||||
templateName : this.options.postTemplateName
|
||||
templateName : "post-viewer/content/" + this.options.postTemplateName
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
<div class="activity-streams-photo backdrop">
|
||||
<div class="photoset">
|
||||
<div class="img-bounding-box">
|
||||
<img src="{{object_url}}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="multi-photo backdrop">
|
||||
<h3>
|
||||
{{text}}
|
||||
{{{text}}}
|
||||
</h3>
|
||||
|
||||
<div class="photoset">
|
||||
|
|
@ -3,6 +3,6 @@
|
|||
A HEADING
|
||||
</h1>
|
||||
<p>
|
||||
{{text}}
|
||||
{{{text}}}
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="status photo-backdrop" style="background-image: url({{sizes.large}})">
|
||||
<div class="darken">
|
||||
<h1>
|
||||
{{../text}}
|
||||
{{{../text}}}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<div class="status backdrop">
|
||||
<h1>
|
||||
{{text}}
|
||||
{{{text}}}
|
||||
</h1>
|
||||
</div>
|
||||
|
|
@ -24,6 +24,7 @@ app.views.Post = app.views.StreamObject.extend({
|
|||
tooltipSelector : ".delete, .block_user, .post_scope",
|
||||
|
||||
initialize : function(options) {
|
||||
console.log(this.model.attributes)
|
||||
// allow for a custom template name to be passed in via the options hash
|
||||
this.templateName = options.templateName || this.templateName
|
||||
|
||||
|
|
@ -54,7 +55,8 @@ app.views.Post = app.views.StreamObject.extend({
|
|||
presenter : function() {
|
||||
return _.extend(this.defaultPresenter(), {
|
||||
authorIsNotCurrentUser : this.authorIsNotCurrentUser(),
|
||||
showPost : this.showPost()
|
||||
showPost : this.showPost(),
|
||||
text : app.helpers.textFormatter(this.model)
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -198,7 +198,13 @@ $light-grey: #999;
|
|||
width: 35px;
|
||||
}
|
||||
|
||||
i.icon-time,
|
||||
i.icon-retweet {
|
||||
@include opacity(0.5);
|
||||
}
|
||||
|
||||
.author-name {
|
||||
text-shadow: 0 0 2px rgba(255,255,255,0.9);
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue