Skip to content

Commit

Permalink
custom-theme/custom: Update footer
Browse files Browse the repository at this point in the history
Fixes the footer's appearance on mobile devices.
Adjusts the spacing for better readability.
Ensures the footer is displayed at the bottom
 of the page, even when the main content area
 does not occupy the entire page.
  • Loading branch information
wpiet authored and sjanc committed Aug 23, 2024
1 parent 752bdf9 commit 452585c
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 78 deletions.
28 changes: 24 additions & 4 deletions custom-theme/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
padding: 40px 0px 20px !important;
}

footer .logos {
flex-direction: column;
}

}

@media (max-width: 992px) {
Expand Down Expand Up @@ -192,10 +196,15 @@ footer .logos {
footer .logos img {
width: 200px;
flex-shrink: 0; /* Safari needs this */
margin: 10px 20px;
}

footer .logos .footnote {
padding: 10px 40px;
padding: 10px 0;
}

footer .logos p {
margin-bottom: 12px;
}

.goal p {
Expand Down Expand Up @@ -386,10 +395,10 @@ ul.wy-breadcrumbs {

.wy-breadcrumbs li a {
display: inline-block;
padding: 5 px
padding: 5px
}

.wy-breadcrumbs li a: first-child {
.wy-breadcrumbs li a:first-child {
padding-left: 0
}

Expand All @@ -400,7 +409,7 @@ ul.wy-breadcrumbs {
display: inline-block;
}

@media screen and(max-width: 480 px) {
@media screen and(max-width: 480px) {

.wy-breadcrumbs-extra {
display: none
Expand Down Expand Up @@ -485,6 +494,7 @@ code {
text-decoration: none;
display: inline-block;
font-size: 12px;
margin-bottom: 4px;
}

.thumbnail-container {
Expand All @@ -510,3 +520,13 @@ code {
background-size: contain;
pointer-events: none;
}

#wrapper {
display: flex;
min-height: 100vh;
flex-direction: column;
}

#main-content {
flex-grow: 1;
}
48 changes: 26 additions & 22 deletions custom-theme/footer.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
<footer class="row">
<div class="col-xs-12">
{% if config.copyright %}
<p class="copyright">{{ config.copyright }}</p>
{% endif %}
</div>
<div class="col-xs-12">
<div class="logos">
<a href="https://www.apache.org/">
<img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache">
</a>
<p>
Copyright © 2015-2024 The Apache Software Foundation.<br>
<small class="footnote">
Apache Mynewt, Mynewt, Apache, the Apache feather logo, and the Apache Mynewt
project logo are either registered trademarks or trademarks of the Apache
Software Foundation in the United States and other countries.
</small>
</p>
<a href="{{ config.extra.slack_url }}">
<img src="https://www.countit.com/images/add_to_slack.png" alt="Slack Icon" title="Join our Slack Community" />
</a>
<footer>
<div class="container">
<div class="row">
<div class="col-xs-12">
{% if config.copyright %}
<p class="copyright">{{ config.copyright }}</p>
{% endif %}
</div>
<div class="col-xs-12">
<div class="logos">
<a href="https://www.apache.org/">
<img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache">
</a>
<p>
Copyright © 2015-2024 The Apache Software Foundation.<br>
<small class="footnote">
Apache Mynewt, Mynewt, Apache, the Apache feather logo, and the Apache Mynewt
project logo are either registered trademarks or trademarks of the Apache
Software Foundation in the United States and other countries.
</small>
</p>
<a href="{{ config.extra.slack_url }}">
<img src="/img/add_to_slack.png" alt="Slack Icon" title="Join our Slack Community" />
</a>
</div>
</div>
</div>
</div>
<a href="https://www.apache.org/licenses/">
Expand Down
103 changes: 51 additions & 52 deletions custom-theme/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,64 +57,63 @@
{% else %}
<body class="home">
{% endif %}
<div id="wrapper">
{% include 'main-banner.html' %}

{% include 'main-banner.html' %}
{% include "nav.html" %}

{% include "nav.html" %}

{% set full_width_page_titles = [None, 'Home', 'Quick Start', 'About', 'Talks', 'Documentation', 'Download', 'Community', 'CVE'] %}

<div class="container">
{% if page.title == 'Home' %}
{% include "landing.html" %}
{% elif meta and meta.html %}
{% include meta.html[0] %}
{% elif page.title == 'About' %}
{% include "about.html" %}
{% elif page.title == 'Talks' %}
{% include "talks.html" %}
{% elif page.title == 'Quick Start' %}
{% include "quick-start.html" %}
{% elif page.title == 'Documentation' %}
{% include "documentation.html" %}
{% elif page.title == 'Download' %}
{% include "download.html" %}
{% elif page.title == 'Community' %}
{% include "community.html" %}
{% elif page.title == 'CVE' %}
{% include "cve.html" %}
{% else %}
<div class="row">
<div class="col-md-3 v2-sidebar sidebar-container">{% include "toc.html" %}</div>
{% set full_width_page_titles = [None, 'Home', 'Quick Start', 'About', 'Talks', 'Documentation', 'Download', 'Community', 'CVE'] %}
<div id="main-content">
<div class="container">
{% if page.title == 'Home' %}
{% include "landing.html" %}
{% elif meta and meta.html %}
{% include meta.html[0] %}
{% elif page.title == 'About' %}
{% include "about.html" %}
{% elif page.title == 'Talks' %}
{% include "talks.html" %}
{% elif page.title == 'Quick Start' %}
{% include "quick-start.html" %}
{% elif page.title == 'Documentation' %}
{% include "documentation.html" %}
{% elif page.title == 'Download' %}
{% include "download.html" %}
{% elif page.title == 'Community' %}
{% include "community.html" %}
{% elif page.title == 'CVE' %}
{% include "cve.html" %}
{% else %}
<div class="row">
<div class="col-md-3 v2-sidebar sidebar-container">{% include "toc.html" %}</div>

<div class="col-md-9" role="main">
<div class="doc-header">
{% include 'breadcrumbs.html' %}
</div>
{% for version in config.extra.versions %}
{% if config.extra.version == version.dir and not version.latest %}
<div class="alert alert-warning">
<p>
Version {{ version.label }} is not the most recent version of the Apache Mynewt
documentation. Click <a href="/latest">here</a> to read the latest
version.
</p>
<div class="col-md-9" role="main">
<div class="doc-header">
{% include 'breadcrumbs.html' %}
</div>
{% for version in config.extra.versions %}
{% if config.extra.version == version.dir and not version.latest %}
<div class="alert alert-warning">
<p>
Version {{ version.label }} is not the most recent version of the Apache Mynewt
documentation. Click <a href="/latest">here</a> to read the latest
version.
</p>
</div>
{% endif %}
{% endfor %}
{% block content %}
{{ page.content }}
{% endblock %}
<div class="row">
{% include 'next_prev_links.html' %}
</div>
</div>
{% endif %}
{% endfor %}
{% block content %}
{{ page.content }}
{% endblock %}
<div class="row">
{% include 'next_prev_links.html' %}
</div>
{% include 'footer.html' %}
</div>
{% endif %}
</div>
{% endif %}
{% if page.title in full_width_page_titles or (meta and meta.html) %}
{% include 'footer.html' %}
{% endif %}
</div>
{% include 'footer.html' %}
</div>

<script src="{{ base_url }}/js/jquery-1.10.2.min.js"></script>
Expand Down
1 change: 1 addition & 0 deletions custom-theme/quick-start.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
{% endblock %}
</div>
</div>
</div>
</div>

0 comments on commit 452585c

Please sign in to comment.