authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-10-05 00:19:46-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-10-05 15:36:02-07:00
log388ee81a41d3c21cf970f2be561e0d25df99c73a
tree46a8b8d6e5c0b0dd5ec51db5013b1258f166d86a
parent6deaa7ac61e116c12b17eda9d98119a6b860062a
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU

Make Shale guest underlines visible and close the provider icon gap

Assisted-by: gpt-6

1 files changed, 3 insertions(+), 1 deletions(-)

dashboard/src/shale_page.rs+3-1
...@@ -84,11 +84,13 @@ fn rewrite(html: &str, origin: &url::Url, profiles: &HashMap<String, Profile>) -...@@ -84,11 +84,13 @@ fn rewrite(html: &str, origin: &url::Url, profiles: &HashMap<String, Profile>) -
84 element.set_attribute("href", &profile.url)?;84 element.set_attribute("href", &profile.url)?;
85 element.set_attribute("target", "_blank")?;85 element.set_attribute("target", "_blank")?;
86 element.set_attribute("rel", "noreferrer")?;86 element.set_attribute("rel", "noreferrer")?;
87 let style = element.get_attribute("style").unwrap_or_default();
88 element.set_attribute("style", &format!("{style};text-decoration-line:underline;text-decoration-color:currentColor"))?;
87 if let Some(picture) = &profile.picture {89 if let Some(picture) = &profile.picture {
88 let picture = picture.replace('&', "&amp;").replace('"', "&quot;").replace('<', "&lt;");90 let picture = picture.replace('&', "&amp;").replace('"', "&quot;").replace('<', "&lt;");
89 element.prepend(&format!("<img src=\"{picture}\" alt=\"\" width=\"16\" height=\"16\" referrerpolicy=\"no-referrer\" style=\"width:1em;height:1em;object-fit:cover;vertical-align:-.125em;margin-right:.3em\">"), ContentType::Html);91 element.prepend(&format!("<img src=\"{picture}\" alt=\"\" width=\"16\" height=\"16\" referrerpolicy=\"no-referrer\" style=\"width:1em;height:1em;object-fit:cover;vertical-align:-.125em;margin-right:.3em\">"), ContentType::Html);
90 }92 }
91 let icon = profile.icon.trim().replace("<svg ", "<svg aria-hidden=\"true\" focusable=\"false\" style=\"color:inherit;width:.85em;height:.85em;vertical-align:-.1em;margin-right:.15em\" ");93 let icon = profile.icon.trim().replace("<svg ", "<svg aria-hidden=\"true\" focusable=\"false\" style=\"color:inherit;width:.85em;height:.85em;vertical-align:-.1em;margin-right:.05em\" ");
92 let icon = if profile.url.starts_with("https://github.com/") { icon.replace("<path ", "<path style=\"fill:currentColor;stroke:none\" ") } else { icon };94 let icon = if profile.url.starts_with("https://github.com/") { icon.replace("<path ", "<path style=\"fill:currentColor;stroke:none\" ") } else { icon };
93 element.append(&icon, ContentType::Html);95 element.append(&icon, ContentType::Html);
94 element.append(&profile.name, ContentType::Text);96 element.append(&profile.name, ContentType::Text);