This tutorial shows you how to transplant the html, css and javascript from a static html design into an addon, using Layouts and the styles, javascript of the addon.
Create a Collection to hold the addon
- This collection will include all the stylesheets, js files, page templates and addons.
Verify Addons or Create Addons for each jQuery Extension in the html design
- If the design includes a jQuery extension, it should be isolated as a discrete addon.
- If the design includes common libraries already in collections, just make dependencies to the existing addons.
- Be sure to add collection dependencies to any libraries that need to be included.
Create a Shared Stylesheet from the page
- From the source of the new design html, copy the necessary stylesheets one at a time, in order into a single shared stylesheet.
- Add the shared stylesheet to the addon, and the addon's collection
Create a Javascript file for all the scripts needed on the new page
- From the source of the new design html, copy the necessary scripts into one javascript file. Exclude those isolated into separate addons.
- Add the new consolidated script file directly to the addon.
Create a new Layout record for the html from the design
- Copy and paste the html from the design to a layout record.
- Add the layuout to the collection
Add External resources to the Collection
- If the layout references images, etc from the site that are not part of the original site or any other addon, add them to the collection