Skip to content

Commit 27114fd

Browse files
committed
Add ChatGPT notes
1 parent 7303a88 commit 27114fd

File tree

14 files changed

+1166
-5
lines changed

14 files changed

+1166
-5
lines changed

assets/avatar.svg

Lines changed: 14 additions & 0 deletions
Loading

assets/chatgpt-logo.svg

Lines changed: 5 additions & 0 deletions
Loading

assets/comment-icon.svg

Lines changed: 7 additions & 0 deletions
Loading

project-words.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
allowtransparency
12
backquote
3+
buendía
24
casedness
35
cena
46
charis
@@ -7,11 +9,15 @@ cmyk
79
codomain
810
conlang
911
copiable
12+
counterplay
1013
coursetable
1114
dialytika
1215
dotless
16+
emboard
1317
estree
18+
fianchetto
1419
flattenable
20+
garcía
1521
huayu
1622
infty
1723
injectivity
@@ -22,6 +28,7 @@ kwargs
2228
letterlike
2329
lext
2430
luo
31+
márquez's
2532
mathbb
2633
mathcal
2734
mathtt
@@ -38,6 +45,7 @@ pipeable
3845
posix
3946
prismjs
4047
prosgegrammeni
48+
queenside
4149
randcolor
4250
rehype
4351
saturationl

src/Layout/Command/index.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
.promptPath {
5656
font-weight: bold;
57-
color: var(--color-dark-blue);
57+
color: var(--color-indigo);
5858
}
5959

6060
[data-color-mode="dark"] .promptPath {

src/global.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,25 @@
1212
--color-primary-lightest: #0aa9a4;
1313
--color-shadow: #00000020;
1414
--color-red: #ca393e;
15-
--color-green: #3eca39;
1615
--color-pink: #ca3986;
16+
--color-violet: #c539ca;
17+
--color-purple: #7d39ca;
18+
--color-indigo: #393eca;
1719
--color-blue: #3986ca;
18-
--color-dark-blue: #393eca;
20+
--color-seagreen: #39ca7d;
21+
--color-green: #3eca39;
22+
--color-yellowgreen: #86ca39;
23+
--color-yellow: #cac539;
24+
--color-orange: #ca7d39;
1925
--height-navbar: 4rem;
2026
--margin-main-h: 2rem;
2127
--margin-main-v: 0;
2228
--margin-paragraph: 1rem;
2329
--font-main: "CharisSILW", Georgia, "Times New Roman", Times, serif;
2430
--font-code: Menlo, Consolas, Monaco, monospace;
2531
--border-radius-small: 0.25em;
32+
--border-radius-medium: 0.5em;
33+
--border-radius-large: 1em;
2634

2735
font-family: var(--font-main);
2836
scroll-padding-top: var(--height-navbar);
@@ -181,6 +189,7 @@ kbd {
181189
margin-top: 1em;
182190
padding: 0 1em;
183191
font-weight: normal;
192+
z-index: 100;
184193
}
185194

186195
.term {
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.chatBox {
2+
position: relative;
3+
display: flex;
4+
flex-direction: column;
5+
justify-content: flex-end;
6+
padding: 1em;
7+
overflow-y: auto;
8+
}
9+
10+
.chatBox:nth-of-type(2n) {
11+
background-color: #0001;
12+
}
13+
14+
[data-color-mode="dark"] .chatBox:nth-of-type(2n) {
15+
background-color: #fff1;
16+
}
17+
18+
.profileRow {
19+
display: flex;
20+
flex-direction: row;
21+
gap: 0.5em;
22+
align-items: center;
23+
}
24+
25+
.avatar {
26+
width: 2em;
27+
height: 2em;
28+
border-radius: 50%;
29+
}
30+
31+
.avatar[alt="JC"] {
32+
background-color: white;
33+
}
34+
35+
.avatar[alt="ChatGPT"] {
36+
background-color: rgb(25, 195, 125);
37+
}
38+
39+
.name {
40+
font-weight: bold;
41+
}
42+
43+
.commentButton {
44+
position: absolute;
45+
right: 1em;
46+
top: 1em;
47+
width: 1.5em;
48+
height: 1.5em;
49+
cursor: help;
50+
}
51+
52+
.commentButton img {
53+
width: 100%;
54+
height: 100%;
55+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { useId } from "react";
2+
import { Tooltip } from "react-tooltip";
3+
import styles from "./_components.module.css";
4+
import CommentIcon from "assets/comment-icon.svg?react";
5+
import avatar from "assets/avatar.svg";
6+
import chatGPT from "assets/chatgpt-logo.svg";
7+
8+
const formatter = new Intl.DateTimeFormat("en-US", {
9+
year: "numeric",
10+
month: "long",
11+
day: "numeric",
12+
});
13+
14+
export function Time({ dateTime }: { readonly dateTime: string }): JSX.Element {
15+
return (
16+
<time dateTime={dateTime}>{formatter.format(new Date(dateTime))}</time>
17+
);
18+
}
19+
20+
export function ChatBox({
21+
children,
22+
name,
23+
comment,
24+
}: {
25+
readonly children: React.ReactNode;
26+
readonly name: string;
27+
readonly comment?: string;
28+
}): JSX.Element {
29+
const id = useId();
30+
return (
31+
<>
32+
<section className={styles.chatBox}>
33+
<div className={styles.profileRow}>
34+
<img
35+
alt={name}
36+
className={styles.avatar}
37+
src={name === "JC" ? avatar : chatGPT}
38+
/>
39+
<span className={styles.name}>{name}</span>
40+
</div>
41+
{children}
42+
{comment && (
43+
<span data-tooltip-id={id} className={styles.commentButton}>
44+
<CommentIcon />
45+
</span>
46+
)}
47+
</section>
48+
<Tooltip
49+
id={id}
50+
className="tooltip"
51+
disableStyleInjection
52+
clickable
53+
place="left">
54+
<p>{comment}</p>
55+
</Tooltip>
56+
</>
57+
);
58+
}

0 commit comments

Comments
 (0)