File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 2727 import { Button , Icon } from ' $lib/components/ui' ;
2828 import Info from ' $markdoc/tags/Info.svelte' ;
2929 import CopyAsMarkdown from ' $lib/components/blog/copy-as-markdown.svelte' ;
30+ import { hasRoutePrompt } from ' $lib/utils/routePrompts' ;
3031
3132 export let title: string ;
3233 export let toc: Array <TocItem >;
3738 const headerSectionInfoAlert = hasContext (' headerSectionInfoAlert' )
3839 ? getContext <Readable <HeaderSectionInfoAlert | null >>(' headerSectionInfoAlert' )
3940 : readable (null );
41+
42+ const showCopyPage = ! hasRoutePrompt ();
4043 </script >
4144
4245<main class =" contents" id =" main" >
4952 <span class =" web-icon-chevron-left" aria-hidden =" true" ></span >
5053 </a >
5154 {/if }
52- <div class =" copy-button-wrapper-mobile ml-auto" >
53- <CopyAsMarkdown class =" ml-0" />
54- </div >
55+ {#if showCopyPage }
56+ <div class =" copy-button-wrapper-mobile ml-auto" >
57+ <CopyAsMarkdown class =" ml-0" />
58+ </div >
59+ {/if }
5560 </div >
5661 <ul class =" web-metadata text-caption" >
5762 <slot name =" metadata" />
7580 <h1 class ="text-title font-aeonik-pro text-primary" >{title }</h1 >
7681 </div >
7782 </div >
78- <div class =" web-article-header-end copy-button-wrapper hidden lg:block" >
79- <CopyAsMarkdown class =" ml-0" />
80- </div >
83+ {#if showCopyPage }
84+ <div class =" web-article-header-end copy-button-wrapper hidden lg:block" >
85+ <CopyAsMarkdown class =" ml-0" />
86+ </div >
87+ {/if }
8188 </header >
8289 <div class ="web-article-content prose" class:web-reduced-article-size ={$reducedArticleSize }>
8390 <slot />
You can’t perform that action at this time.
0 commit comments