From 0e42ae2dd06b80d766f0126c60b3c522f5f67002 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 1 Aug 2024 15:22:59 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20author=20icon=20links?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _includes/authors.html | 8 ++++++++ _includes/gcode-info.html | 9 +-------- _includes/setting-info.html | 9 +-------- _layouts/docs.html | 9 +-------- _sass/_custom.scss | 16 ++++++++++++---- _setting/config_info.md | 1 + _setting/extruder.md | 1 + _setting/hardware.md | 1 + _setting/machine_info.md | 1 + _setting/stepper_drivers.md | 1 + _setting/temperature.md | 1 + 11 files changed, 29 insertions(+), 28 deletions(-) create mode 100644 _includes/authors.html diff --git a/_includes/authors.html b/_includes/authors.html new file mode 100644 index 000000000..f61c4c0ab --- /dev/null +++ b/_includes/authors.html @@ -0,0 +1,8 @@ +
+ {% assign authors = matter.author | append: ',' | append: matter.contrib | replace: " ","" | split: ',' %} + {% if authors %} + {% for author in authors %} + {% avatar user=author size=30 %} + {% endfor %} + {% endif %} +
diff --git a/_includes/gcode-info.html b/_includes/gcode-info.html index fb2d2b452..183d22a01 100644 --- a/_includes/gcode-info.html +++ b/_includes/gcode-info.html @@ -4,14 +4,7 @@ {% alert info %}This page is under construction and may not have complete or up-to-date information.{% endalert %} {% endif %}
-

- {% assign authors = gcode.author | append: ',' | append: gcode.contrib | replace: " ","" | split: ',' %} - {% if authors %} - {% for author in authors %} - {% avatar user=author size=30 %} - {% endfor %} - {% endif %} -

+ {% assign matter = gcode %}{% include authors.html %}

{{ gcode.codes | codes_desc }} - {{ gcode.title }}

diff --git a/_includes/setting-info.html b/_includes/setting-info.html index 3105722c1..67e0917dc 100644 --- a/_includes/setting-info.html +++ b/_includes/setting-info.html @@ -9,14 +9,7 @@ {% if page.label %}{% assign title = page.label %}{% else %}{% assign title = false %}{% endif %} {% if page.since %}{% assign since = page.since %}{% else %}{% assign since = false %}{% endif %} {% if page.tags %}{% assign tags = page.tags | join: ", " %}{% else %}{% assign tags = false %}{% endif %} -

- {% assign authors = conf.author | append: ',' | append: conf.contrib | replace: " ","" | split: ',' %} - {% if authors %} - {% for author in authors %} - {% avatar user=author size=30 %} - {% endfor %} - {% endif %} -

+ {% assign matter = conf %}{% include authors.html %} {% else %} {% assign ispage = false %} {% assign h1 = "h4" %}{% assign h3 = "h5" %} diff --git a/_layouts/docs.html b/_layouts/docs.html index 4df23c81e..e3423424d 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -18,14 +18,7 @@
-

- {%- assign authors = page.author | append: ',' | append: page.contrib | replace: " ","" | split: ',' %} - {%- if authors %} - {%- for author in authors %} - {% avatar user=author size=30 %} - {%- endfor %} - {%- endif %} -

+ {% assign matter = page %}{% include authors.html %}

{{ page.title }}

{%- if page.category contains 'in-review' %} diff --git a/_sass/_custom.scss b/_sass/_custom.scss index 670020c7b..5ee0219dd 100644 --- a/_sass/_custom.scss +++ b/_sass/_custom.scss @@ -918,10 +918,13 @@ div.custom-article, div.col-md-12>.row.long, div.col-md-12>.row.notes { margin: -1em 0 1em; padding: 0.5em 0.5em 0.25em; } -.detail-header h1 { margin-bottom: 4px; } + #authors { - height: 0; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; - img.avatar { float: right; margin: 8px 0 0 2px; background: white; } + width: 100%; + height: 0; + text-align: right; + padding-right: 2px; + img.avatar { margin: 8px 0 0 2px; } } div.custom-article { @@ -1330,7 +1333,12 @@ div.options table { td { font-size: 90% } } -.detail-header { position: relative; a[name] { position: absolute; top: -5em; } } +.detail-header { + position: relative; + pointer-events: none; + h1 { margin-bottom: 4px; } + a[name] { position: absolute; top: -5em; } +} div.brief { font-weight: $bold-font-weight; } div.since { float: right; margin-right: 0.25em; } diff --git a/_setting/config_info.md b/_setting/config_info.md index 143ed2cd9..8c99734ee 100644 --- a/_setting/config_info.md +++ b/_setting/config_info.md @@ -3,6 +3,7 @@ label: Configuration Info brief: Information about the configuration itself. category: [ wip ] tags: [ info ] +author: thinkyhead settings: - name: CONFIGURATION_H_VERSION diff --git a/_setting/extruder.md b/_setting/extruder.md index 4f9f78b79..ebccdb9f9 100644 --- a/_setting/extruder.md +++ b/_setting/extruder.md @@ -4,6 +4,7 @@ brief: Extruder settings. category: [ wip ] tags: [ hardware, extruder ] pagetype: toc +author: thinkyhead settings: diff --git a/_setting/hardware.md b/_setting/hardware.md index fe2866eb3..146e03b7e 100644 --- a/_setting/hardware.md +++ b/_setting/hardware.md @@ -4,6 +4,7 @@ brief: Machine electronics and main components. category: [ wip ] tags: [ hardware ] pagetype: toc +author: thinkyhead settings: - name: MOTHERBOARD diff --git a/_setting/machine_info.md b/_setting/machine_info.md index bd9f622e6..ce51de115 100644 --- a/_setting/machine_info.md +++ b/_setting/machine_info.md @@ -4,6 +4,7 @@ brief: Human-readable machine information. category: [ wip ] tags: [ info ] pagetype: toc +author: thinkyhead settings: - name: CUSTOM_MACHINE_NAME diff --git a/_setting/stepper_drivers.md b/_setting/stepper_drivers.md index dd7756c21..5ecf39e8a 100644 --- a/_setting/stepper_drivers.md +++ b/_setting/stepper_drivers.md @@ -4,6 +4,7 @@ brief: Basic Stepper Driver settings category: [ wip ] tags: [ hardware ] pagetype: toc +author: thinkyhead shared: - diff --git a/_setting/temperature.md b/_setting/temperature.md index f25e0d0ee..41692b539 100644 --- a/_setting/temperature.md +++ b/_setting/temperature.md @@ -4,6 +4,7 @@ brief: Basic Temperature settings category: [ wip ] tags: [ hardware, temperature ] pagetype: toc +author: thinkyhead settings: - name: TEMP_SENSOR_0