Suggestions.svelte 4.62 KB
Newer Older
1
2
3
4
5
6
<script lang="ts">
	export let submitPrompt: Function;
</script>

<div class=" grid sm:grid-cols-2 gap-2.5 mb-4 md:p-2 text-left">
	<button
Timothy J. Baek's avatar
Timothy J. Baek committed
7
		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"
8
9
10
11
12
		on:click={() => {
			submitPrompt(`Tell me a random fun fact about the Roman Empire`);
		}}
	>
		<div class="flex flex-col text-left">
Timothy J. Baek's avatar
Timothy J. Baek committed
13
			<div class="text-sm font-medium dark:text-gray-300">Tell me a fun fact</div>
14
15
16
			<div class="text-sm text-gray-500">about the Roman Empire</div>
		</div>

Timothy J. Baek's avatar
Timothy J. Baek committed
17
		<div
Timothy J. Baek's avatar
Timothy J. Baek committed
18
			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"
Timothy J. Baek's avatar
Timothy J. Baek committed
19
		>
Timothy J. Baek's avatar
Timothy J. Baek committed
20
21
22
23
24
			<svg
				xmlns="http://www.w3.org/2000/svg"
				viewBox="0 0 20 20"
				fill="currentColor"
				class="w-4 h-4"
25
			>
Timothy J. Baek's avatar
Timothy J. Baek committed
26
27
28
29
30
31
				<path
					fill-rule="evenodd"
					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"
					clip-rule="evenodd"
				/>
			</svg>
32
33
34
35
		</div>
	</button>

	<button
Timothy J. Baek's avatar
Timothy J. Baek committed
36
		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"
37
38
39
40
41
		on:click={() => {
			submitPrompt(`Show me a code snippet of a website's sticky header in CSS and JavaScript.`);
		}}
	>
		<div class="flex flex-col text-left">
Timothy J. Baek's avatar
Timothy J. Baek committed
42
			<div class="text-sm font-medium dark:text-gray-300">Show me a code snippet</div>
43
44
			<div class="text-sm text-gray-500">of a website's sticky header</div>
		</div>
Timothy J. Baek's avatar
Timothy J. Baek committed
45
		<div
Timothy J. Baek's avatar
Timothy J. Baek committed
46
			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"
Timothy J. Baek's avatar
Timothy J. Baek committed
47
		>
Timothy J. Baek's avatar
Timothy J. Baek committed
48
49
50
51
52
			<svg
				xmlns="http://www.w3.org/2000/svg"
				viewBox="0 0 20 20"
				fill="currentColor"
				class="w-4 h-4"
53
			>
Timothy J. Baek's avatar
Timothy J. Baek committed
54
55
56
57
58
59
				<path
					fill-rule="evenodd"
					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"
					clip-rule="evenodd"
				/>
			</svg>
60
61
62
63
		</div>
	</button>

	<button
Timothy J. Baek's avatar
Timothy J. Baek committed
64
		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"
65
66
67
68
69
70
71
		on:click={() => {
			submitPrompt(
				`Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option.`
			);
		}}
	>
		<div class="flex flex-col text-left">
Timothy J. Baek's avatar
Timothy J. Baek committed
72
			<div class="text-sm font-medium dark:text-gray-300">Help me study</div>
73
74
			<div class="text-sm text-gray-500">vocabulary for a college entrance exam</div>
		</div>
Timothy J. Baek's avatar
Timothy J. Baek committed
75
		<div
Timothy J. Baek's avatar
Timothy J. Baek committed
76
			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"
Timothy J. Baek's avatar
Timothy J. Baek committed
77
		>
Timothy J. Baek's avatar
Timothy J. Baek committed
78
79
80
81
82
			<svg
				xmlns="http://www.w3.org/2000/svg"
				viewBox="0 0 20 20"
				fill="currentColor"
				class="w-4 h-4"
83
			>
Timothy J. Baek's avatar
Timothy J. Baek committed
84
85
86
87
88
89
				<path
					fill-rule="evenodd"
					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"
					clip-rule="evenodd"
				/>
			</svg>
90
91
92
93
		</div>
	</button>

	<button
Timothy J. Baek's avatar
Timothy J. Baek committed
94
		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"
95
96
97
98
99
100
101
		on:click={() => {
			submitPrompt(
				`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.`
			);
		}}
	>
		<div class="flex flex-col text-left">
Timothy J. Baek's avatar
Timothy J. Baek committed
102
			<div class="text-sm font-medium dark:text-gray-300">Give me ideas</div>
103
104
			<div class="text-sm text-gray-500">for what to do with my kids' art</div>
		</div>
Timothy J. Baek's avatar
Timothy J. Baek committed
105
		<div
Timothy J. Baek's avatar
Timothy J. Baek committed
106
			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"
Timothy J. Baek's avatar
Timothy J. Baek committed
107
		>
Timothy J. Baek's avatar
Timothy J. Baek committed
108
109
110
111
112
			<svg
				xmlns="http://www.w3.org/2000/svg"
				viewBox="0 0 20 20"
				fill="currentColor"
				class="w-4 h-4"
113
			>
Timothy J. Baek's avatar
Timothy J. Baek committed
114
115
116
117
118
119
				<path
					fill-rule="evenodd"
					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"
					clip-rule="evenodd"
				/>
			</svg>
120
121
122
		</div>
	</button>
</div>