jekyll-theme-elementary-blog 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +12 -0
  3. data/.github/workflows/deploy.yml +32 -0
  4. data/.gitignore +5 -0
  5. data/404.md +16 -0
  6. data/Gemfile +10 -0
  7. data/LICENSE +674 -0
  8. data/README.md +121 -0
  9. data/_config.yaml +56 -0
  10. data/_includes/appcenter.html +9 -0
  11. data/_includes/byline.html +36 -0
  12. data/_includes/featured.html +27 -0
  13. data/_includes/footer.html +11 -0
  14. data/_includes/head.html +48 -0
  15. data/_includes/license.html +9 -0
  16. data/_includes/medium.html +8 -0
  17. data/_includes/nav.html +51 -0
  18. data/_includes/outdated.html +14 -0
  19. data/_includes/read-time.html +5 -0
  20. data/_includes/scripts.html +16 -0
  21. data/_includes/social.html +102 -0
  22. data/_includes/spotlight.html +15 -0
  23. data/_includes/svg/appcenter.svg +32 -0
  24. data/_includes/svg/creative-commons-by.svg +1 -0
  25. data/_includes/svg/creative-commons-sa.svg +1 -0
  26. data/_includes/svg/creative-commons.svg +1 -0
  27. data/_includes/svg/elementary.svg +28 -0
  28. data/_includes/svg/facebook.svg +1 -0
  29. data/_includes/svg/github.svg +1 -0
  30. data/_includes/svg/logomark.svg +1 -0
  31. data/_includes/svg/mastodon.svg +1 -0
  32. data/_includes/svg/patreon.svg +1 -0
  33. data/_includes/svg/paypal.svg +1 -0
  34. data/_includes/svg/reddit.svg +1 -0
  35. data/_includes/svg/rss-square.svg +1 -0
  36. data/_includes/svg/shopping-cart.svg +1 -0
  37. data/_includes/svg/slack.svg +1 -0
  38. data/_includes/svg/stack-exchange.svg +1 -0
  39. data/_includes/svg/twitter.svg +1 -0
  40. data/_includes/tags.html +7 -0
  41. data/_includes/thanks.html +93 -0
  42. data/_includes/title.html +12 -0
  43. data/_includes/twitter-card.html +24 -0
  44. data/_layouts/default.html +14 -0
  45. data/_layouts/error.html +8 -0
  46. data/_layouts/post.html +53 -0
  47. data/_layouts/tagfeed.json +51 -0
  48. data/_layouts/uglify.html +4 -0
  49. data/_posts/1992-02-01-test.md +125 -0
  50. data/_posts/2019-10-01-future-embargoed-post.md +18 -0
  51. data/_posts/2019-11-25-sponsor-post.md +18 -0
  52. data/_posts/2020-07-16-twitter-embeds.md +39 -0
  53. data/_posts/3000-12-31-future-post.md +11 -0
  54. data/_sass/_byline.scss +84 -0
  55. data/_sass/_code.scss +196 -0
  56. data/_sass/_colors.scss +94 -0
  57. data/_sass/_featured.scss +149 -0
  58. data/_sass/_figures.scss +150 -0
  59. data/_sass/_layout.scss +168 -0
  60. data/_sass/_nav.scss +73 -0
  61. data/_sass/_tags.scss +17 -0
  62. data/_sass/_twitter-cards.scss +79 -0
  63. data/_sass/_typography.scss +162 -0
  64. data/authors.md +23 -0
  65. data/blog-card.xcf +0 -0
  66. data/css/main.scss +119 -0
  67. data/feed.json +51 -0
  68. data/feed.xml +44 -0
  69. data/feed/updates.json +5 -0
  70. data/images/cc-by-sa.png +0 -0
  71. data/images/edit-copy-32.svg +439 -0
  72. data/images/facebook.svg +60 -0
  73. data/images/mastodon.svg +70 -0
  74. data/images/reddit.svg +27 -0
  75. data/images/twitter.svg +67 -0
  76. data/index.html +56 -0
  77. data/jekyll-theme-elementary-blog.gemspec +23 -0
  78. data/tags.md +20 -0
  79. metadata +91 -14
