its giving me this error refreshed and quoted safari so confused!
Judging from that small line of code behind the error, you don't seem to be using Sugarcube. Go to your story's options and hit "Change Story Format" and choose Sugarcube.
If you are using the hosted version of the SugarCube story format (which is the default way to use it) then there is another possible cause for that error.
Whenever you use SugarCube to create (publish) your story HTML file the Twine 2 application needs to (re)download the SugarCube format file, if there are any problems connection to the SugarCube web-site the you may get an error.
Think you need to wait for a later version for this kind of functionality to be put in. Think it might be in the current beta version undergoing development.
Harlowe currently does not have macros like SugarCube's <<addclass>> or <<removeclass>>
note: the following is based on the CSS supplied by @Claretta
A method to emulate this in Harlowe is described here but simply put you need to use some Javascript. The javascript to add / remove a class on the html tag would look the following:
Unfortunately Harlowe does not currently support the HTML <script> tag, so until it does you will need to use a hack like the following to call the above javascript:
sorry for my ignorance with sugarcube, but would a (display:"passageWithCode") in Harlowe do something similar to a widget, if the "passageWithCode" passage contained all the code that you want to call?
Using the example before that greyElf provided, I found that I could combine a remove all function by using .removeClass() and the .addClass so that it will remove any previous class to the element and add the new one (essentially replacing the previous one).
Comments
Judging from that small line of code behind the error, you don't seem to be using Sugarcube. Go to your story's options and hit "Change Story Format" and choose Sugarcube.
Whenever you use SugarCube to create (publish) your story HTML file the Twine 2 application needs to (re)download the SugarCube format file, if there are any problems connection to the SugarCube web-site the you may get an error.
note: the following is based on the CSS supplied by @Claretta
A method to emulate this in Harlowe is described here but simply put you need to use some Javascript. The javascript to add / remove a class on the html tag would look the following:
Unfortunately Harlowe does not currently support the HTML <script> tag, so until it does you will need to use a hack like the following to call the above javascript:
Once Harlowe is changed to support the HTML <script> tag the above would look as follows:
I guess this method could be used to change any part of css, like for changing the background image instead of color etc?
Is there a way to REPLACE the Class rather than add or remove?
I ask because it may depend on which passage the person arrives from that determines what the current class is.
Also why SugarCube is best for this sort of thing, because you can bundle them all up into a widget.
sorry for my ignorance with sugarcube, but would a (display:"passageWithCode") in Harlowe do something similar to a widget, if the "passageWithCode" passage contained all the code that you want to call?
I hope this is of help to someone.