forked from mirror/pixelfed
Merge pull request #1196 from pixelfed/frontend-ui-refactor
Frontend ui refactor
This commit is contained in:
commit
870ba20f7b
|
@ -16,6 +16,7 @@ use Auth, Cache;
|
|||
use Illuminate\Http\Request;
|
||||
use League\Fractal;
|
||||
use App\Util\Media\Filter;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class StatusController extends Controller
|
||||
{
|
||||
|
|
|
@ -19,6 +19,25 @@ $(document).ready(function() {
|
|||
new Vue({
|
||||
el: '#content'
|
||||
});
|
||||
|
||||
$('.metro-classic-compose textarea[name="caption"]').on('click', function(e) {
|
||||
let el = $(this);
|
||||
el.attr('rows', 4);
|
||||
});
|
||||
$('.metro-classic-compose textarea[name="caption"]').on('change keyup paste', function(e) {
|
||||
let el = $(this);
|
||||
let len = el.val().length;
|
||||
let limit = el.attr('data-limit');
|
||||
|
||||
let res = len;
|
||||
|
||||
if(len > limit) {
|
||||
res = '<span class="text-danger">' + (limit - len) + '</span>';
|
||||
} else {
|
||||
res = '<span>' + len + '</span>';
|
||||
}
|
||||
$('.metro-classic-compose .caption-counter').html(res);
|
||||
})
|
||||
});
|
||||
</script>
|
||||
@endpush
|
|
@ -1,4 +1,4 @@
|
|||
<div class="card card-md-rounded-0">
|
||||
<div class="card card-md-rounded-0 metro-classic-compose">
|
||||
<div class="card-header bg-white font-weight-bold d-inline-flex justify-content-between">
|
||||
<div>{{__('Create New Post')}}</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue