Skip to content

Commit

Permalink
Reorder sections on homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
hulloitskai committed Dec 7, 2023
1 parent 65e3c0d commit e0689b5
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 102 deletions.
74 changes: 36 additions & 38 deletions app/pages/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,44 +55,6 @@ const HomePage: PageComponent<HomePageProps> = ({
<br />& tell me what&apos;s on your mind!)
</Text>
</Stack>
<Transition
transition={{
transitionProperty: "transform, opacity, max-height",
common: { transformOrigin: "top" },
out: { opacity: 0, transform: "scale(0)", maxHeight: 0 },
in: { opacity: 1, transform: "scale(1)", maxHeight: 500 },
}}
duration={400}
mounted={showPensieve}
keepMounted
>
{style => (
<Box {...{ style }}>
<Stack align="center" gap="xs">
<Box style={{ textAlign: "center" }}>
<Title order={2} size="h3">
Sometimes, Kai thinks out loud.
</Title>
<Text size="xs" c="dimmed" lh={1.3}>
(messages from the last 12 hours)
</Text>
</Box>
<Pensieve
expandable
h={400}
onLoadMessages={messages => {
if (!isEmpty(messages)) {
setShowPensieve(true);
}
}}
onNewMessage={() => {
setShowPensieve(true);
}}
/>
</Stack>
</Box>
)}
</Transition>
<Stack align="center" gap="xs">
<Title order={2} size="h3">
Some things I&apos;ve been exploring lately:
Expand Down Expand Up @@ -120,6 +82,42 @@ const HomePage: PageComponent<HomePageProps> = ({
</Anchor>
</Text>
</Stack>
<Transition
transition={{
transitionProperty: "transform, opacity, max-height",
common: { transformOrigin: "top" },
out: { opacity: 0, transform: "scale(0)", maxHeight: 0 },
in: { opacity: 1, transform: "scale(1)", maxHeight: 500 },
}}
duration={400}
mounted={showPensieve}
keepMounted
>
{style => (
<Stack align="center" gap="xs" {...{ style }}>
<Box style={{ textAlign: "center" }}>
<Title order={2} size="h3">
Sometimes, Kai thinks out loud.
</Title>
<Text size="xs" c="dimmed" lh={1.3}>
(messages from the last 12 hours)
</Text>
</Box>
<Pensieve
expandable
h={400}
onLoadMessages={messages => {
if (!isEmpty(messages)) {
setShowPensieve(true);
}
}}
onNewMessage={() => {
setShowPensieve(true);
}}
/>
</Stack>
)}
</Transition>
<Stack align="center" gap="xs">
<Title order={2} size="h3">
Sometimes, Kai writes.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"dependencies": {
"@9gustin/react-notion-render": "^3.11.2",
"@apollo/client": "^3.7.17",
"@codemirror/language": "6.0.0",
"@fullstory/browser": "^1.7.1",
"@graphiql/toolkit": "^0.9.1",
"@graphql-typed-document-node/core": "^3.2.0",
"@inertiajs/core": "^1.0.9",
"@inertiajs/react": "^1.0.9",
"@mantine/core": "7.3.0",
Expand All @@ -27,7 +27,6 @@
"@sentry/integrations": "^7.57.0",
"@sentry/react": "^7.57.0",
"@svgr/core": "^8.0.0",
"@svgr/plugin-jsx": "^8.0.1",
"@turf/circle": "^6.5.0",
"@uidotdev/usehooks": "^2.4.1",
"clsx": "^2.0.0",
Expand Down Expand Up @@ -66,6 +65,7 @@
"@graphql-eslint/eslint-plugin": "^3.20.1",
"@iconify-json/heroicons": "^1.1.11",
"@iconify-json/lucide": "^1.1.109",
"@svgr/plugin-jsx": "^8.1.0",
"@types/geojson": "^7946.0.11",
"@types/humanize-duration": "^3.27.1",
"@types/is-url": "^1.2.30",
Expand Down
88 changes: 26 additions & 62 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@
debug "^4.1.0"
globals "^11.1.0"

"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.18.13", "@babel/types@^7.21.3", "@babel/types@^7.22.5":
"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.18.13", "@babel/types@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe"
integrity sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==
Expand All @@ -719,7 +719,7 @@
"@babel/helper-validator-identifier" "^7.22.5"
to-fast-properties "^2.0.0"

"@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.23.0", "@babel/types@^7.23.5":
"@babel/types@^7.20.7", "@babel/types@^7.21.3", "@babel/types@^7.22.15", "@babel/types@^7.23.0", "@babel/types@^7.23.5":
version "7.23.5"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.5.tgz#48d730a00c95109fa4393352705954d74fb5b602"
integrity sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==
Expand All @@ -728,32 +728,6 @@
"@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0"

"@codemirror/language@6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.0.0.tgz#f590558447c01f430fb3ef3297c41b8cd3ae9190"
integrity sha512-rtjk5ifyMzOna1c7PBu7J1VCt0PvA5wy3o8eMVnxMKb7z8KA7JFecvD04dSn14vj/bBaAbqRsGed5OjtofEnLA==
dependencies:
"@codemirror/state" "^6.0.0"
"@codemirror/view" "^6.0.0"
"@lezer/common" "^1.0.0"
"@lezer/highlight" "^1.0.0"
"@lezer/lr" "^1.0.0"
style-mod "^4.0.0"

"@codemirror/state@^6.0.0", "@codemirror/state@^6.1.4":
version "6.3.1"
resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.3.1.tgz#acabbbaeedcbfd31680704aba22102a75104f434"
integrity sha512-88e4HhMtKJyw6fKprGaN/yZfiaoGYOi2nM45YCUC6R/kex9sxFWBDGatS1vk4lMgnWmdIIB9tk8Gj1LmL8YfvA==

"@codemirror/view@^6.0.0":
version "6.21.4"
resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.21.4.tgz#6ec83ea238e16b2e1fc149ef9d1a36db2b1f3863"
integrity sha512-WKVZ7nvN0lwWPfAf05WxWqTpwjC8YN3q5goj3CsSig7//DD81LULgOx3nBegqpqP0iygBqRmW8z0KSc2QTAdAg==
dependencies:
"@codemirror/state" "^6.1.4"
style-mod "^4.1.0"
w3c-keyname "^2.2.4"

"@cspotcode/source-map-support@^0.8.0":
version "0.8.1"
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
Expand Down Expand Up @@ -1826,25 +1800,6 @@
"@jridgewell/resolve-uri" "3.1.0"
"@jridgewell/sourcemap-codec" "1.4.14"

"@lezer/common@^1.0.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@lezer/common/-/common-1.1.0.tgz#2e5bfe01d7a2ada6056d93c677bba4f1495e098a"
integrity sha512-XPIN3cYDXsoJI/oDWoR2tD++juVrhgIago9xyKhZ7IhGlzdDM9QgC8D8saKNCz5pindGcznFr2HBSsEQSWnSjw==

"@lezer/highlight@^1.0.0":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@lezer/highlight/-/highlight-1.1.6.tgz#87e56468c0f43c2a8b3dc7f0b7c2804b34901556"
integrity sha512-cmSJYa2us+r3SePpRCjN5ymCqCPv+zyXmDl0ciWtVaNiORT/MxM7ZgOMQZADD0o51qOaOg24qc/zBViOIwAjJg==
dependencies:
"@lezer/common" "^1.0.0"

"@lezer/lr@^1.0.0":
version "1.3.13"
resolved "https://registry.yarnpkg.com/@lezer/lr/-/lr-1.3.13.tgz#578e06c6c52e4dc38421368904585afa3eb82ec8"
integrity sha512-RLAbau/4uSzKgIKj96mI5WUtG1qtiR0Frn0Ei9zhPj8YOkHM+1Bb8SgdVvmR/aWJCFIzjo2KFnDiRZ75Xf5NdQ==
dependencies:
"@lezer/common" "^1.0.0"

"@mantine/core@7.3.0":
version "7.3.0"
resolved "https://registry.yarnpkg.com/@mantine/core/-/core-7.3.0.tgz#04a449367e45af4e742fd42e6cc290b7e385f9ef"
Expand Down Expand Up @@ -2814,6 +2769,11 @@
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-8.0.0.tgz#023cd0895b98521f566060d6bb92100b9fee3775"
integrity sha512-UKrY3860AQICgH7g+6h2zkoxeVEPLYwX/uAjmqo4PIq2FIHppwhIqZstIyTz0ZtlwreKR41O3W3BzsBBiJV2Aw==

"@svgr/babel-plugin-transform-react-native-svg@8.1.0":
version "8.1.0"
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-8.1.0.tgz#90a8b63998b688b284f255c6a5248abd5b28d754"
integrity sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q==

"@svgr/babel-plugin-transform-svg-component@8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-8.0.0.tgz#013b4bfca88779711f0ed2739f3f7efcefcf4f7e"
Expand All @@ -2833,6 +2793,20 @@
"@svgr/babel-plugin-transform-react-native-svg" "8.0.0"
"@svgr/babel-plugin-transform-svg-component" "8.0.0"

"@svgr/babel-preset@8.1.0":
version "8.1.0"
resolved "https://registry.yarnpkg.com/@svgr/babel-preset/-/babel-preset-8.1.0.tgz#0e87119aecdf1c424840b9d4565b7137cabf9ece"
integrity sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug==
dependencies:
"@svgr/babel-plugin-add-jsx-attribute" "8.0.0"
"@svgr/babel-plugin-remove-jsx-attribute" "8.0.0"
"@svgr/babel-plugin-remove-jsx-empty-expression" "8.0.0"
"@svgr/babel-plugin-replace-jsx-attribute-value" "8.0.0"
"@svgr/babel-plugin-svg-dynamic-title" "8.0.0"
"@svgr/babel-plugin-svg-em-dimensions" "8.0.0"
"@svgr/babel-plugin-transform-react-native-svg" "8.1.0"
"@svgr/babel-plugin-transform-svg-component" "8.0.0"

"@svgr/core@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@svgr/core/-/core-8.0.0.tgz#e96829cdb0473345d5671568282ee0736e86ef12"
Expand All @@ -2852,13 +2826,13 @@
"@babel/types" "^7.21.3"
entities "^4.4.0"

"@svgr/plugin-jsx@^8.0.1":
version "8.0.1"
resolved "https://registry.yarnpkg.com/@svgr/plugin-jsx/-/plugin-jsx-8.0.1.tgz#b9495e06062cc0cac0e035751b69471ee328236b"
integrity sha512-bfCFb+4ZsM3UuKP2t7KmDwn6YV8qVn9HIQJmau6xeQb/iV65Rpi7NBNBWA2hcCd4GKoCqG8hpaaDk5FDR0eH+g==
"@svgr/plugin-jsx@^8.1.0":
version "8.1.0"
resolved "https://registry.yarnpkg.com/@svgr/plugin-jsx/-/plugin-jsx-8.1.0.tgz#96969f04a24b58b174ee4cd974c60475acbd6928"
integrity sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA==
dependencies:
"@babel/core" "^7.21.3"
"@svgr/babel-preset" "8.0.0"
"@svgr/babel-preset" "8.1.0"
"@svgr/hast-util-to-babel-ast" "8.0.0"
svg-parser "^2.0.4"

Expand Down Expand Up @@ -7712,11 +7686,6 @@ strip-literal@^1.0.1:
dependencies:
acorn "^8.8.2"

style-mod@^4.0.0, style-mod@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/style-mod/-/style-mod-4.1.0.tgz#a313a14f4ae8bb4d52878c0053c4327fb787ec09"
integrity sha512-Ca5ib8HrFn+f+0n4N4ScTIA9iTOQ7MaGS1ylHcoVqW9J7w2w8PzN6g9gKmTYgGEBH8e120+RCmhpje6jC5uGWA==

style-to-js@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/style-to-js/-/style-to-js-1.1.3.tgz#2012d75dc89bf400edc29c545ed61c8626b00184"
Expand Down Expand Up @@ -8286,11 +8255,6 @@ vt-pbf@^3.1.3:
"@mapbox/vector-tile" "^1.3.1"
pbf "^3.2.1"

w3c-keyname@^2.2.4:
version "2.2.8"
resolved "https://registry.yarnpkg.com/w3c-keyname/-/w3c-keyname-2.2.8.tgz#7b17c8c6883d4e8b86ac8aba79d39e880f8869c5"
integrity sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==

wcwidth@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"
Expand Down

0 comments on commit e0689b5

Please sign in to comment.