Complex components via ParagraphsĪ separate project providing some Paragraph types is available here: USWDS Paragraphs. ConfigurationĪfter installation, see the theme settings inside Drupal for various customizations, mostly involving the header and the footer. If left empty, it defaults to whatever you have in your primary and secondary menus. (Eg, you would put the menu block for your primary menu in the "Primary menu" region.) There is also an optional "Mobile menu" region where you can specify the menu to be used for mobile. You can implement these menus simply by placing a menu block into the appropriate region. In USWDS there are four styles of menus: Primary menu, Secondary menu (upper right, by "Search"), Footer menu, and Sidenav. Or if you have a preferred front-end workflow you can adjust the package.json file accordingly. After doing this, you can set up your assets by copying them from node_modules/uswds/dist, and then running a basic npm script to compile the CSS. The library's source can be installed directly in the subtheme directory by running `npm install` in that location. Use npm to include the USWDS Sass source files Afterwards, this should be a valid path inside your subtheme folder: `assets/css/uswds.css` 2. If you would like to use the pre-compiled USWDS library, download the zip file, extract and rename the folder to "assets", and place it in your theme folder. The theme makes no assumptions about how you would like to add site-specific CSS. Simply copy out the /examples/my_subtheme folder to get started, following the directions in /examples/my_subtheme/README.md. SubthemingĪs with most Drupal themes, it's recommended that your active theme be a subtheme of this one, to make updates easier. Some CSS is added to deal with unavoidable Drupal quirks, but only as a last resort. This base theme focuses on tweaking Drupal's markup so that it will work with the USWDS library. Web Design System is a library of design guidelines and code to help government developers and designers quickly create trustworthy, accessible, and consistent digital government services.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |