Skip to content

Commit

Permalink
yir: rename mobile-heading to inline-heading
Browse files Browse the repository at this point in the history
  • Loading branch information
willnorris committed Oct 30, 2021
1 parent 688c655 commit b74b5be
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
16 changes: 8 additions & 8 deletions assets/css/year-in-review.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ p {


/* All content */
.mobile-heading, .YIR-header, table, .locations, .metric-wrapper, .YIR-tweet-wrapper {
.inline-heading, .YIR-header, table, .locations, .metric-wrapper, .YIR-tweet-wrapper {
width: var(--content-width);
}

.mobile-heading {
.inline-heading {
padding-bottom: var(--feather-grid-mega);
}

.mobile-heading h1 {
.inline-heading h1 {
font-size: var(--font-size-xxjumbo);
line-height: var(--line-height-xxjumbo);
padding-bottom: var(--feather-grid-xsmall);
Expand Down Expand Up @@ -277,11 +277,11 @@ h1#YIR-heading-text, .YIR-subheading {
}
}

#YIR-header-mobile-heading {
#YIR-header-inline-heading {
padding: 0;
}

#YIR-header-mobile-heading p {
#YIR-header-inline-heading p {
padding: 0;
padding-top: var(--feather-grid-large);
}
Expand Down Expand Up @@ -521,7 +521,7 @@ span.metric-name {
display: none;
}

.mobile-heading {
.inline-heading {
display: block;
}

Expand Down Expand Up @@ -581,7 +581,7 @@ span.metric-name {

/* Less than content-width + 2 * feather-grid-large */
@media (max-width: 568px) {
.mobile-heading, .YIR-header, table, .locations, .metric-wrapper, .YIR-tweet-wrapper {
.inline-heading, .YIR-header, table, .locations, .metric-wrapper, .YIR-tweet-wrapper {
width: 100%;
}

Expand All @@ -590,7 +590,7 @@ span.metric-name {
}

/* Decrease font sizes */
.mobile-heading h1 {
.inline-heading h1 {
font-size: var(--font-size-mini-jumbo);
line-height: var(--line-height-mini-jumbo);
}
Expand Down
21 changes: 7 additions & 14 deletions layouts/_default/year-in-review.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,15 @@ <h1 id="YIR-heading-text">Year in Review</h1>
<h1 class="YIR-subheading" id="type">An overview of the past 12 months of activity on Twitter’s Open Source projects.</h1>
</div>

<!-- Only visible in mobile -->
<div class="mobile-heading" id="YIR-header-mobile-heading">
<div class="inline-heading" id="YIR-header-inline-heading">
<p class="section-description">This webpage updates weekly and provides a sliding window into the previous 12 months. Patches are always welcome.</p>
</div>
</div>
</section>

<section id="top10">
<div class="YIR-container-section">
<!-- Only visible in mobile -->
<div class="mobile-heading">
<div class="inline-heading">
<h1>Top 10 repos</h1>
<p class="section-description">These are our top 10 GitHub repositories, ranked by total commit counts.</p>
</div>
Expand Down Expand Up @@ -124,8 +122,7 @@ <h1>Top 10 repos</h1>

<section id="locations">
<div class="YIR-container-section">
<!-- Only visible in mobile -->
<div class="mobile-heading">
<div class="inline-heading">
<h1 class="large-title">Locations</h1>
<p class="section-description">Our contributors are located all around the world. This list is based on self reported locations from our contributors’ GitHub profiles.</p>
</div>
Expand All @@ -144,8 +141,7 @@ <h1 class="large-title">Locations</h1>

<section id="heat">
<div class="YIR-container-section">
<!-- Only visible in mobile -->
<div class="mobile-heading">
<div class="inline-heading">
<h1>Heat metrics</h1>
<p class="section-description">Heat means work. We measure heat by the number and frequency of commits and committers across our repos.</p>
</div>
Expand Down Expand Up @@ -183,8 +179,7 @@ <h1>Heat metrics</h1>

<section id="light">
<div class="YIR-container-section">
<!-- Only visible in mobile -->
<div class="mobile-heading">
<div class="inline-heading">
<h1>Light metrics</h1>
<p class="section-description">Light means visibility. We measure visibility by number of watchers subscribed to updates, and number of people who have favorited our projects.</p>
</div>
Expand Down Expand Up @@ -225,8 +220,7 @@ <h1>Light metrics</h1>

<section id="love">
<div class="YIR-container-section">
<!-- Only visible in mobile -->
<div class="mobile-heading">
<div class="inline-heading">
<h1>Love metrics</h1>
<p class="section-description">Love means culture and support. We measure love by the number of users who have copied our projects and contributed changes back upstream.</p>
</div>
Expand Down Expand Up @@ -265,8 +259,7 @@ <h1>Love metrics</h1>

<section id="follow">
<div class="YIR-container-section">
<!-- Only visible in mobile -->
<div class="mobile-heading">
<div class="inline-heading">
<h1>@TwitterOSS</h1>
<p class="section-description">Making it simple to trust, ship, and grow Open Source at Twitter and beyond. Follow @TwitterOSS to stay updated!</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion static/js/year-in-review.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (window.matchMedia("(prefers-reduced-motion: no-preference)").matches) {
});

// hide inline headings
for (element of document.getElementsByClassName("mobile-heading")) {
for (element of document.getElementsByClassName("inline-heading")) {
element.classList.add("hide")
}

Expand Down

0 comments on commit b74b5be

Please sign in to comment.