Adding custom JavaScript/SCSS files
The Point of Sale app uses different asset bundles for managing JavaScript and style sheet files. In this recipe, we will learn how to add SCSS and JavaScript files to the Point of Sale asset bundle.
Getting ready
In this recipe, we will load an SCSS style sheet and a JavaScript file into the Point of Sale application.
How to do it...
To load assets in the Point of Sale application, follow these steps:
- Add a new SCSS file at
/pos_demo/static/src/scss/pos_demo.scss
and insert the following code:.pos .pos-content { Â Â Â Â .price-tag { Â Â Â Â Â Â Â Â background: #00abcd; Â Â Â Â Â Â Â Â width: 100%; Â Â Â Â Â Â Â Â right: 0; Â Â Â Â Â Â Â Â left: 0; Â Â Â Â Â Â Â Â top:0; Â Â Â Â } }
- Add a JavaScript file at
/pos_demo/static/src/js/pos_demo...