Skip to content

andycochran/council.nyc.gov

 
 

Repository files navigation

New York City Council WordPress

This repository contains the themes & plugins for New York City Council's WordPress multisite installation.

Requirements

Local Installation

Only the themes and plugins are included in this repository. All WordPress core files are ignored. To run locally, clone this repository and manually install WordPress in the same directory, being careful not to overwrite any files.

WordPress Multisite

This package is meant to be used with a network of sites. The primary site is for basic Council pages—such as the home page or about page. Each Council Member and each Division (Legislation, Budget, Land Use, Press, etc) has its own site in the network and uses a custom child theme.

Themes

There are several themes included in this package. The primary site uses the wp-nycc theme. All other themes are child themes of the wp-nycc parent theme. Each Member site should use the wp-nycc-member child theme. And each Division site should use its specific wp-nycc-[division] child theme.

For details on how particular themes function, see documentation in the wiki.

Foundation for Sites

The New York City Council website uses Foundation for Sites, a responsive and accessible front-end framework. The wp-nycc theme is based on andycochran/wp-foundation-sites, a bare-bones WordPress theme built with Foundation.

When upgrading to a newer version of Foundation, make sure wp-nycc/assets/scss/_settings.scss uses @import '../../bower_components/foundation-sites/scss/util/util'; not @import 'util/util';.

Editing Themes

  • cd wp-nycc/
  • Run npm install to get node_modules
  • Run bower install to get bower_components
  • Run gulp to compile the CSS & JavaScript
  • Run gulp watch to watch for changes to .sass and .js files

Styles

The styles for all themes are in the wp-nycc parent theme. The child themes do not include any styles.

  • Do not edit the files in wp-nycc/assets/css/—they're generated by Gulp
  • Add your custom styles to wp-nycc/assets/scss/app.scss
  • Change the Foundation variables in wp-nycc/assets/scss/_settings.scss
  • Choose which Foundation component to include in wp-nycc/assets/scss/foundation.scss

JavaScript

The scripts for all themes are in the wp-nycc parent theme. The child themes do not include any JavaScript.

  • Do not edit the files in wp-nycc/assets/js/—they're generated by Gulp
  • Add/edit your custom JavaScript files in wp-nycc/assets/js/scripts/
  • All .js files in wp-nycc/assets/js/scripts/ will concatenate to wp-nycc/assets/js/scripts.js and wp-nycc/assets/js/scripts.min.js
  • Choose which Foundation JavaScript components to include in wp-nycc/gulpfile.js

Note: The wp-nycc/map_scripts.php and wp-nycc-member/pb-map-scripts.php files contain JavaScript that is dynamically produced from WordPress content and is inserted directly into the footer.

Documentation

All documentation is in the wiki, where you can find details on how the themes and plugins function.

Contributors

Want to add a new feature or update an existing one? The best way to contribute is to submit a pull request on GitHub. Find a bug? Please submit an issue on GitHub. You can also contact us on Twitter and Facebook.

About

themes & plugins for NYC Council's WordPress multisite installation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 64.4%
  • CSS 25.6%
  • JavaScript 10.0%