fix: 🐛 resolve links in mobile navigation #160
This commit is contained in:
parent
b407206941
commit
f32195cd99
5 changed files with 43 additions and 70 deletions
45
package-lock.json
generated
45
package-lock.json
generated
|
|
@ -89,7 +89,6 @@
|
|||
"@typescript-eslint/parser": "^8.39.0",
|
||||
"@vitejs/plugin-react": "^4.7.0",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"baseline-browser-mapping": "^2.9.19",
|
||||
"concurrently": "^9.2.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
|
|
@ -6146,13 +6145,16 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/baseline-browser-mapping": {
|
||||
"version": "2.9.19",
|
||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz",
|
||||
"integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==",
|
||||
"version": "2.10.42",
|
||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.42.tgz",
|
||||
"integrity": "sha512-c/jurFrDLyui7o1J86yLkRu4LMsTYcBohveus7/I2Hzdn9KIP2bdJPTue/lR1KH46enoPbD77GKeSYNdyPoD3Q==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"baseline-browser-mapping": "dist/cli.js"
|
||||
"baseline-browser-mapping": "dist/cli.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
|
|
@ -6324,9 +6326,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001755",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001755.tgz",
|
||||
"integrity": "sha512-44V+Jm6ctPj7R52Na4TLi3Zri4dWUljJd+RDm+j8LtNCc/ihLCT+X1TzoOAkRETEWqjuLnh9581Tl80FvK7jVA==",
|
||||
"version": "1.0.30001803",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001803.tgz",
|
||||
"integrity": "sha512-g/uHREV2ZpK9qMalCsWaxmA6ol+DX8GYhuf3T40RKoP+oL7vhRJh8LNt73PCjpnR6l14FzfPrB5Yux4PKm2meg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -8787,14 +8789,6 @@
|
|||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/immutable": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz",
|
||||
"integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/import-fresh": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
|
||||
|
|
@ -11750,25 +11744,6 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.51.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.51.0.tgz",
|
||||
"integrity": "sha512-haGdpTgywJTvHC2b91GSq+clTKGbtkkZmVAb82jZQN/wTy6qs8DdFm2lhEQbEwrY0QDRgSQ3xDurqM977C3noA==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
"immutable": "^4.0.0",
|
||||
"source-map-js": ">=0.6.2 <2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"sass": "sass.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-embedded": {
|
||||
"version": "1.93.3",
|
||||
"resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.93.3.tgz",
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
"@typescript-eslint/parser": "^8.39.0",
|
||||
"@vitejs/plugin-react": "^4.7.0",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"baseline-browser-mapping": "^2.9.19",
|
||||
"concurrently": "^9.2.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
|
|
|
|||
|
|
@ -448,7 +448,6 @@
|
|||
padding-left: 10px;
|
||||
}
|
||||
[data-menu="submenu-2951"] .mobile-menu__level {
|
||||
padding-top: 0;
|
||||
min-height: calc(100vh - 80px);
|
||||
}
|
||||
.offer-form {
|
||||
|
|
|
|||
|
|
@ -274,8 +274,7 @@
|
|||
@endphp
|
||||
<li id="menu-item-190"
|
||||
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-190 {{ currentMenuItemClass($pageFinanceName) }}">
|
||||
<a
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageFinanceName) }}">{{ $pageFinance->title }}</a>
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageFinanceName) }}">{{ $pageFinance->title }}</a>
|
||||
@if ($PageFinancesections)
|
||||
<ul class="sub-menu">
|
||||
@foreach ($PageFinancesections as $key => $item)
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
</li>
|
||||
@endif
|
||||
<li class="mobile-menu__item">
|
||||
<a class="mobile-menu__link" href="{{ LaravelLocalization::getLocalizedURL(app()->getLocale(), __('routes.contact_index')) }}">
|
||||
<a class="mobile-menu__link" href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.nous-contacter') }}">
|
||||
{{ trans('front.contact.index') }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -263,6 +263,7 @@
|
|||
</a>
|
||||
</div>
|
||||
@php
|
||||
$pageNousRejoindreName = sprintf('front.dynamic-pages.%s', $pageNousRejoindre->id_key);
|
||||
$sections = [
|
||||
'list_our_jobs',
|
||||
'list_your_career',
|
||||
|
|
@ -274,23 +275,21 @@
|
|||
];
|
||||
@endphp
|
||||
<ul class="mobile-menu__level">
|
||||
@if(array_intersect($sections, array_keys($pageNousRejoindre->content)))
|
||||
@foreach ($sections as $key => $item)
|
||||
@if (array_key_exists($item, array_keys($pageNousRejoindre->content)))
|
||||
@php
|
||||
$section = $pageNousRejoindre->content[$item];
|
||||
$title = $section[0]['string_title'];
|
||||
$subtitle = $section[0]['string_subtitle'];
|
||||
@endphp
|
||||
<li class="mobile-menu__item">
|
||||
<a class="mobile-menu__link"
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.nous-rejoindre') }}#{{ 'rejoin_' . $key }}">
|
||||
{{ Str::ucfirst(Str::lower($title) . " " . Str::lower($subtitle)) }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@foreach ($sections as $key => $item)
|
||||
@php $pageNousRejoindreSection = $pageNousRejoindre->content[$item]; @endphp
|
||||
@if ($pageNousRejoindreSection)
|
||||
@php
|
||||
$title = $pageNousRejoindreSection[0]['string_title'];
|
||||
$subtitle = $pageNousRejoindreSection[0]['string_subtitle'];
|
||||
@endphp
|
||||
<li class="mobile-menu__item">
|
||||
<a class="mobile-menu__link"
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageNousRejoindreName) }}#{{ 'rejoin_' . $key }}">
|
||||
{{ Str::ucfirst(Str::lower($title) . ' ' . Str::lower($subtitle)) }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -304,6 +303,7 @@
|
|||
</a>
|
||||
</div>
|
||||
@php
|
||||
$pageFinanceName = sprintf('front.dynamic-pages.%s', $pageFinance->id_key);
|
||||
$sections = [
|
||||
'list_agir_avec_territoires',
|
||||
'list_action_ldc',
|
||||
|
|
@ -315,19 +315,20 @@
|
|||
];
|
||||
@endphp
|
||||
<ul class="mobile-menu__level">
|
||||
@if(array_intersect($sections, array_keys($pageFinance->content)))
|
||||
@foreach ($sections as $key => $item)
|
||||
@if (array_key_exists($item, array_keys($pageNousRejoindre->content)))
|
||||
@php $title = $pageFinance->content[$item][0]['string_title']; @endphp
|
||||
<li class="mobile-menu__item">
|
||||
<a class="mobile-menu__link"
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.finance') }}#{{ Str::slug($title) }}">
|
||||
{{ $title }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@foreach ($sections as $key => $item)
|
||||
@php $pageFinanceSection = $pageFinance->content[$item];@endphp
|
||||
@if ($pageFinanceSection)
|
||||
@php
|
||||
$title = data_get($pageFinanceSection[0], 'string_title');
|
||||
@endphp
|
||||
<li class="mobile-menu__item">
|
||||
<a class="mobile-menu__link"
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageFinanceName) }}#{{ Str::slug($title) }}">
|
||||
{{ $title }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
@php $FinanceChildPages = $pageFinance->childPages->where('status', \App\Enums\DynamicPages\PageStatusEnum::published); @endphp
|
||||
@if ($FinanceChildPages->count())
|
||||
<p class="menu-mobile-message">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue