@pimaonline/pimaonline-themepack
v5.19.0
Published
A cloud based, course theme-pack for building courses efficiently within the D2L learning environment.
Readme
PimaOnline ThemePack
The PimaOnline Themepack is a web development toolkit for building online courses within the D2L Brightspace Learning Management System (LMS). The themepack offers multiple and interchangeable themes.
Dependencies
- Node.js ^v20.9.0
- React ^18.3.1
- Sass ^1.79.4
- Typescript ^5.6.2
- Webpack ^5.95.0
How to use
Add a theme's CSS in the <head> of your document. /cards/ may be replaced with another theme.
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@pimaonline/pimaonline-themepack/dist/css/themes/cards/styles.css">Add themepack's JavaScript into the <head> of the document ensuring the defer attribute is used.
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@pimaonline/pimaonline-themepack/dist/js/scripts2.js" defer></script>Development
Fork this repository, clone it, and install all necessary dependencies using npm install.
$ git clone https://github.com/YOUR_USERNAME/pimaonline-themepack.git
$ cd pimaonline-themepack
$ npm installStart the server
$ npm run devThe app will run at http://localhost:8080.
How to Test Theme Using Local Server
The PimaOnline Themepack uses webpack-dev-server to host a local server.
Navigate to
/src/testing-area/and open any or all HTML templates, i.e.one-column,two-column,three-section.Change the
styleslink fromcardsto your theme’s SCSS folder. (e.g. from<link rel="stylesheet" href="../../dist/css-dev/themes/cards/styles.css"/>to<link rel="stylesheet" href="../../dist/css-dev/themes/[course]/styles.css"/>)In terminal, use
npm run devto start the local server.In a browser, go to http://localhost:8080. Find theme layouts in the
/src/testing-area/folder here as well.To stop the local server use CTRL+C.
How to Test Theme in a Live Shell
Open Dreamweaver and connect to the
WD_testing_environmentcourse on D2L. Create a folder inside your sandbox and label it with the name of the new theme.Inside the new folder, create an HTML document and paste in the HTML for any layout. Find and copy the code from Pima Online Webdocs.
Replace
/cards/styles.csswith the new theme's css path.Save and put the new folder including the files inside.
Review the theme in the live D2L shell to confirm all custom styles display correctly.
Stylelint for CSS/SCSS Linting
The PimaOnline Themepack uses Stylelint to enforce consistent and valid CSS/SCSS code across the project. It is configured using the stylelint-config-standard-scss ruleset.
Stylelint features
npm run stylelint: Lints all .scss and .css files in /src and generates stylelint-full-report.txt in /src/stylelint/reports. This command is also built into npm run build.
npm run stylelint:watch: Only lints changed files .scss and .css files and generates stylelint-watch-report.txt in /src/stylelint/reports. This command is also built into npm run dev.
Modify Stylelint Configuration
The main configuration file is located at stylelint/stylelint.config.js.
Terminal commands
npm run dev: Used for development. Runs a dev server and watch feature.
npm run build: Used for compiling src into dist without running server or watch.
npm run docs: Serve documentation and view in a browser, found at http://localhost:3000.
Authors
Center for Learning Technology at Pima Community College
License
(C) 2025 Pima Community College. All rights reserved. Unauthorized copying, modification, distribution, or any form of exploitation of this code, is strictly prohibited.
