Skip to content

Commit

Permalink
ui: fix color contrast of external links
Browse files Browse the repository at this point in the history
  • Loading branch information
manustays committed Jun 28, 2024
1 parent 300c0aa commit 472720e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
19 changes: 12 additions & 7 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,19 @@ module.exports = function(eleventyConfig) {
markdownLib.use(md_attrs, {
allowedAttributes: ["class"]
}); // https://github.com/GerHobbelt/markdown-it-attrs
markdownLib.use(md_link_attrs, {
pattern: /^https?:/,
attrs: {
target: '_blank',
rel: 'noopener',
class: 'ext-link'
markdownLib.use(md_link_attrs, [
{
// pattern: /^https?:/,
matcher(href) {
return href.match(/^https?:\/\//i) && !href.match(/^(https?:\/\/)?eko.in/);
},
attrs: {
target: '_blank',
rel: 'noopener',
class: 'ext-link'
}
}
}); // https://github.com/crookedneighbor/markdown-it-link-attributes
]); // https://github.com/crookedneighbor/markdown-it-link-attributes
markdownLib.use(md_lazy_loading); // https://github.com/ruanyf/markdown-it-image-lazy-loading
markdownLib.use(md_abbr); // https://github.com/markdown-it/markdown-it-abbr
markdownLib.use(md_footnote); // https://github.com/markdown-it/markdown-it-footnote
Expand Down
8 changes: 0 additions & 8 deletions src/_includes/css/blog.css
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,6 @@ img.hero {
padding: 20px;
} */

a.ext-link {
opacity: 0.2;
}

a.ext-link:hover {
opacity: 1;
}

.blog-button {
width: 30%;
color: white;
Expand Down

0 comments on commit 472720e

Please sign in to comment.