OnBoarding.svelte 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <script>
  2. import { getContext } from 'svelte';
  3. const i18n = getContext('i18n');
  4. import { WEBUI_BASE_URL } from '$lib/constants';
  5. import Marquee from './common/Marquee.svelte';
  6. import SlideShow from './common/SlideShow.svelte';
  7. import ArrowRightCircle from './icons/ArrowRightCircle.svelte';
  8. export let show = true;
  9. export let getStartedHandler = () => {};
  10. </script>
  11. {#if show}
  12. <div class="w-full h-screen max-h-[100dvh] text-white relative">
  13. <div class="fixed m-10 z-50">
  14. <div class="flex space-x-2">
  15. <div class=" self-center">
  16. <img
  17. crossorigin="anonymous"
  18. src="{WEBUI_BASE_URL}/static/favicon.png"
  19. class=" w-6 rounded-full"
  20. alt="logo"
  21. />
  22. </div>
  23. </div>
  24. </div>
  25. <SlideShow duration={5000} />
  26. <div
  27. class="w-full h-full absolute top-0 left-0 bg-gradient-to-t from-20% from-black to-transparent"
  28. ></div>
  29. <div class="w-full h-full absolute top-0 left-0 backdrop-blur-sm bg-black/50"></div>
  30. <div class="relative bg-transparent w-full min-h-screen flex z-10">
  31. <div class="flex flex-col justify-end w-full items-center pb-10 text-center">
  32. <div class="text-5xl lg:text-7xl font-secondary">
  33. <Marquee
  34. duration={5000}
  35. words={[
  36. $i18n.t('Explore the cosmos'),
  37. $i18n.t('Unlock mysteries'),
  38. $i18n.t('Chart new frontiers'),
  39. $i18n.t('Dive into knowledge'),
  40. $i18n.t('Discover wonders'),
  41. $i18n.t('Ignite curiosity'),
  42. $i18n.t('Forge new paths'),
  43. $i18n.t('Unravel secrets'),
  44. $i18n.t('Pioneer insights'),
  45. $i18n.t('Embark on adventures')
  46. ]}
  47. />
  48. <div class="mt-0.5">{$i18n.t(`wherever you are`)}</div>
  49. </div>
  50. <div class="flex justify-center mt-8">
  51. <div class="flex flex-col justify-center items-center">
  52. <button
  53. class="relative z-20 flex p-1 rounded-full bg-white/5 hover:bg-white/10 transition font-medium text-sm"
  54. on:click={() => {
  55. getStartedHandler();
  56. }}
  57. >
  58. <ArrowRightCircle className="size-6" />
  59. </button>
  60. <div class="mt-1.5 font-primary text-base font-medium">{$i18n.t(`Get started`)}</div>
  61. </div>
  62. </div>
  63. </div>
  64. <!-- <div class="absolute bottom-12 left-0 right-0 w-full"></div> -->
  65. </div>
  66. </div>
  67. {/if}