mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-09-25 03:53:00 +02:00
Upgrade footer
This commit is contained in:
parent
013d00bc4c
commit
c560bc4d66
@ -46,3 +46,33 @@ table.docutils {
|
|||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#upgrade-footer {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 100%;
|
||||||
|
background-color: rgba(20,20,20,0.8);
|
||||||
|
min-height: 26px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #ccc;
|
||||||
|
line-height: 26px;
|
||||||
|
padding: 8px 0 8px 30px;
|
||||||
|
z-index: 9999;
|
||||||
|
display: none
|
||||||
|
}
|
||||||
|
#upgrade-footer-changelog {
|
||||||
|
background-color: #b3b3b3;
|
||||||
|
color: #4e4e4e;
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 0 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
float: right;
|
||||||
|
margin: 0 60px 0 10px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.not-hidden {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
@ -4,6 +4,10 @@
|
|||||||
<div class="footer">
|
<div class="footer">
|
||||||
<a href="/misc/privacy.html">Privacy Policy</a>
|
<a href="/misc/privacy.html">Privacy Policy</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="upgrade-footer">
|
||||||
|
A new version has been release since you last visited this page: {{ release }} 🎉
|
||||||
|
<a id="upgrade-footer-changelog" href="/esphomeyaml/changelog/index.html">View Changelog</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-113203480-2"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-113203480-2"></script>
|
||||||
<script>
|
<script>
|
||||||
@ -13,4 +17,16 @@
|
|||||||
|
|
||||||
gtag('config', 'UA-113203480-2', {'anonymize_ip': true});
|
gtag('config', 'UA-113203480-2', {'anonymize_ip': true});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var old = window.localStorage.getItem("release");
|
||||||
|
if (old === null) {
|
||||||
|
window.localStorage.setItem("release", "{{ release }}");
|
||||||
|
} else if (old !== "{{ release }}") {
|
||||||
|
document.getElementById("upgrade-footer").classList.add("not-hidden");
|
||||||
|
document.getElementById("upgrade-footer-changelog").addEventListener('click', function () {
|
||||||
|
window.localStorage.setItem("release", "{{ release }}");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
10
conf.py
10
conf.py
@ -66,8 +66,8 @@ source_suffix = '.rst'
|
|||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = 'esphomelib'
|
project = 'ESPHome'
|
||||||
copyright = '2018, Otto Winter'
|
copyright = '2019, Otto Winter'
|
||||||
html_show_copyright = False
|
html_show_copyright = False
|
||||||
html_show_sphinx = False
|
html_show_sphinx = False
|
||||||
author = 'Otto Winter'
|
author = 'Otto Winter'
|
||||||
@ -188,7 +188,7 @@ latex_elements = {
|
|||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
(master_doc, 'esphomelib.tex', 'esphomelib Documentation',
|
(master_doc, 'esphomelib.tex', 'ESPHome Documentation',
|
||||||
'Otto Winter', 'manual'),
|
'Otto Winter', 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ latex_engine = 'xelatex'
|
|||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [
|
||||||
(master_doc, 'esphomelib', 'esphomelib Documentation',
|
(master_doc, 'esphomelib', 'ESPHome Documentation',
|
||||||
[author], 1)
|
[author], 1)
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ man_pages = [
|
|||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
(master_doc, 'esphomelib', 'esphomelib Documentation',
|
(master_doc, 'esphomelib', 'ESPHome Documentation',
|
||||||
author, 'esphomelib', 'One line description of project.',
|
author, 'esphomelib', 'One line description of project.',
|
||||||
'Miscellaneous'),
|
'Miscellaneous'),
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user