|
1 | 1 | <script lang="ts"> |
2 | 2 | import { slide } from 'svelte/transition'; |
3 | | - import { onMount } from 'svelte'; |
4 | 3 | import { trackEvent } from '$lib/actions/analytics'; |
5 | 4 | import { createAccordion, melt } from '@melt-ui/svelte'; |
6 | 5 |
|
7 | 6 | export let noBorder = false; |
8 | | - let logoSrc = '/images/logos/appwrite.svg'; |
9 | 7 |
|
10 | 8 | const { |
11 | 9 | elements: { content, heading, item, root, trigger }, |
|
109 | 107 | { label: 'Security', href: '/docs/advanced/security' } |
110 | 108 | ] |
111 | 109 | }; |
112 | | -
|
113 | | - const syncBrandLogo = () => { |
114 | | - logoSrc = document.body.classList.contains('brand-pink') |
115 | | - ? '/images/logos/appwrite.svg' |
116 | | - : '/images/logos/appwrite-green.svg'; |
117 | | - }; |
118 | | -
|
119 | | - onMount(() => { |
120 | | - syncBrandLogo(); |
121 | | -
|
122 | | - const brandObserver = new MutationObserver(syncBrandLogo); |
123 | | - brandObserver.observe(document.body, { attributes: true, attributeFilter: ['class'] }); |
124 | | -
|
125 | | - return () => { |
126 | | - brandObserver.disconnect(); |
127 | | - }; |
128 | | - }); |
129 | 110 | </script> |
130 | 111 |
|
131 | 112 | <nav |
132 | 113 | aria-label="Footer" |
133 | 114 | class="web-footer-nav relative mt-24" |
134 | 115 | class:web-u-sep-block-start={!noBorder} |
135 | 116 | > |
136 | | - <img class="web-logo" src={logoSrc} alt="appwrite" height="24" width="130" /> |
| 117 | + <img class="web-logo" src="/images/logos/appwrite.svg" alt="appwrite" height="24" width="130" /> |
137 | 118 | <ul class="web-footer-nav-main-list" use:melt={$root}> |
138 | 119 | {#each Object.entries(links) as [title, items]} |
139 | 120 | <li class="web-footer-nav-main-item web-is-not-mobile"> |
|
0 commit comments