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

Minor Performance and Accessibility Enhancements for Twitter Open-Source Website 🌠 #181

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions content/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ <h1 class="small-title center-text mega-margin">#OurPhilosophy</h1>
</div>
<div class="small-container" id="emoji-cards">
<div class="emoji-card">
<img src="assets/fire.svg" alt="Fire emoji" class="emoji-img center-margin large-margin">
<img src="assets/fire.svg" alt="Fire emoji" class="emoji-img center-margin large-margin" decoding="async">
<h1 class="center-text medium-margin">Heat</h1>
<p class="center-text">Heat means work.<br/>Upstream contributions, bug fixes, designs, docs--the rigorous work that drives the community.</p>
</div>

<div class="emoji-card">
<img src="assets/sun.svg" alt="Sun emoji" class="emoji-img center-margin large-margin">
<img src="assets/sun.svg" alt="Sun emoji" class="emoji-img center-margin large-margin" decoding="async">
<h1 class="center-text medium-margin">Light</h1>
<p class="center-text">Light means visibility. <br/>For the projects, contributions, opportunities, challenges, and people that impact the community.</p>
</div>

<div class="emoji-card">
<img src="assets/heart.svg" alt="Pride heart emoji" class="emoji-img center-margin large-margin">
<img src="assets/heart.svg" alt="Pride heart emoji" class="emoji-img center-margin large-margin" decoding="async">
<h1 class="center-text medium-margin">Love</h1>
<p class="center-text">Love means culture and support.<br/>Why we care. How we work. Actions that grow the community.</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<html lang="en" class="no-js">
<head>
{{ partial "head.html" . }}
<script defer src="{{ "js/main.js" | relURL }}"></script>
{{ with .Params.custom_js }}<script defer src="{{ printf "js/%s" . | relURL }}"></script>{{ end }}
</head>

<body>
Expand Down Expand Up @@ -30,7 +32,5 @@
</body>

<script>document.getElementsByTagName("html")[0].classList.remove("no-js")</script>
<script src="{{ "js/main.js" | relURL }}"></script>
{{ with .Params.custom_js }}<script src="{{ printf "js/%s" . | relURL }}"></script>{{ end }}
{{ if hugo.IsProduction }}{{ partial "ga.html" . }}{{ end }}
</html>
2 changes: 1 addition & 1 deletion layouts/_default/memberships.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{ range $.Site.Data.memberships }}
<div class="sizeFull membership" id="{{ .id }}">
<!-- Logo -->
<img src="{{ .logo }}" class="membership-logo">
<img src="{{ .logo }}" class="membership-logo" decoding="async">

<div class="name-handle">
<!-- Name -->
Expand Down
10 changes: 5 additions & 5 deletions layouts/_default/projects.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ define "header" }}
<h1 class="large-title">Projects</h1>
<div id="search-bar" style="display: none;">
<input id="search-box" type="text" name="search" placeholder="Search Projects" autocomplete="off" autofocus />
<input id="search-box" type="search" name="search" placeholder="Search Projects" autocomplete="off" autofocus />
<svg id="search-icon" viewBox="0 0 24 24" aria-hidden="true" class="r-14j79pv r-4qtqp9 r-yyyyoo r-1xvli5t r-dnmrzs r-4wgw6l r-f727ji r-bnwqim r-1plcrui r-lrvibr"><g><path d="M21.53 20.47l-3.66-3.66C19.195 15.24 20 13.214 20 11c0-4.97-4.03-9-9-9s-9 4.03-9 9 4.03 9 9 9c2.215 0 4.24-.804 5.808-2.13l3.66 3.66c.147.146.34.22.53.22s.385-.073.53-.22c.295-.293.295-.767.002-1.06zM3.5 11c0-4.135 3.365-7.5 7.5-7.5s7.5 3.365 7.5 7.5-3.365 7.5-7.5 7.5-7.5-3.365-7.5-7.5z"></path></g></svg>
</div>
<script>document.getElementById("search-bar").style.display="flex"</script>
Expand All @@ -11,9 +11,9 @@ <h1 class="large-title">Projects</h1>
<!-- Container for results text -->
<div id="results" class="container hide">Found <span class="count"></span> results for <span class="query"></span></div>

<div class="container all-projects">
<section class="container all-projects">
{{ range sort $.Site.Data.projects "pushedAt" "desc" -}}
<div class="project-card" id="{{ .nameWithOwner }}">
<article class="project-card" id="{{ .nameWithOwner }}">
<h1 class="project-name small-margin">{{ .name }}</h1>
<div class="border small-margin"{{ with .primaryLanguage }} style="border-bottom-color:{{ .color }}"{{ end }}></div>
<div class="project-description xsmall-margin">{{ .descriptionHTML | safeHTML }}</div>
Expand All @@ -24,7 +24,7 @@ <h1 class="project-name small-margin">{{ .name }}</h1>
{{ with .homepageUrl }}<a href="{{ . }}" target="_blank" rel="noopener">Website</a>{{ end }}
</div>
<a href="https://twitter.github.io/metrics/{{ .nameWithOwner }}/WEEKLY" class="Button Button--secondary">Metrics</a>
</div>
</article>
{{ end }}
</div>
</section>
{{ end }}
2 changes: 1 addition & 1 deletion layouts/_default/year-in-review.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a class="YIRnav-YIR-link" href="#">Year in Review</a>
</a>
</div>
<a id="menu-toggle" href="#" onclick="document.getElementById('nav-menu').classList.toggle('active'); return false;">
<a id="menu-toggle" href="#" onclick="document.getElementById('nav-menu').classList.toggle('active'); return false;" aria-label="Toggle menu">
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#ffffff"><path d="M0 0h24v24H0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>
</a>

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Open Source
</a>
</div>
<a id="menu-toggle" href="#" onclick="document.getElementById('nav-menu').classList.toggle('active'); return false;">
<a id="menu-toggle" href="#" onclick="document.getElementById('nav-menu').classList.toggle('active'); return false;" aria-label="Toggle menu">
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#ffffff"><path d="M0 0h24v24H0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>
</a>
<ul id="nav-menu">
Expand Down