|
7 | 7 | import { navItems } from 'lib/config/nav-menu/nav-items.config'; |
8 | 8 | import { handleNavItemAction } from 'lib/utils/nav-item-action.handler'; |
9 | 9 | import type { NavMenuItem } from 'lib/functions/nav-menu-item.model'; |
| 10 | + import InlineSvg from 'lib/components/InlineSvg.svelte'; |
10 | 11 | import FooterBottomBar from './FooterBottomBar.svelte'; |
11 | 12 | import styles from './FooterNavigation.module.scss' |
| 13 | + import { classnames } from 'lib/utils/classnames'; |
12 | 14 |
|
13 | 15 | const ctx = getAppContext() |
14 | 16 | $: ({auth} = $ctx) |
|
21 | 23 |
|
22 | 24 | $: ({fullFooter} = $ctx.toolConfig) |
23 | 25 |
|
| 26 | + let isCollapsed = true; |
| 27 | +
|
24 | 28 | let supportVisible = false; |
25 | 29 | let footerEl: Element | undefined = undefined; |
26 | 30 |
|
27 | 31 | function toggleSupportModal() { |
28 | 32 | supportVisible = true; |
29 | 33 | } |
30 | 34 |
|
| 35 | + function toggleFooter() { |
| 36 | + isCollapsed = !isCollapsed; |
| 37 | + } |
| 38 | +
|
31 | 39 | onMount(checkAndLoadFonts) |
32 | 40 |
|
33 | 41 | onMount(() => { |
|
36 | 44 | </script> |
37 | 45 |
|
38 | 46 | <footer class={styles.footerWrap} bind:this={footerEl}> |
39 | | - {#if fullFooter === true} |
| 47 | + {#if !fullFooter} |
| 48 | + <div class={classnames(styles.toggleBar, isCollapsed && styles.isCollapsed)} on:click={toggleFooter} on:keydown={() => {}}> |
| 49 | + <span class={styles.icon}> |
| 50 | + <InlineSvg src="/assets/icon-tmenu.svg" /> |
| 51 | + </span> |
| 52 | + <span class={classnames(styles.icon, styles.toggl)}> |
| 53 | + <InlineSvg src="/assets/icon-arrow.svg" /> |
| 54 | + </span> |
| 55 | + </div> |
| 56 | + {/if} |
| 57 | + {#if fullFooter === true || !isCollapsed} |
40 | 58 | <div class={styles.footerNavigation}> |
41 | 59 | <ul class={styles.menuSections}> |
42 | 60 | {#each menuItems as menuItem} |
43 | 61 | <li class={styles.menuSection}> |
44 | 62 | {#if !!menuItem.label} |
45 | 63 | <div class={styles.menuSectionHeading}> |
46 | 64 | {menuItem.label} |
47 | | - </div> |
| 65 | + </div> |
48 | 66 | {/if} |
49 | 67 | {#if menuItem.children?.length} |
50 | 68 | <ul class={styles.menuSectionEntries}> |
|
54 | 72 | <a target="_top" use:handleNavItemAction={child} href={child.url}> |
55 | 73 | {child.label} |
56 | 74 | </a> |
57 | | - </li> |
| 75 | + </li> |
58 | 76 | {/if} |
59 | 77 | {/each} |
60 | 78 | </ul> |
|
0 commit comments