Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Federalist prep #1430

Merged
merged 40 commits into from
Jan 28, 2016
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c8d023c
Adds a baseurl and updates relevant tempaltes and plugins
Dec 30, 2015
d3919aa
Reverts changes to head, config
Dec 30, 2015
e939cfe
Adds baseurl to first md post in the site
Dec 30, 2015
d927c6d
Should link the stylesheet in Federalist
Dec 30, 2015
c0df275
Brings in the other includes with baseurl
Dec 30, 2015
f48e329
Baseurls for common layouts, remove an unused layout
Dec 30, 2015
1c5cd41
Removes a double slash from layout urls
Dec 30, 2015
f25af88
Moar basurls
Dec 30, 2015
7751abe
Base URLs a bunch of pages
Dec 30, 2015
05b0922
Moar pages with baseurls
Dec 30, 2015
afad3a3
Fixes a liquid syntax error.
Dec 30, 2015
47a1423
Merge branch 'staging' into federalist-prep
Dec 30, 2015
516e054
baseurl's Mike's post
Dec 30, 2015
3069151
Fixes the homepage image links
Dec 30, 2015
ed2c7ec
Fixes some double slash problems in the home page
Dec 30, 2015
2d63c55
Super find and replace!
Dec 30, 2015
7d39e91
Trailing slash for nav links
Dec 30, 2015
cba26ac
Fixes the team_photo filter
Dec 30, 2015
93a8da3
Fixes the link to the logo in the photo filter
Dec 30, 2015
110704b
More base urls in posts, eps. html images
Dec 30, 2015
8b85bb5
Merge branch 'staging' into federalist-prep
Jan 6, 2016
f2e7fe6
Fixes the baseurl for the logo font
Jan 6, 2016
1244dd7
Should make travis go greenzo
Jan 6, 2016
f539f9a
Merge branch 'staging' into federalist-prep
Jan 8, 2016
bf6a6bd
Adds baseurl to new posts
Jan 8, 2016
ebb05cf
Removes all HTML posts, converts them to Markdown
Jan 8, 2016
3410a44
Remove the double extension, should fix the permalinks
Jan 8, 2016
daeea5f
Properly baseurls the author and blog links
Jan 8, 2016
5030b68
Adds a trailing slash to pagination links
Jan 8, 2016
9d876c3
Removes some debugging _stuff_
Jan 8, 2016
363f70b
Links to /blog/ instead of /news/
Jan 8, 2016
62bc1da
Baseurl for GSA's logo
Jan 8, 2016
0277aad
Should find a better way to write these plugins some day
Jan 8, 2016
a40c5ea
Finally getting this baseurl thing nailed down
Jan 8, 2016
2af9b81
Finally got the authors plugin patched up
Jan 8, 2016
ecd112a
No more double slashes on related post links
Jan 8, 2016
1d06c71
Scrubs out some html conversion artifacts
Jan 8, 2016
e6891ad
Tag index h1 link fixed
Jan 8, 2016
4b4ee81
trailing slashes for author links
Jan 8, 2016
0364781
Stray a-s
Jan 28, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/flag.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p>
An official website of the United States Government <img alt="US flag
signifying that this is a United States Federal Government website"
src="/assets/images/us_flag_small.png">
src="{{site.baseurl}}/assets/images/us_flag_small.png">
</p>
</div>
</aside>
20 changes: 10 additions & 10 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,46 @@
<div class="container usa-footer-primary-section">
<div class="usa-grid-full">
<div class="usa-width-one-sixth footer-content">
<img src="/assets/images/logo-gsa.png" alt="GSA logo">
<img src="{{ site.baseurl }}/assets/images/logo-gsa.png" alt="GSA logo">
<div>
<a href="https://github.com/18f"><img src="/assets/images/always-be-shipping_orange.png" alt="Always Be Shipping."></a>
<a href="https://github.com/18f"><img src="{{ site.baseurl }}/assets/images/always-be-shipping_orange.png" alt="Always Be Shipping."></a>
</div>
</div>
<div class="usa-width-one-sixth usa-footer-primary-content footer-content" itemscope itemtype="http://schema.org/ContactPoint">
<h1>Work</h1>
<a href="/delivery" title="Delivery">Delivery</a>
<a href="{{ site.baseurl }}/delivery" title="Delivery">Delivery</a>
</br>
<a href="/consulting" title="Consulting">Consulting</a>
<a href="{{ site.baseurl }}/consulting" title="Consulting">Consulting</a>
</br>
<a href="/dashboard" title="Dashboard">Dashboard</a>
<a href="{{ site.baseurl }}/dashboard" title="Dashboard">Dashboard</a>
<br/>
<a href="https://github.com/18F"><i class="fa fa-github" title="18F GitHub page"></i> github.com/18F</a>
</div>
<div class="usa-width-one-sixth usa-footer-primary-content footer-content">
<h1>People</h1>
<a href="/team" title="18F People">Team</a>
<a href="{{ site.baseurl }}/team" title="18F People">Team</a>
</br>
<a href="https://pages.18f.gov/joining-18f/" title="Joining 18F">Join us</a>
</div>
<div class="usa-width-one-sixth usa-footer-primary-content footer-content">
<h1> Resources </h1>
<a href="/blog" title="18F Blog">Blog</a>
<a href="{{ site.baseurl }}/blog" title="18F Blog">Blog</a>
</br>
<a href="https://pages.18f.gov/guides" title="18F Guides">Guides</a>
</br>
<a href="/developer/" title="Developer program">Developer program</a>
<a href="{{ site.baseurl }}/developer/" title="Developer program">Developer program</a>
</div>
<div class="usa-width-one-sixth usa-footer-primary-content footer-content">
<h1>Policies</h1>
<a href="/linking-policy/" title="18F Linking policy">Linking</a>
<a href="{{ site.baseurl }}/linking-policy/" title="18F Linking policy">Linking</a>
<br/>
<a href="https://github.com/18F/open-source-policy" title="18F Open source policy">Open source</a>
<br/>
<a href="https://github.com/18F/18f.gsa.gov/edit/staging/{{ page.path }}" title="Edit this page">Edit this page</a>
</div>
<div class="usa-width-one-sixth usa-footer-primary-content footer-content">
<h1>Contact Us</h1>
<a href="/press" title="Press">Press</a>
<a href="{{ site.baseurl }}/press" title="Press">Press</a>
<br/>
<a href="https://twitter.com/18F"><i class="fa fa-twitter" title="18F Twitter"></i> @18F</a>
</br>
Expand Down
28 changes: 14 additions & 14 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,40 +59,40 @@
<!-- Favicons
================================================== -->
<!-- 128x128 -->
<link rel="shortcut icon" type="image/ico" href="/assets/images/favicons/favicon.ico" />
<link rel="icon" type="image/png" href="/assets/images/favicons/favicon.png" />
<link rel="shortcut icon" type="image/ico" href="{{site.baseurl}}/assets/images/favicons/favicon.ico" />
<link rel="icon" type="image/png" href="{{site.baseurl}}/assets/images/favicons/favicon.png" />

