EnquiryWitch is a Twine 2 story format designed to make a dynamic "contact wizard" (or witch!)* for organisations that have specific and varied remits, such as charities and community organisations.
It is built on top of Snowman, a minimal Twine 2 story format designed for people who already know JavaScript and CSS originally created by Chris Klimas. Snowman is currently maintained by Dan Cox.
note * (wizards are bureacratic and patriarchal, and witches are holistic and community-focused)
Link to the format to import to Twine
This is a WIP so not all of this is currently possible.
[[!Submit->SUBMIT PARAMS->submit-email]]
Any internal link leading to a passage that contains 'submit' in its name is transformed into a 'submit' button, which sends a ping to the email server.
Params are case insensitive, seperate params must be separated by a ->
Send to: [SENDTO]glinda[/SENDTO]
CC: [CC]wizardofoz[/CC]
Urgent: [URGENT]
Full example:
[[!Submit->[SENDTO]glinda[/SENDTO]->[CC]wizardofoz[/CC]->[URGENT]->submit-email]]
[REDIRECT][Click to go anywhere](https://en.wikipedia.org/wiki/Special:Random)[/REDIRECT]
Allows transportation to external pages, opens in a new window or tab. The portal looks more like a button than a link.
[QUESTION]Where can I find eye of newt?[/QUESTION]
Tbh all this currently does is make it bold. But it will do more eventually. It is also used to keep a record of the spirit's correspondence.
All internal links to other Twine passages are treated as ANSWERS to the last question asked.
[FORMFIELD][Type of familiar]{familiar_type}(text)[/FORMFIELD]
Formfields take 3 bits of information - the [Label]
, the {variable_name}
and the (type)
. The available types are text
, text-long
and number
.
Are you a good witch or a bad witch?
[CHECKBOX][Good witch]{good_witch}[/CHECKBOX]
[CHECKBOX][Bad witch]{bad_witch}[/CHECKBOX]
Checkboxes take a [Label]
and a {variable_name}
.
Changes to the story content can be made in ./GI_Contact_Page.twee
.
Changes to the styles can be made in ./lib/src/ew.scss
.
git clone https://github.com/GenderedIntelligence/enquirywitch && cd enquirywitch
npm install
to install dependanciesnpm run build
will create a Twine 2-ready story format under dist/
.npm start
will spin up a server for developmentlibrary -> import -> choose file
select GI_Contact_Page.twee
from the project rootTwine -> Story Formats -> Add
and add in the URL provided by the NPM serverBuild -> Test
it should open a browser window with the twine storyTwine -> Story Formats -> Remove
then re-add it. npm run test
.Build -> Publish To File
EnquiryWitch is built on top of Snowman, and uses jQuery, Underscore & Marked.
The official Snowman documentation has more details about Snowman including multiple examples of how to do various tasks.