mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 16:23: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.InfiniteScroll = require('infinite-scroll');
|
||||||
window.filesize = require('filesize');
|
window.filesize = require('filesize');
|
||||||
window.Plyr = require('plyr');
|
window.Plyr = require('plyr');
|
||||||
|
|
|
@ -156,6 +156,7 @@
|
||||||
<input type="hidden" name="_token" value="">
|
<input type="hidden" name="_token" value="">
|
||||||
<input type="hidden" name="item" :value="statusId">
|
<input type="hidden" name="item" :value="statusId">
|
||||||
<input class="form-control" name="comment" placeholder="Add a comment..." autocomplete="off">
|
<input class="form-control" name="comment" placeholder="Add a comment..." autocomplete="off">
|
||||||
|
<input type="submit" value="Send" class="btn btn-primary comment-submit" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</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 {
|
.card {
|
||||||
box-shadow: 0 2px 6px 0 hsla(0, 0%, 0%, 0.2);
|
box-shadow: 0 2px 6px 0 hsla(0, 0%, 0%, 0.2);
|
||||||
border: none;
|
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 {
|
.box-shadow {
|
||||||
|
|
Loading…
Reference in a new issue