Skip to content

Commit 529695b

Browse files
committed
Remove global Twitter widget
1 parent fbeb6c9 commit 529695b

8 files changed

+16
-15
lines changed

_includes/head.html

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,8 @@
44

55
<title>{{ page.title }} {% if paginator and paginator.page > 1 %}Blog – Page {{ paginator.page }} {% endif %}– CSS Wizardry</title>
66

7-
{% comment %}
8-
<!--
9-
- Preemptively open up connections for external assets (Twitter widgets etc).
10-
- Only needed on pages with sidebars (i.e. non-feature pages).
11-
-->
12-
{% endcomment %}
137
{% if page.layout != "feature" %}
148
<link rel=preconnect href=https://res.cloudinary.com>
15-
<link rel=preconnect href=https://cdn.carbonads.com>
16-
<link rel=preconnect href=https://srv.carbonads.net>
17-
<link rel=preconnect href=https://cdn.syndication.twimg.com>
18-
<link rel=preconnect href=https://syndication.twitter.com>
199
{% endif %}
2010

2111
{% if page.page-class == "page--services page--workshops" or page.page-class == "page--services page--downloads" %}
@@ -73,9 +63,6 @@
7363

7464
<script src=https://cdn.speedcurve.com/js/lux.js?id=47684395 defer></script>
7565

76-
{% if page.layout != "feature" %}
77-
<script src=https://platform.twitter.com/widgets.js defer></script>
78-
{% endif %}
7966
{% if page.page-class == "page--services page--workshops" %}
8067
<script src=https://gumroad.com/js/gumroad.js defer></script>
8168
{% endif %}

_includes/sub-content.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<h4>Connect</h4>
5050

5151
<ul>
52-
<li><a href=https://twitter.com/csswizardry class=twitter-follow-button data-show-count=true data-lang=en>Follow @csswizardry</a></li>
52+
<li><a href=https://twitter.com/csswizardry>𝕏 (Twitter)</a></li>
5353
<li><a href="https://webperf.social/@csswizardry" rel="me">Mastodon</a></li>
5454
<li><a href="https://bsky.app/profile/csswizardry.com">Bluesky</a></li>
5555
<li><a href="https://www.linkedin.com/in/csswizardry/">LinkedIn</a></li>

_posts/2016-06-01-improving-your-css-with-parker.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ href="http://t.co/0jAEb2h8VF">pic.twitter.com/0jAEb2h8VF</a></p>&mdash; Gaël
277277
Métais (@gaelmetais) <a
278278
href="https://twitter.com/gaelmetais/status/564109775995437057">7 February
279279
2015</a></blockquote>
280-
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
280+
281+
<script src="https://platform.twitter.com/widgets.js" defer></script>
281282

282283
A confusing mess of unrelated selectors all grouped together via coincidence as
283284
opposed to reason. This fragments style information across your project, creates

_posts/2017-02-08-code-smells-in-css-revisited.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ Rupert](https://twitter.com/davatron5000):
227227
— Dave Rupert (@davatron5000) <a href="https://twitter.com/davatron5000/status/829091851651149824">7 February, 2017</a>
228228
</blockquote>
229229

230+
<script src="https://platform.twitter.com/widgets.js" defer></script>
231+
230232
If we need to style something differently because of its context, where should
231233
we put that additional CSS?
232234

_posts/2018-04-02-my-digital-music-setup.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ of a ‘dubious’ copy of this track? I’ll donate £25 to a charity of your c
4141
href="https://twitter.com/csswizardry/status/975337747169857537">18 March,
4242
2018</a></blockquote>
4343

44+
<script src="https://platform.twitter.com/widgets.js" defer></script>
45+
4446
If you want to listen to the track—of course you do, it’s stunning—then you’ll
4547
have to make do with the YouTube version. Couple it with some good headphones
4648
and a decent amount of volume and you’ll still get the picture:

_posts/2019-05-31-self-host-your-static-assets.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ Roberts (@csswizardry) <a
6464
href="https://twitter.com/csswizardry/status/1651599057608142849?ref_src=twsrc%5Etfw">27
6565
April, 2023</a></blockquote>
6666

67+
<script src="https://platform.twitter.com/widgets.js" defer></script>
68+
6769
## Risk: Service Shutdowns
6870

6971
A far less common occurrence, but what happens if a provider decides they need

_posts/2022-03-28-optimising-largest-contentful-paint.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ Let’s go.
3939

4040
## Solve Everything Beforehand
4141

42+
_**Struggling to hit 2.5s?** [Work with me one-to-one and deliver a faster
43+
LCP](/consultancy/)._
44+
4245
Let’s start with the easy stuff. LCP is a milestone timing—it measures…
4346

4447
> …the render time of the largest image or text block visible within the
@@ -314,6 +317,8 @@ it.]</p>&mdash; Harry Roberts (@csswizardry) <a
314317
href="https://twitter.com/csswizardry/status/1436361516534620168?ref_src=twsrc%5Etfw">10 September
315318
2021</a></blockquote>
316319

320+
<script src="https://platform.twitter.com/widgets.js" defer></script>
321+
317322
This means that `background-image` LCPs are requested at the very last moment,
318323
which is far too late. We don’t like `background-image` LCPs.
319324

_posts/2023-07-01-in-defence-of-domcontentloaded.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,8 @@ tiny ones:
420420

421421
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">As a rule, RTT (α) stays constant while download time (𝑥) is proportional to filesize. Therefore, splitting one large bundle into 16 smaller ones goes from 1α + 𝑥 to 16α + 16(0.0625𝑥). Expect things to probably get a little slower. <a href="https://t.co/c0hEsIAwKq">pic.twitter.com/c0hEsIAwKq</a></p>&mdash; Harry Roberts (@csswizardry) <a href="https://twitter.com/csswizardry/status/1352402710688133122?ref_src=twsrc%5Etfw">21 January, 2021</a></blockquote>
422422

423+
<script src="https://platform.twitter.com/widgets.js" defer></script>
424+
423425
My advice in this case is to tweak their build to output maybe 8–10 bundles and
424426
re-test from there. It’s important to balance bundle size, number of bundles,
425427
and caching strategies, but it’s clear to me that the issue here is overzealous

0 commit comments

Comments
 (0)