From b75f078c56e4c6a3b5eb03f7ddb025404ec25aea Mon Sep 17 00:00:00 2001 From: A1Gard Date: Sun, 1 Sep 2024 07:35:50 +0330 Subject: [PATCH] added tag page fixed readme fixed map bugs (inline map & icons) --- README.md | 2 +- app/Http/Controllers/ClientController.php | 29 +++--- app/Models/Clip.php | 31 ++++--- app/Models/Post.php | 49 ++++++----- app/Models/Product.php | 70 ++++++++------- public/assets/vendor/leaflet/layers-2x.png | Bin 0 -> 1259 bytes public/assets/vendor/leaflet/layers.png | Bin 0 -> 696 bytes .../assets/vendor/leaflet/marker-icon-2x.png | Bin 0 -> 2464 bytes public/assets/vendor/leaflet/marker-icon.png | Bin 0 -> 1466 bytes .../assets/vendor/leaflet/marker-shadow.png | Bin 0 -> 618 bytes resources/js/client-custom/tabControll.js | 3 +- resources/js/client-vue/AddressInput.vue | 9 ++ resources/js/components/AddressInput.vue | 10 +++ resources/js/components/latlng.vue | 8 ++ resources/sass/client-custom/_general.scss | 28 ++++++ resources/views/client/tag.blade.php | 83 ++++++++++++++++++ .../segments/index/InlineMap/InlineMap.js | 36 +++++--- .../product/ProductKaren/ProductKaren.scss | 8 -- 18 files changed, 263 insertions(+), 103 deletions(-) create mode 100644 public/assets/vendor/leaflet/layers-2x.png create mode 100644 public/assets/vendor/leaflet/layers.png create mode 100644 public/assets/vendor/leaflet/marker-icon-2x.png create mode 100644 public/assets/vendor/leaflet/marker-icon.png create mode 100644 public/assets/vendor/leaflet/marker-shadow.png create mode 100644 resources/views/client/tag.blade.php diff --git a/README.md b/README.md index 9360590..c38e52d 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ php artisan seeding:prepare ``` - Seeding image for models: [Group, Category, Post, Product, Slider] ```bash -pa seeding:image Product digital +php artisan seeding:image Product digital ``` > First parameter is Model, Second is image seeder directory available [bag, clothe, digital, sport, posts, makeup] > You can create your directory and put your image into new directory then use image seeder diff --git a/app/Http/Controllers/ClientController.php b/app/Http/Controllers/ClientController.php index 9436fcd..a75a264 100644 --- a/app/Http/Controllers/ClientController.php +++ b/app/Http/Controllers/ClientController.php @@ -29,10 +29,10 @@ class ClientController extends Controller $this->middleware(function ($request, $next) { - if ($request->attributes->get('set_lang') != true){ + if ($request->attributes->get('set_lang') != true) { app()->setLocale(config('app.locale')); \Session::remove('locate'); - }elseif (\Session::has('locate')) { + } elseif (\Session::has('locate')) { app()->setLocale(\Session::get('locate')); } @@ -177,7 +177,12 @@ class ClientController extends Controller { $tag = Tag::where('slug->' . config('app.locale'), 'like', $slug)->first(); - return $tag; + $posts = Post::withAnyTags([$tag])->where('status', 1)->paginate(100); + $products = Product::withAnyTags([$tag])->where('status', 1)->paginate(100); + $clips = Clip::withAnyTags([$tag])->where('status', 1)->paginate(100); + $title = __('Tag') . ': ' . $tag->name; + $subtitle = ''; + return view('client.tag', compact('tag', 'posts', 'products', 'clips', 'title', 'subtitle')); } @@ -229,7 +234,7 @@ class ClientController extends Controller public function group($slug) { - $group = Group::where('slug',$slug)->firstOrFail(); + $group = Group::where('slug', $slug)->firstOrFail(); $area = 'group'; $title = $group->name; $subtitle = $group->subtitle; @@ -400,10 +405,6 @@ class ClientController extends Controller } - - - - public function compare() { $area = 'compare'; @@ -413,13 +414,15 @@ class ClientController extends Controller $products = Product::whereIn('id', $ids)->where('status', 1)->get(); return view('client.default-list', compact('area', 'products', 'title', 'subtitle')); } + public function contact() { $area = 'contact-us'; $title = __("Contact us"); $subtitle = ''; - return view('client.default-list', compact('area', 'title', 'subtitle')); + return view('client.default-list', compact('area', 'title', 'subtitle')); } + public function sendContact(ContactSubmitRequest $request) { $con = new Contact(); @@ -581,14 +584,14 @@ class ClientController extends Controller } $method = explode('@', $r)[1]; $segments = $request->segments(); - $routes = explode('/',$n); + $routes = explode('/', $n); $args = []; foreach ($routes as $i => $route) { - if ($route[0] == '{'){ - $args[] = $segments[$i+1]; + if ($route[0] == '{') { + $args[] = $segments[$i + 1]; } } - $args[]= $request; + $args[] = $request; return $this->$method(...$args); } diff --git a/app/Models/Clip.php b/app/Models/Clip.php index d6c046d..9af1e01 100644 --- a/app/Models/Clip.php +++ b/app/Models/Clip.php @@ -10,9 +10,9 @@ use Spatie\Translatable\HasTranslations; class Clip extends Model { - use HasFactory, SoftDeletes, HasTranslations,HasTags; + use HasFactory, SoftDeletes, HasTranslations, HasTags; - public $translatable = ['title','body']; + public $translatable = ['title', 'body']; public function getRouteKeyName() { @@ -27,6 +27,7 @@ class Clip extends Model return \Storage::url('cover/optimized-' . $this->cover); } + public function imgOriginalUrl() { if ($this->cover == null) { @@ -50,12 +51,14 @@ class Clip extends Model return $this->belongsTo(\App\Models\User::class); } - public function attachs(){ - return $this->morphMany(Attachment::class,'attachable'); + public function attachs() + { + return $this->morphMany(Attachment::class, 'attachable'); } - public function webUrl(){ - return fixUrlLang(route('client.clip',$this->slug)); + public function webUrl() + { + return fixUrlLang(route('client.clip', $this->slug)); } @@ -69,12 +72,13 @@ class Clip extends Model return $this->morphMany(Comment::class, 'commentable')->where('status', 1); } - public function markup(){ + public function markup() + { $app = config('app.name'); $logo = asset('upload/images/logo.png'); - $desc = str_replace('"','',strip_tags($this->body)); - $count = $this->comments()->count() ; + $desc = str_replace('"', '', strip_tags($this->body)); + $count = $this->comments()->count(); return << @@ -106,11 +110,12 @@ RESULT; } - public function tagsList(){ - if ($this->tags()->count() == 0){ + public function tagsList() + { + if ($this->tags()->count() == 0) { return getSetting('keyword'); - }else{ - return implode(',',$this->tags()->pluck('name')->toArray()); + } else { + return implode(',', $this->tags()->pluck('name')->toArray()); } } diff --git a/app/Models/Post.php b/app/Models/Post.php index 655809d..ff7713e 100644 --- a/app/Models/Post.php +++ b/app/Models/Post.php @@ -41,28 +41,28 @@ class Post extends Model implements HasMedia { $optimize = getSetting('optimize'); - if ($optimize == false){ + if ($optimize == false) { $optimize = 'webp'; } $t = explode('x', config('app.media.post_thumb')); $t = imageSizeConvertValidate('post_thumb'); - $mc = $this->addMediaConversion('post-image') + $mc = $this->addMediaConversion('post-image') ->width($t[0]) ->height($t[1]) - ->crop( $t[0], $t[1]) + ->crop($t[0], $t[1]) ->optimize() ->sharpen(10) ->nonQueued() ->format($optimize); - if (getSetting('watermark')){ + if (getSetting('watermark')) { $mc->watermark(public_path('upload/images/logo.png'), - AlignPosition::BottomLeft, 5, 5, Unit::Percent, - config('app.media.watermark_size'), Unit::Percent, - config('app.media.watermark_size'), Unit::Percent, Fit::Contain, - config('app.media.watermark_opacity')); + AlignPosition::BottomLeft, 5, 5, Unit::Percent, + config('app.media.watermark_size'), Unit::Percent, + config('app.media.watermark_size'), Unit::Percent, Fit::Contain, + config('app.media.watermark_opacity')); } } @@ -106,12 +106,14 @@ class Post extends Model implements HasMedia return $this->morphMany(Comment::class, 'commentable'); } - public function mainGroup(){ - return $this->belongsTo(Group::class,'group_id'); + public function mainGroup() + { + return $this->belongsTo(Group::class, 'group_id'); } - public function attachs(){ - return $this->morphMany(Attachment::class,'attachable'); + public function attachs() + { + return $this->morphMany(Attachment::class, 'attachable'); } @@ -130,23 +132,25 @@ class Post extends Model implements HasMedia // ]; // } - public function webUrl(){ - return fixUrlLang(route('client.post',$this->slug)); + public function webUrl() + { + return fixUrlLang(route('client.post', $this->slug)); } - public function markup(){ + public function markup() + { $type = 'BlogPosting'; - if (strpos(strtolower(implode(',',$this->groups()->pluck('name')->toArray())),__('article')) !== false){ + if (strpos(strtolower(implode(',', $this->groups()->pluck('name')->toArray())), __('article')) !== false) { $type = 'Article'; } - if (strpos(strtolower(implode(',',$this->groups()->pluck('name')->toArray())),__('news')) !== false){ + if (strpos(strtolower(implode(',', $this->groups()->pluck('name')->toArray())), __('news')) !== false) { $type = 'NewsArticle'; } $app = config('app.name'); $logo = asset('upload/images/logo.png'); - $author = $this->author->name??$app; + $author = $this->author->name ?? $app; return << { @@ -184,11 +188,12 @@ RESULT; } - public function tagsList(){ - if ($this->tags()->count() == 0){ + public function tagsList() + { + if ($this->tags()->count() == 0) { return getSetting('keyword'); - }else{ - return implode(',',$this->tags()->pluck('name')->toArray()); + } else { + return implode(',', $this->tags()->pluck('name')->toArray()); } } } diff --git a/app/Models/Product.php b/app/Models/Product.php index 3cedd24..47832ad 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -144,9 +144,9 @@ class Product extends Model implements HasMedia { return $this->hasMany(Discount::class, 'product_id', 'id') ->where(function ($query) { - $query->where('expire', '>=', date('Y-m-d')) - ->orWhereNull('expire'); - }); + $query->where('expire', '>=', date('Y-m-d')) + ->orWhereNull('expire'); + }); } public function quesions() @@ -156,7 +156,7 @@ class Product extends Model implements HasMedia function hasDiscount() { - if (!$this->isAvailable()){ + if (!$this->isAvailable()) { return false; } return $this->discounts() @@ -242,11 +242,11 @@ class Product extends Model implements HasMedia case 'select': case 'singlemulti': if (!is_array($value)) { - if (isset( $result[$key]['data']->datas[$value])){ + if (isset($result[$key]['data']->datas[$value])) { $result[$key]['human_value'] = $result[$key]['data']->datas[$value]; - }else{ + } else { $result[$key]['human_value'] = '-'; } } else { @@ -259,11 +259,11 @@ class Product extends Model implements HasMedia break; default: if (is_array($value)) { - $result[$key]['human_value'] = ''.implode(' ', $value).''; + $result[$key]['human_value'] = '' . implode(' ', $value) . ''; } else { if ($value == '' || $value == null) { $result[$key]['human_value'] = '-'; - }else{ + } else { $result[$key]['human_value'] = $value; } } @@ -283,7 +283,7 @@ class Product extends Model implements HasMedia public function webUrl() { - return fixUrlLang(route('client.product',$this->slug)); + return fixUrlLang(route('client.product', $this->slug)); } @@ -296,16 +296,16 @@ class Product extends Model implements HasMedia $price = $this->quantities()->min('price'); } - if (!$this->isAvailable()){ - return __('Unavailable'); + if (!$this->isAvailable()) { + return __('Unavailable'); } if ($this->hasDiscount()) { $d = $this->activeDiscounts()->first(); if ($d->type == 'PRICE') { $price -= $d->amount; - }else{ - $price = ( (100 - $d->amount) * $price ) / 100; + } else { + $price = ((100 - $d->amount) * $price) / 100; } } @@ -315,6 +315,7 @@ class Product extends Model implements HasMedia return number_format($price) . ' ' . config('app.currency.symbol'); } + public function oldPricePure() { $price = 0; @@ -330,6 +331,7 @@ class Product extends Model implements HasMedia return $price; } + public function oldPrice() { $price = 0; @@ -346,29 +348,32 @@ class Product extends Model implements HasMedia return number_format($price) . ' ' . config('app.currency.symbol'); } - public function isFav(){ + public function isFav() + { if (!auth('customer')->check()) { return -1; } if (\auth('customer')->user()->products()->where('product_id', $this->id)->exists()) { return 1; - }else{ + } else { return 0; } } - public function isAvailable(){ - if ($this->stock_quantity == 0){ - return false; + public function isAvailable() + { + if ($this->stock_quantity == 0) { + return false; } - if ($this->stock_status != 'IN_STOCK'){ - return false; + if ($this->stock_status != 'IN_STOCK') { + return false; } - return true; + return true; } - public function markup(){ + public function markup() + { $currency = config('app.currency.code'); @@ -413,25 +418,26 @@ RESULT; public function seoDesc() { $template = getSetting('product_description'); - if ($template == null || $template == ''){ + if ($template == null || $template == '') { $template = __('%name% sale in our shop by %price% %category.name%'); } - $template = str_replace('%name%', $this->name,$template); - $template = str_replace('%price%', $this->getPrice() ,$template); - $template = str_replace('%excerpt%', $this->excerpt,$template); - $template = str_replace('%stock_quantity%', $this->stock_quantity,$template); - $template = str_replace('%category.name%', $this->category->name,$template); + $template = str_replace('%name%', $this->name, $template); + $template = str_replace('%price%', $this->getPrice(), $template); + $template = str_replace('%excerpt%', $this->excerpt, $template); + $template = str_replace('%stock_quantity%', $this->stock_quantity, $template); + $template = str_replace('%category.name%', $this->category->name, $template); return $template; } - public function tagsList(){ - if ($this->tags()->count() == 0){ + public function tagsList() + { + if ($this->tags()->count() == 0) { return getSetting('keyword'); - }else{ - return implode(',',$this->tags()->pluck('name')->toArray()); + } else { + return implode(',', $this->tags()->pluck('name')->toArray()); } } } diff --git a/public/assets/vendor/leaflet/layers-2x.png b/public/assets/vendor/leaflet/layers-2x.png new file mode 100644 index 0000000000000000000000000000000000000000..200c333dca9652ac4cba004d609e5af4eee168c1 GIT binary patch literal 1259 zcmVFhCYNy;#0irRPomHqW|G1C*;4?@4#E?jH>?v@U%cy?3dQAc-DchXVErpOh~ z-jbon+tNbnl6hoEb;)TVk+%hTDDi_G%i3*RZ&15!$Fjr^f;Ke&A@|?=`2&+{zr+3a z{D*=t(`AXyS%X7N z%a#RZw6vD^t_rnM`L4E>m=U&R!A-&}nZIi$BOPvkhrCuUe@BN~-lRD)f44;J%TwgE zcze8u!PQ_NR7?o(NylLXVTfDO zxs5=@|GsYEsNo4M#nT%N!UE(?dnS)t2+{ELYAFp*3=iF=|EQnTp`#vlSXuGVraYo? z+RCzXo6h3qA8{KG?S4nE(lM+;Eb4nT3XV;7gcAxUi5m)`k5tv}cPy()8ZR3TLW3I- zAS^}cq-IJvL7a4RgR!yk@~RT%$lA7{L5ES*hyx)M4(yxI$Ub(4f)K|^v1>zvwQY!_ zIrWw8q9GS^!Dp~}+?mbnB6jDF8mVlbQ!jFKDY;w=7;XO{9bq7>LXGK24WA`;rL)_Z z)&j}pbV(;6gY;VMhbxgvn`X;6x}VUEE-7 z%)7j-%t8S=ZL3yc)HbXDAqJZvBTPoiW_A-+a8m3_Z?v{DN7Tnr#O_VUMT0UBt$;p` zDh6JbGHN8JJ*JN%y2%msb97@_S>9!%Egwk;?PEkU9ntz&3uR}%Fj5d$JHQbQb3}a{ zSzFT^#n=VInPpcAS}CNxj?_ zVscANk5Cfz(51EI1pz};AWWb|kgbYNb4wCEGUn3+eMUMV?1-{=I4TlmLJMot@rd07 zZuo2hk1ccu{YmGkcYdWAVdk{Z4Nm?^cTD&}jGm+Q1SYIXMwmG*oO*83&#>l%nbR`G zhh=lZ%xIb7kU3#;TBbfECrnC9P=-XpL|TG2BoZdj61*XiFbW8?1Z_wp%#;>${SUIy V$8qr;L*)Pf002ovPDHLkV1hYLS~36t literal 0 HcmV?d00001 diff --git a/public/assets/vendor/leaflet/layers.png b/public/assets/vendor/leaflet/layers.png new file mode 100644 index 0000000000000000000000000000000000000000..1a72e5784b2b456eac5d7670738db80697af3377 GIT binary patch literal 696 zcmV;p0!RIcP)*@&l2<6p=!C&s@#ZL+%BQvF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* z_+8b`F-{E=0sOgM<;VHTo!Ij3u zmmI`2?K7g(GOcGA)@h?$SW&pwHdtj1n57PLI8&6RHhx4R%Q7b z^JEqR)@06V!pbS*@D_ZyRMo_LlT}r{#sXOx4kM-V<_V{!5SSuM^SIVCA37|nY7LWQ zZA#B1h4l`6asz=Lvax_#GMRX|NF>=$=p{Qn0i@ExX1jGhy@B8a*_uR+ODEbVi8ObL zezG?azy>E~S~dl43&8<$(2H}P&*tuBdESUP83KQ?8B z?K(!uS>H1wlWQz;qOfB`T#TZ=EoSp~vZ5XtCvwm1h*Ex6mzTsn_y@_=xREIslV-%- zpdWkEzMjeNOGWrSM32gpBt27*O29NdhGzuDgYxcf`Jjjqw@B;Vmdb@fxdhCRi`Kg> zmUTr$=&@#i!%F4Q6mb&4QKfR^95KJ!<6~fqx-f^66AV!|ywG{6D^Vay-3b99>XOe# e-I|>x8~*?ZhF3snGbtJX0000cOl4 literal 0 HcmV?d00001 diff --git a/public/assets/vendor/leaflet/marker-icon.png b/public/assets/vendor/leaflet/marker-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..950edf24677ded147df13b26f91baa2b0fa70513 GIT binary patch literal 1466 zcmV;r1x5OaP)P001cn1^@s6z>|W`000GnNklGNuHDcIX17Zdjl&3`L?0sTjIws<{((Dh&g-s0<@jYQyl?D*X^?%13;ml^gy> ziMrY_^1WI=(g@LMizu=zCoA>C`6|QEq1eV92k*7m>G65*&@&6)aC&e}G zI)pf-Za|N`DT&Cn1J|o`19mumxW~hiKiKyc-P`S@q)rdTo84@QI@;0yXrG%9uhI>A zG5QHb6s4=<6xy{1 z@NMxEkryp{LS44%z$3lP^cX!9+2-;CTt3wM4(k*#C{aiIiLuB>jJj;KPhPzIC00bL zU3a#;aJld94lCW=`4&aAy8M7PY=HQ>O%$YEP4c4UY#CRxfgbE~(|uiI=YS8q;O9y6 zmIkXzR`}p7ti|PrM3a}WMnR=3NVnWdAAR>b9X@)DKL6=YsvmH%?I24wdq?Gh54_;# z$?_LvgjEdspdQlft#4CQ z`2Zyvy?*)N1Ftw|{_hakhG9WjS?Az@I@+IZ8JbWewR!XUK4&6346+d#~gsE0SY(LX8&JfY>Aj)RxGy96nwhs2rv zzW6pTnMpFkDSkT*a*6Dx|u@ds6ISVn0@^RmIsKZ5Y;bazbc;tTSq(kg(=481ODrPyNB6n z-$+U}(w$m6U6H$w17Bw+wDaFIe~GvNMYvnw31MpY0eQKT9l>SU``8k7w4)z!GZKMI z#_cEKq7k~i%nlK@6c-K?+R;B#5$?T#YpKD`t_4bAs^#E+@5QW$@OX3*`;(#{U^d-vY)&xEE>n5lYl&T?Amke9$Lam@{1K@O ze*LXqlKQHiv=gx+V^Cbb2?z@ISBQ*3amF;9UJ3SBg(N|710TLamQmYZ&Qjn2LuO<* zCZlB4n%@pc&7NNnY1}x+NWpHlq`OJEo|`aYN9<`RBUB+79g;>dgb6YlfN#kGL?lO_ z!6~M^7sOnbsUkKk<@Ysie&`G>ruxH&Mgy&8;i=A zB9OO!xR{AyODw>DS-q5YM{0ExFEAzt zm>RdS+ssW(-8|?xr0(?$vBVB*%(xDLtq3Hf0I5yFm<_g=W2`QWAax{1rWVH=I!VrP zs(rTFX@W#t$hXNvbgX`gK&^w_YD;CQ!B@e0QbLIWaKAXQe2-kkloo;{iF#6}z!4=W zi$giRj1{ zt;2w`VSCF#WE&*ev7jpsC=6175@(~nTE2;7M-L((0bH@yG}-TB$R~WXd?tA$s3|%y zA`9$sA(>F%J3ioz<-LJl*^o1|w84l>HBR`>3l9c8$5Xr@xCiIQ7{x$fMCzOk_-M=% z+{a_Q#;42`#KfUte@$NT77uaTz?b-fBe)1s5XE$yA79fm?KqM^VgLXD07*qoM6N<$ Ef<_J(9smFU literal 0 HcmV?d00001 diff --git a/resources/js/client-custom/tabControll.js b/resources/js/client-custom/tabControll.js index 98bdca3..4ef86b9 100644 --- a/resources/js/client-custom/tabControll.js +++ b/resources/js/client-custom/tabControll.js @@ -1,11 +1,12 @@ document.addEventListener('DOMContentLoaded', function () { if (document.querySelectorAll('.tab-control a').length > 0) { document.querySelectorAll('.tab-control a')?.forEach(function (el) { + el.addEventListener('click', function () { try { document.querySelector('.tab-control a.active').classList.remove('active'); this.classList.add('active'); - document.querySelector('.tab.active').classList.remove('active'); + document.querySelector('.tab.active,.tab-content.active').classList.remove('active'); document.querySelector(this.getAttribute('href')).classList.add('active'); } catch { } diff --git a/resources/js/client-vue/AddressInput.vue b/resources/js/client-vue/AddressInput.vue index 6b8aba1..f5ed697 100644 --- a/resources/js/client-vue/AddressInput.vue +++ b/resources/js/client-vue/AddressInput.vue @@ -274,8 +274,17 @@ export default { }, initMap() { + if (!import.meta.env.DEV){ + L.Icon.Default.mergeOptions({ + iconRetinaUrl: "/assets/vendor/leaflet/marker-icon-2x.png", + iconUrl: "/assets/vendor/leaflet/marker-icon.png", + shadowUrl: "/assets/vendor/leaflet/marker-shadow.png" + }); + } + this.map = L.map(this.$refs.mapContainer).setView([35.83266000, 50.99155000], 10); + L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: '© openstreetmap', attributionControl: false, diff --git a/resources/js/components/AddressInput.vue b/resources/js/components/AddressInput.vue index 80fe289..e5087b1 100644 --- a/resources/js/components/AddressInput.vue +++ b/resources/js/components/AddressInput.vue @@ -274,6 +274,16 @@ export default { }, initMap() { + + if (!import.meta.env.DEV){ + L.Icon.Default.mergeOptions({ + iconRetinaUrl: "/assets/vendor/leaflet/marker-icon-2x.png", + iconUrl: "/assets/vendor/leaflet/marker-icon.png", + shadowUrl: "/assets/vendor/leaflet/marker-shadow.png" + }); + } + + this.map = L.map(this.$refs.mapContainer).setView([35.83266000, 50.99155000], 10); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { diff --git a/resources/js/components/latlng.vue b/resources/js/components/latlng.vue index b2fb8b9..af02b98 100644 --- a/resources/js/components/latlng.vue +++ b/resources/js/components/latlng.vue @@ -70,6 +70,14 @@ export default { }, methods: { initMap() { + if (!import.meta.env.DEV){ + L.Icon.Default.mergeOptions({ + iconRetinaUrl: "/assets/vendor/leaflet/marker-icon-2x.png", + iconUrl: "/assets/vendor/leaflet/marker-icon.png", + shadowUrl: "/assets/vendor/leaflet/marker-shadow.png" + }); + } + this.map = L.map(this.$refs.mapContainer).setView([this.lat, this.lng], this.zoom); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { diff --git a/resources/sass/client-custom/_general.scss b/resources/sass/client-custom/_general.scss index 0fd1e72..e52e5f5 100644 --- a/resources/sass/client-custom/_general.scss +++ b/resources/sass/client-custom/_general.scss @@ -127,3 +127,31 @@ body { color: var(--xshop-diff2); } } + + +.tag-page{ + + min-height: 60vh; + .tab-control{ + padding-left: 12px; + padding-right: 12px; + } + .tab-control a.active{ + background: var(--xshop-primary); + color: var(--xshop-diff); + } + .tab-content{ + background: transparent; + } +} + +.tab-content { + display: none; + padding: 1rem; + background: var(--karen-tab-bg-color,#ffffff); + + &.active { + display: block; + + } +} diff --git a/resources/views/client/tag.blade.php b/resources/views/client/tag.blade.php new file mode 100644 index 0000000..d2a1903 --- /dev/null +++ b/resources/views/client/tag.blade.php @@ -0,0 +1,83 @@ +@extends('website.inc.website-layout') + +@section('title') + {{$title}} - {{config('app.name')}} +@endsection +@section('content') + @foreach(getParts('default_header') as $part) + @php($p = $part->getBladeWithData()) + @include($p['blade'],['data' => $p['data']]) + @endforeach +
+ +
+
+ @if(count($posts) == 0) +
+ {{__("There is nothing to show!")}} +
+ @else + + @endif +
+
+ @if(count($products) == 0) +
+ {{__("There is nothing to show!")}} +
+ @else + + @endif +
+
+ @if(count($clips) == 0) +
+ {{__("There is nothing to show!")}} +
+ @else + + @endif +
+
+
+ @foreach(getParts('default_footer') as $part) + @php($p = $part->getBladeWithData()) + @include($p['blade'],['data' => $p['data']]) + @endforeach +@endsection diff --git a/resources/views/segments/index/InlineMap/InlineMap.js b/resources/views/segments/index/InlineMap/InlineMap.js index 21687f9..3eb185d 100644 --- a/resources/views/segments/index/InlineMap/InlineMap.js +++ b/resources/views/segments/index/InlineMap/InlineMap.js @@ -3,21 +3,31 @@ import L from 'leaflet'; var map,marker ; window.addEventListener('load',function () { - const lat = parseFloat(document.querySelector('#maplat').value); - const lng = parseFloat(document.querySelector('#maplng').value); - const zoom = parseInt(document.querySelector('#mapzoom').value); - map = L.map(document.querySelector('#mapContainer')).setView([lat,lng], zoom); + // delete L.icon.default.prototype._getIconUrl ; + if (!import.meta.env.DEV){ + L.Icon.Default.mergeOptions({ + iconRetinaUrl: "/assets/vendor/leaflet/marker-icon-2x.png", + iconUrl: "/assets/vendor/leaflet/marker-icon.png", + shadowUrl: "/assets/vendor/leaflet/marker-shadow.png" + }); + } + if (document.querySelectorAll('#mapContainer').length != 0) { + const lat = parseFloat(document.querySelector('#maplat').value); + const lng = parseFloat(document.querySelector('#maplng').value); + const zoom = parseInt(document.querySelector('#mapzoom').value); + map = L.map(document.querySelector('#mapContainer')).setView([lat, lng], zoom); - L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: '© openstreetmap', - attributionControl: false, - }).addTo(map); + L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { + attribution: '© openstreetmap', + attributionControl: false, + }).addTo(map); - map.attributionControl.setPrefix('xShop'); + map.attributionControl.setPrefix('xShop'); - if (this.marker) { - map.removeLayer(marker); - } + if (this.marker) { + map.removeLayer(marker); + } - marker = L.marker({lat: lat, lng: lng}).addTo(map); + marker = L.marker({lat: lat, lng: lng}).addTo(map); + } }); diff --git a/resources/views/segments/product/ProductKaren/ProductKaren.scss b/resources/views/segments/product/ProductKaren/ProductKaren.scss index d8b261e..d80313c 100644 --- a/resources/views/segments/product/ProductKaren/ProductKaren.scss +++ b/resources/views/segments/product/ProductKaren/ProductKaren.scss @@ -160,13 +160,5 @@ background: var(--xshop-primary); transition: left 0.3s ease, width 0.3s ease; } - .tab-content { - display: none; - padding: 1rem; - background: var(--karen-tab-bg-color,#ffffff); - } - .tab-content.active { - display: block; - } }