diff --git a/searx/brand.py b/searx/brand.py index af1a8eec8..dcd1dd9ed 100644 --- a/searx/brand.py +++ b/searx/brand.py @@ -18,6 +18,17 @@ class BrandCustom(msgspec.Struct, kw_only=True, forbid_unknown_fields=True): """Custom entries in the footer of the WEB page: ``[title]: [link]``""" +class ThemeColors(msgspec.Struct, kw_only=True, forbid_unknown_fields=True): + """Custom settings for theme colors in the brand section.""" + + theme_color_light: str = "#3050ff" + background_color_light: str = "#fff" + theme_color_dark: str = "#58f" + background_color_dark: str = "#222428" + theme_color_black: str = "#3050ff" + background_color_black: str = "#000" + + class SettingsBrand(msgspec.Struct, kw_only=True, forbid_unknown_fields=True): """Options for configuring brand properties. @@ -53,3 +64,19 @@ class SettingsBrand(msgspec.Struct, kw_only=True, forbid_unknown_fields=True): .. autoclass:: searx.brand.BrandCustom :members: """ + + pwa_colors: ThemeColors = msgspec.field(default_factory=ThemeColors) + """Custom settings for PWA colors.""" + + # new_issue_url is a hackish solution tailored for only one hoster (GH). As + # long as we don't have a more general solution, we should support it in the + # given function, but it should not be expanded further. + + new_issue_url: str = "https://github.com/searxng/searxng/issues/new" + """If you host your own issue tracker not on GitHub, then unset this URL. + + Note: This URL will create a pre-filled GitHub bug report form for an + engine. Since this feature is implemented only for GH (and limited to + engines), it will probably be replaced by another solution in the near + future. + """ diff --git a/searx/settings.yml b/searx/settings.yml index 2cf2c29ed..1cf62987d 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -27,6 +27,15 @@ brand: # links: # Uptime: https://uptime.searxng.org/history/darmarit-org # About: "https://searxng.org" + # pwa_colors: + # # Custom settings for PWA icon an colors used in manifest.json + # # Default colors are: + # theme_color_light: "#3050ff" + # background_color_light: "fff" + # theme_color_dark: "#58f" + # background_color_dark: "#222428" + # theme_color_black: "#3050ff" + # background_color_black: "#000" search: # Filter results. 0: None, 1: Moderate, 2: Strict diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index b07168a34..7b2cd6a66 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -26,6 +26,7 @@ +