diff --git a/app.py b/app.py index c3c8785..0d3d9a4 100644 --- a/app.py +++ b/app.py @@ -31,7 +31,15 @@ API_KEY = config['DEFAULT']['API_KEY'] bootstrap = Bootstrap5(app) -app.config['BOOTSTRAP_BOOTSWATCH_THEME'] = 'litera' +# Move every setting from config['BOOTSTRAP'] to the root level of config +for key in config['BOOTSTRAP']: + key = key.upper() + app.config[key] = config['BOOTSTRAP'][key] + if key == 'SECRET_KEY': + continue + elif key == 'API_KEY': + continue + print(f"Loaded config: {key} = {app.config[key]}") # Initialize the logger logger = logging.getLogger(__name__) diff --git a/example_config.ini b/example_config.ini index 3008c2a..9a9c88b 100644 --- a/example_config.ini +++ b/example_config.ini @@ -10,4 +10,21 @@ VIEW_MAX_LINES = 500 # Number of lines to display per page in the log viewer VIEW_PAGE_LINES = 50 # Number of bytes to read at a time -TAIL_PAGE_SIZE = 100 \ No newline at end of file +TAIL_PAGE_SIZE = 100 + +[BOOTSTRAP] +# See: +# https://bootstrap-flask.readthedocs.io/en/stable/basic/#configurations +BOOTSTRAP_SERVE_LOCAL = False +BOOTSTRAP_BTN_STYLE = 'primary' +BOOTSTRAP_BTN_SIZE = 'sm' +BOOTSTRAP_ICON_SIZE = '1em' +BOOTSTRAP_ICON_COLOR = None +BOOTSTRAP_BOOTSWATCH_THEME = litera +BOOTSTRAP_MSG_CATEGORY = 'primary' +BOOTSTRAP_TABLE_VIEW_TITLE = 'View' +BOOTSTRAP_TABLE_EDIT_TITLE = 'Edit' +BOOTSTRAP_TABLE_DELETE_TITLE = 'Delete' +BOOTSTRAP_TABLE_NEW_TITLE = 'New' +BOOTSTRAP_FORM_GROUP_CLASSES = 'mb-3' +BOOTSTRAP_FORM_INLINE_CLASSES = 'row row-cols-lg-auto g-3 align-items-center' \ No newline at end of file