Skip to content

Commit 7ba9ce7

Browse files
committed
cleaning up print page
1 parent dcf0d1b commit 7ba9ce7

5 files changed

Lines changed: 34 additions & 58 deletions

File tree

docs/single_page.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ hide:
55
icon: fontawesome/solid/scroll
66
---
77

8-
<a class="list-group-item" href="#" onclick="window.print(); return false;">
9-
Print Page
10-
</a>
118

129
# Introduction
1310

mkdocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ nav:
260260
- Configuration: configuration.md
261261
- Supported Qwiic Devices: supported_devices.md
262262
- Suggested Reading: suggested-reading.md
263-
- View as Single Page: single_page.md
264263

265264
- Examples:
266265
- Connecting to a WiFi Network: wifi_network.md

overrides/main.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44

55
<!-- Adds file-eye icon to view hookup guide as a single page -->
66
{% if "single_page.md" %}
7-
<a href="/SparkFun_DataLogger/single_page" title="View Guide as Single-Page" class="md-content__button md-icon">
8-
{% include ".icons/material/file-eye-outline.svg" %}
9-
<!-- .icons/fontawesome/solid/scroll.svg -->
10-
</a>
7+
<a href="/SparkFun_DataLogger/single_page" title="View Guide as Single-Page" class="md-content__button md-icon">
8+
{% include ".icons/material/file-eye-outline.svg" %}
9+
:material-file-eye-24-outline:
10+
<!-- .icons/fontawesome/solid/scroll.svg -->
11+
</a>
12+
<a class="md-content__button md-icon" title="Print Page" href="#" onclick="window.print(); return false;">
13+
:octicons-print-24: Print Page
14+
</a>
15+
1116
{% endif %}
1217

1318

1419
{{ super() }}
15-
{% endblock content %}
20+
{% endblock content %}

overrides/partials/tabs.html

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,14 @@
2323
{% import "partials/tabs-item.html" as item with context %}
2424

2525
<!-- Navigation tabs -->
26-
<nav
27-
class="md-tabs"
28-
aria-label="{{ lang.t('tabs') }}"
29-
data-md-component="tabs"
30-
>
31-
<div class="md-tabs__inner md-grid">
26+
<nav class="md-tabs" aria-label="{{ lang.t('tabs') }}" data-md-component="tabs">
27+
<div class="md-tabs__inner md-grid">
3228

33-
<!-- Adds tab on right side of header -->
34-
{% if "hard_copy.md" %}
35-
<ul class="md-tabs__list" style="float: right;">
36-
<li class="md-tabs__item">
37-
<a href="/SparkFun_DataLogger/hard_copy/" class="md-tabs__link">
38-
Hard Copies 🖨️
39-
</a>
40-
</li>
41-
</ul>
42-
{% endif %}
43-
44-
<!-- Original tabbed sections -->
45-
<ul class="md-tabs__list">
46-
{% for nav_item in nav %}
47-
{{ item.render(nav_item) }}
48-
{% endfor %}
49-
</ul>
50-
</div>
51-
</nav>
29+
<!-- Original tabbed sections -->
30+
<ul class="md-tabs__list">
31+
{% for nav_item in nav %}
32+
{{ item.render(nav_item) }}
33+
{% endfor %}
34+
</ul>
35+
</div>
36+
</nav>

overrides/partials/toc-backup.html

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,44 +23,34 @@
2323
<!-- Determine title -->
2424
{% set title = lang.t("toc") %}
2525
{% if config.mdx_configs.toc and config.mdx_configs.toc.title %}
26-
{% set title = config.mdx_configs.toc.title %}
26+
{% set title = config.mdx_configs.toc.title %}
2727
{% endif %}
2828

2929
<!-- Table of contents -->
3030
<nav class="md-nav md-nav--secondary" aria-label="{{ title }}">
31-
{% set toc = page.toc %}
31+
{% set toc = page.toc %}
3232

33-
<!--
33+
<!--
3434
Check whether the content starts with a level 1 headline. If it does, the
3535
top-level anchor must be skipped, since it would be redundant to the link
3636
to the current page that is located just above the anchor. Therefore we
3737
directly continue with the children of the anchor.
3838
-->
39-
{% set first = toc | first %}
40-
{% if first and first.level == 1 %}
39+
{% set first = toc | first %}
40+
{% if first and first.level == 1 %}
4141
{% set toc = first.children %}
42-
{% endif %}
42+
{% endif %}
4343

44-
<!-- Table of contents title and list -->
45-
{% if toc %}
44+
<!-- Table of contents title and list -->
45+
{% if toc %}
4646
<label class="md-nav__title" for="__toc">
47-
<span class="md-nav__icon md-icon"></span>
48-
{{ title }}
47+
<span class="md-nav__icon md-icon"></span>
48+
{{ title }}
4949
</label>
5050
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
51-
{% for toc_item in toc %}
51+
{% for toc_item in toc %}
5252
{% include "partials/toc-item.html" %}
53-
{% endfor %}
53+
{% endfor %}
5454

55-
56-
<!-- Add single page view to TOC-->
57-
<li class="md-nav__item">
58-
<a href="/SparkFun_DataLogger/hookup_guide/single_page" class="md-nav__link">
59-
<span class="md-ellipsis">
60-
View Guide as Single-Page&nbsp;{% include ".icons/fontawesome/solid/scroll.svg" %}
61-
</span>
62-
</a>
63-
</li>
64-
</ul>
65-
{% endif %}
66-
</nav>
55+
{% endif %}
56+
</nav>

0 commit comments

Comments
 (0)