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

Make header/footer padding consistent #951

Merged
merged 5 commits into from
Jul 5, 2020
Merged
Show file tree
Hide file tree
Changes from 4 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
12 changes: 11 additions & 1 deletion src/config/2020.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,16 @@
"avatar_url": "https:\/\/avatars0.githubusercontent.com\/u\/1120896?v=4&s=200",
"github": "rviscomi",
"twitter": "rick_viscomi"
},
"dsadhanala": {
"name": "Durga Prasad Sadhanala",
"teams": [
"developers"
],
"avatar_url": "https:\/\/avatars3.githubusercontent.com\/u\/5795823?s=200&v=4",
"website": "https:\/\/web-ui.dev",
"github": "dsadhanala",
"twitter": "dsadhanala"
}
}
}
}
18 changes: 11 additions & 7 deletions src/static/css/2019.css
Original file line number Diff line number Diff line change
Expand Up @@ -740,16 +740,13 @@ blockquote::before {
}

/* Footer */
footer {
footer .container {
display: grid;
grid-template-areas:
'home-logo nav-items nav-items nav-items'
'hr hr hr hr'
'copyright copyright ha-logo social-media';
grid-template-columns: 280px 1fr 1fr 120px 0 0;
/* 20px same as .container padding */
padding-left: 20px;
padding-right: 20px;
}

footer .home-logo {
Expand Down Expand Up @@ -875,10 +872,11 @@ p.copyright a {
display: inline;
}

footer {
footer .container {
display: grid;
grid-template-areas:
'home-logo home-logo language-switcher language-switcher'
'home-logo home-logo home-logo home-logo'
'language-switcher language-switcher language-switcher language-switcher'
'hr hr hr hr'
'nav-items nav-items nav-items nav-items'
'hr-last hr-last hr-last hr-last'
Expand All @@ -887,6 +885,10 @@ p.copyright a {
grid-template-rows: 60px auto auto;
}

footer .home-logo {
justify-content: center;
}

footer .nav-items {
grid-area: nav-items;
display: flex;
Expand Down Expand Up @@ -1013,7 +1015,7 @@ p.copyright a {
}

/* Footer */
footer {
footer .container {
grid-template-areas:
'home-logo'
'hr'
Expand All @@ -1028,6 +1030,7 @@ p.copyright a {
footer .home-logo {
grid-area: home-logo;
margin: 20px 0;
justify-content: center;
}

footer .mobile-ha-social-media {
Expand Down Expand Up @@ -1079,6 +1082,7 @@ p.copyright a {
justify-content: center;
align-items: center;
margin-top: 20px;
text-align: center;
}

footer .social-media {
Expand Down
8 changes: 5 additions & 3 deletions src/static/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ header::after {
z-index: -1;
}

header .container {
header .container,
footer .container {
max-width: none;
padding-left: 60px;
padding-right: 60px;
Expand Down Expand Up @@ -516,8 +517,9 @@ p {
header::after {
bottom: 200px;
}

header .container {

header .container,
footer .container {
padding-left: 20px;
padding-right: 20px;
}
Expand Down
112 changes: 57 additions & 55 deletions src/templates/base/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,79 +184,81 @@

{% block footer %}
<footer class="alt-bg">
<div class="home-logo">
<a class="navigation-logo" href="{{ url_for('home', year=year, lang=lang) }}">
{{ self.web_almanac_logo() }}
</a>
</div>
<hr>
<nav aria-label="{{ self.footer_title() }}" class="nav-items">
<ul>
{{ self.non_chapter_nav_links() }}
<li>
{{ year_switcher('footer') }}
</li>
<li>
{{ language_switcher('footer') }}
</li>
</ul>
</nav>
<div class="mobile-ha-social-media">
<a class="ha-logo" href="https://httparchive.org/" aria-labelledby="httparchive-logo-footer-mobile">
<div class="container">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note, only change I made here is adding <div class="container"> and wrap footer content in it.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the explanation - would really have confused without that!

<div class="home-logo">
<a class="navigation-logo" href="{{ url_for('home', year=year, lang=lang) }}">
{{ self.web_almanac_logo() }}
</a>
</div>
<hr>
<nav aria-label="{{ self.footer_title() }}" class="nav-items">
<ul>
{{ self.non_chapter_nav_links() }}
<li>
{{ year_switcher('footer') }}
</li>
<li>
{{ language_switcher('footer') }}
</li>
</ul>
</nav>
<div class="mobile-ha-social-media">
<a class="ha-logo" href="https://httparchive.org/" aria-labelledby="httparchive-logo-footer-mobile">
<svg width="70" height="35" role="img">
<title id="httparchive-logo-footer-mobile">{{ self.http_archive_link() }}</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#ha"></use>
</svg>
</a>
<ul class="social-media">
<li>
<a href="https://twitter.com/HTTPArchive" aria-labelledby="twitter-logo-footer-mobile">
<svg width="20" height="20" role="img">
<title id="twitter-logo-footer-mobile">Twitter</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#twitter"></use>
</svg>
</a>
</li>
<li>
<a href="https://github.com/HTTPArchive/almanac.httparchive.org" aria-labelledby="github-logo-footer-mobile">
<svg width="20" height="20" role="img">
<title id="github-logo-footer-mobile">GitHub</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#github"></use>
</svg>
</a>
</li>
</ul>
</div>
<hr>
<p class="copyright">
<span>{{ self.copyright() }}</span>
<br>
<a href="{{ url_for('accessibility_statement', lang=lang) }}">{{ self.accessibility_statement() }}</a>
</p>
<a class="ha-logo not-mobile" href="https://httparchive.org/" aria-labelledby="ha-logo-footer">
<svg width="70" height="35" role="img">
<title id="httparchive-logo-footer-mobile">{{ self.http_archive_link() }}</title>
<title id="ha-logo-footer">{{ self.http_archive_link() }}</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#ha"></use>
</svg>
</a>
<ul class="social-media">
<ul class="social-media not-mobile">
<li>
<a href="https://twitter.com/HTTPArchive" aria-labelledby="twitter-logo-footer-mobile">
<a href="https://twitter.com/HTTPArchive" aria-labelledby="twitter-logo-footer">
<svg width="20" height="20" role="img">
<title id="twitter-logo-footer-mobile">Twitter</title>
<title id="twitter-logo-footer">Twitter</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#twitter"></use>
</svg>
</a>
</li>
<li>
<a href="https://github.com/HTTPArchive/almanac.httparchive.org" aria-labelledby="github-logo-footer-mobile">
<a href="https://github.com/HTTPArchive/almanac.httparchive.org" aria-labelledby="github-logo-footer">
<svg width="20" height="20" role="img">
<title id="github-logo-footer-mobile">GitHub</title>
<title id="github-logo-footer">GitHub</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#github"></use>
</svg>
</a>
</li>
</ul>
</div>
<hr>
<p class="copyright">
<span>{{ self.copyright() }}</span>
<br>
<a href="{{ url_for('accessibility_statement', lang=lang) }}">{{ self.accessibility_statement() }}</a>
</p>
<a class="ha-logo not-mobile" href="https://httparchive.org/" aria-labelledby="ha-logo-footer">
<svg width="70" height="35" role="img">
<title id="ha-logo-footer">{{ self.http_archive_link() }}</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#ha"></use>
</svg>
</a>
<ul class="social-media not-mobile">
<li>
<a href="https://twitter.com/HTTPArchive" aria-labelledby="twitter-logo-footer">
<svg width="20" height="20" role="img">
<title id="twitter-logo-footer">Twitter</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#twitter"></use>
</svg>
</a>
</li>
<li>
<a href="https://github.com/HTTPArchive/almanac.httparchive.org" aria-labelledby="github-logo-footer">
<svg width="20" height="20" role="img">
<title id="github-logo-footer">GitHub</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#github"></use>
</svg>
</a>
</li>
</ul>
</footer>
{% endblock %}
{% block scripts %}
Expand Down