From c467f07b83c73fa1ea647702c1080b30af55ebd0 Mon Sep 17 00:00:00 2001 From: Sean Massa Date: Mon, 15 Jan 2024 00:15:42 -0600 Subject: [PATCH] show external links --- app/styles/app.css | 15 +++++++++++++++ app/templates/application.gjs | 8 ++++++-- app/templates/blog.gjs | 9 +++++++++ public/assets/external-link.svg | 3 +++ public/assets/icon-mastodon.svg | 2 +- 5 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 app/templates/blog.gjs create mode 100644 public/assets/external-link.svg diff --git a/app/styles/app.css b/app/styles/app.css index 8da1992..3d83084 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -82,6 +82,21 @@ blockquote p:last-child { margin-bottom: 0; } +header a[href^="http://"]:after, +header a[href^="https://"]:after, +footer p a[href^="http://"]:after, +footer p a[href^="https://"]:after, +.blog a[href^="http://"]:after, +.blog a[href^="https://"]:after { + content: ""; + background: url(/assets/external-link.svg); + background-size: 18px 18px; + background-repeat: no-repeat; + background-position: center center; + margin-left: 0.2em; /* spacing*/ + padding-right: 1em; /* sizing */ +} + /* TODO: these h2 styles have to move up to h1 styles because of the markdown rendering TODO: move the title to not an h1, then move these styles to h1 diff --git a/app/templates/application.gjs b/app/templates/application.gjs index 39f429c..460e74f 100644 --- a/app/templates/application.gjs +++ b/app/templates/application.gjs @@ -29,8 +29,12 @@ class MyRouteComponent extends Component {