Suggestions.svelte 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <script lang="ts">
  2. export let submitPrompt: Function;
  3. </script>
  4. <div class=" grid sm:grid-cols-2 gap-2.5 mb-4 md:p-2 text-left">
  5. <button
  6. class=" flex justify-between w-full px-4 py-2.5 bg-white hover:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 outline outline-1 outline-gray-200 dark:outline-gray-600 rounded-lg transition group"
  7. on:click={() => {
  8. submitPrompt(`Tell me a random fun fact about the Roman Empire`);
  9. }}
  10. >
  11. <div class="flex flex-col text-left">
  12. <div class="text-sm font-medium dark:text-gray-300">Tell me a fun fact</div>
  13. <div class="text-sm text-gray-500">about the Roman Empire</div>
  14. </div>
  15. <div
  16. class="self-center p-1 rounded-lg text-white group-hover:bg-gray-100 group-hover:text-gray-800 dark:group-hover:bg-gray-800 dark:group-hover:text-gray-300 dark:text-gray-800 transition"
  17. >
  18. <svg
  19. xmlns="http://www.w3.org/2000/svg"
  20. viewBox="0 0 20 20"
  21. fill="currentColor"
  22. class="w-4 h-4"
  23. >
  24. <path
  25. fill-rule="evenodd"
  26. d="M10 17a.75.75 0 01-.75-.75V5.612L5.29 9.77a.75.75 0 01-1.08-1.04l5.25-5.5a.75.75 0 011.08 0l5.25 5.5a.75.75 0 11-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0110 17z"
  27. clip-rule="evenodd"
  28. />
  29. </svg>
  30. </div>
  31. </button>
  32. <button
  33. class=" flex justify-between w-full px-4 py-2.5 bg-white hover:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 outline outline-1 outline-gray-200 dark:outline-gray-600 rounded-lg transition group"
  34. on:click={() => {
  35. submitPrompt(`Show me a code snippet of a website's sticky header in CSS and JavaScript.`);
  36. }}
  37. >
  38. <div class="flex flex-col text-left">
  39. <div class="text-sm font-medium dark:text-gray-300">Show me a code snippet</div>
  40. <div class="text-sm text-gray-500">of a website's sticky header</div>
  41. </div>
  42. <div
  43. class="self-center p-1 rounded-lg text-white group-hover:bg-gray-100 group-hover:text-gray-800 dark:group-hover:bg-gray-800 dark:group-hover:text-gray-300 dark:text-gray-800 transition"
  44. >
  45. <svg
  46. xmlns="http://www.w3.org/2000/svg"
  47. viewBox="0 0 20 20"
  48. fill="currentColor"
  49. class="w-4 h-4"
  50. >
  51. <path
  52. fill-rule="evenodd"
  53. d="M10 17a.75.75 0 01-.75-.75V5.612L5.29 9.77a.75.75 0 01-1.08-1.04l5.25-5.5a.75.75 0 011.08 0l5.25 5.5a.75.75 0 11-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0110 17z"
  54. clip-rule="evenodd"
  55. />
  56. </svg>
  57. </div>
  58. </button>
  59. <button
  60. class=" hidden sm:flex justify-between w-full px-4 py-2.5 bg-white hover:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 outline outline-1 outline-gray-200 dark:outline-gray-600 rounded-lg transition group"
  61. on:click={() => {
  62. submitPrompt(
  63. `Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option.`
  64. );
  65. }}
  66. >
  67. <div class="flex flex-col text-left">
  68. <div class="text-sm font-medium dark:text-gray-300">Help me study</div>
  69. <div class="text-sm text-gray-500">vocabulary for a college entrance exam</div>
  70. </div>
  71. <div
  72. class="self-center p-1 rounded-lg text-white group-hover:bg-gray-100 group-hover:text-gray-800 dark:group-hover:bg-gray-800 dark:group-hover:text-gray-300 dark:text-gray-800 transition"
  73. >
  74. <svg
  75. xmlns="http://www.w3.org/2000/svg"
  76. viewBox="0 0 20 20"
  77. fill="currentColor"
  78. class="w-4 h-4"
  79. >
  80. <path
  81. fill-rule="evenodd"
  82. d="M10 17a.75.75 0 01-.75-.75V5.612L5.29 9.77a.75.75 0 01-1.08-1.04l5.25-5.5a.75.75 0 011.08 0l5.25 5.5a.75.75 0 11-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0110 17z"
  83. clip-rule="evenodd"
  84. />
  85. </svg>
  86. </div>
  87. </button>
  88. <button
  89. class=" hidden sm:flex justify-between w-full px-4 py-2.5 bg-white hover:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 outline outline-1 outline-gray-200 dark:outline-gray-600 rounded-lg transition group"
  90. on:click={() => {
  91. submitPrompt(
  92. `What are 5 creative things I could do with my kids' art? I don't want to throw them away, but it's also so much clutter.`
  93. );
  94. }}
  95. >
  96. <div class="flex flex-col text-left">
  97. <div class="text-sm font-medium dark:text-gray-300">Give me ideas</div>
  98. <div class="text-sm text-gray-500">for what to do with my kids' art</div>
  99. </div>
  100. <div
  101. class="self-center p-1 rounded-lg text-white group-hover:bg-gray-100 group-hover:text-gray-800 dark:group-hover:bg-gray-800 dark:group-hover:text-gray-300 dark:text-gray-800 transition"
  102. >
  103. <svg
  104. xmlns="http://www.w3.org/2000/svg"
  105. viewBox="0 0 20 20"
  106. fill="currentColor"
  107. class="w-4 h-4"
  108. >
  109. <path
  110. fill-rule="evenodd"
  111. d="M10 17a.75.75 0 01-.75-.75V5.612L5.29 9.77a.75.75 0 01-1.08-1.04l5.25-5.5a.75.75 0 011.08 0l5.25 5.5a.75.75 0 11-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0110 17z"
  112. clip-rule="evenodd"
  113. />
  114. </svg>
  115. </div>
  116. </button>
  117. </div>