Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

A child theme for Human Resources Services.

License

Notifications You must be signed in to change notification settings

washingtonstateuniversity/hrs.wsu.edu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WSU Human Resource Services Theme

Support Level Build Status Release Version WordPress tested up to version 6.5.0 WordPress Block Ready code style: prettier GPLv3 License

Description

Caution

As of 26 July 2024, this project is archived and no longer being actively maintained.

This is the WordPress theme for the Washington State University (WSU) Human Resource Services (HRS) website. It's a child theme of the WSU Spine parent theme.

Settings

The HRSWP Theme provides a shared settings page for the HRS Theme and HRSWP plugins. The HRS Theme registers two settings for managing production and non-production environments. One toggles environment notices on and off, and the other whether to require a login for frontend access.

Installation & Dependencies

The WSU Human Resource Services theme is not intended for general use and is not available from the WordPress Themes repository. It must be manually installed.

Installation

  1. Download the latest release from GitHub and rename the .zip file to: hrs.wsu.edu.zip.
  2. From here you can either extract the files into the theme directory via SFTP and skip to step 5, or navigate to the Themes screen in the admin area of your site to upload it through the theme uploader (steps 3-4).
  3. Select Themes > Add New and then select the "Upload Theme" button.
  4. Select "Choose File" and locate the downloaded .zip file for the theme (it must be a file in .zip format) on your computer. Select "Install Now."
  5. Select "Activate Plugin" or return to the plugins page to activate later.

Dependencies

  • WSU Spine Parent theme (required): The HRS theme will not activate without this parent theme. Download the WSU Spine Parent theme and follow the instructions under installation. Make sure to rename the Spine theme directory to wsuspine in the themes directory.
  • HRSWP Blocks plugin (recommended): The HRSWP Blocks plugin provides several custom blocks and block adjustments that complement the HRS theme. Also includes several blocks that work with the HRSWP Sqlsrv DB plugin to display external content.
  • HRSWP Sqlsrv DB plugin (recommended): The HRSWP Sqlsrv DB plugin provides tools to connect to and query external Microsoft SQL Server databases. It is required for the HRSWP Blocks plugin to function completely.
  • WSUWP HRS Courses plugin (optional): The WSUWP HRS Courses plugin creates a Courses custom post type with supporting custom taxonomies.

For developers

The HRS Theme is not a Full Site Editing-enabled theme. It unregisters all of the FSE blocks, along with several others that are not used in the standard HRS environment. Refer to the list in src/components/unregister.js.

The WSU HRS Theme development environment relies on NPM and Composer for test and build processes. The package.json and composer.json configuration files will install the necessary dependencies for testing and building the production version of the theme. The NPM scripts in package.json do most of the heavy lifting.

Initial setup

  1. Clone the WSU Human Resource Services theme to a directory on your computer.
  2. Change into that directory.
  3. Install the Composer dependencies.
  4. Install the NPM dependencies.
  5. Ensure PHP, CSS, and JS linting coding standards checks are working -- this should exit with zero (0) errors.
  6. If you plan to contribute changes to the WSU HRS theme you're encouraged to follow the Git feature branch workflow. Suggested changes should be made on a separate branch and a pull request opened to merge into the stable branch.

In a terminal:

git clone https://github.com/washingtonstateuniversity/hrs.wsu.edu.git
cd hrs.wsu.edu
composer install
npm install
npm lint
git checkout -b new-feature
git push origin new-feature

Project structure

The WSU HRS theme CSS, JavaScript, non-core PHP, and images are maintained in the src/ directory in directories corresponding to their template or component name. For example, styles for the gallery block can be found at src/components/gallery/. Core PHP templates such as header.php are located at the root level, but template parts and component PHP can be found in the src/ directory.

Stylesheets are written in CSS with PostCSS Preset Env nesting rules. JavaScript is written in ESNext.

NPM scripts are responsible for processing source files into production format, polyfilling where necessary, and producing source maps. The build process includes the following steps:

  1. Prepare the build environment by removing the contents of the build/ directory. (Note: Do not manually create anything here; it will be deleted on build.)
  2. Run linting and code standards checks on PHP (phpcs), CSS (stylelint), and JS (eslint) files.
  3. Build styles: Compile the main CSS entry points for the front end (src/style.css) and the editor (src/editor.css), run CSSNext plugins, and save minified production version to build/.
  4. Build scripts and copy PHP: Compile the main JS entry points for the front end (src/index.js) and the editor (src/editor.js) using Webpack. The Webpack build process will also move all component and template part PHP to the build/ directory, along with images.

To maintain this structure:

  • Styles and scripts should be added and edited in the appropriate src/ subdirectory for the component or template.
  • Theme images should be added and edited in the src/images/ directory.
  • Run npm run build -s to test and update all compiled files before committing changes.

Browser Support

The WSU Human Resource Services child theme uses Browserlist to help monitor feature support. It aims provide a reasonably fast and fully usable experience on older browsers while to progressively enhancing the user experience on more modern browsers.

Specifically, the HRS theme aims to support all browsers with greater than 1% global usage (based on data from Can I Use), as well as IE 11 and the Firefox Extended Support Release (ESR). The Browserlist configuration, defined in package.json is:

"browserslist": [
  "> 1%",
  "ie 11",
  "Firefox ESR"
],

Review the current list of mobile and desktop browsers this resolves to using the Browserlist online demo (search for > 1%,ie 11,Firefox ESR).

Support Level

Archived: WSU HRS no longer maintains this theme.

Changelog

All notable changes are documented in the CHANGELOG.md, with dates and version numbers.

Contributing

Please submit bugs and feature requests through GitHub Issues. Refer to CONTRIBUTING.md for the development workflow and details for submitting pull requests.