parent
309f0dd993
commit
08ede3f797
6 changed files with 3 additions and 7899 deletions
|
@ -16,34 +16,8 @@ fi
|
|||
|
||||
FILES=(sass_processed/style.css sass_processed/content-description.css sass_processed/table.css sass_processed/ranks.css)
|
||||
|
||||
DARKMODE_CSS_FILES=(resources/darkmode.css resources/darkmode-svg.css)
|
||||
DARKMODE_SCSS_FILES=(resources/darkmode-processed.scss resources/darkmode-svg-processed.scss)
|
||||
DARKMODE_SASS_PROCESSED_FILES=(sass_processed/darkmode-processed.css sass_processed/darkmode-svg-processed.css)
|
||||
|
||||
|
||||
# Function to convert CSS to SCSS and prepend .darkmode
|
||||
convert_and_prepend_darkmode() {
|
||||
local css_file=$1
|
||||
local scss_file=$2
|
||||
local temp_file=$(mktemp)
|
||||
|
||||
echo ".darkmode {" > $temp_file
|
||||
cat $css_file >> $temp_file
|
||||
echo "}" >> $temp_file
|
||||
|
||||
mv $temp_file $scss_file
|
||||
}
|
||||
|
||||
for i in "${!DARKMODE_CSS_FILES[@]}"; do
|
||||
convert_and_prepend_darkmode "${DARKMODE_CSS_FILES[$i]}" "${DARKMODE_SCSS_FILES[$i]}"
|
||||
done
|
||||
|
||||
|
||||
cd `dirname $0`
|
||||
sass resources:sass_processed
|
||||
|
||||
echo
|
||||
postcss "${FILES[@]}" --verbose --use autoprefixer -d resources
|
||||
|
||||
echo
|
||||
postcss "${DARKMODE_SASS_PROCESSED_FILES[@]}" --verbose --use autoprefixer -d resources
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ LANGUAGE_CODE }}" {% if use_darkmode %}class="darkmode"{% endif %}>
|
||||
<html lang="{{ LANGUAGE_CODE }}">
|
||||
<head>
|
||||
<title>{% block title %}{{ title }} - {{ SITE_LONG_NAME }}{% endblock %}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
|
@ -72,8 +72,8 @@
|
|||
{% endif %}
|
||||
|
||||
{% if use_darkmode %}
|
||||
<link rel="stylesheet" href="{{ static('darkmode-processed.css') }}">
|
||||
<link rel="stylesheet" href="{{ static('darkmode-svg-processed.css') }}">
|
||||
<link rel="stylesheet" href="{{ static('darkmode.css') }}">
|
||||
<link rel="stylesheet" href="{{ static('darkmode-svg.css') }}">
|
||||
{% endif %}
|
||||
|
||||
<noscript>
|
||||
|
|
Loading…
Reference in a new issue