|
| 1 | +<script lang="ts"> |
| 2 | + import svelteLogo from '../images/svelte.png' |
| 3 | + import tailwindBg from '../images/tailwind_bg.png' |
| 4 | + import typescriptLogo from '../images/typescript.png' |
| 5 | + import tailwindLogo from '../images/tailwind.png' |
| 6 | + import chromeWindowBg from '../images/chromeWindow.png' |
| 7 | +
|
| 8 | + let isDialogOpen = true |
| 9 | +
|
| 10 | + function toggleDialog() { |
| 11 | + isDialogOpen = !isDialogOpen |
| 12 | + } |
| 13 | +</script> |
| 14 | + |
| 15 | +{#if !isDialogOpen} |
| 16 | + <div class="mx-auto p-6"> |
| 17 | + <button |
| 18 | + on:click={toggleDialog} |
| 19 | + class="bg-white rounded-md p-3 text-sm font-semibold text-gray-900 shadow-sm hover:bg-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white" |
| 20 | + > |
| 21 | + 🧩 Open content script hint <span aria-hidden="true">+</span> |
| 22 | + </button> |
| 23 | + </div> |
| 24 | +{:else} |
| 25 | + <div class="mx-auto max-w-7xl md:px-0 lg:p-6"> |
| 26 | + <div class="relative isolate overflow-hidden bg-gray-900 px-6 pt-16 shadow-2xl lg:rounded-3xl md:pt-24 md:h-full sm:h-[100vh] lg:flex lg:gap-x-20 lg:px-24 lg:pt-0"> |
| 27 | + <div class="absolute z-20 top-0 inset-x-0 flex justify-center overflow-hidden pointer-events-none"> |
| 28 | + <div class="w-[108rem] flex-none flex justify-end"> |
| 29 | + <picture> |
| 30 | + <img |
| 31 | + src={tailwindBg} |
| 32 | + alt="" |
| 33 | + class="w-[90rem] flex-none max-w-none hidden dark:block" |
| 34 | + decoding="async" |
| 35 | + /> |
| 36 | + </picture> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + <div class="mx-auto max-w-md text-center lg:py-12 lg:mx-0 lg:flex-auto lg:text-left"> |
| 40 | + <div class="flex items-center justify-center space-x-4 my-4 mx-auto"> |
| 41 | + <img |
| 42 | + alt="React logo" |
| 43 | + src={svelteLogo} |
| 44 | + class="relative inline-block w-12" |
| 45 | + /> |
| 46 | + <div class="text-3xl text-white">+</div> |
| 47 | + <img |
| 48 | + alt="TypeScript logo" |
| 49 | + src={typescriptLogo} |
| 50 | + class="relative inline-block w-12" |
| 51 | + /> |
| 52 | + <div class="text-3xl text-white">+</div> |
| 53 | + <img |
| 54 | + alt="Tailwind logo" |
| 55 | + src={tailwindLogo} |
| 56 | + class="relative inline-block w-12" |
| 57 | + /> |
| 58 | + </div> |
| 59 | + <h2 class="text-3xl font-bold tracking-tight text-white sm:text-4xl"> |
| 60 | + This is a content script running Svelte, TypeScript, and Tailwind.css |
| 61 | + </h2> |
| 62 | + <p class="mt-6 text-lg leading-8 text-gray-300"> |
| 63 | + Learn more about creating cross-browser extensions by |
| 64 | + <button |
| 65 | + on:click={toggleDialog} |
| 66 | + class="underline hover:no-underline" |
| 67 | + > |
| 68 | + closing this hint |
| 69 | + </button> |
| 70 | + . |
| 71 | + </p> |
| 72 | + </div> |
| 73 | + <div class="relative mt-16 h-80 lg:mt-8"> |
| 74 | + <img |
| 75 | + class="absolute left-0 top-0 w-[57rem] max-w-none rounded-md bg-white/5 ring-1 ring-white/10" |
| 76 | + src={chromeWindowBg} |
| 77 | + alt="Chrome window screenshot" |
| 78 | + width="1824" |
| 79 | + height="1080" |
| 80 | + /> |
| 81 | + </div> |
| 82 | + </div> |
| 83 | + </div> |
| 84 | +{/if} |
0 commit comments