Make injection of theme scripts automatic

This commit is contained in:
Oliver Blanthorn 2018-05-20 15:04:46 +01:00
parent c2803b0927
commit 535dd5bb67
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
6 changed files with 11 additions and 13 deletions

9
scripts/bodgecss.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/env bash
imports=$(find src/static/themes/ -name *.css| sed "s/^src\/static\///" | sed "s/^.*$/@import url\('..\/\0'\);/")
shopt -s globstar
for css in $(ls build/static/css/**/*.css); do
printf '%s\n%s\n' "$imports" "$(cat $css)" > $css
done

View file

@ -55,6 +55,8 @@ fi
wait wait
scripts/bodgecss.sh
if [ -e "$CLEANSLATE" ] ; then if [ -e "$CLEANSLATE" ] ; then
cp -v "$CLEANSLATE" build/static/css/cleanslate.css cp -v "$CLEANSLATE" build/static/css/cleanslate.css
else else

View file

@ -1,7 +1,3 @@
@import url('../themes/default/commandline.css');
@import url('../themes/dark/commandline.css');
@import url('../themes/greenmat/commandline.css');
body { body {
overflow: hidden; overflow: hidden;
margin: 0; margin: 0;

View file

@ -1,7 +1,3 @@
@import url('../themes/default/content.css');
@import url('../themes/dark/content.css');
@import url('../themes/greenmat/content.css');
#cmdline_iframe { #cmdline_iframe {
position: fixed !important; position: fixed !important;
bottom: 0 !important; bottom: 0 !important;

View file

@ -1,7 +1,3 @@
@import url('../themes/default/content.css');
@import url('../themes/dark/content.css');
@import url('../themes/greenmat/content.css');
span.TridactylHint { span.TridactylHint {
position: absolute !important; position: absolute !important;
font-family: var(--tridactyl-hintspan-font-family) !important; font-family: var(--tridactyl-hintspan-font-family) !important;

View file

@ -1,4 +1,3 @@
#TridactylViewsourceElement { #TridactylViewsourceElement {
position: absolute !important; position: absolute !important;
/* This is the z-index of hint.css and content.css -1 */ /* This is the z-index of hint.css and content.css -1 */