Skip to content

Commit

Permalink
update docs meta
Browse files Browse the repository at this point in the history
  • Loading branch information
mbund committed Jul 15, 2023
1 parent 9bd6c07 commit d104a8a
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
31 changes: 31 additions & 0 deletions docs/css/customizations.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
UX Bugfix for permalink affecting typography in headings.
Upstream will not fix: https://github.com/squidfunk/mkdocs-material/issues/2369
*/

/* Headings are configured to be links (instead of only the permalink symbol), removes the link colour */
div.md-content article.md-content__inner a.toclink {
color: currentColor;
}

/* Instead of a permalink symbol at the end of heading text, use a border line on the left spanning height of heading */
/* Includes optional background fill with rounded right-side corners, and restores inline code style */
/* NOTE: Headings with markdown links embedded disrupt the bg fill style, as they're not children of `a.toclink` element */
div.md-content article.md-content__inner a.toclink {
display: inline-block; /* Enables multi-line support for both border and bg color */
border-left: 0.2rem solid transparent; /* transparent placeholder to avoid heading shift during reveal transition */
margin-left: -0.6rem; /* Offset heading to the left */
padding-left: 0.4rem; /* Push heading back to original position, margin-left - border-left widths */
transition: background-color 200ms, border-left 200ms;

/* Only relevant if using background highlight style */
border-radius: 0 0.25rem 0.25rem 0;
padding-right: 0.4rem;
}

div.md-content article.md-content__inner a.toclink:hover,
div.md-content article.md-content__inner :target > a.toclink {
border-left: 0.2rem solid #448aff; /* highlight line on the left */
background-color: #b3dbff6e; /* background highlight fill */
transition: background-color 200ms, border-left 200ms;
}
4 changes: 2 additions & 2 deletions docs/reference/technical-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<td>Kubernetes package manager</td>
</tr>
<tr>
<td><img src="https://cncf-branding.netlify.app/img/projects/longhorn/icon/color/longhorn-icon-color.svg" width="48"></td>
<td><img src="https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/longhorn.svg" width="48"></td>
<td><a href="https://longhorn.io">Longhorn</a></td>
<td>Cloud native distributed block storage for Kubernetes</td>
</tr>
Expand All @@ -62,7 +62,7 @@
<td>Log aggregation</td>
</tr>
<tr>
<td><img src="https://cncf-branding.netlify.app/img/projects/prometheus/icon/color/prometheus-icon-color.svg" width="48"></td>
<td><img src="https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/prometheus.svg" width="48"></td>
<td><a href="https://prometheus.io">Prometheus</a></td>
<td>Systems monitoring</td>
</tr>
Expand Down
18 changes: 12 additions & 6 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ repo_url: https://github.com/mbund/homelab
theme:
name: material
palette:
- scheme: default
- media: "(prefers-color-scheme: light)"
scheme: default
primary: indigo
accent: indigo
toggle:
icon: material/brightness-7
icon: material/weather-sunny
name: Switch to dark mode
- scheme: slate
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: indigo
accent: indigo
accent: blue
toggle:
icon: material/brightness-4
icon: material/weather-night
name: Switch to light mode
features:
- content.action.edit
Expand Down Expand Up @@ -58,7 +60,7 @@ markdown_extensions:
- pymdownx.tasklist:
custom_checkbox: true
- toc:
permalink: true
anchorlink: true
- md_in_html
- attr_list
- def_list
Expand All @@ -67,6 +69,9 @@ markdown_extensions:
plugins:
- social

extra_css:
- css/customizations.css

extra:
generator: false
social:
Expand All @@ -87,3 +92,4 @@ nav:
- reference/matrix.md
- reference/relay.md
- reference/k3sup.md
- reference/nvidia.md

0 comments on commit d104a8a

Please sign in to comment.