From a051c170106f93833ba32871e8b628c479b78266 Mon Sep 17 00:00:00 2001 From: KodeStar Date: Sun, 18 Feb 2018 17:23:05 +0000 Subject: [PATCH] style the tags + close #47 --- app/Item.php | 8 ++++++++ public/css/app.css | 8 +++++--- public/mix-manifest.json | 2 +- resources/assets/sass/_select2.scss | 8 +++++--- resources/views/item.blade.php | 2 +- resources/views/items/form.blade.php | 2 +- resources/views/items/list.blade.php | 1 + resources/views/tags/list.blade.php | 1 + 8 files changed, 23 insertions(+), 9 deletions(-) diff --git a/app/Item.php b/app/Item.php index 60073961..05f9b63f 100644 --- a/app/Item.php +++ b/app/Item.php @@ -161,6 +161,14 @@ class Item extends Model return 'fa-arrow-alt-to-right'; } } + public function getLinkTypeAttribute() + { + if((int)$this->type === 1) { + return 'tags'; + } else { + return 'items'; + } + } public function scopeOfType($query, $type) { diff --git a/public/css/app.css b/public/css/app.css index d98b1674..ec4de6a2 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -5590,14 +5590,16 @@ readers do not read off random characters that represent icons */ } .select2-container--default .select2-selection--multiple .select2-selection__choice { - background-color: #e4e4e4; - border: 1px solid #aaa; + background-color: #f2f3f6; + border: 1px solid #dedfe2; border-radius: 4px; cursor: default; float: left; margin-right: 5px; + font-size: 13px; + font-weight: 300; margin-top: 5px; - padding: 0 5px; + padding: 5px; } .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { diff --git a/public/mix-manifest.json b/public/mix-manifest.json index b57d6410..8cecc25b 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,4 +1,4 @@ { - "/css/app.css": "/css/app.css?id=098a3a1a2e45b2715547", + "/css/app.css": "/css/app.css?id=353c513dd97a5fa0607d", "/js/app.js": "/js/app.js?id=24ea5e5c1fbea3461a14" } \ No newline at end of file diff --git a/resources/assets/sass/_select2.scss b/resources/assets/sass/_select2.scss index 47afaece..23981d95 100644 --- a/resources/assets/sass/_select2.scss +++ b/resources/assets/sass/_select2.scss @@ -199,14 +199,16 @@ margin-top: 5px; margin-right: 10px; } .select2-container--default .select2-selection--multiple .select2-selection__choice { - background-color: #e4e4e4; - border: 1px solid #aaa; + background-color: #f2f3f6; + border: 1px solid #dedfe2; border-radius: 4px; cursor: default; float: left; margin-right: 5px; + font-size: 13px; + font-weight: 300; margin-top: 5px; - padding: 0 5px; } + padding: 5px; } .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: #999; cursor: pointer; diff --git a/resources/views/item.blade.php b/resources/views/item.blade.php index 9791041e..4cf9afed 100644 --- a/resources/views/item.blade.php +++ b/resources/views/item.blade.php @@ -13,6 +13,6 @@ target }} href="{{ $app->link }}"> - + diff --git a/resources/views/items/form.blade.php b/resources/views/items/form.blade.php index a475e8a9..9d8b20cf 100644 --- a/resources/views/items/form.blade.php +++ b/resources/views/items/form.blade.php @@ -33,7 +33,7 @@ {!! Form::text('colour', null, array('placeholder' => __('app.apps.hex'),'class' => 'form-control color-picker')) !!}
- + {!! Form::select('tags', $tags, $current_tags, ['class' => 'tags', 'multiple']) !!}
diff --git a/resources/views/items/list.blade.php b/resources/views/items/list.blade.php index bb0a7f59..8d1a41ca 100644 --- a/resources/views/items/list.blade.php +++ b/resources/views/items/list.blade.php @@ -12,6 +12,7 @@
{{ __('app.buttons.add') }} + {{ __('app.buttons.cancel') }}
diff --git a/resources/views/tags/list.blade.php b/resources/views/tags/list.blade.php index 99a84480..02def55d 100644 --- a/resources/views/tags/list.blade.php +++ b/resources/views/tags/list.blade.php @@ -12,6 +12,7 @@
{{ __('app.buttons.add') }} + {{ __('app.buttons.cancel') }}