npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cagovweb/state-template

v6.3.1

Published

California State Web Template NPM Package

Downloads

361

Readme

California State Web Template NPM Package

This is the NPM Package for the California State Web Template, an HTML template and website standard offered by the California Department of Technology to state agencies and departments within the State of California and beyond.

The California State Web Template is designed to promote a responsive and standard look and feel to ensure a uniform user experience across state entities. The web template includes many usability, security and accessibility requirements and is updated regularly to meet evolving industry standards and best practices.

The state web template is an open source project which you can find on the CA Office of Digital Services GitHub repository. There are various technology versions of the web template available for consumption. Collaboration is highly encouraged and user feedback and contributions are always considered and often implemented.

This package is based on Bootstrap v5.3.0

How to use

React

Option 1 - default theme

//import with default Oceanside theme - includes core JS and CSS
import "@cagovweb/state-template";

Option 2 - specific theme

//import with specific theme
//Core CSS first
import "@cagovweb/state-template/dist/css/cagov.core.css";
//Choose Theme
import "@cagovweb/state-template/dist/css/colortheme-oceanside.css";
//Core JS last
import "@cagovweb/state-template/dist/js/cagov.core.js";

.Net Core (Visual Studio)

You can use Library Manager (LibMan) to automatically sync the client JS/CSS with your Visual Studio projects.

Create libman.json in your project root folder

{
  "version": "1.0",
  "libraries": [
    {
      "provider": "jsdelivr",
      "library": "@cagovweb/state-template@latest",
      "destination": "wwwroot/lib/state-template/"
    }
  ]
}

In your layout files you can reference the files in the lib folder

<link href="~/lib/state-template/dist/css/cagov.core.min.css" rel="stylesheet">
<link href="~/lib/state-template/dist/css/colortheme-oceanside.min.css" rel="stylesheet">
<script src="~/lib/state-template/dist/js/cagov.core.min.js"></script>

Eleventy

.eleventy.js (see reference)

module.exports = function(eleventyConfig) {
  // Copy state template core files to site output
  eleventyConfig.addPassthroughCopy({
    "node_modules/@cagovweb/state-template/dist": "state-template"
  });
};

At references in your template files

<head>
  ...
  <link rel="stylesheet" href="state-template/css/cagov.core.min.css"/>
  <link rel="stylesheet" href="state-template/css/colortheme-oceanside.min.css"/>
  <script type="text/javascript" src="state-template/js/cagov.core.min.js"></script>
</head>

Documentation

For more information on how to use the state web template, please visit webstandards.ca.gov. There you will find documentation on how to get started, how to customize the template, how to follow the web standards and best practices, and how to join the community of web developers and designers working with the state web template.

You can also visit template.webstandards.ca.gov to see examples of websites built with the state web template and learn more about the upcoming design system that will replace the state web template in the future.

License

The state web template is licensed under the MIT License. See LICENSE for details.

Status

npm version template version license CSS gzip size JS gzip size