GenderedIntelligence / enquirywitch

MIT License
1 stars 0 forks source link

enquirywitch matches new branding for GI #276

Closed aaaaargZombies closed 10 months ago

aaaaargZombies commented 10 months ago

description

enquirywitch is being moved to a new site with updated styles

Acceptance criteria

notes

https://xd.adobe.com/view/198d4659-3583-4cf9-9445-19c142671cd4-4cde/screen/a6188131-afa9-441e-a050-c4c6bfe788e6/

image

image

image

image

aaaaargZombies commented 10 months ago

well I'm glad the first thing I did was delete all the styles and try to embed it into the rails app because there's a fun descovery

SyntaxError at /

syntax error, unexpected backslash, expecting ']'
...ettings={evaluate:/'.freeze;([\s\S]+?);@output_buffer.safe_a...
...                              ^
/home/unicorn/projects/gi-matrix/app/components/enquiry_witch_component/enquiry_witch_component.html.erb:1673: syntax error, unexpected backslash, expecting ']'

The regex int he script is looking for some templating templateSettings={evaluate:/<%([\s\S]+?)%>/g which erb tries to parse. So I need to investigate how to combine the export with rails as I want to style it in place.

aaaaargZombies commented 10 months ago

after much experimentation and with string manipulation and encoding issues I have settled on this solution

<%= raw(render file: 'app/views/contact/_enquiry_witch.html', content_type: 'text/html') %>

I've realized that the feedback loop for styling in twine is going to be awful and that if I style it independently I risk having to redo it when it interacts with the rails app.

I think what will be more efficient will be to strip styles from the twine story and then add a styles sheet that targets it in the rails app.