Basic frontend dev setup for North Macedonia statistical office website.
It includes a basic server for development purpose, a SASS and component setup.
- Finish start page template (Desktop)
- Add theme template
- Add template for statistics start page
- Add template for regular page
- Create responsive menus (Mobile)
- Printversion
- Make templates fully responsive
- Make sure you have Node.js and NPM installed.
- Install live-server
- Github desktop is a good help
I recommend install (live-server)[https://www.npmjs.com/package/live-server] globally.
npm install -g live-server
Run this in the root of the directory
npm install
npm run dev
To build minified css for production
npm run build
Files that should be used for production are stored in this directory. The CSS is also built to the CSS catalogue.
HTML snippets are stored in this catalogue. If a component has variants it is stored in a library with the component name and template name. In the SCSS library you'll find a corresponding _component.scss
file.
Example
components/list/news/start.html
contains news showed in the startpage template.
To include a component we use a simple data-include="path/filename.html"
attribute on a div tag. A script runs on load, adds components to the page and removes div tags.