sitoctt/Scripts/MakeLocalTwemojis.sh

38 lines
765 B
Bash
Raw Normal View History

2022-06-01 00:04:32 +02:00
#!/bin/sh
File=twemoji-amazing-local.css
2022-06-01 00:04:32 +02:00
mkdir -p Scripts.out/Twemoji
cd Scripts.out/Twemoji
# Get latest Twemoji SVGs
git clone --depth 1 "https://github.com/twitter/twemoji"
mv twemoji/assets/svg svg
rm -rf twemoji
# Get latest Twemoji-Amazing CSS
wget https://nightly.link/SebastianAigner/twemoji-amazing/workflows/build_css/master/artifact.zip
unzip artifact.zip
rm artifact.zip
mv twemoji-amazing.css $File
2022-06-01 00:04:32 +02:00
# Replace spaces with tabs, save space
sed -i 's/ / /' $File
2022-06-01 00:04:32 +02:00
# Blank out CDN URL
sed -i 's/https:\/\/twemoji.maxcdn.com\/v\/latest\///' $File
2022-06-01 00:04:32 +02:00
# Personal CSS patches
cat >> $File << [EOF]
2022-06-01 00:04:32 +02:00
/*
Personal CSS patches from
https://gitlab.com/octtspacc/sitoctt
2022-06-01 00:04:32 +02:00
*/
.twa span {
/* Prevents image and text emoji overlap */
font-size: 0px;
2022-06-01 00:04:32 +02:00
}
[EOF]