<!-- 192x192, as recommended for Android
http://updates.html5rocks.com/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
-->
<link rel="icon" type="image/png" sizes="192x192" href="/assets/images/favicons/18f-center-192.png" />
<link rel="icon" type="image/png" sizes="192x192" href="{{site.baseurl}}/assets/images/favicons/18f-center-192.png" />

<!-- 57x57 (precomposed) for iPhone 3GS, pre-2011 iPod Touch and older Android devices -->
<link rel="apple-touch-icon-precomposed" href="/assets/images/favicons/18f-center-57.png">
<link rel="apple-touch-icon-precomposed" href="{{site.baseurl}}/assets/images/favicons/18f-center-57.png">
<!-- 72x72 (precomposed) for 1st generation iPad, iPad 2 and iPad mini -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/assets/images/favicons/18f-center-72.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{site.baseurl}}/assets/images/favicons/18f-center-72.png">
<!-- 114x114 (precomposed) for iPhone 4, 4S, 5 and post-2011 iPod Touch -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/assets/images/favicons/18f-center-114.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="{{site.baseurl}}/assets/images/favicons/18f-center-114.png">
<!-- 144x144 (precomposed) for iPad 3rd and 4th generation -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/assets/images/favicons/18f-center-144.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{site.baseurl}}/assets/images/favicons/18f-center-144.png">

