-
-
Notifications
You must be signed in to change notification settings - Fork 4
Hype Template Placeholder
Max Ziebell edited this page Sep 18, 2020
·
4 revisions
Variable | Content |
---|---|
${bgcolor} |
The background color you set in the scene panel |
${customHeadHtml} |
The content you add to your Head HTML (without head tag) |
${mainContainerDivWidth} |
The (initial) width of your Hype document. It uses the smallest layout it can find (mobile first). If you want another behavior you can change it using a terminal command. |
${mainContainerDivWidthUnit} |
The unit for width (for now only px or % ) |
${mainContainerDivHeight} |
The (initial) height of your Hype document. It uses the smallest layout it can find (mobile first). If you want another behavior you can change it using a terminal command. |
${mainContainerDivHeightUnit} |
The unit for height (for now only px or % ) |
${posterImageFileName} |
The path to the poster image. Size is chosen by best match. |
Variable | Content |
---|---|
${mainContainerID} |
The ID Hype creates from your filename (sanitized) |
${javascriptFileName} |
The path to the generated document *_hype_generated_script.js
|
Variable | Content |
---|---|
${physicsJSFileName} |
The full path to the physics engine file (based on Matter.js) |
${hypeJSFileName} |
The full path to the Hype runtime (Thin or Full) |
${waypointsJSFileName} |
The full path to the the view port action helper (base on waypoints) |
Condition | Content |
---|---|
${ifdef VARIABLE} … ${endif}
|
Check if VARIABLE is defined is set. Could be any of the variables above to see if they are defined. |
${ifndef VARIABLE} … ${endif}
|
Check if VARIABLE is defined is not set. Could be any of the variables above to see if they are defined. |
Condition | Content |
---|---|
${ifdef bgcolor} … ${endif}
|
Check if a background color is defined |
${ifdef includeHypePhysics} … ${endif}
|
Check if physics is used |
${ifdef inlineHypeJS} … ${endif}
|
Check if the runtime should be linked |
${ifdef includeHypeWaypoints} … ${endif}
|
Check if waypoints is used |
${ifdef posterImageFileName} … ${endif}
|
Check if a poster image is defined |
${ifdef inlineDocumentLoader} … ${endif}
|
Check if advanced exports inlines the generated scripts |
${ifdef divForSEO} … ${endif}
|
Check if exports is set to include SEO content |
${ifdef legalDisclaimer} … ${endif}
|
Check if a legal disclaimer is defined |
Variable | Content |
---|---|
${legalDisclaimer} |
Not sure what this is used for |
${ifdef dashboardWidget} … ${endif}
|
Check if this is exported as dashboard widget (probably outdated at this point, backwards compatibility) |
These placeholders can be found in the Hype template called IndexTemplate.html
in the Hype 4 Resource folder in the application package. If you edit them, please make a copy beforehand. Editing them breaks the code signature and is not supported by Tumult but it works.
You can also give the little application Hype Template Genie a try to streamline setting the template. To follow the discussion around this application and approach visit the forum thread.
- Choose another topic from the sidebar
- Visit the topic index
- Return to the welcome page
- Learn about contributing
- Consider making an one-time donation
- Visit the landing page for this project
- Accessibility in Hype
- Quick iterations as the secret to progress
- Using querySelector
- Test an elements class name using classList and contains
- Including external files and Hype Extensions
- Fetching hypeDocument from within a rectangle
- Extend the functionality of Hype using Export Scripts
- Using external editors
- Embedding Hype documents into third-party services
- Accessing external APIs from Hype Previews
- Manually include resources in document head
- Manipulating scene height
- Extension template