second alpha (v0.2)
This commit is contained in:
parent
7a343254e2
commit
7a1094c733
22 changed files with 2343 additions and 1511 deletions
25
site_generator/functions/generators/css_generator.sh
Normal file
25
site_generator/functions/generators/css_generator.sh
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
# css_generator.sh - Erzeugt die zentrale CSS-Datei
|
||||
|
||||
generate_css() {
|
||||
local css_file_path="${WEB_ROOT_PATH}/style.css"
|
||||
local actual_banner_img_url_path="${FALLBACK_BANNER_IMG_URL}"
|
||||
|
||||
if [ -n "$STATIC_BANNER_FILENAME" ]; then
|
||||
local banner_web_path="/images/${STATIC_BANNER_FILENAME}"
|
||||
if [ -f "${WEB_ROOT_PATH}${banner_web_path}" ]; then
|
||||
actual_banner_img_url_path="$banner_web_path"
|
||||
log_message "Verwende statisches Banner: ${actual_banner_img_url_path}"
|
||||
else
|
||||
log_message "WARNUNG: Statisches Banner '${STATIC_BANNER_FILENAME}' nicht gefunden. Fallback: ${FALLBACK_BANNER_IMG_URL}"
|
||||
fi
|
||||
else
|
||||
log_message "Kein STATIC_BANNER_FILENAME definiert, verwende Fallback: ${FALLBACK_BANNER_IMG_URL}"
|
||||
fi
|
||||
|
||||
log_message "Erzeuge/Aktualisiere ${css_file_path}..."
|
||||
render_template "${TEMPLATE_DIR_PATH}/css.template" "$css_file_path" \
|
||||
"css_banner_image_path" "$actual_banner_img_url_path" \
|
||||
"CACHE_BUSTER" "$CACHE_BUSTER"
|
||||
if [ $? -ne 0 ]; then log_message "FEHLER bei der CSS-Generierung."; fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue