Code Monkey home page Code Monkey logo

pif-website's Introduction

The Presidential Innovation Fellows website

The Presidential Innovation Fellows website is developed using the U.S. Web Design System v 2.0 and is focused on providing developers a starter kit and reference implementation for Federalist websites.

This code uses the Jekyll site engine and built with Ruby. If you prefer to use Javascript, check out federalist-uswds-gatsby, which uses Gatsby site engine.

This project assumes that you are comfortable editing source code. If you prefer to launch a website without editing any source code, checkout uswds-jekyll, which allows you to change the layout and content with configuration files.

This project strives to be compliant with requirements set by 21st Century IDEA Act. The standards require that a website or digital service:

  • is accessible to individuals with disabilities;
  • has a consistent appearance;
  • does not duplicate any legacy websites (the legislation also requires agencies to ensure that legacy websites are regularly reviewed, removed, and consolidated);
  • has a search function;
  • uses an industry standard secure connection;
  • “is designed around user needs with data-driven analysis influencing management and development decisions, using qualitative and quantitative data to determine user goals, needs, and behaviors, and continually test the website, web-based form, web-based application, or digital service to ensure that user needs are addressed;”
  • allows for user customization; and
  • is mobile-friendly.

Key Functionality

This repository contains the following examples and functionality:

✅ Publish blog posts, press releases, announcements, etc. To modify this code, check out blog/index.html, which manages how the posts are listed. You should then check out _layouts/post.html to see how individual posts are structured.

✅ Publish single one-off pages. Instead of creating lots of folders throughout the root directory, you should put single pages in _pages folder and change the permalink at the top of each page. Use sub-folders only when you really need to.

✅ Publish data (for example: job listings, links, references), you can use the template _layouts/data.html. Just create a file in you _pages folder with the following options:

---
title: Collections Page
layout: data
permalink: /collections
datafile: collections
---

The reference to datafile referers to the name of the file in _data/collections.yml and loops through the values. Feel free to modify this as needed.

✅ There are two different kinds of pages, one does not have a side bar navigation, and the other uses _includes/sidenav.html. You can enable this option by adding sidenav: true to your page front matter.

---
title: Document with Sidenav
layout: page
sidenav: true
permalink: /document-with-sidenav
---

✅ Enable search with Search.gov by adding option to _config.yml.

---
searchgov:
  endpoint: https://search.usa.gov  # You should not change this.
  affiliate: federalist-uswds-example # replace this with your search.gov account
  access_key: your-access-key # This is placeholder. Not private.
  inline: true #this renders the results on the same domain. Otherwise, it will render the results in the search.gov domain
---

How to edit

  • Non-developers should focus on editing markdown content in the _posts and _pages folder

  • We try to keep configuration options to a minimum so you can easily change functionality. You should review _config.yml to see the options that are available to you. There are a few values on top that you need to change. They refer to the agency name and contact information. The rest of _config.yml has a range of more advanced options.

  • The contents inside assets/ folder store your Javascript, SCSS/CSS, images, and other media assets are managed by jekyll-assets. Assets are combined, compressed, and automatically available in your theme

  • If you look at package.json you will see that the npm run federalist command that will run when running on the Federalist platform.

  • Do not edit files in the _site/ folder. These files are auto-generated, and any change you make in the folder will be overwritten.

  • To edit the look and feel of the site, you need to edit files in _includes/ folder, which render key components, like the menu, side navigation, and logos.

  • index.html may not require much editing, depending on how you customize hero.html and highlights.html.

  • _layouts/ may require the least amount of editing of all the files since they are primarily responsible for printing the content.

  • blog/index.html can be edited, but be careful. It will impact the pagination system for the posts. If you do edit the file, be prepared to edit _config.yml. For example, you may need go change configurations for jekyll-paginate-v2

  • search/index.html is used by search.gov.

usa anchor

This repo adapts the digital.gov USA anchor, which can be found in _layout/anchor.html. The data to populate this file is found in the _data/usa_anchor.yaml.

Installation

Clone the repository.

$ git clone https://github.com/presidential-innovation-fellows/pif-website
$ cd pif-website

Install the Node.js dependencies.

$ npm install

Build the site.

$ npm run build

Run the site locally.

$ npm start

Open your web browser to localhost:4000 to view your site.

After you make changes, be sure to run the tests.

$ npm test

Note that when built by Federalist, npm run federalist is used instead of the build script.

Technologies you should familiarize yourself with

  • Jekyll - The primary site engine that builds your code and content.
  • Front Matter - The top of each page/post includes keywords within -- tags. This is meta data that helps Jekyll build the site, but you can also use it to pass custom variables.
  • U.S. Web Design System v 2.0

