data endpoint for entity 90008 (aka. a website)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: only show eyes and pet on non-resume page

dusk 5cb58a15 2cb1fc50

+17 -18
+17 -18
src/routes/+layout.svelte
··· 29 29 ]; 30 30 31 31 let routeComponents = $derived(data.route.split('/')); 32 - let doAddPostItem = $derived(routeComponents.length > 3 && routeComponents[1] === 'entries'); 33 - let doAddResumeItem = $derived(routeComponents[1] === 'resume'); 32 + let isEntryPage = $derived(routeComponents.length > 3 && routeComponents[1] === 'entries'); 33 + let isResumePage = $derived(routeComponents[1] === 'resume'); 34 34 let isRoute = $derived((_route: string) => { 35 - if (doAddPostItem) { 35 + if (isEntryPage) { 36 36 if (_route === 'entries') { 37 37 return false; 38 38 } else if (_route.startsWith('entries/')) { ··· 145 145 </defs> 146 146 </svg> 147 147 148 - {#each data.lastVisitors as [id, visitor], index} 149 - {@const pos = eyePositions.at(index)} 150 - {#if pos !== undefined} 151 - <Eye visits={visitor.visits} {id} top={pos[0]} left={pos[1]} /> 152 - {/if} 153 - {/each} 148 + {#if !isResumePage} 149 + {#each data.lastVisitors as [id, visitor], index} 150 + {@const pos = eyePositions.at(index)} 151 + {#if pos !== undefined} 152 + <Eye visits={visitor.visits} {id} top={pos[0]} left={pos[1]} /> 153 + {/if} 154 + {/each} 155 + {/if} 154 156 155 157 <div 156 158 class="md:h-[96vh] pb-[8vh] lg:px-[1vw] 2xl:px-[2vw] lg:pb-[3vh] lg:pt-[1vh] overflow-x-hidden [scrollbar-gutter:stable]" ··· 158 160 {@render children?.()} 159 161 </div> 160 162 161 - <Pet /> 163 + {#if !isResumePage} 164 + <Pet /> 165 + {/if} 162 166 163 167 <nav class="w-full min-h-[5vh] max-h-[5vh] fixed bottom-0 z-[999] bg-ralsei-black overflow-visible"> 164 168 <div ··· 173 177 {#each menuItems as item, menuIdx} 174 178 {@const highlight = isRoute(item.href)} 175 179 <NavButton {highlight} {...item} /> 176 - {#if doAddPostItem && menuIdx === 1} 180 + {#if isEntryPage && menuIdx === 1} 177 181 <NavButton 178 182 highlight 179 183 name={routeComponents[2]} ··· 181 185 iconUri="/icons/entry.webp" 182 186 /> 183 187 {/if} 184 - {#if doAddResumeItem && menuIdx === 2} 185 - <NavButton 186 - highlight 187 - name={routeComponents[1]} 188 - href="/resume" 189 - iconUri="/icons/about.webp" 190 - /> 188 + {#if isResumePage && menuIdx === 2} 189 + <NavButton highlight name="resume" href="/resume" iconUri="/icons/about.webp" /> 191 190 {/if} 192 191 {/each} 193 192 <div class="hidden md:block grow"></div>