Skip to content

Instantly share code, notes, and snippets.

@jkap
Last active March 31, 2023 13:34
Show Gist options
  • Save jkap/a787a3d7eb799631c9e4ea6db4d64e2f to your computer and use it in GitHub Desktop.
Save jkap/a787a3d7eb799631c9e4ea6db4d64e2f to your computer and use it in GitHub Desktop.
jae's ask formatter

jae's ask formatter for prechoster

INSTRUCTIONS:

  1. download the json file below
  2. import it into prechoster
  3. update your retrospring URL (the last "plain text" block)
  4. Ask goes in the first box, answer goes in the second
  5. profit!

CREDITS

TERMS OF USE

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

You are prohibited from removing the attribution section in this template or its output. Don't be a dick.

{"modules":[{"id":"396b4e1b035c1577","data":{"contents":"I'm putting a question here!","language":"text"},"pluginId":"source.text","sends":[],"namedSends":{"152aae77d0e8a772":["ask"]},"graphPos":null},{"id":"59714cceb7682bd0","data":{"contents":"That's great! here's an answer!\n\n<b>You can use HTML here too!</b>\n\nDon't forget to change your retrospring URL at the bottom!","language":"html"},"pluginId":"source.text","sends":[],"namedSends":{"152aae77d0e8a772":["answer"]},"graphPos":null},{"id":"152aae77d0e8a772","data":{"contents":"<script>\n import ask from \"./ask\";\n import answer from \"./answer\";\n import retrospringUrl from \"./retrospringUrl\";\n</script>\n\n<div class=\"background\">\n <div class=\"container\">\n <div class=\"ask-section\">\n <div class=\"ask-container\">\n <span class=\"attribution\"\n ><strong>Anonymous</strong>\n <!-- -->asked:</span\n >\n <div class=\"ask\">{ask}</div>\n <div class=\"arrow\"></div>\n </div>\n <div class=\"avatar\">\n <img\n src=\"https://staging.cohostcdn.org/attachment/08e8d8db-ce71-4b4b-820d-5069595cf92e/anonbug.png\"\n alt=\"\"\n />\n </div>\n </div>\n <div>\n {@html answer}\n <div class=\"separator\" />\n </div>\n <div class=\"retrospring\">\n <span>\n design: <a href=\"https://cohost.org/twilight-sparkle\">@twilight-sparkle</a> &bull; anonbug: <a href=\"https://cohost.org/easrng/post/1091733-have-you-seen-this-b\">@easrng</a> &bull; <a href=\"https://gist.github.com/jkap/a787a3d7eb799631c9e4ea6db4d64e2f\">get the template!</a>\n </span>\n <a href={retrospringUrl}>ask me more questions!</a>\n </div>\n </div>\n</div>\n"},"pluginId":"source.svelte","sends":["b1961ee62a46572a"],"namedSends":{},"graphPos":null},{"id":"b1961ee62a46572a","data":{"mode":"attr"},"pluginId":"transform.style-inliner","sends":["output"],"namedSends":{},"graphPos":null},{"id":"3eb8b44aa3e306b5","data":{"contents":".background {\n background-color: rgb(var(--color-strawberry));\n padding: 20px 30px;\n margin: -1rem -0.75rem;\n}\n\n.container {\n background-color: rgb(var(--color-notBlack));\n color: rgb(var(--color-notWhite));\n padding: 10px;\n border-radius: 8px;\n}\n\n.ask-section {\n margin: 15px;\n position: relative;\n line-height: 1.4;\n color: rgb(68, 68, 68);\n\n .ask-container {\n background-color: rgb(242, 242, 242);\n border: 1px solid rgb(242, 242, 242);\n padding: 15px 20px;\n border-radius: 3px;\n position: relative;\n margin-right: 60px;\n }\n\n .attribution {\n color: rgb(136, 136, 136);\n margin-bottom: -0.25em;\n strong {\n color: rgb(136, 136, 136);\n }\n }\n\n .ask {\n margin: 1em 0px 0px;\n }\n\n .arrow {\n position: absolute;\n right: -6px;\n top: 16px;\n height: 10px;\n width: 10px;\n background-color: rgb(242, 242, 242);\n transform: rotate(45deg);\n }\n\n .avatar {\n position: absolute;\n top: 2px;\n right: 0px;\n\n img {\n border-radius: 2px;\n width: 40px;\n height: 40px;\n margin: 0px;\n }\n }\n}\n\n.separator {\n display: block;\n border-bottom: 1px gray dotted;\n}\n\n.retrospring {\n display: flex;\n flex-direction: row;\n font-size: 0.75em;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n}\n"},"pluginId":"source.lesscss","sends":["b1961ee62a46572a"],"namedSends":{},"graphPos":null},{"id":"8da8a1f6d1cf3957","data":{"contents":"https://retrospring.net/@jkap","language":"text"},"pluginId":"source.text","sends":[],"namedSends":{"152aae77d0e8a772":["retrospringUrl"]},"graphPos":null}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment