From eb1494712dcf7490d3d3c466bf9ee964cec56dba Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 4 Jul 2019 14:26:47 +0200 Subject: [PATCH] wip #2843 @5 --- .../Controllers/Admin/NewsCrudController.php | 16 ++ app/Http/Controllers/Controller.php | 13 -- app/Http/Controllers/PageController.php | 5 +- app/Http/Controllers/ProductController.php | 24 ++ app/Http/Kernel.php | 1 - app/Http/Middleware/GenerateMenus.php | 216 ------------------ app/Models/Page.php | 196 ++++++++++++++++ app/Models/Product.php | 45 +++- app/Models/Settings.php | 5 + composer.json | 1 - config/app.php | 2 + package.json | 5 +- public/_modules/product-onglet/style.styl | 3 +- .../product-details}/arrow-down.svg | 0 .../product-details/icon-document.svg} | 0 .../product-details/icon-tech.svg} | 0 resources/js/bootstrap.js | 13 +- resources/js/product-details.js | 28 +++ .../styles/components/product-details.styl | 70 ++++++ resources/views/layouts/app.blade.php | 4 +- .../views/pages/product-detail.blade.php | 209 +++++++++++++---- resources/views/partials/footer.blade.php | 4 +- resources/views/partials/nav.blade.php | 2 +- routes/backpack/custom.php | 5 - routes/web.php | 7 +- webpack.mix.js | 1 + 26 files changed, 574 insertions(+), 301 deletions(-) create mode 100644 app/Http/Controllers/Admin/NewsCrudController.php delete mode 100644 app/Http/Controllers/Controller.php create mode 100644 app/Http/Controllers/ProductController.php delete mode 100644 app/Http/Middleware/GenerateMenus.php rename public/{_modules/product-onglet/img => images/product-details}/arrow-down.svg (100%) rename public/{_modules/product-onglet/img/icon-file.svg => images/product-details/icon-document.svg} (100%) rename public/{_modules/product-onglet/img/icon-file-2.svg => images/product-details/icon-tech.svg} (100%) create mode 100644 resources/js/product-details.js create mode 100644 resources/styles/components/product-details.styl diff --git a/app/Http/Controllers/Admin/NewsCrudController.php b/app/Http/Controllers/Admin/NewsCrudController.php new file mode 100644 index 0000000..ff04f36 --- /dev/null +++ b/app/Http/Controllers/Admin/NewsCrudController.php @@ -0,0 +1,16 @@ +homepage.'); + $this->_404(); } $this->data['title'] = $page->title; diff --git a/app/Http/Controllers/ProductController.php b/app/Http/Controllers/ProductController.php new file mode 100644 index 0000000..70045d0 --- /dev/null +++ b/app/Http/Controllers/ProductController.php @@ -0,0 +1,24 @@ +_404(); + } + + $this->data['title'] = $product->title; + $this->data['product'] = $product->withFakes(); + + return view('pages.product-detail', $this->data); + } +} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 415c2d1..348665a 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -36,7 +36,6 @@ class Kernel extends HttpKernel \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, - \App\Http\Middleware\GenerateMenus::class, ], 'api' => [ diff --git a/app/Http/Middleware/GenerateMenus.php b/app/Http/Middleware/GenerateMenus.php deleted file mode 100644 index 3052ae1..0000000 --- a/app/Http/Middleware/GenerateMenus.php +++ /dev/null @@ -1,216 +0,0 @@ - 'Capteurs', - 'links' => [ - 'Force' => 'products/force', - 'Couple' => 'products/couple', - 'Déplacement' => 'products/deplacement', - 'Accélération' => 'products/acceleration', - 'Inclinaison' => 'products/inclinaison', - 'Pression' => 'products/pression', - ], - ], - - // Right panel - [ - 'title' => 'Systèmes de mesure', - 'links' => [ - 'Roue dynamométrique' => 'products/roue', - 'Contrôle de fermeture d’ouvrants' => 'products/cdfdo', - 'Contrôle de taraudage' => 'products/cdt', - 'Collecteurs tournant' => 'products/ct', - 'Télémétrie' => 'products/telemetrie', - 'Acquisition de données' => 'products/add', - ], - ], - ]; - - $tree = Page::getTree(); - file_put_contents(app_path('tree.txt'), print_r($tree, true)); - $main = $tree['#main']; - - $nav_items = []; - foreach ($main['children'] as $name => $item) { - - if ($item['element']->status !== 1) continue; // Skip offline pages - - $submenus = null; - if ($name == 'products') { - $submenus = $productsSubMenus; - } else { - $links = []; - - foreach ($item['children'] as $key => $child) { - $links[$child['element']->title] = $child['element']->slug; - } - - if (count($links) > 0) { - $submenus = [['links' => $links]]; - } - } - $s = ['url' => $item['element']->slug]; - if (null !== $submenus) { - $s['submenus'] = $submenus; - } - - $nav_items[$item['element']->title] = $s; - } - - // Hard coded menu structure until we have dynamic data from the CMS -// $nav_items = [ -// -// 'Products' => [ -// 'url' => 'products', -// 'submenus' => [ -// -// // Left panel -// [ -// 'title' => 'Capteurs', -// 'links' => [ -// 'Force' => 'products/force', -// 'Couple' => 'products/couple', -// 'Déplacement' => 'products/deplacement', -// 'Accélération' => 'products/acceleration', -// 'Inclinaison' => 'products/inclinaison', -// 'Pression' => 'products/pression', -// ], -// ], -// -// // Right panel -// [ -// 'title' => 'Systèmes de mesure', -// 'links' => [ -// 'Roue dynamométrique' => 'products/roue', -// 'Contrôle de fermeture d’ouvrants' => 'products/cdfdo', -// 'Contrôle de taraudage' => 'products/cdt', -// 'Collecteurs tournant' => 'products/ct', -// 'Télémétrie' => 'products/telemetrie', -// 'Acquisition de données' => 'products/add', -// ], -// ], -// ], -// ], -// -// 'Solutions' => [ -// 'url' => 'solutions', -// 'submenus' => [ -// [ -// 'links' => [ -// 'Énergie' => 'solutions/energie', -// 'Aéronautique' => 'solutions/aero', -// 'Ferroviaire' => 'solutions/ferroviaire', -// 'Automobile' => 'solutions/auto', -// 'Génie civil' => 'solutions/civil', -// 'Industrie' => 'solutions/industrie', -// ] -// ], -// ], -// ], -// -// 'Services' => [ -// 'url' => 'services', -// 'submenus' => [ -// [ -// 'title' => null, -// 'links' => [ -// 'Location' => 'services/location', -// 'Calibration' => 'services/calibration', -// 'Développement OEM' => 'services/developpement-oem', -// 'Custom Design' => 'services/custom-design', -// 'Formation' => 'services/formation', -// ], -// ], -// ], -// ], -// 'Support' => ['url' => 'support'], -// 'Société' => [ -// 'url' => 'societe', -// 'submenus' => [ -// [ -// 'links' => [ -// 'Qui sommes nous ?' => 'societe/a-propos', -// 'Actualités' => 'societe/actualites', -// ] -// ] -// ], -// ], -// 'Contact' => ['url' => 'contact'], -// ]; - - - \Menu::make('primary', function ($menu) use ($nav_items) { - - foreach ($nav_items as $nav_label => $nav_item) { - - $parent = $menu->add($nav_label, $nav_item['url']); - - // Handle items with submenus - if (isset($nav_item['submenus'])) { - - foreach ($nav_item['submenus'] as $submenu_data) { - - // Create an empty sub-element that will serve as a wrapper for the submenu(s) - $wrapper = $parent->raw('')->attr(['class' => 'nav-submenu-wrapper']); - - // Some submenus have a title element - if (isset($submenu_data['title'])) { - $wrapper->raw($submenu_data['title'])->attr(['class' => 'nav-submenu-title']); - } - - foreach ($submenu_data['links'] as $label => $url) { - $wrapper->add($label, $url); - } - } - } - - } - - }); - - // Also make a menu for the breadcrumbs - this one is simpler and doesn't have the submenu headings - \Menu::make('breadcrumbs', function ($menu) use ($nav_items) { - - // Start with home link - $menu = $menu->add('Home', ''); - - foreach ($nav_items as $nav_label => $nav_item) { - - $parent = $menu->add($nav_label, $nav_item['url']); - - // Handle items with submenus - if (isset($nav_item['submenus'])) { - - foreach ($nav_item['submenus'] as $submenu_data) { - foreach ($submenu_data['links'] as $label => $url) { - $parent->add($label, $url); - } - } - } - } - }); - - return $next($request); - } - - -} diff --git a/app/Models/Page.php b/app/Models/Page.php index 9b8d099..d8fb4b3 100644 --- a/app/Models/Page.php +++ b/app/Models/Page.php @@ -4,8 +4,204 @@ namespace App\Models; use Cubist\Backpack\app\Magic\Models\CMSPage; +use Lavary\Menu\Menu; class Page extends CMSPage { + public static function makeMenus() + { + if (Menu::exists('primary')) { + return; + } + $productsSubMenus = [ + + // Left panel + [ + 'title' => 'Capteurs', + 'links' => [ + 'Force' => 'products/force', + 'Couple' => 'products/couple', + 'Déplacement' => 'products/deplacement', + 'Accélération' => 'products/acceleration', + 'Inclinaison' => 'products/inclinaison', + 'Pression' => 'products/pression', + ], + ], + + // Right panel + [ + 'title' => 'Systèmes de mesure', + 'links' => [ + 'Roue dynamométrique' => 'products/roue', + 'Contrôle de fermeture d’ouvrants' => 'products/cdfdo', + 'Contrôle de taraudage' => 'products/cdt', + 'Collecteurs tournant' => 'products/ct', + 'Télémétrie' => 'products/telemetrie', + 'Acquisition de données' => 'products/add', + ], + ], + ]; + + $tree = Page::getTree(); + + $main = $tree['#main']; + + $nav_items = []; + foreach ($main['children'] as $name => $item) { + $submenus = null; + if ($name == 'products') { + $submenus = $productsSubMenus; + } else { + $links = []; + + foreach ($item['children'] as $key => $child) { + $links[$child['element']->title] = $child['element']->slug; + } + + if (count($links) > 0) { + $submenus = [['links' => $links]]; + } + } + $s = ['url' => $item['element']->slug]; + if (null !== $submenus) { + $s['submenus'] = $submenus; + } + + $nav_items[$item['element']->title] = $s; + } + +// // Hard coded menu structure until we have dynamic data from the CMS +// $nav_items = [ +// +// 'Products' => [ +// 'url' => 'products', +// 'submenus' => [ +// +// // Left panel +// [ +// 'title' => 'Capteurs', +// 'links' => [ +// 'Force' => 'products/force', +// 'Couple' => 'products/couple', +// 'Déplacement' => 'products/deplacement', +// 'Accélération' => 'products/acceleration', +// 'Inclinaison' => 'products/inclinaison', +// 'Pression' => 'products/pression', +// ], +// ], +// +// // Right panel +// [ +// 'title' => 'Systèmes de mesure', +// 'links' => [ +// 'Roue dynamométrique' => 'products/roue', +// 'Contrôle de fermeture d’ouvrants' => 'products/cdfdo', +// 'Contrôle de taraudage' => 'products/cdt', +// 'Collecteurs tournant' => 'products/ct', +// 'Télémétrie' => 'products/telemetrie', +// 'Acquisition de données' => 'products/add', +// ], +// ], +// ], +// ], +// +// 'Solutions' => [ +// 'url' => 'solutions', +// 'submenus' => [ +// [ +// 'links' => [ +// 'Énergie' => 'solutions/energie', +// 'Aéronautique' => 'solutions/aero', +// 'Ferroviaire' => 'solutions/ferroviaire', +// 'Automobile' => 'solutions/auto', +// 'Génie civil' => 'solutions/civil', +// 'Industrie' => 'solutions/industrie', +// ] +// ], +// ], +// ], +// +// 'Services' => [ +// 'url' => 'services', +// 'submenus' => [ +// [ +// 'title' => null, +// 'links' => [ +// 'Location' => 'services/location', +// 'Calibration' => 'services/calibration', +// 'Développement OEM' => 'services/developpement-oem', +// 'Custom Design' => 'services/custom-design', +// 'Formation' => 'services/formation', +// ], +// ], +// ], +// ], +// 'Support' => ['url' => 'support'], +// 'Société' => [ +// 'url' => 'societe', +// 'submenus' => [ +// [ +// 'links' => [ +// 'Qui sommes nous ?' => 'societe/a-propos', +// 'Actualités' => 'societe/actualites', +// ] +// ] +// ], +// ], +// 'Contact' => ['url' => 'contact'], +// ]; + + + \Menu::make('primary', function ($menu) use ($nav_items) { + + foreach ($nav_items as $nav_label => $nav_item) { + + $parent = $menu->add($nav_label, $nav_item['url']); + + // Handle items with submenus + if (isset($nav_item['submenus'])) { + + foreach ($nav_item['submenus'] as $submenu_data) { + + // Create an empty sub-element that will serve as a wrapper for the submenu(s) + $wrapper = $parent->raw('')->attr(['class' => 'nav-submenu-wrapper']); + + // Some submenus have a title element + if (isset($submenu_data['title'])) { + $wrapper->raw($submenu_data['title'])->attr(['class' => 'nav-submenu-title']); + } + + foreach ($submenu_data['links'] as $label => $url) { + $wrapper->add($label, $url); + } + } + } + + } + + }); + + // Also make a menu for the breadcrumbs - this one is simpler and doesn't have the submenu headings + \Menu::make('breadcrumbs', function ($menu) use ($nav_items) { + + // Start with home link + $menu = $menu->add('Home', ''); + + foreach ($nav_items as $nav_label => $nav_item) { + + $parent = $menu->add($nav_label, $nav_item['url']); + + // Handle items with submenus + if (isset($nav_item['submenus'])) { + + foreach ($nav_item['submenus'] as $submenu_data) { + foreach ($submenu_data['links'] as $label => $url) { + $parent->add($label, $url); + } + } + } + } + }); + } } diff --git a/app/Models/Product.php b/app/Models/Product.php index fbd8d22..0f739c1 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -4,6 +4,7 @@ namespace App\Models; use Cubist\Backpack\app\Magic\Models\CubistMagicModel; use Illuminate\Support\Str; +use Spatie\MediaLibrary\Models\Media; class Product extends CubistMagicModel { @@ -16,6 +17,14 @@ class Product extends CubistMagicModel 'singular' => 'produit', 'plural' => 'produits']; + protected $_documents = []; + + public function __construct(array $attributes = []) + { + $this->_documents = ['technical_sheet' => trans('Fiche technique'), 'documentation' => trans('Documentation')]; + parent::__construct($attributes); + } + public function setFields() { parent::setFields(); @@ -87,8 +96,8 @@ class Product extends CubistMagicModel 'maxFiles' => 6, 'tab' => 'Média']); - $documents = ['technical_sheet' => 'Fiche technique', 'documentation' => 'Documentation']; - foreach ($documents as $name => $label) { + + foreach ($this->_documents as $name => $label) { $this->addField(['name' => $name, 'label' => $label, 'type' => 'Files', @@ -204,4 +213,36 @@ class Product extends CubistMagicModel } } + + public function getDocuments() + { + $typedocs = ['odt', 'doc', 'docx', 'pdf']; + $res = []; + foreach ($this->_documents as $fieldName => $label) { + foreach ($this->getMedia($this->$fieldName) as $media) { + /** @var $media Media */ + + $res[] = ['media' => $media, 'label' => $label, 'type' => in_array($media->getExtensionAttribute(), $typedocs) ? 'document' : 'tech']; + } + } + + return $res; + } + + public function hasDocuments() + { + return count($this->getDocuments()) > 0; + } + + public function getSpecificationsValues() + { + $res = []; + $allspecs = Specification::all(); + $mytype = ProductType::find($this->productType); + $myspecs = $mytype->specifications; + foreach ($myspecs as $spec) { + + } + return $res; + } } diff --git a/app/Models/Settings.php b/app/Models/Settings.php index b27db86..5d70942 100644 --- a/app/Models/Settings.php +++ b/app/Models/Settings.php @@ -15,5 +15,10 @@ class Settings extends \Cubist\Backpack\app\Magic\Models\Settings 'type'=>'Email', 'label'=>'E-mail', 'tab'=>'Informations de contact']); + + $this->addField(['name'=>'phone', + 'type'=>'Text', + 'label'=>'Téléphone', + 'tab'=>'Informations de contact']); } } diff --git a/composer.json b/composer.json index 4dd58ff..fc695b8 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,6 @@ "license": "proprietary", "require": { "cubist/cms-back": "dev-master", - "lavary/laravel-menu": "^1.7", "league/csv": "^9.2", "nothingworks/blade-svg": "^0.3.1", "spatie/laravel-blade-x": "^2.2" diff --git a/config/app.php b/config/app.php index ff1e054..5989a1c 100644 --- a/config/app.php +++ b/config/app.php @@ -247,6 +247,8 @@ return [ 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, + + ], ]; diff --git a/package.json b/package.json index e25a4cc..7b1f9a4 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,10 @@ "rupture": "^0.7.1", "stylus": "acidjazz/stylus#dev", "stylus-loader": "^3.0.2", - "tailwindcss": "^1.0.1", + "tailwindcss": "^1.0.4", "vue": "^2.6.10", "vue-slide-up-down": "^1.7.2", - "vue-template-compiler": "^2.6.10" + "vue-template-compiler": "^2.6.10", + "gsap": "^2.1.3" } } diff --git a/public/_modules/product-onglet/style.styl b/public/_modules/product-onglet/style.styl index 49d7ce9..196b415 100644 --- a/public/_modules/product-onglet/style.styl +++ b/public/_modules/product-onglet/style.styl @@ -5,6 +5,7 @@ $dark = #6B7287 $lightgrey = #F7F8FC $darkblue = #152F4E + * padding: 0 box-sizing: border-box !important @@ -104,4 +105,4 @@ $darkblue = #152F4E display flex !important .rotate transform: rotate(180deg) - transition 400ms all ease \ No newline at end of file + transition 400ms all ease diff --git a/public/_modules/product-onglet/img/arrow-down.svg b/public/images/product-details/arrow-down.svg similarity index 100% rename from public/_modules/product-onglet/img/arrow-down.svg rename to public/images/product-details/arrow-down.svg diff --git a/public/_modules/product-onglet/img/icon-file.svg b/public/images/product-details/icon-document.svg similarity index 100% rename from public/_modules/product-onglet/img/icon-file.svg rename to public/images/product-details/icon-document.svg diff --git a/public/_modules/product-onglet/img/icon-file-2.svg b/public/images/product-details/icon-tech.svg similarity index 100% rename from public/_modules/product-onglet/img/icon-file-2.svg rename to public/images/product-details/icon-tech.svg diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index 4ba264b..4e36bfc 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -7,12 +7,13 @@ window._ = require('lodash'); * code may be modified to fit the specific needs of your application. */ -// try { -// window.Popper = require('popper.js').default; -// window.$ = window.jQuery = require('jquery'); -// -// require('bootstrap'); -// } catch (e) {} +try { + //window.Popper = require('popper.js').default; + window.$ = window.jQuery = require('jquery'); + + //require('bootstrap'); +} catch (e) {} + /** * We'll load the axios HTTP library which allows us to easily issue requests diff --git a/resources/js/product-details.js b/resources/js/product-details.js new file mode 100644 index 0000000..f490adb --- /dev/null +++ b/resources/js/product-details.js @@ -0,0 +1,28 @@ +$(function () { + $(document).on('click', '#product-tabs .section-title', function () { + let that = $(this); + + $('.content-item').each(function () { + if ($(this).data('content') === that.data('nav')) { + $(this).addClass('active-content').siblings().removeClass('active-content').addClass('hidden'); + that.addClass('active-nav').parent().siblings().find(".section-title").removeClass('active-nav'); + } + }); + + if ($(window).width() < 940) { + $('.responsive-content').each(function () { + if ($(this).data('content') === that.data('nav')) { + that.find('.product-nav-arrow').toggleClass('rotate'); + } + }) + } + }) + + $(".section-title").click(function () { + $(this) + .toggleClass('active-content') + .siblings(".responsive-content") + .slideToggle() + }); + +}); diff --git a/resources/styles/components/product-details.styl b/resources/styles/components/product-details.styl new file mode 100644 index 0000000..26d8379 --- /dev/null +++ b/resources/styles/components/product-details.styl @@ -0,0 +1,70 @@ +$h3 = 24px +$barlow = 'Barlow', sans-serif +$muli = 'Muli', sans-serif +$dark = #6B7287 +$lightgrey = #F7F8FC +$darkblue = #152F4E + + +#product-tabs + max-width: 1536px + margin: 0 auto + + .content + @media (max-width 940px) + display none + max-width 1536px + padding 55px 48px 48px 48px + background $lightgrey + + .product-nav + @media (max-width 940px) + flex-direction column + + &-item + //padding : 25px 50px + font-family $barlow + font-size: 18px + color: $darkblue + position: relative + transition 400ms all ease + @media (max-width 940px) + &:last-child::after + height: 0 + &::after + content '' + background #E7E9F3 + left 48px + right 48px + bottom 0 + position absolute + height 1px + + .section-title + font-family $barlow + display flex + padding: 25px 50px + cursor pointer + + + div + padding: 0px 50px 25px 50px + @media (min-width 940px) + display none !important + + .product-nav-arrow + display flex + transition 400ms all ease + @media (min-width 940px) + display none + + .active-nav + background $lightgrey + @media (max-width 940px) + background white + + .active-content + display flex !important + + .rotate + transform: rotate(180deg) + transition 400ms all ease diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index bc2e4c1..bbf224a 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -31,10 +31,10 @@ @include('partials.header') @section('breadcrumbs') - @if(Menu::get('breadcrumbs')->active()) + @if(CubistMenu::get('breadcrumbs')->active()) - {!! Menu::get('breadcrumbs')->crumbMenu()->asDiv(['class' => 'breadcrumbs'], [], ['class' => 'breadcrumbs-item']) !!} + {!! CubistMenu::get('breadcrumbs')->crumbMenu()->asDiv(['class' => 'breadcrumbs'], [], ['class' => 'breadcrumbs-item']) !!} @endif diff --git a/resources/views/pages/product-detail.blade.php b/resources/views/pages/product-detail.blade.php index dd3b8ba..a8ed71d 100644 --- a/resources/views/pages/product-detail.blade.php +++ b/resources/views/pages/product-detail.blade.php @@ -1,62 +1,185 @@ @extends('layouts/app') @section('content') + + + + {{$product->name}} + + + + {{-- Product details --}} +
+ {{-- Product images --}} +
+
+
- - - - Modèle 1200
- de 1.5 kN à 900kN -
-
+ + @foreach ($product->getMedia($product->images) as $image) +
+
+ @endforeach +
+
- {{-- Product details --}} -
- {{-- Product images --}} -
-
-
+ {{-- Product text --}} + + {!! Markdown::parse($product->highlights) !!} - - @for ($i = 1; $i <= 3; $i++) -
-
- @endfor -
-
+ @if(count($product->getMedia($product->technical_sheet))) +

