diff --git a/.github/workflows/.pre-commit-config.yaml b/.github/workflows/.pre-commit-config.yaml deleted file mode 100644 index 027ab32..0000000 --- a/.github/workflows/.pre-commit-config.yaml +++ /dev/null @@ -1,12 +0,0 @@ -repos: - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.9 - hooks: - - id: ruff - args: [--fix] - - id: ruff-format - - repo: https://github.com/psf/black - rev: 24.8.0 - hooks: - - id: black - args: [--quiet] diff --git a/.github/workflows/buildx.yml b/.github/workflows/buildx.yml index 85a451c..d89eea5 100644 --- a/.github/workflows/buildx.yml +++ b/.github/workflows/buildx.yml @@ -3,7 +3,7 @@ name: buildx on: workflow_run: workflows: ["docker_main"] - branches: [main] + branches: [main, updates] types: - completed push: @@ -50,6 +50,17 @@ jobs: # docker buildx build --push \ # --tag ghcr.io/benbusby/whoogle-search:latest \ # --platform linux/amd64,linux/arm64 . + - name: build and push updates branch (update-testing tag) + if: github.event.workflow_run.head_branch == 'updates' && github.event.workflow_run.conclusion == 'success' && (github.actor == 'benbusby' || github.actor == 'Don-Swanson') + run: | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + docker buildx ls + docker buildx build --push \ + --tag benbusby/whoogle-search:update-testing \ + --platform linux/amd64,linux/arm/v7,linux/arm64 . + docker buildx build --push \ + --tag ghcr.io/benbusby/whoogle-search:update-testing \ + --platform linux/amd64,linux/arm/v7,linux/arm64 . - name: build and push release (version + latest) if: github.event_name == 'release' && github.event.release.prerelease == false && (github.actor == 'benbusby' || github.actor == 'Don-Swanson') run: | diff --git a/.github/workflows/docker_main.yml b/.github/workflows/docker_main.yml index f369f47..5e30a55 100644 --- a/.github/workflows/docker_main.yml +++ b/.github/workflows/docker_main.yml @@ -3,7 +3,7 @@ name: docker_main on: workflow_run: workflows: ["tests"] - branches: [main] + branches: [main, updates] types: - completed diff --git a/app/models/config.py b/app/models/config.py index ed56af8..3446309 100644 --- a/app/models/config.py +++ b/app/models/config.py @@ -81,7 +81,6 @@ class Config: self.tbs = os.getenv('WHOOGLE_CONFIG_TIME_PERIOD', '') self.theme = os.getenv('WHOOGLE_CONFIG_THEME', 'system') self.safe = read_config_bool('WHOOGLE_CONFIG_SAFE') - self.dark = read_config_bool('WHOOGLE_CONFIG_DARK') # deprecated self.alts = read_config_bool('WHOOGLE_CONFIG_ALTS') self.nojs = read_config_bool('WHOOGLE_CONFIG_NOJS') self.tor = read_config_bool('WHOOGLE_CONFIG_TOR') diff --git a/app/routes.py b/app/routes.py index 59a14f0..b176000 100644 --- a/app/routes.py +++ b/app/routes.py @@ -217,9 +217,7 @@ def index(): translation=app.config['TRANSLATIONS'][ g.user_config.get_localization_lang() ], - logo=render_template( - 'logo.html', - dark=g.user_config.dark), + logo=render_template('logo.html'), config_disabled=( app.config['CONFIG_DISABLE'] or not valid_user_session(session)), @@ -581,7 +579,7 @@ def search(): languages=app.config['LANGUAGES'], countries=app.config['COUNTRIES'], time_periods=app.config['TIME_PERIODS'], - logo=render_template('logo.html', dark=g.user_config.dark), + logo=render_template('logo.html'), query=urlparse.unquote(query), search_type=search_util.search_type, mobile=g.user_request.mobile, diff --git a/app/templates/display.html b/app/templates/display.html index c044512..a742284 100644 --- a/app/templates/display.html +++ b/app/templates/display.html @@ -26,10 +26,12 @@ {% else %} {% endif %} - {% else %} - {% endif %} - + {% if config.style %} + + {% endif %}