Skip to content

Commit

Permalink
Add copy button and timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Sep 28, 2024
1 parent 4d9e3e8 commit bf72985
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ sphinxcontrib-spelling==8.0.0
sphinxext-opengraph==0.9.1
sphinx-tabs==3.4.5
matplotlib==3.9.2
sphinx-copybutton==0.5.2
sphinx-gitstamp==0.4.0
5 changes: 4 additions & 1 deletion src/_themes/oxide/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@
{{ title }}
</nav>
{% endif %}
{% block body %} {% endblock %}
{% block body %}{% endblock %}
{%- if gitstamp %}
<div class="page-timestamp">This site was last updated on {{ gitstamp }}.</div>
{%- endif %}
<div class="giscus"></div>
<nav>
{% if prev %}
Expand Down
6 changes: 6 additions & 0 deletions src/_themes/oxide/static/oxide.css
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,12 @@ img.fullscreen{
cursor: pointer;
}

div.page-timestamp{
width: 100%;
text-align: right;
font-size: calc(var(--text-size) * 0.5);
}

/* Small screens */

@media (max-width: 1024px) {
Expand Down
2 changes: 2 additions & 0 deletions src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
"sphinxext.opengraph",
"sphinx.ext.doctest",
"sphinx_tabs.tabs",
"sphinx_copybutton",
"sphinx_gitstamp",
]

rst_prolog = """
Expand Down

0 comments on commit bf72985

Please sign in to comment.