4 changes: 2 additions & 2 deletions _data/collections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dapibus interdum pellentesque. Integer eu vehicula elit. Sed cursus magna in dui suscipit rhoncus.

- name: USDA
url: http://usda.gov/
url: https://usda.gov/
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dapibus interdum pellentesque. Integer eu vehicula elit. Sed cursus magna in dui suscipit rhoncus.

- name: Performance.gov
url: http://performance.gov/
url: https://performance.gov/
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dapibus interdum pellentesque. Integer eu vehicula elit. Sed cursus magna in dui suscipit rhoncus.

- name: Login.gov
Expand Down
2 changes: 1 addition & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="tablet:grid-col">
<div class="logo-links">
<a class="footer-logo media_link" href="https://18f.gsa.gov">
{% asset img/logo-img.png width="50" alt="Agency logo" %}
<img src="{{site.baseurl}}/assets/uswds/img/logo-img.png" width="50" alt="Agency logo" />
</a>
</div>
</div>
Expand Down
9 changes: 3 additions & 6 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
>
<div class="usa-banner__inner">
<div class="grid-col-auto">
{% asset img/us_flag_small.png class="usa-banner__header-flag"
alt="U.S. flag" %}
<img src="{{site.baseurl}}/assets/uswds/img/us_flag_small.png" class="usa-banner__header-flag" alt="U.S. flag" />
</div>
<div class="grid-col-fill tablet:grid-col-auto">
<p class="usa-banner__header-text">
Expand All @@ -37,8 +36,7 @@
<div class="usa-banner__content usa-accordion__content" id="gov-banner">
<div class="grid-row grid-gap-lg">
<div class="usa-banner__guidance tablet:grid-col-6">
{% asset img/icon-dot-gov.svg class="usa-banner__icon
usa-media-block__img" alt="Dot gov" %}
<img src="{{site.baseurl}}/assets/uswds/img/icon-dot-gov.svg" class="usa-banner__icon usa-media-block__img" alt="Dot gov" />
<div class="usa-media-block__body">
<p>
<strong>The .gov means it’s official.</strong>
Expand All @@ -50,8 +48,7 @@
</div>
</div>
<div class="usa-banner__guidance tablet:grid-col-6">
{% asset img/icon-https.svg class="usa-banner__icon
usa-media-block__img" alt="Https" %}
<img src="{{site.baseurl}}/assets/uswds/img/icon-https.svg" class="usa-banner__icon usa-media-block__img" alt="Https" />
<div class="usa-media-block__body">
<p>
<strong>The site is secure.</strong>
Expand Down
12 changes: 4 additions & 8 deletions _includes/highlights.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<div class="grid-container">
<div class="usa-graphic-list__row grid-row grid-gap">
<div class="usa-media-block tablet:grid-col">
{% asset img/circle-124.png class="usa-media-block__img" alt="Alt text"
%}
<img src="{{site.baseurl}}/assets/uswds/img/circle-124.png" class="usa-media-block__img" alt="Alt text" />
<div class="usa-media-block__body">
<h3 class="usa-graphic-list__heading">Graphic headings can vary.</h3>
<p>
Expand All @@ -19,8 +18,7 @@ <h3 class="usa-graphic-list__heading">Graphic headings can vary.</h3>
</div>
</div>
<div class="usa-media-block tablet:grid-col">
{% asset img/circle-124.png class="usa-media-block__img" alt="Alt text"
%}
<img src="{{site.baseurl}}/assets/uswds/img/circle-124.png" class="usa-media-block__img" alt="Alt text" />
<div class="usa-media-block__body">
<h3 class="usa-graphic-list__heading">Stick to 6 or fewer words.</h3>
<p>
Expand All @@ -33,8 +31,7 @@ <h3 class="usa-graphic-list__heading">Stick to 6 or fewer words.</h3>
</div>
<div class="usa-graphic-list__row grid-row grid-gap">
<div class="usa-media-block tablet:grid-col">
{% asset img/circle-124.png class="usa-media-block__img" alt="Alt text"
%}
<img src="{{site.baseurl}}/assets/uswds/img/circle-124.png" class="usa-media-block__img" alt="Alt text" />
<div class="usa-media-block__body">
<h3 class="usa-graphic-list__heading">
Never highlight anything without a goal.
Expand All @@ -47,8 +44,7 @@ <h3 class="usa-graphic-list__heading">
</div>
</div>
<div class="usa-media-block tablet:grid-col">
{% asset img/circle-124.png class="usa-media-block__img" alt="Alt text"
%}
<img src="{{site.baseurl}}/assets/uswds/img/circle-124.png" class="usa-media-block__img" alt="Alt text" />
<div class="usa-media-block__body">
<h3 class="usa-graphic-list__heading">Could also have 2 or 6.</h3>
<p>
Expand Down
2 changes: 1 addition & 1 deletion _includes/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
>
<div class="usa-nav__inner">
<button class="usa-nav__close">
{% asset img/close.svg alt="close" %}
<img src="{{site.baseurl}}/assets/uswds/img/close.svg" alt="close" />
</button>
<ul class="usa-nav__primary usa-accordion">
{% for nav_item in include.primary_navigation %} {% unless
Expand Down
16 changes: 8 additions & 8 deletions _includes/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
<link
rel="shortcut icon"
type="image/ico"
href="{% asset img/favicons/favicon.ico @path %}"
href="{{site.baseurl}}/assets/uswds/img/favicons/favicon.ico"
/>
<link
rel="icon"
type="image/png"
href="{% asset img/favicons/favicon.png @path %}"
href="{{site.baseurl}}/assets/uswds/img/favicons/favicon.png"
/>
<!-- 192x192, as recommended for Android
http://updates.html5rocks.com/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
Expand All @@ -49,32 +49,32 @@
rel="icon"
type="image/png"
sizes="192x192"
href="{% asset img/favicons/favicon-192.png @path %}"
href="{{site.baseurl}}/assets/uswds/img/favicons/favicon-192.png"
/>
<!-- 57x57 (precomposed) for iPhone 3GS, pre-2011 iPod Touch and older Android devices -->
<link
rel="apple-touch-icon-precomposed"
href="{% asset img/favicons/favicon-57.png @path %}"
href="{{site.baseurl}}/assets/uswds/img/favicons/favicon-57.png"
/>
<!-- 72x72 (precomposed) for 1st generation iPad, iPad 2 and iPad mini -->
<link
rel="apple-touch-icon-precomposed"
sizes="72x72"
href="{% asset img/favicons/favicon-72.png @path %}"
href="{{site.baseurl}}/assets/uswds/img/favicons/favicon-72.png"
/>
<!-- 114x114 (precomposed) for iPhone 4, 4S, 5 and post-2011 iPod Touch -->
<link
rel="apple-touch-icon-precomposed"
sizes="114x114"
href="{% asset img/favicons/favicon-114.png @path %}"
href="{{site.baseurl}}/assets/uswds/img/favicons/favicon-114.png"
/>
<!-- 144x144 (precomposed) for iPad 3rd and 4th generation -->
<link
rel="apple-touch-icon-precomposed"
sizes="144x144"
href="{% asset img/favicons/favicon-144.png @path %}"
href="{{site.baseurl}}/assets/uswds/img/favicons/favicon-144.png"
/>
<!-- CSS
================================================== -->
{% asset styles.css %}
<link type="text/css" href="{{site.baseurl}}/assets/css/styles.css" rel="stylesheet" />
</head>
3 changes: 2 additions & 1 deletion _includes/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
</script>
{% endif %}

{% asset app.js %}
<script src="{{site.baseurl}}/assets/js/app.js"></script>
<script src="{{site.baseurl}}/assets/js/uswds.min.js"></script>

{% if site.searchgov %}
{% if site.searchgov.suggestions == true %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/searchgov/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<label class="usa-sr-only" for="extended-search-field-small">Search small</label>
<input class="usa-input usagov-search-autocomplete" id="extended-search-field-small" type="search" name="query" autocomplete="off">
<button class="usa-button" type="submit">
{% asset "img/usa-icons-bg/search--white.svg" class="usa-search__submit-icon" alt="Search" %}
<img src="{{site.baseurl}}/assets/uswds/img/usa-icons-bg/search--white.svg" class="usa-search__submit-icon" alt="Search" />
</button>
</div>
</form>
Expand Down
15 changes: 15 additions & 0 deletions _plugins/asset-helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'fileutils'

module AssetHelper
def self.process(site, payload)
return if @processed
FileUtils.cp_r('node_modules/uswds/dist/js/', 'assets/', verbose: true)
FileUtils.cp_r('node_modules/uswds/dist/img/', 'assets/uswds/', verbose: true)
FileUtils.cp_r('node_modules/uswds/dist/fonts/', 'assets/uswds/', verbose: true)
@processed = true
end
end

Jekyll::Hooks.register :site, :after_reset do |site, payload|
AssetHelper.process(site, payload)
end
53 changes: 53 additions & 0 deletions _plugins/autoprefixer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
require "autoprefixer-rails"

# adapted from https://github.com/vwochnik/jekyll-autoprefixer
module Autoprefixer
class Autoprefixer
attr_reader :site, :batch

def initialize(site)
@site = site
@batch = Array.new
end

def process()
options = @site.config['autoprefixer'] || {}
@batch.each do |item|
path = item.destination(@site.dest)
File.open(path, 'r+') do |file|
content = file.read
file.truncate(0)
file.rewind
file.write(AutoprefixerRails.process(content, options))
end
end

@batch.clear
end
end
end

module Jekyll
class Site
attr_accessor :autoprefixer
end
end

Jekyll::Hooks.register :site, :after_reset do |site|
# create new autoprefixer instance
site.autoprefixer = Autoprefixer::Autoprefixer.new(site)
end

Jekyll::Hooks.register :site, :post_render do |site|
site.each_site_file do |item|
if site.regenerator.regenerate?(item)
ext = File.extname(item.destination(site.dest))
site.autoprefixer.batch.push(item) if ext == ".css"
end
end
end

Jekyll::Hooks.register :site, :post_write do |site|
site.autoprefixer.process
end

2 changes: 1 addition & 1 deletion _posts/2019-01-14-hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ layout: post
date: January 14, 2019
author: Abraham Lincoln
excerpt: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dapibus interdum pellentesque. Integer eu vehicula elit. Sed cursus magna in dui suscipit rhoncus.
image: hire-us.jpg
image: /assets/img/hire-us.jpg
image_alt_text: Hire Us
---

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ $theme-header-max-width: "desktop";
$theme-header-min-width: "desktop";

// Hero
$theme-hero-image: asset_url("img/hero.png");
$theme-hero-image: "../uswds/img/hero.png";

// Icon List
$theme-icon-list-font-family: "body";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ backend:
media_folder: assets/uploads
public_folder: /images/uploads
publish_mode: editorial_workflow
logo_url: https://federalist.18f.gov/assets/images/federalist-logo.png
logo_url: https://cloud.gov/assets/images/pages/federalist-logo.png

collections:
- label: Posts
Expand Down
2 changes: 1 addition & 1 deletion admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
{% asset netlify-cms.js %}
<script src="{{site.baseurl}}/assets/js/netlify-cms.js"></script>
<link href="/admin/config.yml" type="text/yaml" rel="cms-config-url">
<style>
img[alt="Logo"] {
Expand Down
8 changes: 5 additions & 3 deletions _assets/css/styles.scss → assets/css/styles.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---
// https://jekyllrb.com/docs/assets/
/*
* * * * * ==============================
* * * * * ==============================
Expand All @@ -18,13 +21,12 @@
@import "theme/uswds-theme-components";

// Set correct paths for use with asset pipeline
$theme-font-path: "fonts";
$theme-image-path: "img";
$theme-font-path: "../uswds/fonts";
$theme-image-path: "../uswds/img";

// -------------------------------------
// Import individual USWDS packages...
@import "scss/packages/required";
@import "overrides/all";
@import "scss/packages/global";

@import "scss/packages/uswds-components";
Expand Down
File renamed without changes
File renamed without changes
2 changes: 0 additions & 2 deletions _assets/js/app.js → assets/js/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
//= require js/uswds.min.js

// Add your custom javascript here
console.log("Hi from Federalist");
723 changes: 723 additions & 0 deletions assets/js/netlify-cms.js

Large diffs are not rendered by default.

Empty file added assets/uswds/.gitkeep
Empty file.
8 changes: 4 additions & 4 deletions blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ <h2 class="title">
</div>
</div>
<div>
{% if post.image %} {% asset "{{ post.image }}"
class="tablet:float-left tablet:width-1/3 padding-right-3
padding-top-1" alt="{{ post.image_alt_text }}" %} {% endif %} {{
post.content }} {% comment %} We default to using post.content, but
{% if post.image %}
<img src="{{ site.baseurl }}{{ post.image }}" class="tablet:float-left tablet:width-1/3 padding-right-3 padding-top-1" alt="{{ post.image_alt_text }}" \>
{% endif %}
{{post.content }} {% comment %} We default to using post.content, but
you can also use post.excerpt. If you use excerpt then you have to
make sure the content is on each post header {% endcomment %}
</div>
Expand Down
1,837 changes: 908 additions & 929 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"reset": "npx rimraf .git",
"start": "bundle exec jekyll serve --livereload",
"start-detached": "bundle exec jekyll serve --detach",
"htmlproofer": "bundle exec htmlproofer _site",
"htmlproofer": "bundle exec htmlproofer --no-enforce-https --allow-missing-href _site",
"pa11y-ci:sitemap": "pa11y-ci --sitemap http://localhost:4000/sitemap.xml --sitemap-exclude \"/*.pdf\" --sitemap-exclude \"/admin\""
},
"dependencies": {
Expand Down