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

Fix: limit usage of h1 per page to one #138

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
41 changes: 25 additions & 16 deletions content/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,30 @@
<div class="section grey" id="philosophy">
<div class="container">
<div id="philosophy-text">
<h1 class="small-title center-text mega-margin">#OurPhilosophy</h1>
<h2 class="small-title center-text mega-margin">#OurPhilosophy</h2>
<p class="center-text mega-margin">For anything to grow, you need three things:</p>
</div>
</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">
<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>
<h2 class="center-text medium-margin">Heat</h2>
<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">
<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>
<h2 class="center-text medium-margin">Light</h2>
<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">
<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>
<h2 class="center-text medium-margin">Love</h2>
<p class="center-text">Love means culture and support.<br />Why we care. How we work. Actions that grow the
community.</p>
</div>

</div>
Expand All @@ -39,8 +42,9 @@ <h1 class="center-text medium-margin">Love</h1>
<div class="section" id="explore-projects">
<div class="container">
<div class="explore-text">
<h1 class="small-title mega-margin">Explore Projects</h1>
<p class="mega-margin">Twitter has been built on open source since the beginning. Openness is part of our DNA. The projects you see here were born at Twitter, and patches are always welcome!</p>
<h2 class="small-title mega-margin">Explore Projects</h2>
<p class="mega-margin">Twitter has been built on open source since the beginning. Openness is part of our
DNA. The projects you see here were born at Twitter, and patches are always welcome!</p>
<a href="/projects/" class="Button Button--primary Button--large">View All Projects</a>
</div>
</div>
Expand All @@ -51,11 +55,13 @@ <h1 class="small-title mega-margin">Explore Projects</h1>
<div class="grey section" id="follow-us">
<div class="container">
<div class="center-text" id="open-source-text">
<h1 class="small-title mega-margin open-source-title">Follow Us <a target="_blank"
rel="noopener" href="https://twitter.com/TwitterOSS">@TwitterOSS</a></h1>
<h2 class="small-title mega-margin open-source-title">Follow Us <a target="_blank" rel="noopener"
href="https://twitter.com/TwitterOSS">@TwitterOSS</a></h2>
</div>
<div id="open-source-timeline" class="timeline-cell">
<a class="twitter-timeline" data-height="500" href="https://twitter.com/TwitterOSS?ref_src=twsrc%5Etfw">Tweets by TwitterOSS</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<a class="twitter-timeline" data-height="500"
href="https://twitter.com/TwitterOSS?ref_src=twsrc%5Etfw">Tweets by TwitterOSS</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
</div>
</div>
Expand All @@ -65,12 +71,15 @@ <h1 class="small-title mega-margin open-source-title">Follow Us <a target="_blan
<div class="section" id="career">
<div class="container">
<div id="career-text" class="same-mega-margin">
<h1 class="small-title mega-margin career-title">Join the Flock</h1>
<p class="mega-margin">We are always on the lookout for innovative and creative individuals who are passionate about building a platform where all voices can be heard.</p>
<h2 class="small-title mega-margin career-title">Join the Flock</h2>
<p class="mega-margin">We are always on the lookout for innovative and creative individuals who are
passionate about building a platform where all voices can be heard.</p>
<a href="https://careers.twitter.com" class="Button Button--secondary Button--large">View All Careers</a>
</div>
<div class="timeline-cell">
<a class="twitter-timeline" data-height="500" href="https://twitter.com/TwitterCareers?ref_src=twsrc%5Etfw">Tweets by TwitterCareers</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<a class="twitter-timeline" data-height="500"
href="https://twitter.com/TwitterCareers?ref_src=twsrc%5Etfw">Tweets by TwitterCareers</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
</div>
</div>
</div>
59 changes: 31 additions & 28 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
{{ partial "head.html" . }}
</head>

<body>
{{ block "nav" . }}{{ partial "nav.html" . }}{{ end }}
<head>
{{ partial "head.html" . }}
</head>

{{ block "main" . }}
<!-- Site wrapper -->
<main>
<div class="header">
<div class="container">
<div id="header-text">
{{ block "header" . }}
{{ with .Title }}<h1 class="large-title">{{ . }}</h1>{{ end }}
{{ with .Params.subtitle }}<h1 class="subtitle">{{ . }}</h1>{{ end }}
{{ end }}
</div>
<body>
{{ block "nav" . }}{{ partial "nav.html" . }}{{ end }}

{{ block "main" . }}
<!-- Site wrapper -->
<main>
<div class="header">
<div class="container">
<div id="header-text">
{{ block "header" . }}
{{ with .Title }}<h2 class="large-title">{{ . }}</h2>{{ end }}
{{ with .Params.subtitle }}<h1 class="subtitle">{{ . }}</h1>{{ end }}

Choose a reason for hiding this comment

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

{{ with .Title }}

{{ . }}

{{ end }}
{{ with .Params.subtitle }}

{{ . }}

{{ end }}

I guess Title should make use of h1 rather than subtitle

{{ end }}
</div>
</div>
<div class="content">
{{ block "content" . }}{{ end }}
</div>
</main>
{{ end }}
</div>
<div class="content">
{{ block "content" . }}{{ end }}
</div>
</main>
{{ end }}

{{ block "footer" . }}{{ partial "footer.html" . }}{{ end }}
</body>

{{ block "footer" . }}{{ partial "footer.html" . }}{{ end }}
</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 }}

<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>
</html>
21 changes: 15 additions & 6 deletions layouts/_default/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
<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 />
<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>
<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>
<script>document.getElementById("search-bar").style.display = "flex"</script>
{{ end }}

{{ define "content" }}
Expand All @@ -14,17 +21,19 @@ <h1 class="large-title">Projects</h1>
<div class="container all-projects">
{{ range sort $.Site.Data.projects "pushedAt" "desc" -}}
<div 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>
<h2 class="project-name small-margin">{{ .name }}</h2>
<div class="border small-margin" {{ with .primaryLanguage }} style="border-bottom-color:{{ .color }}" {{ end }}>
</div>
<div class="project-description xsmall-margin">{{ .descriptionHTML | safeHTML }}</div>
<p class="project-language">{{ with .primaryLanguage }}{{ .name }}{{ end }}</p>
<div class="whitespace"></div>
<div class="project-links">
<a href="https://github.com/{{ .nameWithOwner }}" target="_blank" rel="noopener">GitHub</a>
{{ 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>
<a href="https://twitter.github.io/metrics/{{ .nameWithOwner }}/WEEKLY"
class="Button Button--secondary">Metrics</a>
</div>
{{ end }}
</div>
{{ end }}
{{ end }}
12 changes: 6 additions & 6 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{ define "header" }}
<h1 class="subtitle">
<a href="https://twitter.com/TwitterOSS" target="_blank" rel="noopener">@TwitterOSS</a>
</h1>
<h1 class="large-title">Open Source is Happening</h1>
<h2 class="subtitle">
<a href="https://twitter.com/TwitterOSS" target="_blank" rel="noopener">@TwitterOSS</a>
</h2>
<h1 class="large-title ">Open Source is Happening</h1>
{{ end }}

{{ define "content" }}
{{ .Content }}
{{ end }}
{{ .Content }}
{{ end }}