Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: max-niederman/website
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0f2dcf73ac84af4e991885bd54d455a490705009
Choose a base ref
..
head repository: max-niederman/website
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 026b867470661490bca49d8562505c340606548a
Choose a head ref
Showing with 9 additions and 1 deletion.
  1. +3 −0 src/markdown/links.mjs
  2. +6 −1 src/styles/links.scss
3 changes: 3 additions & 0 deletions src/markdown/links.mjs
Original file line number Diff line number Diff line change
@@ -25,9 +25,12 @@ function typeForLink(url) {
return "phone";
case "https:":
case "http:":
console.log(url.hostname);
switch (url.hostname.replace(/^www\./, "")) {
case "maxniederman.com":
return "internal";
case "en.wikipedia.org":
return "wikipedia";
case "github.com":
return "github";
case "linkedin.com":
7 changes: 6 additions & 1 deletion src/styles/links.scss
Original file line number Diff line number Diff line change
@@ -49,6 +49,11 @@ a[data-link-type="internal"]::after {
font-feature-settings: "swsh";
}

a[data-link-type="wikipedia"]::after {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23bb005e' d='m14.97 18.95l-2.56-6.03c-1.02 1.99-2.14 4.08-3.1 6.03c-.01.01-.47 0-.47 0C7.37 15.5 5.85 12.1 4.37 8.68C4.03 7.84 2.83 6.5 2 6.5v-.45h5.06v.45c-.6 0-1.62.4-1.36 1.05c.72 1.54 3.24 7.51 3.93 9.03c.47-.94 1.8-3.42 2.37-4.47c-.45-.88-1.87-4.18-2.29-5c-.32-.54-1.13-.61-1.75-.61c0-.15.01-.25 0-.44l4.46.01v.4c-.61.03-1.18.24-.92.82c.6 1.24.95 2.13 1.5 3.28c.17-.34 1.07-2.19 1.5-3.16c.26-.65-.13-.91-1.21-.91c.01-.12.01-.33.01-.43c1.39-.01 3.48-.01 3.85-.02v.42c-.71.03-1.44.41-1.82.99L13.5 11.3c.18.51 1.96 4.46 2.15 4.9l3.85-8.83c-.3-.72-1.16-.87-1.5-.87v-.45l4 .03v.42c-.88 0-1.43.5-1.75 1.25c-.8 1.79-3.25 7.49-4.85 11.2z'/%3E%3C/svg%3E");
// font-size: 0.75em;
}

a[data-link-type="github"]::after {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3Cpath fill='%23bb005e' fill-opacity='0' d='M15 4.5c-0.39 -0.1 -1.33 -0.5 -3 -0.5c-1.67 0 -2.61 0.4 -3 0.5c-0.53 -0.43 -1.94 -1.5 -3.5 -1.5c-0.34 1 -0.29 2.22 0 3c-0.75 1 -1 2 -1 3.5c0 2.19 0.48 3.58 1.5 4.5c1.02 0.92 2.11 1.37 3.5 1.5c-0.65 0.54 -0.5 1.87 -0.5 2.5v4h6v-4c0 -0.63 0.15 -1.96 -0.5 -2.5c1.39 -0.13 2.48 -0.58 3.5 -1.5c1.02 -0.92 1.5 -2.31 1.5 -4.5c0 -1.5 -0.25 -2.5 -1 -3.5c0.29 -0.78 0.34 -2 0 -3c-1.56 0 -2.97 1.07 -3.5 1.5Z'%3E%3Canimate fill='freeze' attributeName='fill-opacity' begin='0.8s' dur='0.15s' values='0;0.3'/%3E%3C/path%3E%3Cg fill='none' stroke='%23bb005e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath stroke-dasharray='32' stroke-dashoffset='32' d='M12 4c1.67 0 2.61 0.4 3 0.5c0.53 -0.43 1.94 -1.5 3.5 -1.5c0.34 1 0.29 2.22 0 3c0.75 1 1 2 1 3.5c0 2.19 -0.48 3.58 -1.5 4.5c-1.02 0.92 -2.11 1.37 -3.5 1.5c0.65 0.54 0.5 1.87 0.5 2.5c0 0.73 0 3 0 3M12 4c-1.67 0 -2.61 0.4 -3 0.5c-0.53 -0.43 -1.94 -1.5 -3.5 -1.5c-0.34 1 -0.29 2.22 0 3c-0.75 1 -1 2 -1 3.5c0 2.19 0.48 3.58 1.5 4.5c1.02 0.92 2.11 1.37 3.5 1.5c-0.65 0.54 -0.5 1.87 -0.5 2.5c0 0.73 0 3 0 3'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='0.7s' values='32;0'/%3E%3C/path%3E%3Cpath stroke-dasharray='10' stroke-dashoffset='10' d='M9 19c-1.41 0 -2.84 -0.56 -3.69 -1.19c-0.84 -0.63 -1.09 -1.66 -2.31 -2.31'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' begin='0.8s' dur='0.2s' values='10;0'/%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
}
@@ -67,4 +72,4 @@ a[data-link-type="discord"]::after {

a[data-link-type="nytimes"]::after {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 48 48'%3E%3Cpath fill='none' stroke='%23bb005e' stroke-linecap='round' stroke-linejoin='round' d='M30.35 4.58c9.84-1.19 11.33 11.7 1.42 11.7c-4.34 0-12.4-3.75-15.71-3.75c-3.77 0-4.62 3.75-2.41 5.45'/%3E%3Cpath fill='none' stroke='%23bb005e' stroke-linecap='round' stroke-linejoin='round' d='M30.35 4.58c4.68.66 3.34 4.64 1.21 4.64c-5.85 0-9.73-3.58-15.27-3.58c-7.51 0-9.09 10.83-2.64 12.36m18.172 3.365l3.726 3.726l-3.726 3.727l-3.727-3.727zm-.002.005v-5.09m0 12.55v7.65'/%3E%3Cpath fill='none' stroke='%23bb005e' stroke-linecap='round' stroke-linejoin='round' d='M39.13 29c-1.77 4.27-4.67 8.39-13.21 8.39c-6.23 0-10.43-4.74-10.43-10.87s1.51-8.94 6.09-11.89'/%3E%3Cpath fill='none' stroke='%23bb005e' stroke-linecap='round' stroke-linejoin='round' d='M26.2 32.18V16.71l-10.05 4.25m3.54 13.97l6.51-2.75m-6.51-12.71v14.94'/%3E%3Cpath fill='none' stroke='%23bb005e' stroke-linecap='round' stroke-linejoin='round' d='M39.13 29c.87 6.2-3.61 14.5-14.51 14.5c-8.47 0-15.85-6-15.85-14.44c0-8.77 7.22-12.71 12.81-14.43'/%3E%3C/svg%3E");
}
}