Commit Graph
9 Commits
Author SHA1 Message Date
bbaovanc 31731c9996 js: Fix copy to clipboard button stuck as "Copied" when clicked twice 2026-09-18 14:31:23 -05:00
bbaovanc b67e3f4671 js: Define function for copy to clipboard and provide it in onClick
Instead of looping through all the code blocks at onload, just put an
onClick tag in the HTML template, which calls a global function.

This also improves the semantics since we aren't abusing href to be
javascript.

Also improves the writeText function call, since that method actually
returns a Promise which we should be waiting on. It technically worked
before because Promise starts executing instantly in JS, without being
awaited.
2026-09-18 14:21:47 -05:00
bbaovanc d50a4dc6bd Import remaining template and styling code from bbaovanc.com
It's probably better structure-wise to have it all consolidated in
bobatheme. Then bbaovanc.com is only concerned about content, not stuff
that I declared to be specific to my site. This came from when I had
multiple sites running bobatheme in the background, so now it's just an
arbitrary, legacy distinction.

Fixes #86
2025-07-30 00:43:05 -05:00
bbaovanc c06e7eb938 Remove assets/js/share-event.js
Moved this completely to bbaovanc.com repo. I think it was here as a
placeholder purely because of some issue with global resources not
working in the past. It seems like it maybe works fine now though.
2025-07-01 00:52:33 -05:00
bbaovanc c980ced2fb Remove back to top button
It's kind of ugly and weird, and probably not necessary. I might add it
back in the future if it's actually needed again.
2023-11-05 17:41:59 -06:00
bbaovanc 80f5994d96 Improve code block copy text
- Use JS to get it directly from the code block instead of needing a
  separate `pre.code-raw` to get it from. That makes it possible to:
- bashsession: Don't copy prompt or command output
2023-01-22 00:09:34 -06:00
bbaovanc 47d6d02186 Add copy to clipboard to code blocks 2023-01-20 17:14:18 -06:00
bbaovanc fa5c014a1b Add share_event JS function 2022-05-01 18:14:02 -05:00
bbaovanc 161c68d16c Add back to top button 2021-11-22 20:49:11 -06:00