Sidebar AngularJS

eu tenho um controller SideBar que gerencia as páginas do meu site e ao clicar em um link vamos para a página.inserir a descrição da imagem aqui

Segue o código que define o controller:

(function () { 'use strict'; angular.module('centric').controller('SidebarCtrl', ['$  scope', '$  uibModal', 'AuthFactory', 'RequestFactory', function ($  scope, $  uibModal, AuthFactory, RequestFactory) {      $  scope.options = [         {             name: 'Dashboard',             href: '#/app/dashboard'         },{             name: 'Clientes',             href: '#/app/clients'         },         {             name: 'Compras',             href: '#/app/compras'         }     ];  }]); })(); 

Então, o terceiro botão da sidebar, Compras, não consegue me redirecionar para a página compras.html, apenas me redireciona para Dashboard de novo.

Compras.html tem a mesma estrutura que clientes.html, pois irei usar de base e fazer as alterações necessárias. Daí criei um compras.html na pasta app/view e colei o conteúdo de clientes.html… o que estou fazendo de errado?

Full-width sidebar or 85% with backdrop on mobile?

What is the best practice when it comes to sidebars and user experience on mobile? Is it better to have one that is full-width or one that is 85% width with 15% backdrop? What are the benefits or downsides of either one? Which one do you use in your projects?

Examples:

enter image description here

The current way I do it is as in example 1 with width of 85% and max-width of 360px (so it limits the width on bigger screens), but I was wondering whether I should change it to create more like-an-app experience.

List products based on slug and sidebar filters

This method shows the list of manufacturers’ offered products based on the slug and sidebar filters.

Most of the time I have to write the same query with only some changes: you can say I am repeating myself. I want my code more readable and short. How can i refactor and reduce the lines of code?

