1
0
Fork 0
forked from mirror/pixelfed

Merge pull request #676 from cmho/274-add-comment-button

[274] Add comment button to comment form where browser has 'Touch' event enabled
This commit is contained in:
daniel 2018-12-27 01:07:34 -07:00 committed by GitHub
commit cacaa6b721
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 16 deletions

View file

@ -25,6 +25,13 @@ pixelfed.readmore = () => {
});
};
try {
document.createEvent("TouchEvent");
$('body').addClass('touch');
} catch (e) {
return false;
}
window.InfiniteScroll = require('infinite-scroll');
window.filesize = require('filesize');
window.Plyr = require('plyr');

View file

@ -156,6 +156,7 @@
<input type="hidden" name="_token" value="">
<input type="hidden" name="item" :value="statusId">
<input class="form-control" name="comment" placeholder="Add a comment..." autocomplete="off">
<input type="submit" value="Send" class="btn btn-primary comment-submit" />
</form>
</div>
</div>

View file

@ -267,6 +267,26 @@ body, button, input, textarea {
.card {
box-shadow: 0 2px 6px 0 hsla(0, 0%, 0%, 0.2);
border: none;
.comment-submit {
display: none;
position: absolute;
bottom: 12px;
right: 20px;
width: 60px;
text-align: center;
border-radius: 0 3px 3px 0;
}
}
.touch .card {
input[name="comment"] {
padding-right: 70px;
}
.comment-submit {
display: block;
}
}
.box-shadow {