File tree Expand file tree Collapse file tree 7 files changed +1315
-15
lines changed
layout/service-navigation-nested-mobile Expand file tree Collapse file tree 7 files changed +1315
-15
lines changed Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
- import { base } from " $app/paths" ;
3
-
4
2
import { onMount } from " svelte" ;
5
3
6
4
// Define navigation item type
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
- import { base } from " $app/paths" ;
3
2
import { onMount } from " svelte" ;
4
3
import { browser } from " $app/environment" ;
5
4
import { page } from " $app/state" ;
260
259
/>
261
260
262
261
{#snippet settingsLink ()}
263
- <a
264
- href ={base + cookiesUrl }
265
- class =" govuk-link"
266
- onclick ={handleCookiesNavigation }
267
- >
262
+ <a href ={cookiesUrl } class ="govuk-link" onclick ={handleCookiesNavigation }>
268
263
{changeSettingsText }
269
264
</a >
270
265
{/ snippet }
338
333
{rejectButtonText }
339
334
</button >
340
335
<a
341
- href ={base + cookiesUrl }
336
+ href ={cookiesUrl }
342
337
class =" govuk-link"
343
338
onclick ={handleCookiesNavigation }
344
339
>
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
- import { base } from " $app/paths" ;
3
2
import Pill from " $lib/package-wrapping/Pill.svelte" ;
4
3
import {
5
4
pascalToKebabCase ,
21
20
<!-- Homepage: component name as clickable link -->
22
21
<a
23
22
class =" link-to-other-page"
24
- href ={` ${ base } /${parentFolder }${(folder ? " /" + folder : " " ) + (subFolder ? " /" + subFolder : " " )}/${pascalToKebabCase (name )}` }
23
+ href ={` /${parentFolder }${(folder ? " /" + folder : " " ) + (subFolder ? " /" + subFolder : " " )}/${pascalToKebabCase (name )} ` }
25
24
>
26
25
<h6 >{@html forceWrapAtThirdCapital (name )}</h6 >
27
26
</a >
Original file line number Diff line number Diff line change 1
- import { base } from "$app/paths" ;
2
1
import type {
3
2
SideNavItem ,
4
3
SideNavGroup ,
5
- } from "$lib /components/layout/service-navigation-nested-mobile/SideNav.svelte" ;
4
+ } from ".. /components/layout/service-navigation-nested-mobile/SideNav.svelte" ;
6
5
import type { ComponentItem } from "../../routes/+layout.server" ; // Adjust path as needed if +layout.server.ts is the source
7
6
import { forceWrapAtThirdCapital } from "./text-string-conversion/textStringConversion.js" ;
8
7
@@ -30,7 +29,7 @@ export function extractLinkableComponentNavItems(
30
29
// If it's a wrapper, add it directly
31
30
navItems . push ( {
32
31
text : forceWrapAtThirdCapital ( item . name ) ,
33
- href : `${ base } /${ item . path } ` ,
32
+ href : `/${ item . path } ` ,
34
33
// subItems: undefined, // Explicitly no sub-items for direct wrappers here
35
34
} ) ;
36
35
}
@@ -67,7 +66,7 @@ export function createMobileItems(tree: ComponentItem[]) {
67
66
if ( category . hasWrapper ) {
68
67
result . push ( {
69
68
text : forceWrapAtThirdCapital ( category . name ) ,
70
- href : `${ base } /${ category . path } ` ,
69
+ href : `/${ category . path } ` ,
71
70
} ) ;
72
71
}
73
72
// If the category has children, process them
You can’t perform that action at this time.
0 commit comments