2022-11-18 23:13:26 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
HeadInject="
|
|
|
|
<style>
|
|
|
|
body {
|
|
|
|
color: #000000;
|
|
|
|
background-color: #FFFFFF;
|
|
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
body {
|
|
|
|
color: #FFFFFF;
|
|
|
|
background-color: #000000;
|
|
|
|
}
|
|
|
|
}
|
2022-11-22 00:22:25 +01:00
|
|
|
img {
|
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100vh;
|
|
|
|
}
|
|
|
|
</style>
|
2022-11-18 23:13:26 +01:00
|
|
|
"
|
|
|
|
|
2023-02-23 00:14:59 +01:00
|
|
|
cp -r ./public ./public.Plain
|
|
|
|
mv ./public.Plain ./public/Plain
|
2022-11-18 23:13:26 +01:00
|
|
|
cd ./public/Plain
|
|
|
|
|
|
|
|
find . -name "*.html" \
|
2022-11-22 00:22:25 +01:00
|
|
|
-exec sed -i "s|<style>|<!--style>|g" {} \; \
|
|
|
|
-exec sed -i "s|</style>|</style--->|g" {} \;
|
2022-11-18 23:13:26 +01:00
|
|
|
|
|
|
|
find . -name "*.html" \
|
2022-11-22 00:22:25 +01:00
|
|
|
-exec sed -i "s|<head>|<head>\n$(echo $HeadInject)|" {} \;
|
2022-11-18 23:13:26 +01:00
|
|
|
|
|
|
|
find . -name "*.css" \
|
2022-11-22 00:22:25 +01:00
|
|
|
-exec sh -c 'if [ "$(basename {})" != "Global.css" ]; then echo > {}; fi' \;
|