Git Product home page Git Product logo

federalist-themes's Introduction

Federalist Themes

A collection of Federalist themes.

Features

Here's what we provide in every Federalist Theme.

US Web Design System

All themes are built with the U.S. Web Design System. This provides provides a fast, accessible, mobile-friendly government website backed by user research right out of the box.

Content focused

Content provided into includes are treated as markdown by default making it easy to use existing includes with rich content. If you need to provide raw HTML for more tailored content, you can do that too!

Federalist grows with you

Our themes start simple so you can focus on getting your content up quickly. More advanced customizations in the theme are ready when you are!

Usage

Layouts

landing

The landing layout is meant to be used with the front page of your website. The landing layout is based on the USWDS Landing page template.

default

A bare-bones layout containing only the header and footer. This layout can be used for pages with custom structure or as the basis for any custom layouts you create.

base

An empty layout containing only the non-visible <head> content. This layout should rarely be used.

Includes

We standardize template variables where possible. Content provided to templates are escaped by default. Most includes accept a content property for the body content of the component which is treated as markdown.

Passing in HTML

We follow a convention with variables passed to includes. By default, we will escape content strings based to includes for safe rendering within HTML. If you would like to pass HTML in directly, most variables are suffixed with _html to indicate that HTML content. Here's an example:

---
# index.html
# Normally you would pass in your content for escaping
hero_with_text:
  heading: Heading for my hero is escaped.

# However, you may include raw HTML by passing in the `heading_html` variable
# instead. Make sure to sanitize your content yourself. You should never render
# content provided directy from users.
hero_with_html:
  heading_html: <strong>This</strong> heading contains markup.
---
{% include hero.html hero=page.hero_with_text %}
{% include hero.html hero=page.hero_with_html %}

Common include properties

heading refers to the heading or title of a component. content refers to the body content for a component.

hero.html

media_blocks.html

secondary_lead.html

tagline.html

usa-banner.html

Using USWDS

All the Federalist themes are based on the U.S. Web Design System. By default, we include the minified CSS provided by the US Web Design System. which allows you to use the CSS classes described in the USWDS and copy/paste examples directly from the USWDS component library.

For advanced users, you may use the SCSS files provided by USWDS.

Overriding layouts and includes

Contributing

See CONTRIBUTING for additional information.

Development

This section explains the technical details to get the project setup for developing on the Federalist themes.

Install the Node.js dependencies.

$ npm install

Build the Jekyll themes.

$ npm run build

Start the watch task to automatically copy common templates into the themes directories.

$ npm run watch

Then, you can cd into individual theme directories and run Jekyll just as you would a stand-alone theme.

$ cd federalist-standard-theme
$ bundle install
$ bundle exec jekyll serve

Directories

This table explains the different directories

Directory | Description

Common tasks

Update USWDS

When a new verison of USWDS comes out, here's how to update the themes.

Bump the version in package.json.

Run the build.

$ npm run build

Run the automated tests.

$ npm test

Then, run the steps for packaging and publishing

Package and publish

This packages the themes as a gem and publishes them to rubygems.

Prerequisites

Semantic versioning for Jekyll themes

What does Semantic versioning mean for Jekyll themes?

Public domain

This project is in the worldwide public domain. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

federalist-themes's People

Contributors

adborden avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.