@@ -410,7 +412,7 @@ export const DragResizableImage = ({
left + 18 + width / 2
}px;height: ${
top + 18 + height / 2
- }px; position: relative; opacity: 0.3; background: ${
+ }px; position: relative; opacity: ${indicator_opacity}; background: ${
indicator
? 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAQAAAD8x0bcAAAATklEQVR4AY3OAQYAMQwF0d7/0q2KrzFGZZZVPPLXxlc/RHIjEyIMxBnWBBAFcNODOaSo8X7C3uU/hY3Q5Bwm6vBkCKTiOU3mWkYkI5KQA4BYG/M4zBNLAAAAAElFTkSuQmCC")'
: "none"
diff --git a/html/image-macro.tsx b/html/image-macro.tsx
index dd0f479..86c9287 100644
--- a/html/image-macro.tsx
+++ b/html/image-macro.tsx
@@ -1,5 +1,5 @@
-import { Main, DragResizableImage, render_and_copy } from "./common.tsx";
-// this is a really bad and boring idea. pass.
+import { Main, DragResizableImage, render_and_copy, n_of } from "./common.tsx";
+
// new idea! "make your own image macro" scrollable background of various le classic meme images (imgflip)
// + images (yes, images; nobody has impact installed)
// nah. let's just do white + text-shadow
@@ -98,46 +98,90 @@ const Word = ({
// ughhhh am i going to have to pull out that crappy library
// AND download an impact font
// (yes)
-const ScatteredWords = ({ children }: { children: string[] }) => (
+// tl;dr i can still use this scattering
+// imagescript can't do the shadow we need (thank goodness)
+// maybe imagemagick + photopea then
+// i got it (KISS): photopea -> split on command line -> reference by url
+// that should be workable
+
+const words = {
+ THE: 6,
+ HOMESTUCK: 3,
+ MEME: 4,
+ IS: 4,
+ EGGBUG: 4,
+ WHEN: 2,
+ YOU: 5,
+ SUS: 1,
+ IMPOSTER: 1,
+ ME: 3,
+ ALIEN: 1,
+ ARE: 3,
+ A: 4,
+ BOTTOM: 2,
+ TOP: 2,
+ TEXT: 4,
+ "?": 3,
+ "!": 3,
+ NO: 3,
+ YES: 3,
+ COHOST: 2,
+ MEHBARK: 2,
+ WEBARK: 2,
+ THIS: 2,
+ POST: 2,
+ SUCK: 2,
+ "CHUCK NORRIS": 2,
+ FOR: 2,
+ S: 4,
+ GET: 2,
+} satisfies Record
;
+console.log(
+ `yikes. there are ${
+ Object.keys(words).length
+ } unique words and ${Object.values(words).reduce(
+ (a, b) => a + b
+ )} words in total`
+);
+// Object.keys(words).forEach(w => console.log(w))
+const text_img_url = (text: string) =>
+ `https://static.pyrope.net/meme-text/${text}.png`;
+
+const TEXT_HEIGHT = 55;
+const decoder = new TextDecoder();
+// crazy inefficient but idc
+const get_text_width = (text: string): number =>
+ +decoder.decode(
+ new Deno.Command("identify", {
+ args: ["-format", "%w", `static/meme-text/${text}.png`],
+ }).outputSync().stdout
+ );
+
+const ScatteredWords = ({ children }: { children: Record }) => (
<>
- {...children.map(w => (
-
- {w}
-
- ))}
+ {...Object.entries(children).flatMap(([text, count]) =>
+ // feels pretty snazzy ngl
+ n_of(Math.ceil(count), () => (
+
+ )).map(f => f())
+ )}
>
);
-const words = `
-the the the the the the the
-`
- .split(/\s+/)
- .filter(Boolean)
- .map(w => w.toUpperCase());
-
render_and_copy(
<>
-
-
+ {words}
+ notes as per usual i do this all th etime:
+
+ -
+ dragresizing taken entirely from @blackle's excellent
+ post: https://cohost.org/blackle/post/38921-alright-cohost-it
+
+ -
+ you have to get the very center to drag. @blackle put an
+ indicator but i made it optional and turned it off! sorry!
+ aesthetics! (edit: turned em back on. character growth! i did
+ turn the opacity down just a squidge. idk. it's late!)
+
+ -
+ i probably could have turned the resizing off too, but, you
+ know, it's very funny
+
+
>
);
diff --git a/static/meme-text/!.png b/static/meme-text/!.png
new file mode 100644
index 0000000..e6d998f
Binary files /dev/null and b/static/meme-text/!.png differ
diff --git a/static/meme-text/A.png b/static/meme-text/A.png
new file mode 100644
index 0000000..f091f22
Binary files /dev/null and b/static/meme-text/A.png differ
diff --git a/static/meme-text/ALIEN.png b/static/meme-text/ALIEN.png
new file mode 100644
index 0000000..723de04
Binary files /dev/null and b/static/meme-text/ALIEN.png differ
diff --git a/static/meme-text/ARE.png b/static/meme-text/ARE.png
new file mode 100644
index 0000000..e3a09de
Binary files /dev/null and b/static/meme-text/ARE.png differ
diff --git a/static/meme-text/BOTTOM.png b/static/meme-text/BOTTOM.png
new file mode 100644
index 0000000..f9337f3
Binary files /dev/null and b/static/meme-text/BOTTOM.png differ
diff --git a/static/meme-text/CHUCK_NORRIS.png b/static/meme-text/CHUCK_NORRIS.png
new file mode 100644
index 0000000..d64a88f
Binary files /dev/null and b/static/meme-text/CHUCK_NORRIS.png differ
diff --git a/static/meme-text/COHOST.png b/static/meme-text/COHOST.png
new file mode 100644
index 0000000..29e6357
Binary files /dev/null and b/static/meme-text/COHOST.png differ
diff --git a/static/meme-text/EGGBUG.png b/static/meme-text/EGGBUG.png
new file mode 100644
index 0000000..0547e6c
Binary files /dev/null and b/static/meme-text/EGGBUG.png differ
diff --git a/static/meme-text/FOR.png b/static/meme-text/FOR.png
new file mode 100644
index 0000000..a5a3c86
Binary files /dev/null and b/static/meme-text/FOR.png differ
diff --git a/static/meme-text/GET.png b/static/meme-text/GET.png
new file mode 100644
index 0000000..0905bd7
Binary files /dev/null and b/static/meme-text/GET.png differ
diff --git a/static/meme-text/HOMESTUCK.png b/static/meme-text/HOMESTUCK.png
new file mode 100644
index 0000000..21b1c62
Binary files /dev/null and b/static/meme-text/HOMESTUCK.png differ
diff --git a/static/meme-text/IMPOSTER.png b/static/meme-text/IMPOSTER.png
new file mode 100644
index 0000000..3fe2446
Binary files /dev/null and b/static/meme-text/IMPOSTER.png differ
diff --git a/static/meme-text/IS.png b/static/meme-text/IS.png
new file mode 100644
index 0000000..fbcd019
Binary files /dev/null and b/static/meme-text/IS.png differ
diff --git a/static/meme-text/ME.png b/static/meme-text/ME.png
new file mode 100644
index 0000000..fa985d7
Binary files /dev/null and b/static/meme-text/ME.png differ
diff --git a/static/meme-text/MEHBARK.png b/static/meme-text/MEHBARK.png
new file mode 100644
index 0000000..4a7bdec
Binary files /dev/null and b/static/meme-text/MEHBARK.png differ
diff --git a/static/meme-text/MEME.png b/static/meme-text/MEME.png
new file mode 100644
index 0000000..b3cc184
Binary files /dev/null and b/static/meme-text/MEME.png differ
diff --git a/static/meme-text/NO.png b/static/meme-text/NO.png
new file mode 100644
index 0000000..a47f282
Binary files /dev/null and b/static/meme-text/NO.png differ
diff --git a/static/meme-text/POST.png b/static/meme-text/POST.png
new file mode 100644
index 0000000..a3f364b
Binary files /dev/null and b/static/meme-text/POST.png differ
diff --git a/static/meme-text/S.png b/static/meme-text/S.png
new file mode 100644
index 0000000..d6b96db
Binary files /dev/null and b/static/meme-text/S.png differ
diff --git a/static/meme-text/SUCK.png b/static/meme-text/SUCK.png
new file mode 100644
index 0000000..1a6960b
Binary files /dev/null and b/static/meme-text/SUCK.png differ
diff --git a/static/meme-text/SUS.png b/static/meme-text/SUS.png
new file mode 100644
index 0000000..3aaeb9e
Binary files /dev/null and b/static/meme-text/SUS.png differ
diff --git a/static/meme-text/TEXT.png b/static/meme-text/TEXT.png
new file mode 100644
index 0000000..53fe5b7
Binary files /dev/null and b/static/meme-text/TEXT.png differ
diff --git a/static/meme-text/THE.png b/static/meme-text/THE.png
new file mode 100644
index 0000000..5b7a27c
Binary files /dev/null and b/static/meme-text/THE.png differ
diff --git a/static/meme-text/THIS.png b/static/meme-text/THIS.png
new file mode 100644
index 0000000..7b79608
Binary files /dev/null and b/static/meme-text/THIS.png differ
diff --git a/static/meme-text/TOP.png b/static/meme-text/TOP.png
new file mode 100644
index 0000000..f6c2d7e
Binary files /dev/null and b/static/meme-text/TOP.png differ
diff --git a/static/meme-text/WEBARK.png b/static/meme-text/WEBARK.png
new file mode 100644
index 0000000..a5c783c
Binary files /dev/null and b/static/meme-text/WEBARK.png differ
diff --git a/static/meme-text/WHEN.png b/static/meme-text/WHEN.png
new file mode 100644
index 0000000..c8436f2
Binary files /dev/null and b/static/meme-text/WHEN.png differ
diff --git a/static/meme-text/YES.png b/static/meme-text/YES.png
new file mode 100644
index 0000000..9e20443
Binary files /dev/null and b/static/meme-text/YES.png differ
diff --git a/static/meme-text/YOU.png b/static/meme-text/YOU.png
new file mode 100644
index 0000000..a7489d1
Binary files /dev/null and b/static/meme-text/YOU.png differ
diff --git a/static/meme-text/mother.png b/static/meme-text/mother.png
new file mode 100644
index 0000000..c68bfad
Binary files /dev/null and b/static/meme-text/mother.png differ