Contributing

See CONTRIBUTING for additional information.

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.

pif-website's People

Contributors

adambellow avatar adamsfallen avatar ahsanulabeer avatar aileenmcgraw-pif avatar amirbey avatar bgebken avatar bwillman avatar daveskender avatar davidewarren avatar dependabot[bot] avatar echappen avatar emilyianacone avatar erren avatar hbillings avatar jaredbain avatar jkrzy avatar joshuadifrances avatar katemccall-kiley avatar keithpif avatar konklone avatar lukad03 avatar michael-balint avatar okamanda avatar rossdakin avatar s2t2 avatar sarankaba avatar smitasatiani avatar stroupaloop avatar thisisdano avatar ver-kat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pif-website's Issues

Disappearing PIFs

A few PIF bios disappeared from the site recently (thanks for @KateMcCall-Kiley for noticing).

They were still in the code, but somehow what was in S3 took a step backwards.

I'm guessing this was due to an s3_website push without first doing a git pull to ensure local master was up to date.

So, just a PSA to remember to pull before deploying. Cheers!

Copy changes via C Wong

maybe change the wording on "join the fellowship", it doesn't quite sound right, and i don't think any of us really refers to it as that and in the picture carousel with quotes

i would get rid of the "class of 2014" thing, i think a lot of us struggle with having people believe that we're not interns and we try not to project the image that we're experts

"class of" makes it sound more like some kind of a certification program. Could just be "2014 fellow"
especially since we're getting away from classes starting now anyway

changes to skills

We should have generic "data" skill, considering all "Open Data" PIFs. I think now "data" translated into "Data Viz" which is too narrow.

Also I know some consider that "Cyber" shouldn't be a skill on pif.gov : ) can we change it to "Cybersecurity"?

cc/ @rjmajma

pif.gsa.gov uses deprecated encryption for HTTPS

The pif.gsa.gov application is still using SHA-1 for its entire certificate chain. SHA-1 has been deprecated by NIST, 18F, others, as it no longer provides adequate encryption.

Someone has to tell them to re-issue / re-deploy their certs as SHA-256 or above.

White House Comms/Legal Review

To be reviewed for incorporation as appropriate:

  • There should be a sentence or two of history that gives context on the homepage. IE: "The Presidential Innovation Fellows (PIF) program was established by President Obama's White House in 2012 to attract top innovators into government. Now run out of the General Services Administration (GSA), the program continues to bring the principles, values, and practices of the innovation economy into government…" This will provide context for why there President's quote is being used and who runs the site/program now.
  • Please do a scrub through to make sure that "we" is defined more clearly throughout since it's likely that someone will come in through a page other than the homepage. For example, on the Supported Agencies page — especially at mobile, where the logo is just the eagle — it's unclear who "we" is and whether you're government or private.

Fix relocation language

“The Presidential Innovation Fellowship positions are full-time and may require relocation to the Washington D.C. area.” – A note from our legal: It doesn't make sense to say that PIFs "may require relocation to...DC" and allow as the only option "available to work full-time in...DC"

JS Error

Present on all pages except home page:

screen shot 2015-07-29 at 5 06 43 pm

Prevents JS things from working, e.g. filters on https://presidentialinnovationfellows.gov/fellows/

Suspect the video player.

Suggestion (I would open a PR but don't have a dev environment setup yet): maybe just wrap it all in a function and bail near the top if the video element doesn't exist.

E.g. turn this:

  /* video player */
  var video_player = document.getElementById("video_player");
  var links = video_player.getElementsByTagName('a');
  for (var i=0; i<links.length; i++) {
    links[i].onclick = handler;
  }

  /*** more video stuff ***/

Into this:

  /* video player */
  (function() {
    var video_player = document.getElementById("video_player");

    // bail on non-video pages
    if (!video_player) {
      return;
    }

    var links = video_player.getElementsByTagName('a');
    for (var i=0; i<links.length; i++) {
      links[i].onclick = handler;
    }

    /*** more video stuff ***/
  })();

Consolidating the list of projects a fellow has worked on by agency

Currently PIFs are identified from _data/{current/previous}_projects per project.

These projects are listed for each PIF on the Fellows page (bio details modal for each fellow) as the following

agency > project

If a fellow worked on multiple projects for the same agency, it should be consolidated.

Additionally, this allows showing the agency logos at the bottom of the bio details modal without repeating agency logos.

I heard @mbland knows how to 1 and 0 this out like a champ :)

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.