Skip to content

Commit

Permalink
Fully redesigns the site, see commit history at 18F/beta.18f.gov
Browse files Browse the repository at this point in the history
As soon as this becomes the main branch both here and in Federalist, we're good.
  • Loading branch information
Greg Boone committed Aug 31, 2016
1 parent c7a02f3 commit 3e19ee7
Show file tree
Hide file tree
Showing 2,221 changed files with 36,728 additions and 10,477 deletions.
53 changes: 48 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,55 @@
**CONTRIBUTORS TAKE NOTE:** We work off the `staging` branch, so be sure to base your work on `staging` -- we don't even have a `master` branch.
This is a repo to design a beta version of 18f.gsa.gov based on the U.S.
Web Design Standards and with a complete refresh of much of the content.

## Where Contributions Go
## Front end architecture
### CSS
- Styling will be built from the US Web Design Standards.
- CSS methodology will be inherited from the WDS, which inherits mostly from the [18f front end guide](https://pages.18f.gov/frontend/css-coding-styleguide/architecture/).
- Use [18F modifed BEM naming convention](https://pages.18f.gov/frontend/css-coding-styleguide/naming/)
- Componentized CSS: start with tag rules and only becomes more specific as necessary, using component classes.
- Will update the WDS library when it publishes a change required by the guide. Otherwise will update bi-monthly.
- The codebase will be visual regression tested when a suitable tool is found for 18F.
- The Sass code will be linted with `scss-lint`
- The [18F CSS linting configuration](https://raw.githubusercontent.com/18F/frontend/18f-pages-staging/.scss-lint.yml) will be used.
- If linting fails, it will also fail the tests, but not the build.
- Will default to [semantic HTML5](http://www.w3schools.com/html/html5_semantic_elements.asp).


### Images
- Will use `<svg>` and `xlink` (looking for link) for icons.
- All blog images should be under 800kb in total, un-minified size.
- Images should be under 600Kb after being minified
- All raster images should be minified with a tool such as [grunt-imagemin](https://github.com/gruntjs/grunt-contrib-imagemin).


### JavaScript
- The site will be developed with Jekyll so will have a ruby-based build.
- Is required to work without JavaScript.
- jQuery will be required for the WDS.
- No heavy JS framework is required.
- Should use the AirBnB linter configuration for JavaScript, if linting fails, it will also fail the tests, but not the build.
- Ruby gems will be used for front end dependency management.
- JavaScript will not be bundled.
- There will be a manual testing script that will be required to walk through for each PR.

Submit contributions to https://github.com/18F/18f.gsa.gov as a pull request to the `staging` branch.

## Team photos
### Devices
- All versions of IE that Microsoft supports (IE9 and up); newest Chrome/FF.
- Mobile first will be employed.
- Every applicable change should be run through HTML code sniffer.


### Performance
- Will measure against the following custom events:
- Time to blog post image
- Time to main image and callout text.
- Time til first blog post title shows up on page with all blog posts.
- Each of these should load in under a second


## Where Contributions Go

Individual 18F team photos (as of commit-time, in `assets/images/team/`) are not covered by the below public domain dedication. The contributor of each photo (generally, the individual teammate in question), by contributing it, is affirming that 18F has appropriate permission to include the photo in this repository and display it on the website.
Submit contributions to https://github.com/18F/beta.18f.gov as pull requests to the `master` branch.

## Public domain

Expand Down
19 changes: 12 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
source "https://rubygems.org"

ruby '2.2.3'
gem 'redcarpet', '3.2.3'
gem 'jekyll', '3.1.2'
gem 'html-proofer'
ruby "2.2.3"
gem "redcarpet"
gem "jekyll", '~> 3.1'
gem "html-proofer"

group :jekyll_plugins do
gem 'jekyll-sitemap'
if ENV['FAST_BUILDS']
puts 'not using jekyll-archives because its sloooooooooow'
else
gem 'jekyll-archives', :git => 'https://github.com/jekyll/jekyll-archives.git'
end

gem 'jekyll_pages_api'
gem 'jekyll-archives', :git => 'https://github.com/jekyll/jekyll-archives.git'
gem 'jekyll_pages_api_search'
gem 'jekyll-sitemap'
gem 'jekyll-paginate'
gem 'jekyll-redirect-from'
gem 'jekyll_frontmatter_tests'
gem 'jekyll-feed'
end

gem 'jemoji'
group :development do
gem 'pry'
Expand Down
76 changes: 43 additions & 33 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
GIT
remote: https://github.com/jekyll/jekyll-archives.git
revision: 40823a4e16d81d7d0fb90736a7359144a15ea923
revision: af9e9cc8184768da44c423426b5cdf43b9df6356
specs:
jekyll-archives (2.1.0)
jekyll (>= 2.4)

GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.6)
activesupport (4.2.7.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.4.0)
coderay (1.1.1)
colorator (0.1)
coderay (1.1.0)
colorator (1.1.0)
colored (1.2)
ethon (0.8.1)
ethon (0.9.0)
ffi (>= 1.3.0)
ffi (1.9.10)
ffi (1.9.14)
forwardable-extended (2.6.0)
gemoji (2.1.0)
html-pipeline (2.3.0)
activesupport (>= 2, < 5)
nokogiri (>= 1.4)
html-proofer (3.0.4)
html-proofer (3.0.6)
activesupport (~> 4.2)
addressable (~> 2.3)
colored (~> 1.2)
Expand All @@ -36,81 +37,90 @@ GEM
yell (~> 2.0)
htmlentities (4.3.4)
i18n (0.7.0)
jekyll (3.1.2)
colorator (~> 0.1)
jekyll (3.2.0)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-feed (0.4.0)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.10.0)
jekyll-redirect-from (0.11.0)
jekyll (>= 2.0)
jekyll-sass-converter (1.4.0)
sass (~> 3.4)
jekyll-sitemap (0.10.0)
jekyll-watch (1.3.1)
listen (~> 3.0)
jekyll_frontmatter_tests (0.0.6)
jekyll-sitemap (0.9.0)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
jekyll_frontmatter_tests (0.0.8)
jekyll (>= 2.0, < 4.0)
jekyll_pages_api (0.1.5)
htmlentities (~> 4.3)
jekyll (>= 2.0, < 4.0)
jemoji (0.6.2)
jekyll_pages_api_search (0.4.4)
jekyll_pages_api (~> 0.1.4)
sass (~> 3.4)
jemoji (0.5.1)
gemoji (~> 2.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0)
jekyll (>= 2.0)
json (1.8.3)
kramdown (1.10.0)
kramdown (1.11.1)
liquid (3.0.6)
listen (3.0.6)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9.7)
mercenary (0.3.5)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
method_source (0.8.2)
mini_portile2 (2.0.0)
minitest (5.8.4)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
parallel (1.6.2)
mini_portile2 (2.1.0)
minitest (5.9.0)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
parallel (1.9.0)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
pkg-config (1.1.7)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
redcarpet (3.2.3)
rouge (1.10.1)
redcarpet (3.3.4)
rouge (1.11.1)
safe_yaml (1.0.4)
sass (3.4.21)
sass (3.4.22)
slop (3.6.0)
thread_safe (0.3.5)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
yell (2.0.5)
yell (2.0.6)

PLATFORMS
ruby

DEPENDENCIES
html-proofer
jekyll (= 3.1.2)
jekyll (~> 3.1)
jekyll-archives!
jekyll-feed
jekyll-paginate
jekyll-redirect-from
jekyll-sitemap
jekyll_frontmatter_tests
jekyll_pages_api
jekyll_pages_api_search
jemoji
pry
redcarpet (= 3.2.3)
redcarpet

BUNDLED WITH
1.10.6
1.11.2
4 changes: 0 additions & 4 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Individual 18F team photos (as of commit-time, in `assets/images/team/`) are not covered by the below public domain dedication. The contributor of each photo (generally, the individual teammate in question), by contributing it, is affirming that 18F has appropriate permission to include the photo in this repository and display it on the website.

------

As a work of the United States Government, this project is in the
public domain within the United States.

Expand Down
90 changes: 24 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,35 @@
## 18F's Homepage
# 18F's flagship website

This repository contains 18F's website, https://18f.gsa.gov.
A fresh start for 18f.gsa.gov. Online at beta.18f.gov. We plan to use the U.S. Web Design standards as a frontend framework.

**Writing a blog post for 18F? You must read our [blog publishing guide](_posts/README.md).**
## Installation

### Deployment and workflow
Run each of the following steps to get the site up and running.

* The `staging` branch is **automatically deployed** to our [staging site](https://staging.18f.gov).
* The `production` branch is **automatically deployed** to our [production site](https://18f.gsa.gov).
1. `git clone [email protected]:18F/beta.18f.gov`
2. `cd beta.18f.gov`
3. `bundle install`
4. `jekyll serve`

**All development and pull requests should be done against the `staging` branch.**
To dramatically speed up rebuild times (from more than 20 seconds to around 5), you can also run `./serve` or `./build` for step 4. These are shorthand for a combination of commands that disable certain plugins. This is especially useful if you're drafting a blog post or formatting single pages.

Deployments to production will be done by site admins, using pull requests from `staging` to `production`.
You should be able to see the site at: http://127.0.0.1:4000

We occasionally use various subdomains of 18f.gov to demo work in a way that others can see it. These deployments are manual and require a little bit of extra configuration. See the readme file in the "deploy" folder for more information on how this works.
## System security controls

### Getting your picture and bio on the site:
The site is a static website with HTML, CSS, and Javascript. Deployments are done through the Federalist platform.

If you're a new teammate, follow these steps and the #18f-site team will take care of it:
1. Federalist runs in its own organization and space in CloudFoundry
1. Federalist Admin: https://federalist.18f.gov/
1. Using the Federalist editor that requires GitHub Oauth and writes commits as auth'd GitHub user, changes are then passed through a webhook back to Federalist
1. Federalist uses a CloudFoundry S3 service to write to the bucket, the Federalist instance only derives S3 credentials (IAM user: s3-sb-federalist.18f.gov) from the CloudFoundry S3 service and can only read/write to federalist.18f.gov/*
1. Federalist responds to a webhook on GitHub and runs Jekyll to generate static web files and puts them in an S3 bucket
1. We map whatever.agency.gov URL to the S3 bucket

1. Upload your photo to the appropriate [Google Drive folder](https://drive.google.com/a/gsa.gov/folderview?id=0B8kn3cuJUwEkLUMwWXE2VVczbUU&usp=sharing).
2. Fill out the [bio form](https://docs.google.com/a/gsa.gov/forms/d/1XRCkQZw3-1JoZh6tm4k1qbunEnvJdOvDrTjRCqs-dp4/viewform).
3. Get in touch with the site team in #18f-site; we'll handle it from there!
### Constraints

NOTE: Bios and pictures are scheduled to be added at the end of each month.

**You do not need to edit the team.json or authors.yml files in this repo,** we'll find it in `team-api.18f.gov`.

If you get stuck, or have any other questions, feel free to reach out to anyone on the 18f-site team in channel #18f-site.

Helpful tips:

* [Our Guide to the Terminal and GitHub](https://18f.gsa.gov/2015/03/03/how-to-use-github-and-the-terminal-a-guide/)
* [Creating a Pull Request (GitHub Support)](https://help.github.com/articles/creating-a-pull-request/)
* [Creating a Pull Request with GitHub for Mac (GitHub blog post)](https://github.com/blog/1946-create-pull-requests-with-github-for-mac)


### Publishing a blog post

For a guide to how 18F manages blogging, and technical guidelines for getting your blog post into the site, see the **[18F Blogging Guide](_posts/README.md)**.

### Developing the site

This is a [Jekyll](http://jekyllrb.com) website. Install Jekyll through Rubygems (you may need `sudo`), Bourbon, and Jekyll Sitemap:

```bash
./go init
```

Prerequisites: A few of our gems require a C++ compiler (**XCode** on the Mac). [For the time being](https://github.com/jekyll/jekyll/issues/2327#issuecomment-55337023) you will also need **Node** to be installed, because Jekyll 2 couples a CoffeeScript runtime. This will eventually be removed.

So yes: this project requires Ruby and Node (for now). Aren't static site generators the simplest?

Launch with Jekyll:

```bash
./go serve
```

The site will be visible at `http://localhost:4000`.

Before submitting a pull request, please ensure `./go ci_build` runs and exits cleanly.

### Deploying the site

You don't need to worry about deployment stuff for normal development -- any pushes to `staging` and `production` branches will auto-deploy.

But to dig into our deployment setup and code, visit [`deploy/`](deploy) for more details.

### Public domain

This project is in the worldwide [public domain](LICENSE.md). As stated in [CONTRIBUTING](CONTRIBUTING.md):

> 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](https://creativecommons.org/publicdomain/zero/1.0/).
>
> 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.
* We'll use Cloudfront to map beta.18f.gov to an S3 endpoint
* IE 9 and above
* Federalist, and the CloudFoundry platform do not support the following HTTPS implementations:
* HTTP/2
* OSCP Stapling
1 change: 0 additions & 1 deletion Staticfile

This file was deleted.

1 change: 0 additions & 1 deletion _cards/accordion.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: Accordion to me, you’re the best.
image: /assets/images/vday/accordion.png
post: /2016/02/12/happy-valentines-day-from-18F/
layout: bare
---
<meta name="twitter:card" content="photo" />
<meta name="twitter:title" content="{{ page.title }}" />
Expand Down
1 change: 0 additions & 1 deletion _cards/entire-grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: My heart would fill this entire grid.
image: /assets/images/vday/entire-grid.png
post: /2016/02/12/happy-valentines-day-from-18F/
layout: bare
---
<meta name="twitter:card" content="photo" />
<meta name="twitter:title" content="{{ page.title }}" />
Expand Down
1 change: 0 additions & 1 deletion _cards/no-standard-way.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: There’s no standard way to say I love you this Valentine’s day.
image: /assets/images/vday/no-standard-way.png
post: /2016/02/12/happy-valentines-day-from-18F/
layout: bare
---
<meta name="twitter:card" content="photo" />
<meta name="twitter:title" content="{{ page.title }}" />
Expand Down
1 change: 0 additions & 1 deletion _cards/press-all-buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: You press all my buttons.
image: /assets/images/vday/press-all-buttons.png
post: /happy-valentines-day-from-18F/
layout: bare
---
<meta name="twitter:card" content="photo" />
<meta name="twitter:title" content="{{ page.title }}" />
Expand Down
Loading

0 comments on commit 3e19ee7

Please sign in to comment.