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

Get better Lighthouse score in a11y and performance #78

Merged
merged 4 commits into from
Dec 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 lib/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const rootURL = process.env.URL
const competitionOpen = new Date(dates.competition_open_starts)
const noClaims = new Date(dates.competition_open_ends)

ncp('static', 'out/static', err => {
ncp('static', 'out', err => {
if (err) {
console.error(err)
}
Expand Down
14 changes: 7 additions & 7 deletions lib/scrape.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ const GCI_API_BASE = 'https://codein.withgoogle.com/api'
const MIN_SEARCH_SCORE = 10

const CHAT_IMAGES = {
GITTER: 'static/images/logos/gitter.png',
SLACK: 'static/images/logos/slack.png',
ZULIP: 'static/images/logos/zulip.png',
ROCKET: 'static/images/logos/rocket.png',
TELEGRAM: 'static/images/logos/telegram.png',
IRC: 'static/images/logos/irc.png',
OTHER: 'static/images/chat.png',
GITTER: 'images/logos/gitter.png',
SLACK: 'images/logos/slack.png',
ZULIP: 'images/logos/zulip.png',
ROCKET: 'images/logos/rocket.png',
TELEGRAM: 'images/logos/telegram.png',
IRC: 'images/logos/irc.png',
OTHER: 'images/chat.png',
}

const GH_API_OPTIONS = {
Expand Down
Binary file added static/favicon.ico
Binary file not shown.
Binary file removed static/images/logos/gci.jpg
Binary file not shown.
Binary file added static/images/logos/gci.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/logos/gitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/logos/global.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/logos/gplus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/logos/irc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/logos/rocket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/logos/slack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/logos/telegram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/logos/twitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/logos/zulip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 25 additions & 23 deletions templates/main.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GCI Leaders</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="GCI Current Leaders">
<meta property="og:description" content="Google Code-in 2017 Current Leaders">
<meta property="og:image" content="{{{rootURL}}}/static/images/GCI-logo.jpg">
<link rel="stylesheet" href="static/css/main.css">
<meta property="og:image" content="{{{rootURL}}}/images/GCI-logo.jpg">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div>
<a href="http://codein.withgoogle.com">
<img class="gci-logo" src="static/images/logos/gci.jpg">
<img class="gci-logo" src="images/logos/gci.png" alt="Code-In logo">
</a>
<h1>Google Code-in 2017 Current Leaders</h1>
</div>
Expand All @@ -36,7 +36,7 @@ <h1>Google Code-in 2017 Current Leaders</h1>
<div class="org">
<div class="org-image">
<a href="https://codein.withgoogle.com/organizations/{{slug}}">
<img class="org-image" src="https://{{image_url}}">
<img class="org-image" alt="{{name}} logo" src="https://{{image_url}}">
</a>
</div>
<div class="org-info">
Expand All @@ -51,42 +51,43 @@ <h3>
<img
src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Mark.png"
class="github"
alt="Find them on GitHub"
/>
</a>
{{/github}}
{{#mailing_list}}
<a href="{{mailing_list}}">
<img src="static/images/mail.png" class="chat" />
<img src="images/mail.png" class="chat" alt="Join their mailing list" />
</a>
{{/mailing_list}}
{{#chat}}
<a href="{{chat.url}}">
<img src="{{chat.image}}" class="chat" />
<img src="{{chat.image}}" class="chat" alt="Join their chat" />
</a>
{{/chat}}
{{#twitter_url}}
<a href="{{twitter_url}}">
<img src="static/images/logos/twitter.png" class="chat" />
<img src="images/logos/twitter.png" class="chat" alt="Find them on Twitter" />
</a>
{{/twitter_url}}
{{#gplus_url}}
<a href="{{gplus_url}}">
<img src="static/images/logos/gplus.png" class="chat" />
<img src="images/logos/gplus.png" class="chat" alt="Find them on Google+" />
</a>
{{/gplus_url}}
{{#website_url}}
<a href="{{website_url}}">
<img src="static/images/logos/global.png" class="chat" />
<img src="images/logos/global.png" class="chat" alt="Visit their website" />
</a>
{{/website_url}}
{{#wikipedia_urls.en}}
<a href="{{wikipedia_urls.en}}">
<img src="static/images/logos/wikipedia.png" class="chat" />
<img src="images/logos/wikipedia.png" class="chat" alt="Read about them on Wikipedia" />
</a>
{{/wikipedia_urls.en}}
{{#wikidata_url}}
<a href="{{wikidata_url}}">
<img src="static/images/logos/wikidata.png" class="chat" />
<img src="images/logos/wikidata.png" class="chat" alt="See them on Wikidata" />
</a>
{{/wikidata_url}}
<div class="org-leaderboard">
Expand Down Expand Up @@ -116,7 +117,7 @@ <h3>Organization(s) with no listed leaders</h3>
<div class="org">
<div class="org-image">
<a href="https://codein.withgoogle.com/organizations/{{slug}}">
<img class="org-image" src="https://{{image_url}}">
<img class="org-image" src="https://{{image_url}}" alt="{{name}} logo">
</a>
</div>
<div class="org-info">
Expand All @@ -131,42 +132,43 @@ <h3>
<img
src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Mark.png"
class="github"
alt="Find them on GitHub"
/>
</a>
{{/github}}
{{#mailing_list}}
<a href="{{mailing_list}}">
<img src="static/images/mail.png" class="chat" />
<img src="images/mail.png" class="chat" alt="Join their mailing list" />
</a>
{{/mailing_list}}
{{#chat}}
<a href="{{chat.url}}">
<img src="{{chat.image}}" class="chat" />
<img src="{{chat.image}}" class="chat" alt="Join their chat" />
</a>
{{/chat}}
{{#twitter_url}}
<a href="{{twitter_url}}">
<img src="static/images/logos/twitter.png" class="chat" />
<img src="images/logos/twitter.png" class="chat" alt="Find them on Twitter" />
</a>
{{/twitter_url}}
{{#gplus_url}}
<a href="{{gplus_url}}">
<img src="static/images/logos/gplus.png" class="chat" />
<img src="images/logos/gplus.png" class="chat" alt="Find them on Google+" />
</a>
{{/gplus_url}}
{{#website_url}}
<a href="{{website_url}}">
<img src="static/images/logos/global.png" class="chat" />
<img src="images/logos/global.png" class="chat" alt="Visit their website" />
</a>
{{/website_url}}
{{#wikipedia_urls.en}}
<a href="{{wikipedia_urls.en}}">
<img src="static/images/logos/wikipedia.png" class="chat" />
<img src="images/logos/wikipedia.png" class="chat" alt="Read about them on Wikipedia" />
</a>
{{/wikipedia_urls.en}}
{{#wikidata_url}}
<a href="{{wikidata_url}}">
<img src="static/images/logos/wikidata.png" class="chat" />
<img src="images/logos/wikidata.png" class="chat" alt="See them on Wikidata" />
</a>
{{/wikidata_url}}
</div>
Expand All @@ -182,7 +184,7 @@ <h3>
<footer>
<small>Google Code-in and the Google Code-in logo are trademarks of Google Inc.</small>
</footer>
<script src="static/js/app.js"></script>
<script src="static/js/twitter.js"></script>
<script src="js/app.js"></script>
<script src="js/twitter.js"></script>
</body>
</html>