Skip to content

Commit

Permalink
Merge 3ca63ca into ffa6bcd
Browse files Browse the repository at this point in the history
  • Loading branch information
strugee committed Feb 24, 2019
2 parents ffa6bcd + 3ca63ca commit 7fd865d
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 17 deletions.
11 changes: 9 additions & 2 deletions public/javascript/pump/view.js
Expand Up @@ -1540,10 +1540,17 @@
"click .close-btn": "cancelComment"
},
ready: function() {
var view = this;
var view = this,
orig = view.options.original;

if (orig.inReplyTo) {
$(view.el).prepend('<div class="alert">Your comment will appear on the original post.</div>');
}

view.$('textarea[name="content"]').wysihtml5({
customTemplates: Pump.wysihtml5Tmpl
});

},
cancelComment: function() {
var view = this,
Expand Down Expand Up @@ -1571,7 +1578,7 @@
}
});

act.object.inReplyTo = orig;
act.object.inReplyTo = orig.inReplyTo || orig;

view.startSpin();

Expand Down
22 changes: 22 additions & 0 deletions public/stylesheet/pumpio.css
Expand Up @@ -238,6 +238,28 @@ body {
margin-top: 10px;
}

.inreplyto-icon {
font-size: 170%;
margin-right: 13px;
float: left;
}

.inreplyto-heading {
font-size: initial;
display: inline;
}

.inreplyto-image {
color: gray;
font-style: italic;
margin-top: 4px;
}

blockquote small::before {
/* Bootstrap override */
content: '';
}

/* sidebar */

#sidebar > h3 {
Expand Down
10 changes: 5 additions & 5 deletions public/template/lib/responses.jade
@@ -1,21 +1,21 @@
.responses

//- Like/unlike button
if obj.liked
a.unfavorite(href="#") Unlike
i.fa.fa-thumbs-o-down
else
a.favorite(href="#") Like
i.fa.fa-thumbs-o-up

//- Comment button
a.comment(href="#") Comment
i.fa.fa-comment

//- Share/unshare button
if obj.pump_io && obj.pump_io.shared
a.unshare(href="#") Unshare
i.fa.fa-times
Expand Down
41 changes: 31 additions & 10 deletions public/template/object-client.jade
@@ -1,3 +1,15 @@
mixin authorship(object)
p.muted
small
if object.author
a(href=object.author.url)!= object.author.displayName
| at
a(href=object.url)
time.dt-published(datetime=object.published)= object.published
if object.location
| in
a(href=object.location.url)!= object.location.displayName

.object-page.h-entry
.media
a.pull-left.h-card.p-author(href=object.author.url)
Expand All @@ -7,19 +19,28 @@
img.img-rounded.media-object(src="/images/default.png", width="96", height="96", alt=object.author.displayName)

.media-body
if object.inReplyTo
- var irt = object.inReplyTo;
blockquote
i.fa.fa-reply.inreplyto-icon

//- XXX this is author-then-title, but everything else is title-then-author
//- I think it looks better this way in this particular context but maybe it should be consistent?
+authorship(irt)

if !irt.content && irt.displayName
h2.inreplyto-heading!= irt.displayName
br

if irt.content
!= irt.content.length <= 80 ? irt.content : irt.content.substr(0, 80) + ""
else if irt.objectType === "image"
span.inreplyto-image (Image)

if object.displayName
h2.media-heading.p-name!= object.displayName

p.muted
small
if object.author
a(href=object.author.url)!= object.author.displayName
| at
a(href=object.url)
time.dt-published(datetime=object.published)= object.published
if object.location
| in
a(href=object.location.url)!= object.location.displayName
+authorship(object)

.e-content
if object.image && object.image.url
Expand Down

0 comments on commit 7fd865d

Please sign in to comment.