<!-- Mobile "theme" -->
<meta name="theme-color" content="#1188ff" />

<!-- CSS
================================================== -->
<link href="/assets/css/google-fonts.css" rel="stylesheet">
<link href="/assets/css/font-awesome.min.css" rel="stylesheet">
<link href="/assets/css/fonts.css" rel="stylesheet">
<link href="/assets/css/normalize.css" rel="stylesheet">
<link href="/assets/css/styles.css" rel="stylesheet">
<link href="/assets/css/pygments-theme.css" rel="stylesheet">
<link href="{{site.baseurl}}/assets/css/google-fonts.css" rel="stylesheet">
<link href="{{site.baseurl}}/assets/css/font-awesome.min.css" rel="stylesheet">
<link href="{{site.baseurl}}/assets/css/fonts.css" rel="stylesheet">
<link href="{{site.baseurl}}/assets/css/normalize.css" rel="stylesheet">
<link href="{{site.baseurl}}/assets/css/styles.css" rel="stylesheet">
<link href="{{site.baseurl}}/assets/css/pygments-theme.css" rel="stylesheet">

<!-- IE
================================================== -->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<link href="/assets/css/ie8/ie.css" rel="stylesheet">
<link href="{{site.baseurl}}/assets/css/ie8/ie.css" rel="stylesheet">
<![endif]-->

{% include ascii.html %}
Expand Down
4 changes: 2 additions & 2 deletions _includes/logo.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="bare-logo" role="banner" itemscope itemtype="http://schema.org/WPHeader">
<a href="/">
<a href="{{site.baseurl}}/">
<i class="icon-18f-logo"><p style="display:none;">18F</p></i>
</a>
{% if page.layout == "profile" %}
<nav class="back"><a href="/team#{{ page.name }}"><i class="fa fa-chevron-left"></i><i class="fa fa-chevron-left"></i> back to all people</a></nav>
<nav class="back"><a href="{{site.baseurl}}/team#{{ page.name }}"><i class="fa fa-chevron-left"></i><i class="fa fa-chevron-left"></i> back to all people</a></nav>
{% endif %}
</div>
12 changes: 6 additions & 6 deletions _includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<a href="javascript:;" class="toggle">Menu</a>
<a href="javascript:;" class="toggle hidden">Close</a>
<ul class="hidden global-nav-links">
<li class="global-nav-link"><a href="/dashboard">Work</a></li>
<li class="global-nav-link"><a href="/team">People</a></li>
<li class="global-nav-link"><a href="/consulting">Consulting</a></li>
<li class="global-nav-link"><a href="{{site.baseurl}}/dashboard">Work</a></li>
<li class="global-nav-link"><a href="{{site.baseurl}}/team/">People</a></li>
<li class="global-nav-link"><a href="{{site.baseurl}}/consulting/">Consulting</a></li>
<li class="global-nav-link"><a href="https://pages.18f.gov/joining-18f/">Join</a></li>
</ul>
<span class="sep">|</span>
<ul class="hidden global-nav-links">
<li class="global-nav-link"><a href="/blog">Blog</a></li>
<li class="global-nav-link"><a href="/#newsletter">Newsletter</a></li>
<li class="global-nav-link"><a href="/">Home</a></li>
<li class="global-nav-link"><a href="{{site.baseurl}}/blog/">Blog</a></li>
<li class="global-nav-link"><a href="{{site.baseurl}}/#newsletter">Newsletter</a></li>
<li class="global-nav-link"><a href="{{site.baseurl}}/">Home</a></li>
</ul>
</nav>
10 changes: 5 additions & 5 deletions _includes/scripts.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!-- JS
================================================== -->
<script src="/assets/js/jquery-2.1.1.min.js"></script>
<script src="/assets/js/responsiveslides.min.js"></script>
<script src="{{site.baseurl}}/assets/js/jquery-2.1.1.min.js"></script>
<script src="{{site.baseurl}}/assets/js/responsiveslides.min.js"></script>


<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if IE 9 ]>
<script src="/assets/js/ie8/html5shiv.js"></script>
<script src="/assets/js/ie8/respond.js"></script>
<script src="{{site.baseurl}}/assets/js/ie8/html5shiv.js"></script>
<script src="{{site.baseurl}}/assets/js/ie8/respond.js"></script>
-->

