From 63e4d2c54e9ab940267c5862f0532eb91c6ee2e6 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 21 Jul 2021 17:01:57 -0500 Subject: [PATCH] Make external links span the full width of the article area --- Shared/Article Rendering/ArticleRenderer.swift | 5 +---- Shared/Article Rendering/shared.css | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Shared/Article Rendering/ArticleRenderer.swift b/Shared/Article Rendering/ArticleRenderer.swift index a8f8c4e4b..85fc0db30 100644 --- a/Shared/Article Rendering/ArticleRenderer.swift +++ b/Shared/Article Rendering/ArticleRenderer.swift @@ -154,10 +154,7 @@ private extension ArticleRenderer { d["title"] = title if let externalLink = article.externalURL, externalLink != article.preferredLink { - var displayLink = externalLink.strippingHTTPOrHTTPSScheme - if displayLink.count > 27 { - displayLink = displayLink.prefix(27).appending("...") - } + let displayLink = externalLink.strippingHTTPOrHTTPSScheme let regarding = NSLocalizedString("Link", comment: "Link") let externalLinkString = "\(regarding): \(displayLink)" d["external_link"] = externalLinkString diff --git a/Shared/Article Rendering/shared.css b/Shared/Article Rendering/shared.css index 9019d6aee..d14237442 100644 --- a/Shared/Article Rendering/shared.css +++ b/Shared/Article Rendering/shared.css @@ -118,6 +118,10 @@ body > .systemMessage { .externalLink { margin-bottom: 5px; font-style: italic; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .articleBody {