mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-22 20:40:45 +00:00
Merge pull request #1196 from pixelfed/frontend-ui-refactor
Frontend ui refactor
This commit is contained in:
commit
870ba20f7b
3 changed files with 21 additions and 1 deletions
|
@ -16,6 +16,7 @@ use Auth, Cache;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use League\Fractal;
|
use League\Fractal;
|
||||||
use App\Util\Media\Filter;
|
use App\Util\Media\Filter;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class StatusController extends Controller
|
class StatusController extends Controller
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,25 @@ $(document).ready(function() {
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#content'
|
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>
|
</script>
|
||||||
@endpush
|
@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 class="card-header bg-white font-weight-bold d-inline-flex justify-content-between">
|
||||||
<div>{{__('Create New Post')}}</div>
|
<div>{{__('Create New Post')}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue