Skip to content

Commit

Permalink
add present button back, fix rtl sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamSH-LLK committed Jun 12, 2024
1 parent 44bbb9c commit 6226ba8
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 44 deletions.
4 changes: 4 additions & 0 deletions source/_static/css/frc-furo.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,8 @@ body {
}
aside.sidebar-drawer {
width: revert;
}
.present svg {
height: 1rem;
width: 1rem;
}
7 changes: 6 additions & 1 deletion source/_static/css/frc-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ aside.sidebar-drawer,
margin-right: 320px;
margin-left: 0;
}
@media screen and (max-width: 768px) {
@media screen and (max-width: 67em) {
aside.sidebar-drawer,
.rst-versions {
right: -300px;
Expand All @@ -55,6 +55,11 @@ aside.sidebar-drawer,
right: 0;
left: unset;
}
#__navigation:checked ~ .page aside.sidebar-drawer {
right: 0;
top: 0;
left: unset !important;
}
}

.content .admonition-title:before {
Expand Down
76 changes: 44 additions & 32 deletions source/_templates/base.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,52 @@
{% extends '!base.html' %}

{% block extrabody %}

{% extends '!base.html' %} {% block extrabody %}

<div class="header-bar">
<!-- Color Strip -->
<div class="link-bar-container">
<div id="link-bar" class="collapse">
<ul>
<li id="manual-link"><a href="https://www.firstinspires.org/resource-library/frc/competition-manual-qa-system">FRC Game Manual</a></li>
<li id="qa-link"><a href="https://frc-qa.firstinspires.org/">FRC Game Q&A</a></li>
<script id="headerscript">
if( new Date().getMonth() == 3 && new Date().getDate() == 1) {
document.getElementById("headerscript").insertAdjacentHTML("afterend", '<li id="water-link"><a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">Water Game</a></li>');
}
</script>
</ul>
</div>
</div>
<!-- Color Strip -->
<div class="link-bar-container">
<div id="link-bar" class="collapse">
<ul>
<li id="manual-link">
<a
href="https://www.firstinspires.org/resource-library/frc/competition-manual-qa-system"
>FRC Game Manual</a
>
</li>
<li id="qa-link">
<a href="https://frc-qa.firstinspires.org/">FRC Game Q&A</a>
</li>
<script id="headerscript">
if (new Date().getMonth() == 3 && new Date().getDate() == 1) {
document
.getElementById("headerscript")
.insertAdjacentHTML(
"afterend",
'<li id="water-link"><a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">Water Game</a></li>'
);
}
</script>
</ul>
</div>
</div>
</div>
{% endblock %}

{%- block regular_scripts -%}
{% for path in script_files -%}
{{ js_tag(path) }}
{% endfor -%}
{%- if READTHEDOCS %}
{% endblock %} {%- block regular_scripts -%} {% for path in script_files -%} {{
js_tag(path) }} {% endfor -%} {%- if READTHEDOCS %}
<script>
if (typeof READTHEDOCS_DATA !== 'undefined') {
if (!READTHEDOCS_DATA.features) {
READTHEDOCS_DATA.features = {};
}
READTHEDOCS_DATA.features.docsearch_disabled = false;
if (typeof READTHEDOCS_DATA !== "undefined") {
if (!READTHEDOCS_DATA.features) {
READTHEDOCS_DATA.features = {};
}
</script>
READTHEDOCS_DATA.features.docsearch_disabled = false;
}
</script>
{%- endif %}
<script defer>
const button = Object.assign(document.createElement("a"), {
href: "?present",
className: "present muted-link",
});
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>`;
const container = document.querySelector(".content-icon-container");
container.appendChild(button);
</script>

{%- endblock regular_scripts -%}

11 changes: 0 additions & 11 deletions source/_templates/breadcrumbs.html

This file was deleted.

0 comments on commit 6226ba8

Please sign in to comment.