From 0b98f51a740bf74cbb87268edcd0659353a1af1d Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Sat, 27 Jun 2020 23:09:42 -0400 Subject: [PATCH] switch tweet embed centering to recommended method: https://developer.twitter.com/en/docs/twitter-for-websites/embedded-tweets/overview --- assets/sass/components/_content.scss | 7 ------- layouts/shortcodes/tweet.html | 2 +- yarn.lock | 6 +++--- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/assets/sass/components/_content.scss b/assets/sass/components/_content.scss index c28ba91d..3c09cd91 100644 --- a/assets/sass/components/_content.scss +++ b/assets/sass/components/_content.scss @@ -70,13 +70,6 @@ div#content { } } - &.tweet { - .twitter-tweet-rendered { - margin: 1em auto; - display: block; - } - } - &.youtube { position: relative; padding-bottom: 56.25%; diff --git a/layouts/shortcodes/tweet.html b/layouts/shortcodes/tweet.html index 4c3b622c..5292b4e9 100644 --- a/layouts/shortcodes/tweet.html +++ b/layouts/shortcodes/tweet.html @@ -1,4 +1,4 @@ -{{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%v&dnt=1&omit_script=1" (index .Params 0) -}} +{{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%v&dnt=1&omit_script=1&align=center" (index .Params 0) -}} {{- $json := getJSON $url -}}
diff --git a/yarn.lock b/yarn.lock index 3d039939..2acddeb2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -636,9 +636,9 @@ camelcase@^6.0.0: integrity sha512-8KMDF1Vz2gzOq54ONPJS65IvTUaB1cHJ2DMM7MbPmLZljDH1qpzzLsWdiN9pHh6qvkRVDTi/07+eNGch/oLU4w== caniuse-lite@^1.0.30001087, caniuse-lite@^1.0.30001088: - version "1.0.30001089" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001089.tgz#0634653159f1179093a35fd7f36dbd7c4ed85101" - integrity sha512-RnL5dbdqAfQ5oxHjFUU8uiyJMvTKoXfRn0Asp2R5cpRsyiY5+kLl0fcocQijb0V9XAWFEG/2A/vSswRmpYarmA== + version "1.0.30001090" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001090.tgz#ff7766332f60e80fea4903f30d360622e5551850" + integrity sha512-QzPRKDCyp7RhjczTPZaqK3CjPA5Ht2UnXhZhCI4f7QiB5JK6KEuZBxIzyWnB3wO4hgAj4GMRxAhuiacfw0Psjg== caw@^2.0.0, caw@^2.0.1: version "2.0.1"