Télécharger + la fiche produit

+ @endif - {{-- Product text --}} - -
    -
  • Non-linéarité ± 0.03 % pleine échelle
  • -
  • Compensation mécanique des efforts transverses.
  • -
  • Utilise des jauges de contrainte Interface auto compensées.
  • -
  • Compensation barométrique
  • -
  • Sensibilité à la température < 0.0015% / °C
  • -
  • Etendue de mesure de 1.25 kN à 450 kN
  • -
  • Protection en surcharge : 300% de la gamme de mesure
  • -
  • Disponible en double ponts
  • -
+ Ajouter à ma sélection -

Télécharger la fiche produit

+ ? - Ajouter à ma sélection +
- ? - +
+ -
+ @push('scripts') + + @endpush -
+
+ +
- + {{-- Product Grid --}} @@ -71,8 +194,8 @@

Modèle 1200 de 1.5 kN à 900kN

    -
  • Étendue de mesure : 1.5 kN à 900 kN
  • -
  • Sortie élevée : 2 ou 4 mV/V
  • +
  • Étendue de mesure : 1.5 kN à 900 kN
  • +
  • Sortie élevée : 2 ou 4 mV/V
  • Précision : 0.04% à 0.07% pleine échelle
  • Compensé pour les efforts transverses
diff --git a/resources/views/partials/footer.blade.php b/resources/views/partials/footer.blade.php index 68c8e14..9b4e07d 100644 --- a/resources/views/partials/footer.blade.php +++ b/resources/views/partials/footer.blade.php @@ -32,12 +32,12 @@
- + @svg('icon-email', 'footer-contact-icon') diff --git a/resources/views/partials/nav.blade.php b/resources/views/partials/nav.blade.php index ae53b83..6416c11 100644 --- a/resources/views/partials/nav.blade.php +++ b/resources/views/partials/nav.blade.php @@ -1 +1 @@ -{!! Menu::get('primary')->asUl(['class' => 'nav-primary']) !!} +{!! CubistMenu::get('#main')->asUl(['class' => 'nav-primary']) !!} diff --git a/routes/backpack/custom.php b/routes/backpack/custom.php index 05ca495..929101a 100644 --- a/routes/backpack/custom.php +++ b/routes/backpack/custom.php @@ -14,11 +14,6 @@ Route::group([ Route::match(['delete'], 'page/{id}/media/{mediaId}', 'PageCrudController@deleteMedia'); Route::match(['post'], 'page/{id}/media/reorder', 'PageCrudController@reorderMedia'); }); - CRUD::resource('product', 'ProductCrudController')->with(function () { - Route::match(['post'], 'product/{id}/media', 'ProductCrudController@uploadMedia'); - Route::match(['delete'], 'product/{id}/media/{mediaId}', 'ProductCrudController@deleteMedia'); - Route::match(['post'], 'product/{id}/media/reorder', 'ProductCrudController@reorderMedia'); - }); CRUD::resource('producttype', 'ProductTypeCrudController')->with(function () { Route::match(['post'], 'producttype/{id}/media', 'ProductTypeCrudController@uploadMedia'); Route::match(['delete'], 'producttype/{id}/media/{mediaId}', 'ProductTypeCrudController@deleteMedia'); diff --git a/routes/web.php b/routes/web.php index 9816886..25e01e8 100644 --- a/routes/web.php +++ b/routes/web.php @@ -11,10 +11,6 @@ | */ -Route::get('/', function () { - return view('pages.home'); -}); - Route::get('/products/{category}/{id}', function ($category, $id = null) { return view('pages.product-detail', compact('category', 'id')); })->where(['category' => '.*']); @@ -28,6 +24,9 @@ Route::get('/products/{category}', function ($category) { // return view('pages.test', compact('name')); //})->where(['name' => '.*']); +Route::get('product/{id}', ['uses' => 'ProductController@productDetails']); + /** CATCH-ALL ROUTE for CMS Pages - needs to be at the end of your web.php file **/ Route::get('{page}/{subs?}', ['uses' => 'PageController@index']) ->where(['page' => '^(((?=(?!admin))(?=(?!\/)).))*$', 'subs' => '.*']); + diff --git a/webpack.mix.js b/webpack.mix.js index dcff99b..13ed629 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -19,6 +19,7 @@ mix.browserSync({ }); mix.js('resources/js/app.js', 'public/js') + .js('resources/js/product-details.js','public/js') .stylus('resources/styles/app.styl', 'public/css', { use: [ require('rupture')() -- 2.39.5