public function colabrativetwo(Request $  request, $  slug = 0, $  division_id = 0, $  section_id = 0, $  manufacturer_id = 0, $  list="") {         $  cookieId = $  this->setInitialCookie($  request);         if (!empty($  cookieId))             $  cookieExists = true;          $  manufacturerArr = array();         $  prodFeatured = array();             $  geting=DB::table('product_category')->select('name')->get();              $  filterArray=array();             foreach( $  geting as $  get){                 $  localarray=array();                 $  localarray['name']=$  get->name;                  $  filterArray[]=$  localarray;             }           if ($  slug !== 0 || $  division_id != 0 || $  section_id != 0 || $  manufacturer_id != 0) {              $  where = array();             $  slug_colum = array();             if ($  slug !== 0 && $  slug != '') {                 if ($  slug == 'low-emitting-material-prerequisite') {                      $  slug_colum[] = 'products.low_emitting_material_prerequisite_expiry_date';                     $  slug_colum[] = 'products.low_emitting_material_prerequisite_file';                 }                 elseif ($  slug == 'low-emitting-material-credit')                 {                     $  slug_colum[] = 'products.low_emitting_material_credit_expiry_date';                     $  slug_colum[] = 'products.low_emitting_material_credit_file';                 }                  /*else{                     $  slug_colum[]='products.low_emitting_material_prerequisite_expiry_date'; //                    $  slug_colum[] = 'products.low_emitting_material_prerequisite_file';                  }*/              }              if ($  division_id != 0) {                 $  where['products.division_id'] = $  division_id;             }              if ($  section_id != 0) {                 $  where['products.section_id'] = $  section_id;             }              if ($  manufacturer_id != 0) {                 $  where['manufacturers.id'] = $  manufacturer_id;             }              if (isset($  slug_colum[1])) {                  $  productsFeatured = Product::select('products.id','products.low_emitting_material_prerequisite_file',                 'products.specs_file','products.specs_file_url','products.low_emitting_material_credit_file', 'products.name', 'products.logo', 'products.division_id', 'products.section_id', 'products.manufacturer_id', 'divisions.name as division_name', 'divisions.code as division_code', 'sections.name as section_name', 'sections.code')                         ->where($  where)                         ->whereIn('products.status', ['active'])                         ->where(function ($  query) use ($  slug_colum) {                             if($  slug_colum[0] = 'products.low_emitting_material_prerequisite_expiry_date') {                                 $  query->where($  slug_colum[1], '!=', '');                             } else {                                 $  query->where($  slug_colum[0], '>=', date('Y-m-d'))                                 ->where($  slug_colum[1], '!=', '');                             }                         })                         ->where('users.user_type', 'manufacturer_paid')                         ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                         ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                         ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                         ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                         ->join('users', 'manufacturers.user_id', '=', 'users.id')                         ->orderBy('divisions.code', 'asc')                         ->orderBy('sections.code', 'asc')                         ->groupBy('products.id')                         ->get();                   $  divisionsFeatured = Product::select('divisions.id', 'divisions.name as name', 'divisions.code as division_code', DB::raw('COUNT(DISTINCT products.id) as products_count'))                         ->where($  where)                         ->whereIn('products.status', ['active'])                         ->where(function ($  query) use ($  slug_colum) {                             if($  slug_colum[0] = 'products.low_emitting_material_prerequisite_expiry_date') {                                 $  query->where($  slug_colum[1], '!=', '');                             } else {                                 $  query->where($  slug_colum[0], '>=', date('Y-m-d'))                                 ->where($  slug_colum[1], '!=', '');                             }                         })                         ->where('users.user_type', 'manufacturer_paid')                         ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                         ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                         ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                         ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                         ->join('users', 'manufacturers.user_id', '=', 'users.id')                         ->groupBy('divisions.id')                         ->get();                  $  sectionsFeatured = Product::select('sections.id', 'sections.name as name', 'sections.code', DB::raw('COUNT(DISTINCT products.id) as products_count'))                         ->where($  where)                         ->whereIn('products.status', ['active'])                         ->where(function ($  query) use ($  slug_colum) {                             if($  slug_colum[0] = 'products.low_emitting_material_prerequisite_expiry_date') {                                 $  query->where($  slug_colum[1], '!=', '');                             } else {                                 $  query->where($  slug_colum[0], '>=', date('Y-m-d'))                                 ->where($  slug_colum[1], '!=', '');                             }                         })                         ->where('users.user_type', 'manufacturer_paid')                         ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                         ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                         ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                         ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                         ->join('users', 'manufacturers.user_id', '=', 'users.id')                         ->orderBy('sections.code', 'asc')                         ->groupBy('sections.id')                         ->get();                  $  manufacturersFeatured = Product::select('manufacturers.id AS id', 'manufacturers.name AS name', DB::raw('COUNT(DISTINCT products.id) as products_count'))                         ->where($  where)                         ->whereIn('products.status', ['active'])                         ->where(function ($  query) use ($  slug_colum) {                             if($  slug_colum[0] = 'products.low_emitting_material_prerequisite_expiry_date') {                                 $  query->where($  slug_colum[1], '!=', '');                             } else {                                 $  query->where($  slug_colum[0], '>=', date('Y-m-d'))                                 ->where($  slug_colum[1], '!=', '');                             }                         })                         ->where('users.user_type', 'manufacturer_paid')                         ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                         ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                         ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                         ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                         ->join('users', 'manufacturers.user_id', '=', 'users.id')                         ->orderBy('name', 'asc')                         ->groupBy('manufacturers.id')                         // ->limit(3)                         ->get();             } else {                  // dd($  productsFeatured);                 $  productsFeatured = Product::select('products.id','products.low_emitting_material_prerequisite_file',                 'products.specs_file','products.specs_file_url','products.low_emitting_material_credit_file', 'products.name', 'products.logo', 'products.division_id', 'products.section_id', 'products.manufacturer_id', 'divisions.name as division_name', 'divisions.code as division_code', 'sections.name as section_name', 'sections.code')                         ->where($  where)                         ->whereIn('products.status', ['active'])                         ->where('users.user_type', 'manufacturer_paid')                         ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                         ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                         ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                         ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                         ->join('users', 'manufacturers.user_id', '=', 'users.id')                         ->orderBy('divisions.code', 'asc')                         ->orderBy('sections.code', 'asc')                         ->groupBy('products.id')                         ->get();                  $  divisionsFeatured = Product::select('divisions.id', 'divisions.name as name', 'divisions.code as division_code', DB::raw('COUNT(DISTINCT products.id) as products_count'))                         ->where($  where)                         ->whereIn('products.status', ['active'])                         ->where('users.user_type', 'manufacturer_paid')                         ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                         ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                         ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                         ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                         ->join('users', 'manufacturers.user_id', '=', 'users.id')                         ->groupBy('divisions.id')                         // ->limit(3)                         ->get();                  $  sectionsFeatured = Product::select('sections.id', 'sections.name as name', 'sections.code', DB::raw('COUNT(DISTINCT products.id) as products_count'))                         ->where($  where)                         ->whereIn('products.status', ['active'])                         ->where('users.user_type', 'manufacturer_paid')                         ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                         ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                         ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                         ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                         ->join('users', 'manufacturers.user_id', '=', 'users.id')                         ->orderBy('sections.code', 'asc')                         ->groupBy('sections.id')                         // ->limit(3)                         ->get();                  $  manufacturersFeatured = Product::select('manufacturers.id AS id', 'manufacturers.name AS name', DB::raw('COUNT(DISTINCT products.id) as products_count'))                         ->where($  where)                         ->whereIn('products.status', ['active'])                         ->where('users.user_type', 'manufacturer_paid')                         ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                         ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                         ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                         ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                         ->join('users', 'manufacturers.user_id', '=', 'users.id')                         ->orderBy('name', 'asc')                         ->groupBy('manufacturers.id')                         // ->limit(2)                         ->get();             }         } else {             // dd('oan di siri');              $  productsFeatured = Product::select('products.id', 'products.name','products.low_emitting_material_prerequisite_file',             'manufacturers.phone','manufacturers.address','manufacturers.linkedin_url','manufacturers.city', 'products.specs_file','products.specs_file_url','products.low_emitting_material_credit_file', 'products.logo', 'products.division_id', 'products.section_id', 'products.manufacturer_id', 'divisions.name as division_name', 'divisions.code as division_code', 'sections.name as section_name', 'sections.code')                     ->whereIn('products.status', ['active'])                     ->where(function ($  query) {                         $  query->where('products.low_emitting_material_prerequisite_file', '!=', '');                     })                     ->where('users.user_type', 'manufacturer_paid')                     ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                     ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                     ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                     ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                     ->join('users', 'manufacturers.user_id', '=', 'users.id')                     ->orderBy('divisions.code', 'asc')                     ->orderBy('sections.code', 'asc')                     ->groupBy('products.id');                     // ->limit(3)                     // ->get()                      if($  request->ajax() && $  request->manufacturer){                          $  productsFeatured->whereIn('products.manufacturer_id', $  request->manufacturer);                         $  productsFeatured = $  productsFeatured->get();                                           } else{                         $  productsFeatured = $  productsFeatured->get();                     }    // dd($  productsFeatured);             $  divisionsFeatured = Product::select('divisions.id', 'divisions.name as name', 'divisions.code as division_code', DB::raw('COUNT(DISTINCT products.id) as products_count'))                     ->whereIn('products.status', ['active'])                     ->where(function ($  query) {                         $  query->where('products.low_emitting_material_prerequisite_file', '!=', '');                     })                     ->where('users.user_type', 'manufacturer_paid')                     ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                     ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                     ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                     ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                     ->join('users', 'manufacturers.user_id', '=', 'users.id')                     ->groupBy('divisions.id');                     // ->get();                     if($  request->ajax() && $  request->manufacturer){                          $  divisionsFeatured->whereIn('products.manufacturer_id', $  request->manufacturer);                         $  divisionsFeatured = $  divisionsFeatured->get();                      } else{                         $  divisionsFeatured = $  divisionsFeatured->get();                     }                $  sectionsFeatured = Product::select('sections.id', 'sections.name as name', 'sections.code', DB::raw('COUNT(DISTINCT products.id) as products_count'))                     ->whereIn('products.status', ['active'])                     ->where(function ($  query) {                         $  query->where('products.low_emitting_material_prerequisite_file', '!=', '');                     })                     ->where('users.user_type', 'manufacturer_paid')                     ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                     ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                     ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                     ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                     ->join('users', 'manufacturers.user_id', '=', 'users.id')                     ->orderBy('sections.code', 'asc')                     ->groupBy('sections.id');                     // ->get();                     if($  request->ajax() && $  request->manufacturer){                          $  sectionsFeatured->whereIn('products.manufacturer_id', $  request->manufacturer);                         $  sectionsFeatured = $  sectionsFeatured->get();                      } else{                         $  sectionsFeatured = $  sectionsFeatured->get();                     }              $  manufacturersFeatured = Product::select('manufacturers.id AS id', 'manufacturers.id AS id',             'manufacturers.name', 'manufacturers.address',              'manufacturers.city', 'manufacturers.state', 'manufacturers.state',              'manufacturers.phone', DB::raw('COUNT(DISTINCT products.id) as products_count'))                     ->whereIn('products.status', ['active'])                     ->where(function ($  query) {                         $  query->where('products.low_emitting_material_prerequisite_file', '!=', '');                     })                     ->where('users.user_type', 'manufacturer_paid')                     ->leftJoin('products_selected_leeds', 'products.id', '=', 'products_selected_leeds.product_id')                     ->leftJoin('sections', 'products.section_id', '=', 'sections.id')                     ->leftJoin('divisions', 'products.division_id', '=', 'divisions.id')                     ->join('manufacturers', 'products.manufacturer_id', '=', 'manufacturers.id')                     ->join('users', 'manufacturers.user_id', '=', 'users.id')                     ->orderBy('name', 'asc')                     ->groupBy('manufacturers.id');                     // ->limit(3)                     // ->get();                     if($  request->ajax() && $  request->manufacturer){                          $  manufacturersFeatured->whereIn('products.manufacturer_id', $  request->manufacturer);                         $  manufacturersFeatured = $  manufacturersFeatured->get();                      } else{                         $  manufacturersFeatured = $  manufacturersFeatured->get();                     }         }             // dd($  productsFeatured );         foreach ($  productsFeatured as $  productFeatured) {              $  recSecFeatured['fav_yes'] = '';             $  recSecFeatured['id'] = $  productFeatured->id;             $  recSecFeatured['name'] = $  productFeatured->name;             $  recSecFeatured['logo'] = $  productFeatured->logo;             $  recSecFeatured['div_id'] = $  productFeatured->division_id;             $  recSecFeatured['division_name'] = $  productFeatured->division_name;             $  recSecFeatured['division_code'] = $  productFeatured->division_code;             $  recSecFeatured['low_emitting_material_prerequisite_file'] = $  productFeatured->low_emitting_material_prerequisite_file;             $  recSecFeatured['specs_file'] = $  productFeatured->specs_file;             $  recSecFeatured['specs_file_url'] = $  productFeatured->specs_file_url;               $  mfg = Manufacturer::where('id', $  productFeatured->manufacturer_id)->first();               // Manufacturere information             $  mfgArr = array();             $  mfgArr['id'] = $  mfg['id'];             $  mfgArr['name'] = $  mfg['name'];             $  mfgArr['logo'] = $  mfg['logo'];             $  mfgArr['address'] = $  mfg['address'];             $  mfgArr['city'] = $  mfg['city'];             $  mfgArr['phone'] = $  mfg['phone'];             $  mfgArr['websiteurl'] = $  mfg['websiteurl'];             $  mfgArr['linkedin_url'] =$  mfg['linkedin_url'];             if (!$  this->find_key_value($  manufacturerArr, 'id', $  mfgArr['id'])) {                  $  chkFav = DB::table('user_list_details_temp')                         ->where('type', 'manufacturer')                         ->where('unique_id', $  cookieId)                         ->where('reference_id', $  mfg['id'])                         ->select('id as fav_yes')                         ->first();                 $  mfgArr['fav_yes'] = "";                 if (!empty($  chkFav))                      $  mfgArr['fav_yes'] = $  chkFav->fav_yes;                 // Check if this product exists in non-logged in fav list                  $  manufacturerArr[] = $  mfgArr;             }              $  recSecFeatured['address'] =    $  mfg['address'];             $  recSecFeatured['city']    =    $  mfg['city'];             $  recSecFeatured['phone']   =    $  mfg['phone'];             $  recSecFeatured['websiteurl']   =     $  mfg['websiteurl'];             $  recSecFeatured['linkedin_url'] =     $  mfg['linkedin_url'];             $  recSecFeatured['mfg_id']       =     $  mfg['id'];             $  recSecFeatured['mfg_name']     =     $  mfg['name'];             $  recSecFeatured['mfg_logo']     =     $  mfg['logo'];             $  productSection = Section::where('id', $  productFeatured->section_id)->first();             $  recSecFeatured['sec_id'] = $  productSection['id'];             $  recSecFeatured['sec_code'] = $  productSection['code'];             $  recSecFeatured['sec_name'] = $  productSection['name'];             $  recSecFeatured['slug'] = str_slug($  productFeatured->name);             // Check if this product exists in non-logged in fav list             $  chkFav = DB::table('user_list_details_temp')                     ->where('type', 'product')                     ->where('unique_id', $  cookieId)                     ->where('reference_id', $  productFeatured->id)                     ->select('id as fav_yes')                     ->first();             $  recSecFeatured['fav_yes'] = "";             if (!empty($  chkFav))                 $  recSecFeatured['fav_yes'] = $  chkFav->fav_yes;             // Check if this product exists in non-logged in fav list               $  featuredProductsIdsArr[] = $  productFeatured->id;             $  prodFeatured[] = $  recSecFeatured;         }          //echo "<pre>";print_r( $  prodFeatured );exit;      /***         *         * @author Muneeb Faruqi         * @todo grouped prodFeatured on division name to each product under its certain division...         **/         $  new_test = collect($  prodFeatured)->groupBy('division_name')->toArray();         $  data['leedProducts'] = $  new_test;         $  data['filterArray']=$  filterArray;         /*$  data['leedProducts'] = $  prodFeatured;*/     /*@Muneeb Faruqi Changes Ends*/         $  data['leedManufacturer'] = $  manufacturerArr;         //$  data['leedDivision'] = $  divisionsArr;         $  data['leedDivision'] = $  divisionsFeatured->toArray();         $  data['leedSection'] = $  sectionsFeatured->toArray();         $  data['leedManufacturers'] = $  manufacturersFeatured->toArray();          // dd($  manufacturersFeatured->toArray());          // SEO Code for this page //         $  data['seoPageTitle'] = "Collaborative for High Performance Schools (CHPS.net) product database - Zero Docs";         $  data['seoPageDescription'] = "Pre-Approved low-emitting collaborative for high performance schools CHPS products for construction projects, schools, office and healthcare.";         $  data['seoPageKeywords'] = "Collaborative for high performance schools, LEEDv4 low emitting products, California Department of Public Health CDPH low-emission testing method for CA Specification 01350";         // SEO Code for this page //         // Start Cookie End Code         $  data['cookieId'] = $  cookieId;          $  data['slug'] = $  slug;         $  data['division_id'] = $  division_id;         $  data['section_id'] = $  section_id;         $  data['manufacturer_id'] = $  manufacturer_id;          $  data['class'] = '';         if (!empty($  list) && $  list === 'list') {             $  data['layout'] = 'list';             $  data['class'] = 'library-list-view';         } else {             $  data['layout'] = 'card';         }         $  data['showTooltipHelpText'] = "No";         $  showTooltipChpsPage = $  request->session()->get('tooltip_chps_page', 'No');         if($  showTooltipChpsPage == 'Yes') {             $  request->session()->put('tooltip_chps_page', 'No');             $  data['showTooltipHelpText'] = "Yes";         } //Code by abdullah for sidebar filters data of manufacturers, products, leeds         // $  data['manufacturers'] = Manufacturer::where('status','active')->select('id','name')->orderBy('name', 'asc')->get();          // dd($  data['manufacturers']);         $  agent = new Agent();         if($  agent->isDesktop()) {             $  data['isDesktop'] = true;         } else {             $  data['isDesktop'] = false;         }          $  data['leed_records'] = DB::table('leed_tags')->where('leed_tags.status', 'active')         ->whereIn('products.status', ['active'])         ->where('products.division_id', '>', 0)         ->where('products.section_id', '>', 0)         ->where('products.manufacturer_id', '>', 0)         ->join('products_selected_leeds', 'leed_tags.id', '=', 'products_selected_leeds.leed_id')         ->join('products', 'products_selected_leeds.product_id', '=', 'products.id')         ->orderBy('leed_tags.description', 'asc')         ->select('leed_tags.description', 'leed_tags.id', 'leed_tags.parent_id', DB::raw('COUNT(DISTINCT products_selected_leeds.product_id) as products_count'))         ->groupBy('leed_tags.id')         ->get();  /*** * * @author  Muneeb Faruqi * @todo Manipulated the below array according to $  new_test */  foreach($  data['leedProducts'] as $  all_manufacturers){      foreach($  all_manufacturers as $  manufacturer_new){         $  list_all_manufacturers[] = array('mfgg_name' => $  manufacturer_new['mfg_name'], 'mfgg_id' =>$  manufacturer_new['mfg_id'],             'product_name' => $  manufacturer_new['name'], 'product_id' => $  manufacturer_new['id']);     }     // $  list_all_manufacturers[] = $  all_manufacturers['mfg_name']; }  /*@Muneeb Faruqi Changes Ends*/  $  data['list_all_active_manufacturers'] = array_unique($  list_all_manufacturers, SORT_REGULAR);  // dd($  data['list_all_active_manufacturers']); // unique by mfgg_name $  data['manufacturers'] = $  this->unique_multidim_array($  data['list_all_active_manufacturers'],'mfgg_name');  if($  request->ajax()){     $  data['checkedManufactureArray'] = $  request->manufacturer; }else{     $  data['checkedManufactureArray'] = array();  }          if ($  cookieExists) {             if($  request->ajax()){                  // dd($  checkedManufactureArray);                     // return view('guest::new_design_frontend.ajax',$  data);                     return  view('guest::new_design_frontend.product-library')->with($  data);               }else{                 return  view('guest::new_design_frontend.product-library')->with($  data);              }             // return view('guest::newcollaborative', $  data);                     //  dd($  data);              } else {             // $  this->sendResponseWithCookie('guest::newcollaborative', $  data, $  cookieId);             $  this->sendResponseWithCookie('guest::new_design_frontend.product-library', $  data, $  cookieId);         }   }  ``` 

Sidebar independente do resto da pagina [pendente]

Olá, havia feito essa pergunta esses dias, um rapaz respondeu que tinha como mais acabou não falando como…

Quero por minha sidebar independente do resto da pagina.

Como é: https://www.spruko.com/demo/adminor/Leftmenu-Fullwidth-Draksidebar/email.htm

Como quero que fique: imgur.com/x21jQRk

Parte do CSS: http://prntscr.com/o202bd

não sei se eu tenho que mandar algo fora isso, se tiver, me avisem!

obrigado.

Sidebar modal – pros & cons?

Do slide-out modals work well in your experience?

Our requirements are to present deeper, specific content to users without taking them out of a flow, so linking to another page is not being considered as an option.

Instead we want to implement a slide-out drawer type modal in which to present the information.

The pattern is similar to the one found on AirBnb’s site, when you click on the “help” button, top right:

https://www.airbnb.co.uk/

I’m looking for research into this UI pattern, pros & cons, especially when it comes to accessibility and use on smaller screens.

Drilldown Sidebar menu for my bootstrap admin dashboard

I’m trying to make the sidebar navigation as a “drilldown menu” instead of the typical dropdown below menu. Is this possible, if so how?

Something like this: https://www.jqueryscript.net/demo/mobile-side-navigation-zeynepjs/#

My bootstrap theme: https://startbootstrap.com/previews/sb-admin/

I would really appreciate some help.

Restore Downloads icon to Finder Sidebar

So I symlinked my Downloads folder from my boot drive to an external HDD I always keep connected to my mac. I deleted the original downloads folder from my home folder and replaced it with a symlink to a new folder on my HDD.

This works perfectly, except that in Finder, the sidebar icon is now a folder:

no download icon

When it should look like this:

download icon

Operating system is High Sierra 10.13.6

Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?

WordPress 5.2 destroys structured data by adding rel=”noopener noreferrer” to widget output (also to shortcodes): How to display the shortcode output without code change?

This feature was added in 5.2: https://core.trac.wordpress.org/ticket/43280

Basically there is nothing wrong with adding rel="noopener noreferrer" to <a href="..." target="_blank"></a> links, as it will protect from malicious comments or bad authors for instance.

Anyway I have a shortcode from some plugin which is generating structured data (rating stars) for a website and embedded via shortcode. Adding the rel-Attribute there breaks the structured data (as confirmed by https://search.google.com/structured-data/testing-tool/u/0/?hl=de).

How can I use the shortcode in a sidebar widget with the code preserved?