Skip to content

Commit

Permalink
Include header/footer components across layout types (github#18377)
Browse files Browse the repository at this point in the history
* Flesh out our layouts to include header/footer components across layout types

* Update contribution.html

* Remove extra line that we don't need when we have the gray section
  • Loading branch information
heiskr authored Mar 25, 2021
1 parent ddad608 commit a017660
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 14 deletions.
7 changes: 6 additions & 1 deletion includes/contribution.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
<div class="f5 contribution">
<h2 class="f4">{% data ui.contribution_cta.title %}</h2>
<p class="text-gray f6">{% data ui.contribution_cta.body %}</p>
<a class="btn btn-outline" href={{ "https://github.com/github/docs/edit/main/content/" | append: page.relativePath }}>
{% if page.relativePath %}
{% assign contribution_href = "https://github.com/github/docs/edit/main/content/" | append: page.relativePath %}
{% else %}
{% assign contribution_href = "https://github.com/github/docs" %}
{% endif %}
<a class="btn btn-outline" href="{{ contribution_href }}">
{% octicon "git-pull-request" height="16" %}
{% data ui.contribution_cta.button %}
</a>
Expand Down
6 changes: 5 additions & 1 deletion layouts/enterprise-server-releases.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
{% include sidebar %}

<main class="width-full">
{% include header %}
{% include deprecation-banner %}

<main class="container-xl px-3 px-md-6 my-4 my-lg-4 d-xl-flex">
<article class="markdown-body width-full">
<div class="d-lg-flex flex-justify-between"></div>
Expand Down Expand Up @@ -52,8 +55,9 @@ <h2 id="deprecated-on-developer.github.com"><a href="#deprecated-on-developer.gi
{% for version in enterpriseServerReleases.deprecatedReleasesOnDeveloperSite %}
<li><a href="https://developer.github.com/enterprise/{{version}}">Enterprise Server {{version}}</a></li>
{% endfor %}
{% include support %}
{% include support-section %}
{% include small-footer %}
{% include scroll-button %}
</div>
</div>
</article>
Expand Down
4 changes: 3 additions & 1 deletion layouts/error-404.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!doctype html>
{% assign error = '404' %}
<html lang="{{currentLanguage}}">
{% include head %}
Expand Down Expand Up @@ -31,8 +32,9 @@ <h3 class="mb-3">{% data ui.search.need_help %}</h3>
</div>

<!-- {{ content }} -->
{% include support %}
{% include support-section %}
{% include small-footer %}
{% include scroll-button %}
</main>
</body>
</html>
4 changes: 3 additions & 1 deletion layouts/error-500.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!doctype html>
<html lang="{{currentLanguage}}">
{% include head %}
<body>
Expand All @@ -21,7 +22,8 @@ <h1>{% data ui.errors.oops %}</h1>
</div>

<!-- {{ content }} -->
{% include support %}
{% include support-section %}
{% include small-footer %}
{% include scroll-button %}
</body>
</html>
4 changes: 3 additions & 1 deletion layouts/graphql-explorer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<main class="width-full">
{% include header %}
{% include deprecation-banner %}

<main class="container-xl px-3 px-md-6 my-4 my-lg-4 d-xl-flex">
<article class="markdown-body width-full">
Expand All @@ -32,8 +33,9 @@ <h1 class="border-bottom-0">{{ page.title }}</h1>
</article>
</main>

{% include support %}
{% include support-section %}
{% include small-footer %}
{% include scroll-button %}
</main>
</body>
</html>
7 changes: 4 additions & 3 deletions layouts/product-landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<main class="width-full">
{% include header %}
{% include deprecation-banner %}

<div class="container-xl px-3 px-md-6 pt-3 pb-2">
<header class="d-lg-flex gutter-lg mb-6">
Expand Down Expand Up @@ -142,9 +143,9 @@ <h2 class="font-mktg h1 mb-2">Guides</h2>
{% endif %}
</div>

<div class="border-top">
{% include small-footer %}
</div>
{% include support-section %}
{% include small-footer %}
{% include scroll-button %}
</main>
</body>
</html>
7 changes: 4 additions & 3 deletions layouts/product-sublanding.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<main class="width-full overflow-auto">
{% include header %}
{% include deprecation-banner %}

<div class="bg-gray">
<div class="container-xl px-3 px-md-6 pt-3 pb-2">
Expand Down Expand Up @@ -108,9 +109,9 @@ <h5 class="flex-auto pr-2">{{ guide.title }}</h5>
</div>
{% endif %}

<div class="border-top">
{% include small-footer %}
</div>
{% include support-section %}
{% include small-footer %}
{% include scroll-button %}
</main>
</body>
</html>
6 changes: 3 additions & 3 deletions layouts/release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ <h4 id="{{ slug }}" class="release-notes-section-heading text-uppercase text-bol
</aside>
</div>

<div class="border-top">
{% include small-footer %}
</div>
{% include support-section %}
{% include small-footer %}
{% include scroll-button %}
</main>
</body>
</html>

0 comments on commit a017660

Please sign in to comment.