You'll need to install Node.js, you can use the v6.11.0
or above. Then open up a console (Terminal, iTerm, PowerShell, etc.) and install the depencencies for this project.
npm install
# Start the dev server with live reload
# on http://localhost:8080
npm start
# Build the static assets for upload.
# They'll be put in the /build folder.
npm run build
If you make a commit with the generated files and push it to GitHub then that will also update the live version.
Pug (formerly Jade) for HTML layout, you can check out the official language reference to see how it works.
If you find the syntax too heavy, you can also just write plain HTML and run it through a converter when you're happy with your code.
Bootstrap 4 with our own custom overrides in global.scss
. The idea is to customize and use as much of the existing components as possible.
- Create
pug/my_page.pug
andsass/my_page.scss
- Import your page styles in
sass/main.scss
, this is where we require all sass files for the final build ATM.@import './my_page.scss'
- Your page must have
header
andfooter
elements
doctype html
html(lang='ro')
include head.pug
body
include header.pug
<!-- you code --->
include footer.pug
- Make webpack compile your page by adding a new entry under
plugins
inwebpack.config.js
new HtmlWebpackPlugin({
filename: "my_page.html",
template: "pug/my_page.pug"
}),
- Finally, the page should be listed in the main menu. In
pug/index.pug
add a link to it
a.list-group-item.list-group-item-action(href="my_page.html") My Page
Very small UI elements (<20 lines of pug) that are used in multiple places are good candidates for being an atom.
It's best to just write your pug and styles in a single place and split up into atoms when you need to use the same thing somewere else.
- Carousel images should have a size of
1050px x 277px
for best results