Skip to content

Commit 6226ba8

Browse files
committed
add present button back, fix rtl sidebar
1 parent 44bbb9c commit 6226ba8

File tree

4 files changed

+54
-44
lines changed

4 files changed

+54
-44
lines changed

source/_static/css/frc-furo.css

+4
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,8 @@ body {
8484
}
8585
aside.sidebar-drawer {
8686
width: revert;
87+
}
88+
.present svg {
89+
height: 1rem;
90+
width: 1rem;
8791
}

source/_static/css/frc-rtl.css

+6-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ aside.sidebar-drawer,
4545
margin-right: 320px;
4646
margin-left: 0;
4747
}
48-
@media screen and (max-width: 768px) {
48+
@media screen and (max-width: 67em) {
4949
aside.sidebar-drawer,
5050
.rst-versions {
5151
right: -300px;
@@ -55,6 +55,11 @@ aside.sidebar-drawer,
5555
right: 0;
5656
left: unset;
5757
}
58+
#__navigation:checked ~ .page aside.sidebar-drawer {
59+
right: 0;
60+
top: 0;
61+
left: unset !important;
62+
}
5863
}
5964

6065
.content .admonition-title:before {

source/_templates/base.html

+44-32
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,52 @@
1-
{% extends '!base.html' %}
2-
3-
{% block extrabody %}
4-
1+
{% extends '!base.html' %} {% block extrabody %}
52

63
<div class="header-bar">
7-
<!-- Color Strip -->
8-
<div class="link-bar-container">
9-
<div id="link-bar" class="collapse">
10-
<ul>
11-
<li id="manual-link"><a href="https://www.firstinspires.org/resource-library/frc/competition-manual-qa-system">FRC Game Manual</a></li>
12-
<li id="qa-link"><a href="https://frc-qa.firstinspires.org/">FRC Game Q&A</a></li>
13-
<script id="headerscript">
14-
if( new Date().getMonth() == 3 && new Date().getDate() == 1) {
15-
document.getElementById("headerscript").insertAdjacentHTML("afterend", '<li id="water-link"><a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">Water Game</a></li>');
16-
}
17-
</script>
18-
</ul>
19-
</div>
20-
</div>
4+
<!-- Color Strip -->
5+
<div class="link-bar-container">
6+
<div id="link-bar" class="collapse">
7+
<ul>
8+
<li id="manual-link">
9+
<a
10+
href="https://www.firstinspires.org/resource-library/frc/competition-manual-qa-system"
11+
>FRC Game Manual</a
12+
>
13+
</li>
14+
<li id="qa-link">
15+
<a href="https://frc-qa.firstinspires.org/">FRC Game Q&A</a>
16+
</li>
17+
<script id="headerscript">
18+
if (new Date().getMonth() == 3 && new Date().getDate() == 1) {
19+
document
20+
.getElementById("headerscript")
21+
.insertAdjacentHTML(
22+
"afterend",
23+
'<li id="water-link"><a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">Water Game</a></li>'
24+
);
25+
}
26+
</script>
27+
</ul>
28+
</div>
29+
</div>
2130
</div>
22-
{% endblock %}
23-
24-
{%- block regular_scripts -%}
25-
{% for path in script_files -%}
26-
{{ js_tag(path) }}
27-
{% endfor -%}
28-
{%- if READTHEDOCS %}
31+
{% endblock %} {%- block regular_scripts -%} {% for path in script_files -%} {{
32+
js_tag(path) }} {% endfor -%} {%- if READTHEDOCS %}
2933
<script>
30-
if (typeof READTHEDOCS_DATA !== 'undefined') {
31-
if (!READTHEDOCS_DATA.features) {
32-
READTHEDOCS_DATA.features = {};
33-
}
34-
READTHEDOCS_DATA.features.docsearch_disabled = false;
34+
if (typeof READTHEDOCS_DATA !== "undefined") {
35+
if (!READTHEDOCS_DATA.features) {
36+
READTHEDOCS_DATA.features = {};
3537
}
36-
</script>
38+
READTHEDOCS_DATA.features.docsearch_disabled = false;
39+
}
40+
</script>
3741
{%- endif %}
42+
<script defer>
43+
const button = Object.assign(document.createElement("a"), {
44+
href: "?present",
45+
className: "present muted-link",
46+
});
47+
button.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5m.75-9 3-3 2.148 2.148A12.061 12.061 0 0 1 16.5 7.605" /></svg>`;
48+
const container = document.querySelector(".content-icon-container");
49+
container.appendChild(button);
50+
</script>
3851

3952
{%- endblock regular_scripts -%}
40-

source/_templates/breadcrumbs.html

-11
This file was deleted.

0 commit comments

Comments
 (0)