@@ -0,0 +1,121 @@
1
+ # blog
2
+
3
+ A static, privacy-respecting blog. In ways inspired by both Medium and the popular Medium-look-alike [mediumish-theme-jekyll](https://github.com/wowthemesnet/mediumish-theme-jekyll).
4
+
5
+ ## Goals
6
+
7
+ Remember, we moved away from other platforms for very specific reasons.
8
+
9
+ 1. **Completely frictionless** for readers.
10
+ 2. **As few external resources as possible**—it slows things down and introduces potential privacy issues.
11
+ 3. **Little-to-no JavaScript**—it’s a blog, not a web app. Currently, we only use progressively-enhancing JS for improving the image zoom experience.
12
+
13
+ ## Modern Niceties
14
+
15
+ Just because it's static and privacy-respecting doesn't mean it's not modern and featureful.
16
+
17
+ 1. **RSS feed support** for all the cross-posting you could desire.
18
+ 2. **Completely responsive** design from the start.
19
+ 3. **Dark style** support for everything from day zero.
20
+
21
+ ## Editing workflow
22
+
23
+ Use the GitHub workflow!
24
+
25
+ 1. **Use PRs to propose** and work. That means draft PRs for things that aren't ready to publish, too.
26
+ 2. **All PRs should be reviewed** and approved before publishing.
27
+ 3. **Use reviews and inline comments**/suggestions to collaboratively edit.
28
+
29
+ ### Handling Images
30
+
31
+ Ideally, images are put into the `images/` directory with a folder name matching the post slug. Since the normal maximum width of articles is 800 pixels, image sizes should be as follows:
32
+
33
+ - Up to 800px wide for normal width loDPI
34
+ - Up to 1600px for normal-width HiDPI
35
+ - Up to 800px for half- or third-width images on loDPI
36
+ - Up to 1600px for half- or third-width images on HiDPI
37
+ - 2560px wide for full-bleed (higher than this, even for HiDPI, gets really heavy)
38
+
39
+ When scaling down, use a high quality interpolator like Sinc (Lanczos3) or NoHalo in GIMP to avoid too much blur/fuzziness.
40
+
41
+ Name your sized images something sane like `image-name_800.jpg` for the loDPI version, and `image-name_1600.jpg` for the HiDPI version. When writing the markdown, use this format:
42
+
43
+ ```markdown
44
+ ![Alt Text]({{ site.baseurl }}/images/post-name/image-name_800.jpg){: srcset="{{ site.baseurl }}/images/post-name/image-name_1600.jpg 2x"}
45
+ ```
46
+
47
+ This is a bit verbose, but ensures:
48
+
49
+ - Images stay valid even if we ever move the blog
50
+ - We only load the largest version necessary on loDPI or HiDPI
51
+ - Both loDPI and HiDPI images are loaded at the correct physical size
52
+
53
+ Optimize images with the lowest JPG percent that looks good (i.e. manually in GIMP), and use something like [Image Optimizer](https://appcenter.elementary.io/com.github.gijsgoudzwaard.image-optimizer) for PNGs.
54
+
55
+ Also consider JPGs instead of PNGs when the majority of the image is photographic or a gradient (i.e. not solid colors), as that will compress way better than a PNG.
56
+
57
+ ## Repos
58
+
59
+ The blog is actually split into two repos:
60
+
61
+ 1. [@elementary/blog-template](https://github.com/elementary/blog-template), and
62
+ 2. [@elementary/blog](https://github.com/elementary/blog) (private)
63
+
64
+ The template is the source for the design and layout. The private repo holds a copy of the template plus the actual posts themselves, and is set up with GitHub Pages. Layout and design work should always be done against the template repo.
65
+
66
+ The reason for this separation is to be able to stage future/private blog posts while still letting people benefit from the template work. Ideally we'd have another solution that let us keep the contents of the blog itself public as well, without exposing future posts—or adding significantly to the complexity of maintaining the blog.
67
+
68
+ ## Building & Running Locally
69
+
70
+ The blog is a simple Jekyll-powered site hosted by GitHub Pages. To run it locally, see [the GitHub docs](https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/).
71
+
72
+ ### Dependencies
73
+
74
+ This guide assumes you're on elementary OS or a similar Ubuntu-based environment.
75
+
76
+ #### Packages
77
+
78
+ - `ruby-full` (should include `ruby` and `ruby-dev`)
79
+ - `build-essential`
80
+ - `zlib1g-dev`
81
+
82
+ #### Ruby Stuff
83
+
84
+ - `jekyll` and `bundler`
85
+
86
+ We recommend installing gems to a (hidden) directory in your home folder:
87
+
88
+ ```shell
89
+ echo '' >> ~/.bashrc
90
+ echo '# Install Ruby Gems to ~/.gems' >> ~/.bashrc
91
+ echo 'export GEM_HOME="$HOME/.gems"' >> ~/.bashrc
92
+ echo 'export PATH="$HOME/.gems/bin:$PATH"' >> ~/.bashrc
93
+ echo '' >> ~/.bashrc
94
+ source ~/.bashrc
95
+ ```
96
+
97
+ Install jekyll and bundler:
98
+
99
+ ```shell
100
+ gem install jekyll bundler
101
+ ```
102
+
103
+ Install gems:
104
+
105
+ ```shell
106
+ bundle install
107
+ ```
108
+
109
+ (Adapted from https://jekyllrb.com/docs/installation/)
110
+
111
+ ### Serve
112
+
113
+ ```shell
114
+ bundle exec jekyll serve --host 0.0.0.0
115
+ ```
116
+
117
+ The site should now be available at http://0.0.0.0:4000/ on your local machine, and your local machine's IP address on your network—great for testing on mobile OSes.
118
+
119
+ #### Drafts & Future Posts
120
+
121
+ Append `--drafts` to the serve command, and drafts in the `_drafts` folder will show up based on their last-edited time. Similarly, append `--future` to the serve command to show future posts.
@@ -0,0 +1,56 @@
1
+ title: "elementary Blog"
2
+ description: "We design and develop the fast, open, and privacy-respecting replacement for Windows and macOS"
3
+ permalink: /:title/
4
+ theme-color: "#64baff"
5
+ gravatar: eaa3cc978770998ea2bd4382935bf0f4
6
+
7
+ facebook: elementaryos
8
+ mastodon: elementary
9
+ reddit: elementaryos
10
+ twitter: elementary
11
+
12
+ authors:
13
+ aroman:
14
+ name: "Avi Romanoff"
15
+ description: "Enthusiasm Evangelist"
16
+ cassidyjames:
17
+ name: Cassidy James Blaede
18
+ description: "Co-founder & CXO"
19
+ gravatar: 41275ecc8271aca852ce2c0ff72d2610 # Gravatar md5 hash
20
+ danrabbit:
21
+ name: Daniel Foré
22
+ description: "Founder & CEO"
23
+ gravatar: 1f3cc76b99b5d0dae8381a23f52ea96d
24
+ karensophia:
25
+ name: Karen Sophia
26
+ description: "Customer Engagement"
27
+ # gravatar: e0ac5d5e717da67a36ac72adf235bc42
28
+ kgrubb:
29
+ name: Keli Grubb
30
+ description: Developer
31
+ gravatar: 8e8d16d136c38f3a28820490c17928d1
32
+ peteruithoven:
33
+ name: Peter Uithoven
34
+ description: "Front-end Developer"
35
+ gravatar: f39b1485b28be1dc2b98f269235218bc
36
+ anonymous:
37
+ name: "Unknown Author"
38
+
39
+ plugins:
40
+ - jekyll-feed
41
+ - jekyll-paginate
42
+ - jekyll-redirect-from
43
+ - jekyll-sitemap
44
+
45
+ paginate: 7
46
+ paginate_path: "/archive/:num/"
47
+
48
+ markdown: kramdown
49
+ kramdown:
50
+ syntax_highlighter: rouge
51
+ syntax_highlighter_opts:
52
+ block:
53
+ line_numbers: true
54
+
55
+ future: false # Allows us to stage posts
56
+ exclude: [README.md, Gemfile, Gemfile.lock, vendor]
@@ -0,0 +1,9 @@
1
+ {% if include.rdnn %}
2
+ {% assign rdnn = include.rdnn %}
3
+ {% else %}
4
+ {% assign rdnn = page.rdnn %}
5
+ {% endif %}
6
+
7
+ <aside markdown="1">
8
+ [![Get it on AppCenter](https://appcenter.elementary.io/badge.svg)](https://appcenter.elementary.io/{{ rdnn }})
9
+ </aside>
@@ -0,0 +1,36 @@
1
+ {% if site.authors[include.author].name %}
2
+ {% assign author=site.authors[include.author] %}
3
+ {% else %}
4
+ {% assign author=site.authors["anonymous"] %}
5
+ {% endif %}
6
+
7
+ {% assign date=include.date %}
8
+
9
+ <div class="byline">
10
+ <div class="avatar">
11
+ <img
12
+ {% if author.gravatar %}
13
+ srcset="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=96&d=blank 2x"
14
+ src="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=48&d=blank"
15
+ alt="Avatar for {{ author.name }}"
16
+ {% else %}
17
+ srcset="https://www.gravatar.com/avatar/{{ site.gravatar }}?s=96&d=blank 2x"
18
+ src="https://www.gravatar.com/avatar/{{ site.gravatar }}?s=48&d=blank"
19
+ alt="elementary Avatar"
20
+ {% endif %}
21
+ />
22
+ </div>
23
+ <div class="author">
24
+ {% if include.link == true %}<a href="{{ site.baseurl }}/authors/#{{ include.author }}">{% endif %}
25
+ <span class="name">{{ author.name }}</span>
26
+ {% if include.link == true %}</a>{% endif %}
27
+ {% if author.description and page.layout == 'post' %}
28
+ <span class="description">{{ author.description }}</span>
29
+ {% endif %}
30
+ </div>
31
+ <time class="post-date" datetime="{{ date | date:"%Y-%m-%d" }}">{{ date | date: "%a, %b %e, %Y" }}</time>
32
+ {% if include.content %}
33
+ {% include read-time.html content=include.content %}
34
+ {% endif %}
35
+ </div>
36
+
@@ -0,0 +1,27 @@
1
+ {% assign post = include.post %}
2
+
3
+ <a class="featured{% if post.image %} with-image{% endif %}{% if include.size %} {{ include.size }}{% endif %}" href="{{ post.url | prepend: site.baseurl }}">
4
+ {% if post.image %}
5
+ <div class="featured-image" alt="Featured image" style="background-image: url({{ post.image }});"></div>
6
+ {% endif %}
7
+
8
+ <header>
9
+ <h2>{% include title.html title=post.title %}</h2>
10
+ {% if post.description %}
11
+ <h3>
12
+ {% include title.html title=post.description %}
13
+ {% if include.post.redirect_to %} →{% endif %}
14
+ </h3>
15
+ {% endif %}
16
+
17
+ {% include byline.html author=post.author date=post.date content=post.content %}
18
+ </header>
19
+
20
+ {% unless post.image %}
21
+ <section class="excerpt">
22
+ <p>{{ post.excerpt | strip_html | truncatewords: 40 }}</p>
23
+ <span>Read more…</span>
24
+ </section>
25
+ {% endunless %}
26
+ </a>
27
+
@@ -0,0 +1,11 @@
1
+ <footer>
2
+ <p>© {{ site.time | date: '%Y' }} elementary, Inc</p>
3
+ <ul>
4
+ <li><a href="https://elementary.io/press" target="_self">Press</a></li>
5
+ <li><a href="https://elementary.io/brand" target="_self">Brand</a></li>
6
+ <li><a href="https://elementary.io/oem" target="_self">OEMs</a></li>
7
+ <li><a href="https://elementary.io/privacy" target="_self">Privacy</a></li>
8
+ <li><a href="https://elementary.io/team" target="_self">Team</a></li>
9
+ <li><a href="https://elementary.io/open-source" target="_self">Open Source</a></li>
10
+ </ul>
11
+ </footer>
@@ -0,0 +1,48 @@
1
+ <head>
2
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
3
+
4
+ <title>{% if page.title %}{{ page.title }} &sdot; {% endif %}{{ site.title }}</title>
5
+ <meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}" />
6
+ <meta itemprop="name" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}" />
7
+ <meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}" />
8
+
9
+ <meta charset="UTF-8" />
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
+
12
+ <link rel="icon" sizes="256x256" href="https://www.gravatar.com/avatar/{{ site.gravatar }}?s=256&d=blank" />
13
+ <meta itemprop="logo" content="https://www.gravatar.com/avatar/{{ site.gravatar }}?s=256&d=blank" />
14
+ <link rel="shortcut icon" href="https://elementary.io/favicon.ico">
15
+ <link rel="apple-touch-icon" href="https://elementary.io/images/launcher-icons/apple-touch-icon.png">
16
+
17
+ <link rel="alternate" type="application/rss+xml" title="elementary Blog" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
18
+
19
+ <meta name="author" content="{% if page.author.name %}{{ page.author.name }}{% else %}{{ site.author }}{% endif %}" />
20
+ <meta name="theme-color" content="{% if page.theme-color %}{{ page.theme-color }}{% else %}{{ site.theme-color }}{% endif %}" />
21
+
22
+ {% if page.image %}
23
+ {% assign prefix = page.image | slice: 0, 4 %}
24
+ {% if prefix == "http" %}
25
+ {% assign image = page.image %}
26
+ {% else %}
27
+ {% assign image = page.image | prepend: site.baseurl | prepend: site.url %}
28
+ {% endif %}
29
+ <meta name="twitter:card" content="summary_large_image" />
30
+ <meta property="twitter:image" content="{{ image }}" />
31
+ {% else %}
32
+ <meta name="twitter:card" content="summary" />
33
+ <meta property="twitter:image" content="https://www.gravatar.com/avatar/{{ site.gravatar }}?s=256&d=blank" />
34
+ {% endif %}
35
+ <meta name="twitter:site" content="@{{ site.twitter }}" />
36
+ <meta name="twitter:creator" content="@{{ site.twitter }}" />
37
+
38
+ <meta name="description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}" />
39
+ <meta property="og:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}" />
40
+ <meta itemprop="description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}" />
41
+ <meta name="twitter:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}" />
42
+
43
+ <link rel="stylesheet" type="text/css" media="all" href="{{ '/css/main.css' | prepend: site.baseurl | append: '?v=' | append: site.time }}" />
44
+ {% if jekyll.environment == "production" and site.url == "https://blog.elementary.io" %}
45
+ <script async defer data-domain="blog.elementary.io" src="https://stats.elementary.io/js/index.js"></script>
46
+ <script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
47
+ {% endif %}
48
+ </head>
@@ -0,0 +1,9 @@
1
+ <div class="license">
2
+ <a title=" This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License" rel="license" target="_blank" href="http://creativecommons.org/licenses/by-sa/4.0/">
3
+ Some rights reserved
4
+ </a>
5
+ {% include svg/creative-commons.svg %}
6
+ {% include svg/creative-commons-by.svg %}
7
+ {% include svg/creative-commons-sa.svg %}
8
+ </div>
9
+
@@ -0,0 +1,8 @@
1
+ <div class="medium">
2
+ <hr />
3
+ <article>
4
+ <h2>Looking for More?</h2>
5
+ <p>While we're migrating posts to the elementary blog, some older stories are still only on the <a href="https://medium.com/elementaryos" target="_blank" onclick="plausible('Link: Medium')">official elementary Medium publication</a>. Head over there to read more.
6
+ </article>
7
+ </div>
8
+
@@ -0,0 +1,51 @@
1
+ <header>
2
+ <nav class="primary">
3
+ <ul>
4
+ <li><a href="https://elementary.io" class="logomark" target="_self">
5
+ {% include svg/logomark.svg %}
6
+ </a></li>
7
+
8
+ <li><a href="https://elementary.io/support" target="_self">Support</a></li>
9
+ <li><a href="https://developer.elementary.io" target="_self">Developer</a><</li>
10
+ <li><a href="https://elementary.io/get-involved" target="_self">Get Involved</a></li>
11
+ <li><a href="https://elementary.io/store/" target="_self">Store</a></li>
12
+ <li><a href="{{ site.baseurl }}/">Blog</a></li>
13
+ </ul>
14
+
15
+ <ul>
16
+ <li><a href="{{ site.baseurl }}/feed.xml" title="RSS Feed">
17
+ {% include svg/rss-square.svg %}
18
+ </a></li>
19
+
20
+ <li><a href="https://www.facebook.com/elementaryos" target="_blank" rel="noopener" title="Facebook">
21
+ {% include svg/facebook.svg %}
22
+ </a></li>
23
+
24
+ <li><a href="https://mastodon.social/@elementary" target="_blank" rel="noopener" title="Mastodon">
25
+ {% include svg/mastodon.svg %}
26
+ </a></li>
27
+
28
+ <li><a href="https://www.reddit.com/r/elementaryos" target="_blank" rel="noopener" title="Reddit">
29
+ {% include svg/reddit.svg %}
30
+ </a></li>
31
+
32
+ <li><a href="https://elementaryos.stackexchange.com" target="_blank" rel="noopener" title="StackExchange">
33
+ {% include svg/stack-exchange.svg %}
34
+ </a></li>
35
+
36
+ <li><a href="https://twitter.com/elementary" target="_blank" rel="noopener" title="Twitter">
37
+ {% include svg/twitter.svg %}
38
+ </a></li>
39
+
40
+ <li><a href="https://join.slack.com/t/elementarycommunity/shared_invite/enQtMzU1NDU4OTE1MjY2LWUyOTBkZGNkZGM4MDgzZjE2ZjRiZDgwMDQ1ZTA0MzcxYjI0MDUyNGRlNDI5ZWViNDkwMzMwYzczMDY2ZjA0MTc" target="_blank" rel="noopener" title="Slack">
41
+ {% include svg/slack.svg %}
42
+ </a></li>
43
+ </ul>
44
+ </nav>
45
+ <nav class="secondary">
46
+ <a href="{{ site.baseurl }}/tags/#updates">OS Updates</a>
47
+ <a href="{{ site.baseurl }}/tags/#appcenter">AppCenter</a>
48
+ <a href="{{ site.baseurl }}/tags/#devs">Developers</a>
49
+ <a href="{{ site.baseurl }}/tags/#design">Design</a>
50
+ </nav>
51
+ </header>
@@ -0,0 +1,14 @@
1
+ {% assign post = include.post %}
2
+ {% assign postSecs = post.date | date: '%s' %}
3
+ {% assign nowSecs = 'now' | date: '%s' %}
4
+ {% assign ageSecs = nowSecs | minus: postSecs %}
5
+
6
+ {% unless post.tags contains "evergreen" %}
7
+ {% comment%} Two years in seconds {% endcomment %}
8
+ {% comment %} TODO: more dynamic age? i.e. "three years ago" or "five years ago", etc.? {% endcomment %}
9
+ {% if ageSecs > 63072000 %}
10
+ <aside class="outdated">
11
+ <strong>Note:</strong> this post was written over two years ago. The information below may be outdated.
12
+ </aside>
13
+ {% endif %}
14
+ {% endunless %}
@@ -0,0 +1,5 @@
1
+ <span class="read-time" title="Estimated read time">
2
+ {% assign words = include.content | strip_html | number_of_words %}
3
+ {{ words | divided_by: 200 | plus: 1 }} min read
4
+ </span>
5
+
@@ -0,0 +1,16 @@
1
+ <script>
2
+ // Makes figure images focusable for zooming
3
+ let figureImages = document.querySelectorAll ("figure img");
4
+ figureImages.forEach (function (figureImage) {
5
+ figureImage.setAttribute ("tabindex", -1);
6
+ document.addEventListener ('mousedown', event => {
7
+ if (document.activeElement === figureImage) {
8
+ // Prevent it from triggering on focusIn
9
+ setTimeout (function () {
10
+ document.activeElement.blur ();
11
+ }, 100);
12
+ }
13
+ });
14
+ });
15
+ </script>
16
+
@@ -0,0 +1,102 @@
1
+ <div class="social">
2
+ <h2>Join the Discussion on Social Media</h2>
3
+
4
+ {% if page.twitter or page.mastodon or page.reddit or page.facebook %}
5
+ <div class="official">
6
+ <h3>Official Posts</h3>
7
+
8
+ {% if page.twitter %}
9
+ <a
10
+ href="{{ page.twitter }}"
11
+ rel="noreferrer nofollow noopener"
12
+ target="_blank"
13
+ title="Twitter"
14
+ onclick="plausible('Social: Twitter')"
15
+ >
16
+ <img src="{{ '/images/twitter.svg' | prepend: site.baseurl }}" alt="Twitter" />
17
+ </a>
18
+ {% endif %}
19
+
20
+ {% if page.mastodon %}
21
+ <a
22
+ href="{{ page.mastodon }}"
23
+ rel="noreferrer nofollow noopener"
24
+ target="_blank"
25
+ title="Mastodon"
26
+ onclick="plausible('Social: Mastodon')"
27
+ >
28
+ <img src="{{ '/images/mastodon.svg' | prepend: site.baseurl }}" alt="Mastodon" />
29
+ </a>
30
+ {% endif %}
31
+
32
+ {% if page.reddit %}
33
+ <a
34
+ href="{{ page.reddit }}"
35
+ rel="noreferrer nofollow noopener"
36
+ target="_blank"
37
+ title="Reddit"
38
+ onclick="plausible('Social: Reddit')"
39
+ >
40
+ <img src="{{ '/images/reddit.svg' | prepend: site.baseurl }}" alt="Reddit" />
41
+ </a>
42
+ {% endif %}
43
+
44
+ {% if page.facebook %}
45
+ <a
46
+ href="{{ page.facebook }}"
47
+ rel="noreferrer nofollow noopener"
48
+ target="_blank"
49
+ title="Facebook"
50
+ onclick="plausible('Social: Facebook')"
51
+ >
52
+ <img src="{{ '/images/facebook.svg' | prepend: site.baseurl }}" alt="Facebook" />
53
+ </a>
54
+ {% endif %}
55
+ </div>
56
+ {% endif %}
57
+
58
+ <div class="share">
59
+ <h3>Share</h3>
60
+ {% assign share-url = page.url | prepend: site.baseurl | prepend: site.url %}
61
+
62
+ <a
63
+ href="https://twitter.com/intent/tweet?text={{ page.title }}&url={{ share-url }}&via={{ site.twitter }}&original_referer={{ share-url }}"
64
+ rel="noreferrer nofollow noopener"
65
+ target="_blank"
66
+ title="Twitter"
67
+ onclick="plausible('Share: Twitter')"
68
+ >
69
+ <img src="{{ '/images/twitter.svg' | prepend: site.baseurl }}" alt="Twitter" />
70
+ </a>
71
+
72
+ <a
73
+ href="http://www.reddit.com/submit?title={{ page.title }}&url={{ share-url }}"
74
+ rel="noreferrer nofollow noopener"
75
+ target="_blank"
76
+ title="Reddit"
77
+ onclick="plausible('Share: Reddit')"
78
+ >
79
+ <img src="{{ '/images/reddit.svg' | prepend: site.baseurl }}" alt="Reddit" />
80
+ </a>
81
+
82
+ <a
83
+ href="https://www.facebook.com/sharer/sharer.php?u={{ share-url }}"
84
+ rel="noreferrer nofollow noopener"
85
+ target="_blank"
86
+ title="Facebook"
87
+ onclick="plausible('Share: Facebook')"
88
+ >
89
+ <img src="{{ '/images/facebook.svg' | prepend: site.baseurl }}" alt="Facebook" />
90
+ </a>
91
+
92
+ <a
93
+ href="{{ page.url | prepend: site.baseurl | prepend: site.url }}"
94
+
95
+ title="Permalink"
96
+ onclick="plausible('Share: Permalink')"
97
+ >
98
+ <img src="{{ '/images/edit-copy-32.svg' | prepend: site.baseurl }}" alt="Permalink" />
99
+ </a>
100
+ </div>
101
+ </div>
102
+