Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Make a CSS HTML templates for all pages

Hi,
I have made a template in CSS and HTML to make my project more beautiful (Inventory, avatar, style, ...)
But I don't want to copy/paste this code at each passage for the reason that if i make a change in my template, I want this change affect all passages
How can i do this ?

Thanks for your help

Comments

  • Twine version? Story format version?
  • edited April 2017
    Twine 2.1 and currently I use Harlowe
  • akihap wrote: »
    Twine 2.1 and currently I use Harlowe
    When stating the version of either the Twine 2 application or the Story Format being used you need to state the full version number, as answers can be different for each one. I will assume you are using the default version of Harlowe which is v1.2.3
    eg. does Twine 2.1 mean the previous v2.1.0 application or the current v2.1.1 application?

    Generally you should be placing your CSS within your story's Story Stylesheet area, and then using CSS selectors (either ID, class, or tag based) to apply it to the elements of your layout/template as required.

    Without examples of either your 'template' or your CSS it is difficult to give a more specific answer.
  • edited April 2017
    Yes but the problem is the html code , how can i implement a reference of this code in all pages ? (Like a include ' "mycode.html" ' in php)
    I use Twine 2.1.1
  • Your still need to state the full version number of the story format you are using, Twine 2.1.1 comes with two different versions of Harlowe (v1.2.3 and v2.0.0). I will again assume you are using v1.2.3

    Depending on if you want your template HTML code to come before the contents of the current passage or after that contents you would use either a header tag passage or a footer tag passage.
Sign In or Register to comment.