aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/components
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-04-01 18:52:30 -0400
committerXe Iaso <me@xeiaso.net>2023-04-01 18:52:30 -0400
commitec368169fb4c7782834c626d77f6afab7924cd05 (patch)
tree5be09b9dd8daa2f6cfd5c38f39f7109a4fb120ec /src/frontend/components
parente9e7ec80af0d2cae67c9dcf2cef64ca54a731046 (diff)
downloadxesite-ec368169fb4c7782834c626d77f6afab7924cd05.tar.xz
xesite-ec368169fb4c7782834c626d77f6afab7924cd05.zip
fix share button
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'src/frontend/components')
-rw-r--r--src/frontend/components/ConvSnippet.tsx10
-rw-r--r--src/frontend/components/MastodonShareButton.tsx4
-rw-r--r--src/frontend/components/NoFunAllowed.tsx18
3 files changed, 26 insertions, 6 deletions
diff --git a/src/frontend/components/ConvSnippet.tsx b/src/frontend/components/ConvSnippet.tsx
index 375ed9a..9644333 100644
--- a/src/frontend/components/ConvSnippet.tsx
+++ b/src/frontend/components/ConvSnippet.tsx
@@ -12,8 +12,8 @@ const ConvSnippet = ({ name, mood, children }: ConvSnippetProps) => {
name = name.replace(" ", "_");
return (
- <div className="conversation">
- <div className="conversation-standalone">
+ <div class="conversation">
+ <div class="conversation-standalone">
<picture>
<source
type="image/avif"
@@ -32,9 +32,11 @@ const ConvSnippet = ({ name, mood, children }: ConvSnippetProps) => {
</picture>
</div>
<div className="conversation-chat">
- &lt;<a href={`/characters#${nameLower}`}>
+ {"<"}
+ <a href={`/characters#${nameLower}`}>
<b>{name}</b>
- </a>&gt; {children}
+ </a>
+ {">"} {children}
</div>
</div>
);
diff --git a/src/frontend/components/MastodonShareButton.tsx b/src/frontend/components/MastodonShareButton.tsx
index 03fe596..71395b3 100644
--- a/src/frontend/components/MastodonShareButton.tsx
+++ b/src/frontend/components/MastodonShareButton.tsx
@@ -51,7 +51,7 @@ ${series ? "#" + series + " " : ""}${
{tootBox}
<br />
<button
- onClick={() => {
+ onClick={(() => {
let instanceURL = instanceBox.value;
if (!instanceURL.startsWith("https://")) {
@@ -66,7 +66,7 @@ ${series ? "#" + series + " " : ""}${
});
console.log({ text, mastodonURL });
window.open(mastodonURL, "_blank");
- }}
+ })()}
>
Share
</button>
diff --git a/src/frontend/components/NoFunAllowed.tsx b/src/frontend/components/NoFunAllowed.tsx
new file mode 100644
index 0000000..abe323b
--- /dev/null
+++ b/src/frontend/components/NoFunAllowed.tsx
@@ -0,0 +1,18 @@
+// @jsxImportSource xeact
+// @jsxRuntime automatic
+
+import { c } from "xeact";
+
+export default function NoFunAllowed() {
+ return (
+ <button
+ onclick={(() => {
+ Array.from(c("xeblog-slides-fluff")).forEach((el) =>
+ el.classList.toggle("hidden")
+ );
+ })()}
+ >
+ No fun allowed
+ </button>
+ );
+}