mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-29 17:53:16 +00:00
Add comment button to comment form where browser has 'Touch' event enabled
This commit is contained in:
parent
1d07c4a72e
commit
bffaac1b08
3 changed files with 44 additions and 16 deletions
7
resources/assets/js/components.js
vendored
7
resources/assets/js/components.js
vendored
|
@ -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');
|
||||
|
|
|
@ -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>
|
||||
|
|
20
resources/assets/sass/custom.scss
vendored
20
resources/assets/sass/custom.scss
vendored
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue