|
| 1 | +export const SiteNoticeBanner = () => { |
| 2 | + return ( |
| 3 | + <div |
| 4 | + x-data="{ |
| 5 | + bannerVisible: false, |
| 6 | + bannerVisibleAfter: 300, |
| 7 | + }" |
| 8 | + x-show="bannerVisible" |
| 9 | + x-transition:enter="transition ease-out duration-500" |
| 10 | + x-transition:enter-start="-translate-y-full" |
| 11 | + x-transition:enter-end="translate-y-0" |
| 12 | + x-transition:leave="transition ease-in duration-300" |
| 13 | + x-transition:leave-start="translate-y-0" |
| 14 | + x-transition:leave-end="-translate-y-full" |
| 15 | + x-init=" |
| 16 | + setTimeout(()=>{ bannerVisible = true }, bannerVisibleAfter); |
| 17 | + " |
| 18 | + class="fixed top-0 left-0 w-full h-auto py-2 duration-300 ease-out bg-white shadow-sm sm:py-4" |
| 19 | + x-cloak |
| 20 | + > |
| 21 | + <div class="prose relative flex flex-col sm:flex-row items-start w-full px-3 sm:px-12 mx-auto max-w-7xl flex-wrap"> |
| 22 | + <div class="flex flex-col sm:flex-row w-full text-xs leading-6 text-black duration-150 ease-out opacity-80 hover:opacity-100 gap-3"> |
| 23 | + <span class="flex items-center flex-shrink-0"> |
| 24 | + <svg |
| 25 | + class="w-4 h-4 mr-2" |
| 26 | + viewBox="0 0 24 24" |
| 27 | + fill="none" |
| 28 | + stroke="currentColor" |
| 29 | + > |
| 30 | + <path |
| 31 | + d="M12 3L2 21h20L12 3z" |
| 32 | + stroke="currentColor" |
| 33 | + strokeWidth="1.5" |
| 34 | + /> |
| 35 | + <rect |
| 36 | + x="11" |
| 37 | + y="9" |
| 38 | + width="2" |
| 39 | + height="5" |
| 40 | + rx="1" |
| 41 | + stroke="none" |
| 42 | + fill="currentColor" |
| 43 | + /> |
| 44 | + <rect |
| 45 | + x="11" |
| 46 | + y="16" |
| 47 | + width="2" |
| 48 | + height="2" |
| 49 | + rx="1" |
| 50 | + stroke="none" |
| 51 | + fill="currentColor" |
| 52 | + /> |
| 53 | + </svg> |
| 54 | + <strong>注意 / Warning</strong> |
| 55 | + </span> |
| 56 | + <span class="hidden sm:flex items-center"> |
| 57 | + <span class="inline-block w-px h-12 bg-neutral-200 mx-3"></span> |
| 58 | + </span> |
| 59 | + <span class="block flex-1 pt-1 pb-2 leading-normal sm:inline sm:pt-0 sm:pb-0"> |
| 60 | + 当サイトは、 |
| 61 | + <a href="https://typst.app/docs/">Typst v0.13.1 公式ドキュメント</a> |
| 62 | + を、日本語コミュニティが非公式に翻訳したものです。誤訳・未訳・古い情報が含まれている可能性があるため、 |
| 63 | + <a href="https://typst.app/docs/">公式ドキュメント</a> |
| 64 | + との併用を推奨します。このサイトの内容に誤りを発見された方は、 |
| 65 | + <a href="https://github.com/typst-jp/typst-jp.github.io"> |
| 66 | + GitHubリポジトリまでご報告を頂けましたら幸いです |
| 67 | + </a> |
| 68 | + 。我々のコミュニティにご興味のある方は、ぜひ |
| 69 | + <a href="https://discord.gg/9xF7k4aAuH"> |
| 70 | + 非公式Discordサーバー「くみはんクラブ」 |
| 71 | + </a> |
| 72 | + にご参加ください。 |
| 73 | + <br /> |
| 74 | + This site provides an unofficial translation of the |
| 75 | + <a href="https://typst.app/docs/">Typst v0.13.1 documentation</a> |
| 76 | + by the Japanese Community. Please note that there may be some |
| 77 | + inaccuracies, untranslated sections or outdated information. We |
| 78 | + highly recommend referring to |
| 79 | + <a href="https://typst.app/docs/"> |
| 80 | + the latest official documentation |
| 81 | + </a> |
| 82 | + as well. If you find any errors in the content, |
| 83 | + <a href="https://github.com/typst-jp/typst-jp.github.io"> |
| 84 | + please let us know through our GitHub repository. |
| 85 | + </a> |
| 86 | + If you are interested in our community, feel free to join |
| 87 | + <a href="https://discord.gg/9xF7k4aAuH"> |
| 88 | + our unofficial Discord server, "Kumihan Club." |
| 89 | + </a> |
| 90 | + </span> |
| 91 | + </div> |
| 92 | + </div> |
| 93 | + <button |
| 94 | + x-on:click="bannerVisible=false;" |
| 95 | + class="absolute top-2 right-4 flex items-center flex-shrink-0 translate-x-1 ease-out duration-150 justify-center w-6 h-6 p-1.5 text-black rounded-full hover:bg-neutral-100" |
| 96 | + > |
| 97 | + <svg |
| 98 | + xmlns="http://www.w3.org/2000/svg" |
| 99 | + fill="none" |
| 100 | + viewBox="0 0 24 24" |
| 101 | + stroke-width="1.5" |
| 102 | + stroke="currentColor" |
| 103 | + class="w-full h-full" |
| 104 | + > |
| 105 | + <path |
| 106 | + stroke-linecap="round" |
| 107 | + stroke-linejoin="round" |
| 108 | + d="M6 18L18 6M6 6l12 12" |
| 109 | + /> |
| 110 | + </svg> |
| 111 | + </button> |
| 112 | + </div> |
| 113 | + ); |
| 114 | +}; |
0 commit comments