stuff happened
This commit is contained in:
@ -3,7 +3,7 @@ import { Post } from "../types/index.ts";
|
||||
export const PostBody = function PostBody({ post }: PostBodyOpts) {
|
||||
return (
|
||||
<div
|
||||
class="p-6 bg-[#313244] shadow-md text-[#f5e0dc]"
|
||||
class="p-6 bg-[#313244] shadow-md text-[#f5e0dc] post-content"
|
||||
dangerouslySetInnerHTML={{ __html: post.body }}
|
||||
></div>
|
||||
);
|
||||
|
@ -1,23 +1,29 @@
|
||||
import { Head } from "$fresh/runtime.ts";
|
||||
import { Post } from "../types/index.ts";
|
||||
import { convertUtc } from "../lib/convertUtc.ts";
|
||||
|
||||
export const PostHeader = function PostHeader({ post }: PostHeaderOpts) {
|
||||
return (
|
||||
<div class="p-6 bg-[#313244] shadow-md">
|
||||
<div class="min-w-screen flex flex-col items-center justify-between bg-[#45475a] rounded-lg shadow-md">
|
||||
<div class="sm:mt-14 sm:mb-14 mt-8 mb-8 flex flex-col items-center gap-y-5 gap-x-10 md:flex-row">
|
||||
<div class="space-y-2 text-center md:text-left">
|
||||
<p class="text-2xl text-[#f5e0dc] font-bold sm:text-4xl">
|
||||
{post.title}
|
||||
</p>
|
||||
<p class="text-md font-medium text-[#E39A9C] sm:text-xl italic">
|
||||
by {post.first_name} {post.last_name} posted on{" "}
|
||||
{convertUtc(post.created_at)}
|
||||
</p>
|
||||
<>
|
||||
<Head>
|
||||
<title>Wyatt J. Miller | {post.title}</title>
|
||||
</Head>
|
||||
<div class="p-6 bg-[#313244] shadow-md">
|
||||
<div class="min-w-screen flex flex-col items-center justify-between bg-[#45475a] rounded-lg shadow-md">
|
||||
<div class="sm:mt-14 sm:mb-14 mt-8 mb-8 flex flex-col items-center gap-y-5 gap-x-10 md:flex-row">
|
||||
<div class="space-y-2 text-center md:text-left">
|
||||
<p class="text-2xl text-[#f5e0dc] font-bold sm:text-4xl">
|
||||
{post.title}
|
||||
</p>
|
||||
<p class="text-md font-medium text-[#E39A9C] sm:text-xl italic">
|
||||
by {post.first_name} {post.last_name} posted on{" "}
|
||||
{convertUtc(post.created_at)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
14
frontend/components/ShareLinkButton.tsx
Normal file
14
frontend/components/ShareLinkButton.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
export const ShareLinkButton = function ShareLinkButton({props}) {
|
||||
const [text. setText] = useState("Share");
|
||||
|
||||
const onClickHandler = () => {
|
||||
navigator.clipboard.writeText(location.href);
|
||||
setText("Copied to clipboard!");
|
||||
};
|
||||
|
||||
return (
|
||||
<button onClick={onClickHandler}>
|
||||
{text}
|
||||
</button>
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user