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.
- Add EnquiryWitch as a format to your Twine.
- Build your witch.
- Set up Netlify action.
- Set up an email service.
- Export your Twine witch and integrate her with your site.
- Say 'Abracadabra' aloud three times.
- Voila!
[[!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
.
- install Twine locally using your package manager or from the releases page
git clone https://github.com/GenderedIntelligence/enquirywitch && cd enquirywitch
- Run
npm install
to install dependancies npm run build
will create a Twine 2-ready story format underdist/
.npm start
will spin up a server for development- start up the twine desktop app
- go to
library -> import -> choose file
selectGI_Contact_Page.twee
from the project root - go to
Twine -> Story Formats -> Add
and add in the URL provided by the NPM server - Test the format by
Build -> Test
it should open a browser window with the twine story - The Twine app does not register changes to the story format file. To preview changes you must
Twine -> Story Formats -> Remove
then re-add it. - To run unit tests, run
npm run test
. - To export the story from the Twine app
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.