From 756a8b9bb925aed0b85a236093550ab615d4044b Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sun, 29 Sep 2024 11:30:35 +0800 Subject: feat(CSS): add icon for external link --- src/css/style.css | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/css/style.css b/src/css/style.css index 1d39cc0..d98e871 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -50,8 +50,9 @@ h3, h4, h5, h6 { - font-weight: bold; margin-bottom: 0.5em; + + font-weight: bold; } h1 { @@ -82,6 +83,18 @@ p { a { color: #007bff; text-decoration: none; + + &[href^=http]::after { + content: ''; + display: inline-block; + width: 11px; + height: 11px; + margin-left: 4px; + + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E"); + background-position: center; + background-size: contain; + } } a:hover { -- cgit v1.2.3-70-g09d2