|
| 1 | +<!-- 💠 Source: https://gist.github.com/SimonPadbury/fc55c054c0480550c3be592111778763 --> |
| 2 | + |
| 3 | +<script lang="ts"> |
| 4 | + import MagicTechnology from '$lib/icons/MagicTechnology.svelte'; |
| 5 | +
|
| 6 | + let props = $props(); |
| 7 | +</script> |
| 8 | + |
| 9 | +<div class="sticky flex flex-col items-center {props.class}"> |
| 10 | + <span>Any sufficiently</span> |
| 11 | + <span>advanced technology</span> |
| 12 | + <span>is indistinguishable</span> |
| 13 | + <span>from magic.</span> |
| 14 | + <span class="font-bold"> |
| 15 | + - <a href="https://en.wikipedia.org/wiki/Clarke%27s_three_laws" target="_blank"> |
| 16 | + Arthur C. Clarke |
| 17 | + </a> |
| 18 | + </span> |
| 19 | + <MagicTechnology class="mx-auto fill-gray-600" width="30pt" height="30pt" /> |
| 20 | +</div> |
| 21 | + |
| 22 | +<style> |
| 23 | + .sticky { |
| 24 | + position: absolute; |
| 25 | + right: 0; |
| 26 | + z-index: 150; |
| 27 | + transform: rotate(5deg); |
| 28 | + width: fit-content; |
| 29 | + min-height: 150px; |
| 30 | + margin: -10px 10px 10px; |
| 31 | + padding: 1rem 1rem 0.5rem 1rem; |
| 32 | + font-family: 'Comic Sans MS', 'Comic Sans', 'Chalkboard SE', 'Comic Neue', cursive; |
| 33 | + font-size: 14px; |
| 34 | + color: #000; |
| 35 | + background: rgba(255, 255, 51, 1); |
| 36 | + box-shadow: -2px 2px 2px rgba(0, 0, 0, 0.3); |
| 37 | + } |
| 38 | + .sticky:before, |
| 39 | + .sticky:after { |
| 40 | + content: ''; |
| 41 | + display: block; |
| 42 | + position: absolute; |
| 43 | + width: 16px; |
| 44 | + height: 16px; |
| 45 | + top: 0; |
| 46 | + right: 0; |
| 47 | + } |
| 48 | + .sticky:before { |
| 49 | + border-top: solid 8px #fff; |
| 50 | + border-right: solid 8px #fff; |
| 51 | + border-left: solid 8px transparent; |
| 52 | + border-bottom: solid 8px transparent; |
| 53 | + } |
| 54 | + .sticky:after { |
| 55 | + border-bottom: solid 8px #dddd33; |
| 56 | + border-left: solid 8px #dddd33; |
| 57 | + border-right: solid 8px transparent; |
| 58 | + border-top: solid 8px transparent; |
| 59 | + } |
| 60 | +</style> |
0 commit comments