- npm install
- gulp
- all webparts are split so you know where to find relative code
- app/_webparts/webparts/xxx contains folders with html, javascript and scss in
- the index.html file from each webpart folder gets brought into index.html using nunjacks
{% include '_webparts/webparts/webpart-name/index.html' %}
on thewebpart_webpart-name.html
file - add this to the
pattern-library/nav/index.html
file to display on the navigation - incude the sass into the webpart.scss style sheet (split into webparts and pattern library styles)
- the scss and js get concatinated and put straight into the dist folder
gulp dev
- building locally with style sourcemapsgulp
- builds pattern library and webparts (style and javascript) forhttps://skodauk.github.io/dist/index.html
gulp desktop
- builds css for webparts with desktop CMS overwrites, paragraph repeater overwrites and tertiary level navigation. Excludes pattern library style / jsgulp deploy-mobile
- builds css for webparts (excluding pattern library style / js)gulp desktop-nav
- builds the primary and secondary sitewide nav for k2 (note that the new third level thicker nav is made in thegulp desktop
build)
- Use
npm run desktop-overwrites
whilst testing to run the npm script found in package.json to automatically publish the desktop to github
- Use branch names from JIRA tickets e.g.
SKMW-0001 - Webpart Name
- Commit changes and set up Pull Requests
- Changes will be seen on
https://skodauk.github.io/dist/index.html
where ŠKODA can review (use?hide-title
parameter at end of URL to hide title) - If happy we can update global scripts and css for desktop and mobile.
- So we can use h1 through to H6 or even p / span tags in hero text (semantically we might want to do this) we have the following variable
#{$text}
which can be used to apply styles to all tags. In this case we need to put a wrapper on the container and a child text tag. - Add video to webparts using
id="player"
anddata-ytID="zoRbe2Of9_Y"
where ID is YouTube ID. - Add
?hide-title
to any page to remove the black hero banner - this is useful for example pages likehttps://skodauk.github.io/dist/example_content-page.html
- Set up new pages with a single paragraph repeater in
- Remove the default top image from the page
- With a paragraph repeater you can add multiple 'sub-webparts' to the main paragraph repeater
- This allows you to add / move webparts with ease
- Use
class="content_zone"
to keep content within thesafe zone