From b7b5ccc2e558c42629d049e5a45827b7ad4dd0b9 Mon Sep 17 00:00:00 2001 From: vsoch Date: Sat, 26 Nov 2022 16:13:16 -0700 Subject: [PATCH 1/3] updating mastodon links and page The changes here will link the icon to mastodon directly, and all links (except for email) now have a _blank target. The portal and home page link to our Mastodon page where there is a large obvious button to click to join, so the user flow should be like Mastodon -> Join Us On Mastodon -> Mastodon page. I am adding the icon as an svg because I would have to re-generate the icomoon font and I would rather do that only if absolutely necessary! This seems to look OK, granted that I sized it down to match the others. Signed-off-by: vsoch --- _config.yml | 5 +- _data/authors.yml | 2 + _includes/components/social-list-item.html | 8 ++- _projects/mastodon.md | 81 ++-------------------- assets/icomoon/style.css | 8 +++ assets/icons/mastodon.svg | 65 +++++++++++++++++ pages/index.md | 2 + 7 files changed, 93 insertions(+), 78 deletions(-) create mode 100644 assets/icons/mastodon.svg diff --git a/_config.yml b/_config.yml index 8296df5..0fd7e7a 100644 --- a/_config.yml +++ b/_config.yml @@ -26,8 +26,8 @@ menu: url: /news/ - title: Discussion external_url: https://github.com/hpc-social/hpc-social.github.io/discussions - - title: Join Us On Mastodon - external_url: https://mast.hpc.social/about + - title: Mastodon + url: /projects/mastodon/ # Add links to the footer. legal: @@ -316,6 +316,7 @@ twitter: social: name: HPC Social github: hpc-social + mastodon: hpc-social links: - https://twitter.com/hpc_social - https://github.com/hpc-social diff --git a/_data/authors.yml b/_data/authors.yml index 2f8f529..9247fb1 100644 --- a/_data/authors.yml +++ b/_data/authors.yml @@ -18,6 +18,8 @@ author1: github: hpc-social email: info@hpc.social twitter: hpc_social + mastodon: https://mast.hpc.social/about + # youtube: xxxxxxxxxxxxxxxxxxx # resume: /assets/resume.pdf # facebook: nick.engmann diff --git a/_includes/components/social-list-item.html b/_includes/components/social-list-item.html index 6b61bb9..50b0178 100644 --- a/_includes/components/social-list-item.html +++ b/_includes/components/social-list-item.html @@ -8,12 +8,18 @@ {% assign icon = data_social.icon | default:'icon-link' %} {% assign app = data_social.append %} {% assign prep = data_social.prepend %} + {% assign target = "_blank" %} {% unless data_social %} {% if platform == "email" %} {% assign name = "Email" %} {% assign icon = "icon-mail" %} {% assign prep = "mailto:" %} + {% assign target = "_self" %} + {% elsif platform == "mastodon" %} + {% assign name = "Mastodon" %} + {% assign icon = "mastodon-icon" %} + {% assign prep = "" %} {% elsif platform == "twitter" %} {% assign name = "Twitter" %} {% assign icon = "icon-twitter" %} @@ -32,7 +38,7 @@ {% endif %}
  • - + {{ name }} diff --git a/_projects/mastodon.md b/_projects/mastodon.md index 995e571..ad05589 100644 --- a/_projects/mastodon.md +++ b/_projects/mastodon.md @@ -22,7 +22,11 @@ accent_image: ### hpc.social on Mastodon - +Join Us On Mastodon + +
    + +
    We are proud to provide the HPC community with a Mastodon instance at mast.hpc.social! @@ -39,77 +43,4 @@ Here are some getting-started links: * Privacy policy: [https://mast.hpc.social/privacy-policy](https://mast.hpc.social/privacy-policy) and see also links in the "About" starting page. -The policy documents linked here are served from hpc-social/mastodon-policies on GitHub. You can ask questions, or make contributions or suggestions for changes there. - - - -

    - - - - - +You can read more about our policy at hpc-social/mastodon-policies on GitHub. You can ask questions, or make contributions or suggestions for changes there. diff --git a/assets/icomoon/style.css b/assets/icomoon/style.css index 5e94a85..0635980 100644 --- a/assets/icomoon/style.css +++ b/assets/icomoon/style.css @@ -1,3 +1,7 @@ +--- +layout: null +--- + @font-face { font-family: 'icomoon'; src: url('fonts/icomoon.eot?jbjoqu'); @@ -310,3 +314,7 @@ .icon-history:before { content: "\1f552"; } +/* explicitly different name so it doesn't match icon-* pattern*/ +.mastodon-icon:before { + content: url({{ site.url }}{{ site.baseurl }}/assets/icons/mastodon.svg); +} diff --git a/assets/icons/mastodon.svg b/assets/icons/mastodon.svg new file mode 100644 index 0000000..bace61b --- /dev/null +++ b/assets/icons/mastodon.svg @@ -0,0 +1,65 @@ + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/pages/index.md b/pages/index.md index 3ee366e..355ae36 100644 --- a/pages/index.md +++ b/pages/index.md @@ -14,6 +14,7 @@ We will be updating this site in the coming months - stay tuned! * [Projects]{:.heading.flip-title} --- Maintained by the community. * [Discussions]{:.heading.flip-title} --- Community Discussion * [News]{:.heading.flip-title} --- Latest news and announcements. +* [Mastodon]{:.heading.flip-title} --- Learn how to join us on Mastodon. {:.related-posts.faded} @@ -24,3 +25,4 @@ We will be updating this site in the coming months - stay tuned! [projects]: projects/ [news]: news/ [discussions]: https://github.com/hpc-social/hpc-social.github.io/discussions +[mastodon]: projects/mastodon/ From c946c0f66f74e2060451c4e82968906bf188e599 Mon Sep 17 00:00:00 2001 From: vsoch Date: Sat, 26 Nov 2022 16:17:36 -0700 Subject: [PATCH 2/3] tweak reference in config for mastodon Signed-off-by: vsoch --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 0fd7e7a..468ffcb 100644 --- a/_config.yml +++ b/_config.yml @@ -316,7 +316,7 @@ twitter: social: name: HPC Social github: hpc-social - mastodon: hpc-social + mastodon: https://mast.hpc.social/about links: - https://twitter.com/hpc_social - https://github.com/hpc-social From 19ef57ccfcd56fe9622a087f6cb61e0fee286414 Mon Sep 17 00:00:00 2001 From: vsoch Date: Sat, 26 Nov 2022 16:22:53 -0700 Subject: [PATCH 3/3] do not include url with mastodon svg Signed-off-by: vsoch --- assets/icomoon/style.css | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/assets/icomoon/style.css b/assets/icomoon/style.css index 0635980..927e3f4 100644 --- a/assets/icomoon/style.css +++ b/assets/icomoon/style.css @@ -1,7 +1,3 @@ ---- -layout: null ---- - @font-face { font-family: 'icomoon'; src: url('fonts/icomoon.eot?jbjoqu'); @@ -316,5 +312,5 @@ layout: null } /* explicitly different name so it doesn't match icon-* pattern*/ .mastodon-icon:before { - content: url({{ site.url }}{{ site.baseurl }}/assets/icons/mastodon.svg); + content: url(/assets/icons/mastodon.svg); }