chore: cleaned up old components
ffc8a635
11 file(s) · +8 −227
| 1 | 1 | /invalid /404 |
|
| 2 | 2 | /pinata https://pinata.cloud |
|
| 3 | - | /feed /rss.xml |
|
| 4 | - | /rss /rss.xml |
|
| 5 | 3 | ||
| 6 | 4 | 404 /404 |
| 1 | - | --- |
|
| 2 | - | interface Props { |
|
| 3 | - | text: string; |
|
| 4 | - | className?: string; |
|
| 5 | - | } |
|
| 6 | - | ||
| 7 | - | const { text, className = "" } = Astro.props; |
|
| 8 | - | --- |
|
| 9 | - | ||
| 10 | - | <div> |
|
| 11 | - | ||
| 12 | - | <h1 class:list={[className]} data-decrypting-text data-text={text}> |
|
| 13 | - | {text} |
|
| 14 | - | </h1> |
|
| 15 | - | <slot /> |
|
| 16 | - | </div> |
|
| 17 | - |
| 1 | - | // import { useStore } from "@nanostores/react"; |
|
| 2 | - | // import { $sessionStore, $userStore } from "@clerk/astro/client"; |
|
| 3 | - | // import { useState, useEffect } from "react"; |
|
| 4 | - | // import { |
|
| 5 | - | // SignedIn, |
|
| 6 | - | // SignedOut, |
|
| 7 | - | // UserButton, |
|
| 8 | - | // SignUpButton, |
|
| 9 | - | // } from "@clerk/astro/react"; |
|
| 10 | - | ||
| 11 | - | // type Message = { |
|
| 12 | - | // id: number; |
|
| 13 | - | // note: string; |
|
| 14 | - | // author: string; |
|
| 15 | - | // user_id: string; |
|
| 16 | - | // pfp_url: string; |
|
| 17 | - | // username: string; |
|
| 18 | - | // }; |
|
| 19 | - | ||
| 20 | - | // export default function GuestbookFeed({ API_URL }: { API_URL: string }) { |
|
| 21 | - | // const [messages, setMessages] = useState<Message[]>([]); |
|
| 22 | - | // const [isLoading, setIsLoading] = useState(true); |
|
| 23 | - | // const [isSending, setIsSending] = useState(false); |
|
| 24 | - | // const [inputText, setInputText] = useState(""); |
|
| 25 | - | // const session = useStore($sessionStore); |
|
| 26 | - | // const user = useStore($userStore); |
|
| 27 | - | ||
| 28 | - | // async function fetchMessages() { |
|
| 29 | - | // setIsLoading(true); |
|
| 30 | - | // try { |
|
| 31 | - | // const req = await fetch(`${API_URL}/messages`); |
|
| 32 | - | // const res = await req.json(); |
|
| 33 | - | // console.log(res); |
|
| 34 | - | // setMessages(res); |
|
| 35 | - | // } catch (error) { |
|
| 36 | - | // console.log(error); |
|
| 37 | - | // } finally { |
|
| 38 | - | // setIsLoading(false); |
|
| 39 | - | // } |
|
| 40 | - | // } |
|
| 41 | - | ||
| 42 | - | // function inputHandeler(e) { |
|
| 43 | - | // setInputText(e.target.value); |
|
| 44 | - | // } |
|
| 45 | - | ||
| 46 | - | // async function sendMessage() { |
|
| 47 | - | // setIsSending(true); |
|
| 48 | - | // try { |
|
| 49 | - | // const req = await fetch(`${API_URL}/messages`, { |
|
| 50 | - | // method: "POST", |
|
| 51 | - | // headers: { |
|
| 52 | - | // Authorization: `Bearer ${await session.getToken()}`, |
|
| 53 | - | // }, |
|
| 54 | - | // body: JSON.stringify({ note: inputText }), |
|
| 55 | - | // }); |
|
| 56 | - | // const res = await req.json(); |
|
| 57 | - | // console.log(res); |
|
| 58 | - | // setInputText(""); |
|
| 59 | - | // setIsSending(false); |
|
| 60 | - | // await fetchMessages(); |
|
| 61 | - | // } catch (error) { |
|
| 62 | - | // console.log(error); |
|
| 63 | - | // setIsSending(false); |
|
| 64 | - | // } |
|
| 65 | - | // } |
|
| 66 | - | ||
| 67 | - | // async function deleteMessage(id: number) { |
|
| 68 | - | // try { |
|
| 69 | - | // const req = await fetch(`${API_URL}/messages/${id}`, { |
|
| 70 | - | // method: "DELETE", |
|
| 71 | - | // headers: { |
|
| 72 | - | // Authorization: `Bearer ${await session.getToken()}`, |
|
| 73 | - | // }, |
|
| 74 | - | // }); |
|
| 75 | - | // const res = await req.json(); |
|
| 76 | - | // console.log(res); |
|
| 77 | - | // await fetchMessages(); |
|
| 78 | - | // } catch (error) { |
|
| 79 | - | // console.log(error); |
|
| 80 | - | // } |
|
| 81 | - | // } |
|
| 82 | - | ||
| 83 | - | // useEffect(() => { |
|
| 84 | - | // fetchMessages(); |
|
| 85 | - | // }, []); |
|
| 86 | - | ||
| 87 | - | // return ( |
|
| 88 | - | // <div className="flex flex-col gap-6"> |
|
| 89 | - | // <div className=""> |
|
| 90 | - | // <SignedOut> |
|
| 91 | - | // <SignUpButton |
|
| 92 | - | // signInForceRedirectUrl="/guestbook" |
|
| 93 | - | // signInFallbackRedirectUrl="/guestbook" |
|
| 94 | - | // forceRedirectUrl="/guestbook" |
|
| 95 | - | // mode="modal" |
|
| 96 | - | // className="border-2 border-current rounded-md py-1 px-2 cursor-pointer" |
|
| 97 | - | // > |
|
| 98 | - | // Sign in with Github |
|
| 99 | - | // </SignUpButton> |
|
| 100 | - | // </SignedOut> |
|
| 101 | - | // <SignedIn> |
|
| 102 | - | // <div className="flex items-start gap-4 w-full"> |
|
| 103 | - | // <UserButton |
|
| 104 | - | // appearance={{ |
|
| 105 | - | // layout: { |
|
| 106 | - | // animations: false, |
|
| 107 | - | // }, |
|
| 108 | - | // }} |
|
| 109 | - | // afterSignOutUrl="/guestbook" |
|
| 110 | - | // /> |
|
| 111 | - | // <input |
|
| 112 | - | // className="p-1 bg-bgColor border-current border-2 rounded-md w-96" |
|
| 113 | - | // type="text" |
|
| 114 | - | // onChange={inputHandeler} |
|
| 115 | - | // value={inputText} |
|
| 116 | - | // /> |
|
| 117 | - | // <button |
|
| 118 | - | // className="border-2 border-current rounded-md py-1 px-2 cursor-pointer" |
|
| 119 | - | // onClick={sendMessage} |
|
| 120 | - | // type="button" |
|
| 121 | - | // > |
|
| 122 | - | // {isSending ? "Posting..." : "Post"} |
|
| 123 | - | // </button> |
|
| 124 | - | // </div> |
|
| 125 | - | // </SignedIn> |
|
| 126 | - | // </div> |
|
| 127 | - | // {isLoading ? ( |
|
| 128 | - | // <p>Loading...</p> |
|
| 129 | - | // ) : ( |
|
| 130 | - | // <div className="flex flex-col gap-6"> |
|
| 131 | - | // {messages.map((note: Message) => ( |
|
| 132 | - | // <div |
|
| 133 | - | // className="flex flex-row justify-between items-start" |
|
| 134 | - | // key={note.id} |
|
| 135 | - | // > |
|
| 136 | - | // <div className="flex flex-row gap-2 items-start"> |
|
| 137 | - | // <a |
|
| 138 | - | // className="flex-shrink-0 h-7 w-7" |
|
| 139 | - | // href={`https://github.com/${note.username}`} |
|
| 140 | - | // target="_blank" |
|
| 141 | - | // rel="noreferrer" |
|
| 142 | - | // > |
|
| 143 | - | // <img |
|
| 144 | - | // className="h-full w-full rounded-full object-cover" |
|
| 145 | - | // src={note.pfp_url} |
|
| 146 | - | // alt={note.author} |
|
| 147 | - | // /> |
|
| 148 | - | // </a> |
|
| 149 | - | // <div className="flex flex-col justify-between"> |
|
| 150 | - | // <a |
|
| 151 | - | // href={`https://github.com/${note.username}`} |
|
| 152 | - | // className="font-bold text-gray-400" |
|
| 153 | - | // target="_blank" |
|
| 154 | - | // rel="noreferrer" |
|
| 155 | - | // > |
|
| 156 | - | // {note.author} |
|
| 157 | - | // </a> |
|
| 158 | - | // <p className="break-words">{note.note}</p> |
|
| 159 | - | // </div> |
|
| 160 | - | // </div> |
|
| 161 | - | // {user && user.id === note.user_id && ( |
|
| 162 | - | // <button |
|
| 163 | - | // onClick={async () => deleteMessage(note.id)} |
|
| 164 | - | // type="button" |
|
| 165 | - | // > |
|
| 166 | - | // x |
|
| 167 | - | // </button> |
|
| 168 | - | // )} |
|
| 169 | - | // </div> |
|
| 170 | - | // ))} |
|
| 171 | - | // </div> |
|
| 172 | - | // )} |
|
| 173 | - | // </div> |
|
| 174 | - | // ); |
|
| 175 | - | // } |
| 1 | 1 | --- |
|
| 2 | 2 | import { getFormattedDate } from "@/utils"; |
|
| 3 | 3 | import type { CollectionEntry } from "astro:content"; |
|
| 4 | - | import DecryptingHeader from "../DecryptingHeader.astro"; |
|
| 5 | 4 | ||
| 6 | 5 | interface Props { |
|
| 7 | 6 | content: CollectionEntry<"post">; |
|
| 13 | 12 | const postDate = getFormattedDate(content.data.publishDate); |
|
| 14 | 13 | --- |
|
| 15 | 14 | ||
| 16 | - | <DecryptingHeader text={content.data.title} className="title mb-3 sm:mb-1"> |
|
| 15 | + | <h1 class="title mb-3 sm:mb-1">{content.data.title} |
|
| 17 | 16 | <time datetime={datetime}>{postDate}</time> |
|
| 18 | 17 | { |
|
| 19 | 18 | !!content.data.tags?.length && ( |
|
| 50 | 49 | </div> |
|
| 51 | 50 | ) |
|
| 52 | 51 | } |
|
| 53 | - | </DecryptingHeader> |
|
| 52 | + | </h1> |
|
| 54 | 53 | <p class="mt-8">{content.data.description}</p> |
|
| 2 | 2 | import PageLayout from "@/layouts/Base"; |
|
| 3 | 3 | import { Image } from "astro:assets"; |
|
| 4 | 4 | import aboutImg from "../assets/pfp.png"; |
|
| 5 | - | import DecryptingHeader from "@/components/DecryptingHeader"; |
|
| 6 | 5 | ||
| 7 | 6 | const meta = { |
|
| 8 | 7 | title: "About", |
|
| 12 | 11 | ||
| 13 | 12 | <PageLayout meta={meta}> |
|
| 14 | 13 | <div class="space-y-6"> |
|
| 15 | - | <DecryptingHeader text="About" className="title" /> |
|
| 14 | + | <h1 class="title">About</h1> |
|
| 16 | 15 | <p> |
|
| 17 | 16 | Hey there! My name is Steve and I’m a DX Engineer with a passion for developer tooling that advances cypherpunk values, such as privacy, decentralization, and self-sovereignty. |
|
| 18 | 17 | I’m currently working at |
|
| 1 | - | --- |
|
| 2 | - | import DecryptingHeader from "@/components/DecryptingHeader"; |
|
| 3 | - | import PageLayout from "@/layouts/Base"; |
|
| 4 | - | //import GuestbookFeed from "src/components/GuestbookFeed"; |
|
| 5 | - | ||
| 6 | - | const meta = { |
|
| 7 | - | title: "Guestbook", |
|
| 8 | - | description: "Leave a message in my digital guestbook!", |
|
| 9 | - | }; |
|
| 10 | - | --- |
|
| 11 | - | <PageLayout meta={meta}> |
|
| 12 | - | <div class="space-y-6"> |
|
| 13 | - | <div class="flex flex-col gap-2 mb-6"> |
|
| 14 | - | <DecryptingHeader text="Guestbook" className="title mb-6" /> |
|
| 15 | - | <p>🚧 Under Construction 🚧</p> |
|
| 16 | - | </div> |
|
| 17 | - | </div> |
|
| 18 | - | </PageLayout> |
| 5 | 5 | import SocialList from "@/components/SocialList"; |
|
| 6 | 6 | import { sortMDByDate } from "@/utils"; |
|
| 7 | 7 | import { Image } from "astro:assets"; |
|
| 8 | - | import DecryptingHeader from "@/components/DecryptingHeader"; |
|
| 9 | 8 | ||
| 10 | 9 | const MAX_POSTS = 10; |
|
| 11 | 10 | const allPosts = await getCollection("post"); |
|
| 15 | 14 | ||
| 16 | 15 | <PageLayout meta={{ title: "Home" }}> |
|
| 17 | 16 | <section> |
|
| 18 | - | <DecryptingHeader text="Hey there!" className="title pb-6" /> |
|
| 17 | + | <h1 class="title pb-6">Hey there!</h1> |
|
| 19 | 18 | <p class="mb-4"> |
|
| 20 | 19 | My name is Steve. I'm a DX Engineer with a passion for developer tooling that advances cypherpunk values. I'm currently doing Developer Relations at <a |
|
| 21 | 20 | href="https://openzeppelin.com" |
|
| 1 | 1 | --- |
|
| 2 | 2 | import PageLayout from "@/layouts/Base"; |
|
| 3 | 3 | import { SOCIAL_LINKS } from "@/data/constants"; |
|
| 4 | - | import DecryptingHeader from "@/components/DecryptingHeader"; |
|
| 5 | 4 | ||
| 6 | 5 | const meta = { |
|
| 7 | 6 | title: "Links", |
|
| 11 | 10 | ||
| 12 | 11 | <PageLayout meta={meta}> |
|
| 13 | 12 | <div class="space-y-6"> |
|
| 14 | - | <DecryptingHeader text="Links" className="title mb-6" /> |
|
| 13 | + | <h1 class="title mb-6">Links</h1> |
|
| 15 | 14 | <ul class="flex flex-col items-start gap-x-4 sm:flex-initial"> |
|
| 16 | 15 | <li> |
|
| 17 | 16 | <a |
|
| 6 | 6 | import PostPreview from "@/components/blog/PostPreview"; |
|
| 7 | 7 | import Pagination from "@/components/Paginator"; |
|
| 8 | 8 | import { getUniqueTags, sortMDByDate } from "@/utils"; |
|
| 9 | - | import DecryptingHeader from "@/components/DecryptingHeader"; |
|
| 10 | 9 | ||
| 11 | 10 | export async function getStaticPaths({ paginate }: GetStaticPathsOptions) { |
|
| 12 | 11 | const allPosts = await getCollection("post"); |
|
| 45 | 44 | --- |
|
| 46 | 45 | ||
| 47 | 46 | <PageLayout meta={meta}> |
|
| 48 | - | <DecryptingHeader text="Blog" className="title mb-6" /> |
|
| 47 | + | <h1 class="title mb-6">Blog</h1> |
|
| 49 | 48 | <div class="grid gap-y-16 sm:grid-cols-[3fr_1fr] sm:gap-x-8"> |
|
| 50 | 49 | <section aria-label="Blog post list"> |
|
| 51 | 50 | <ul class="space-y-8 text-left"> |
|
| 2 | 2 | import PageLayout from "@/layouts/Base"; |
|
| 3 | 3 | import ProjectCard from "@/components/ProjectCard"; |
|
| 4 | 4 | import { projects } from "@/data/projects"; |
|
| 5 | - | import DecryptingHeader from "@/components/DecryptingHeader"; |
|
| 6 | 5 | ||
| 7 | 6 | const meta = { |
|
| 8 | 7 | title: "Projects", |
|
| 12 | 11 | ||
| 13 | 12 | <PageLayout meta={meta}> |
|
| 14 | 13 | <div class="flex min-h-screen flex-col items-start justify-start gap-6"> |
|
| 15 | - | <DecryptingHeader text="Projects" className="title" /> |
|
| 14 | + | <h1 class="title">Projects</h1> |
|
| 16 | 15 | {projects.map((project) => <ProjectCard content={project} />)} |
|
| 17 | 16 | </div> |
|
| 18 | 17 | </PageLayout> |
|
| 1 | 1 | --- |
|
| 2 | - | import DecryptingHeader from "@/components/DecryptingHeader"; |
|
| 3 | 2 | import PageLayout from "@/layouts/Base"; |
|
| 4 | 3 | ||
| 5 | 4 | const meta = { |
|
| 19 | 18 | ||
| 20 | 19 | <PageLayout meta={meta}> |
|
| 21 | 20 | <div class="space-y-6"> |
|
| 22 | - | <DecryptingHeader text="Videos" className="title" /> |
|
| 21 | + | <h1 class="title">Videos</h1> |
|
| 23 | 22 | <p>Here are some samples of video content I've produced to help users!</p> |
|
| 24 | 23 | { |
|
| 25 | 24 | videoIds.map((id) => ( |
|