...
Code Block |
---|
language | php |
---|
theme | RDark |
---|
title | Direct enqueing |
---|
|
add_action(
'wp_enqueue_scripts',
function () {
// Enqueue the CSS files.
wp_enqueue_style( 'hsph-bootstrap' );
// Optionnaly: Enqueue JS if you want to use tabs, dropdownsdrop-downs, modals, tooltips, ...
wp_enqueue_script( 'hsph-bootstrap' );
}
); |
...
Code Block |
---|
language | php |
---|
theme | RDark |
---|
title | By dependency |
---|
|
add_action(
'wp_enqueue_scripts',
function () {
// Enqueue the CSS files.
wp_enqueue_style( 'theme-styles', get_stylesheet_directory_uri() . '/style.css', array( 'hsph-bootstrap' ) );
// Optionnaly: Enqueue JS if you want to use tabs, dropdowns, modals, tooltips, ...
wp_enqueue_script( 'theme-scripts', get_stylesheet_directory_uri() . '/js/main.js', array( 'jquery', 'hsph-bootstrap' ) );
}
); |
How to Modify
Requirements: You need to have npm installed on your machine
- Clone the repo locally https://github.com/HarvardChanSchool/plugin-design-system
- In a terminal, navigate to the cloned folder and run
`npm i
` to install the dev tools - Make changes to /assets/sass/hsph-bootstrap/_bootstrap-vars.scss
- Additionally: more advanced changes can be made to existing or new partial sass files
- Compile your changes by running `
npm run bootstrap`
- You can preview your changes by visiting the local html files in /docs/ in your browser.
- Once you are satisfied, commit change to the repo.
Demos