<!--
Expand All @@ -30,7 +30,7 @@
</script>

<!-- Browser warning, console message -->
<script src="/assets/js/18f.js"></script>
<script src="{{site.baseurl}}/assets/js/18f.js"></script>

<!-- Google Analytics -->
<script>
Expand Down
39 changes: 0 additions & 39 deletions _layouts/bare_pif.html

This file was deleted.

2 changes: 1 addition & 1 deletion _layouts/category_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1 class="category">
</div>

<h2>
<a href="{{ post.url }}">{{ post.title }}</a>
<a a href="{{ site.baseurl }}{{ post.url }} }}">{{ post.title }}</a>
</h2>

{{post.excerpt}}
Expand Down
8 changes: 4 additions & 4 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

<section class="blog-posting" itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">

<h1><a href="{{ page.url }}">{{ page.title }}</a></h1>
<h1><a href="{{site.baseurl}}{{ page.url }}">{{ page.title }}</a></h1>

<time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%B %-d, %Y" }} </time>

<p>
Tagged /
<span class="blog-tags" itemprop="keywords">
{% for tag in page.tags %}
<a href="/{{site.tag_dir}}/{{ tag | slugify }}/">{{ tag }}</a>
<a href="{{ site.baseurl }}/{{ site.tag_dir }}/{{ tag | slugify }}/">{{ tag }}</a>
/
{% endfor %}
</span>
Expand All @@ -36,15 +36,15 @@ <h1><a href="{{ page.url }}">{{ page.title }}</a></h1>
<section class="blog-pagination">
<div>
{% if page.previous %}
<a href="{{ page.previous.url }}">
<a href="{{ site.baseurl }}{{ page.previous.url }}">
<h1><i class="fa fa-chevron-left"></i> Previous Post</h1>
<p>&ldquo;{{ page.previous.title }}&rdquo;</p>
</a>
{% endif %}
</div>
<div>
{% if page.next %}
<a href="{{ page.next.url }}">
<a href="{{ site.baseurl }}{{ page.next.url }}">
<h1>Next Post <i class="fa fa-chevron-right"></i></h1>
<p>&ldquo;{{ page.next.title }}&rdquo;</p>
</a>
Expand Down
6 changes: 3 additions & 3 deletions _layouts/tag_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1>{{ numberof }} {% if numberof == 1 %}post{% else %}posts{% endif %} tagged {
{% for post in page.posts %}
<article class="tag-index">
<div class="blog-title">
<h1 itemprop="headline" class="h4"><a class="link-alt" href="{{ post.url }}">{{ post.title }}</a></h1>
<h1 itemprop="headline" class="h4"><a class="link-alt" a href="{{ site.baseurl }}/{{ post.url }}">{{ post.title }}</a></h1>
</div>

<div class="blog-meta">
Expand All @@ -24,7 +24,7 @@ <h1 itemprop="headline" class="h4"><a class="link-alt" href="{{ post.url }}">{{
Tagged /
<span class="blog-tags" itemprop="keywords">
{% for tag in post.tags %}
<a href="/{{ site.tag_dir }}/{{ tag | slugify }}/">{{ tag }}</a>
<a href="{{site.baseurl}}/{{ site.tag_dir }}/{{ tag | slugify }}/">{{ tag }}</a>
/
{% endfor %}
</span>
Expand All @@ -37,7 +37,7 @@ <h1 itemprop="headline" class="h4"><a class="link-alt" href="{{ post.url }}">{{
</div>

<div class="blog-continue">
<p><a href="{{ post.url }}">Continue reading this post...</a></p>
<p><a a href="{{ site.baseurl }}{{ post.url }}">Continue reading this post...</a></p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extraneous a attribute in the anchor tag

</div>
</article>

Expand Down
6 changes: 3 additions & 3 deletions _layouts/tag_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1>{{ page.title }}</h1>

{% if tag_number[0] == tag %}

{{tag_number[1] | size }}
{{tag_number[1] | size }}
<!-- <p> {{tag | size }} </p> -->

{% endif %}
Expand All @@ -25,9 +25,9 @@ <h1>{{ page.title }}</h1>

{% endcapture %}

<p> <a href="/tags/{{tag | slugify }}" >{{tag}} </a> — {{count}} </p>
<p> <a href="{{ site.baseurl }}/tags/{{tag | slugify }}/" >{{tag}} </a> — {{count}} </p>



<!-- <p> {{tag | size }} </p> -->


Expand Down
16 changes: 9 additions & 7 deletions _plugins/author.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class AuthorTag < Liquid::Tag
def initialize(tag_name, author, tokens)
super
@author = author.strip
@baseurl = Jekyll.sites[0].config['baseurl']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

end

def render(context)
Expand All @@ -14,7 +15,6 @@ def render(context)

if teammate
"<span class=\"author #{teammate['name']}\">" +
# "<img src=\"/assets/images/team/#{teammate['name']}.jpg\" />" +
"#{teammate['full_name']}" +
"</span>"
else
Expand All @@ -39,7 +39,7 @@ def render(context)
full_name = context.environments[0]['page']['full_name']
first_name = context.environments[0]['page']['first_name']
posts = context.environments[0]['site']['posts']
site_url = context.environments[0]['site']['url']
site_url = context.environments[0]['site']['baseurl']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

for p in posts
if p.data['authors'] and p.data['authors'].include? author
authored.push(p)
Expand All @@ -61,10 +61,11 @@ def with_pic(input)
name = input[0]
info = input[1]
image = File.join 'assets', 'images', 'team', "#{name}.jpg"
baseurl = Jekyll.sites[0].config['baseurl']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless assignment to variable - baseurl.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

if File.exist?(File.join(Jekyll.sites[0].config['source'], image))
"<img class='img-circle team-img bio-clip' src='/#{image}' alt='18F team member #{info['full_name']}'>"
"<img class='img-circle team-img bio-clip' src='#{@baseurl}/#{image}' alt='18F team member #{info['full_name']}'>"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [122/80]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [122/80]

else
"<img class='img-circle team-img bio-clip' src='/assets/images/18f.png' alt='18F logo'>"
"<img class='img-circle team-img bio-clip' src='#{@baseurl}/assets/images/18f.png' alt='18F logo'>"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [107/80]

end
end
# lookup filter
Expand Down Expand Up @@ -97,15 +98,16 @@ def lookup(input, args)
def team_link(input)
team = Jekyll.sites[0].collections['team'].docs
index = team.find_index {|x| x.data['name'] == input}
baseurl = Jekyll.sites[0].config['baseurl']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless assignment to variable - baseurl.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

unless index.nil?
url = "/team/#{team[index].data['name']}"
url = "#{baseurl}/team/#{team[index].data['name']}"
full_name = team[index].data['full_name']
string = "<a href=#{url}>#{full_name}</a>"
string = "<a href='#{url}'>#{full_name}</a>"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless assignment to variable - string.

else
url = lookup(input, "authors, url")
name = lookup(input, "authors, full_name")
if url
string = "<a href=#{url}>#{name}</a>"
string = "<a href='#{url}'>#{name}</a>"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless assignment to variable - string.

else
string = name
end
Expand Down
3 changes: 2 additions & 1 deletion _plugins/related_posts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class RelGenerator < Liquid::Tag
def initialize(related_posts, text, tokens)
super
@params = text.split(' ')
@baseurl = Jekyll.sites[0].config['baseurl']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

end

# Gets all posts from the site by tag and adds those that match the tags on
Expand Down Expand Up @@ -38,7 +39,7 @@ def list_posts(other_posts)
internal = @params[1] || "li"
if other_posts
related_posts = "<#{external}>"
other_posts.flatten.map { |post| related_posts << "<#{internal}><a href='#{post.url}' class='related_posts'>&ldquo;#{post.data['title']}&rdquo;</a></#{internal}>" }
other_posts.flatten.map { |post| related_posts << "<#{internal}><a href='#{@baseurl}#{post.url}' class='related_posts'>&ldquo;#{post.data['title']}&rdquo;</a></#{internal}>" }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [183/80]

related_posts << "</#{external}"
else
related_posts = "<p>No related posts</p>"
Expand Down
Loading