diff --git a/.bumpversion.toml b/.bumpversion.toml index 2f228eb..1cde0f8 100644 --- a/.bumpversion.toml +++ b/.bumpversion.toml @@ -1,17 +1,17 @@ [tool.bumpversion] +allow_dirty = false +commit = false +commit_args = "" current_version = "0.0.2" +ignore_missing_files = false +ignore_missing_version = false +message = "Bump version: {current_version} β†’ {new_version}" parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)" -serialize = ["{major}.{minor}.{patch}"] -search = "{current_version}" -replace = "{new_version}" regex = false -ignore_missing_version = false -ignore_missing_files = false -tag = false +replace = "{new_version}" +search = "{current_version}" +serialize = ["{major}.{minor}.{patch}"] sign_tags = false -tag_name = "v{new_version}" +tag = false tag_message = "Bump version: {current_version} β†’ {new_version}" -allow_dirty = false -commit = false -message = "Bump version: {current_version} β†’ {new_version}" -commit_args = "" +tag_name = "v{new_version}" diff --git a/.editorconfig b/.editorconfig index 2e21918..c0ce342 100644 --- a/.editorconfig +++ b/.editorconfig @@ -25,5 +25,3 @@ indent_style = tab [default.conf] indent_style = space indent_size = 2 - -{% block extra %}{% endblock extra %} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca7053f..20b4f5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,36 +1,44 @@ name: CI - on: workflow_dispatch: push: pull_request: +permissions: {} jobs: pre-commit: runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout Code Repository uses: actions/checkout@v4 + with: + persist-credentials: false - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' - # Consider using pre-commit.ci for open source project + python-version: "3.11" + - name: Run pre-commit uses: pre-commit/action@v3.0.0 ctt: runs-on: ubuntu-latest + permissions: + contents: read strategy: matrix: - version: ['3.11', '3.12', '3.10'] + version: ["3.11", "3.12", "3.10"] steps: - name: Checkout Code Repository uses: actions/checkout@v4 + with: + persist-credentials: false - name: Set up Python uses: actions/setup-python@v4 diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 0000000..6830f8b --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,36 @@ +name: GitHub Actions Security Analysis with zizmor 🌈 + +on: + push: + branches: ["main"] + pull_request: + branches: ["**"] + +jobs: + zizmor: + name: zizmor latest via PyPI + runs-on: ubuntu-latest + permissions: + security-events: write + # required for workflows in private repositories + contents: read + actions: read + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v5 + + - name: Run zizmor 🌈 + run: uvx zizmor --format sarif . > results.sarif + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: results.sarif + category: zizmor diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 17b113d..484ffc8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,5 @@ +default_stages: [pre-commit] + repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 @@ -29,6 +31,11 @@ repos: - id: ruff - id: ruff-format + - repo: https://github.com/woodruffw/zizmor-pre-commit + rev: v1.4.1 + hooks: + - id: zizmor + # - repo: https://github.com/KyleKing/copier-template-tester # rev: 2.1.2 # hooks: diff --git a/copier.yaml b/copier.yaml index 5da0619..e0158fa 100644 --- a/copier.yaml +++ b/copier.yaml @@ -4,7 +4,7 @@ template_type: default: python choices: - python - - django + # - django project_name: type: str @@ -58,41 +58,41 @@ docker: # Django template -gis: - type: bool - default: false - help: "Setup to use GIS software (GDAL, GEODjango)" - when: "{{ template_type == 'django' }}" - -rest: - type: bool - default: false - help: "Need REST APIs" - when: "{{ template_type == 'django' }}" - -ldap: - type: bool - default: false - help: "LDAP Authentication" - when: "{{ template_type == 'django' }}" - -ui: - type: bool - default: "{{ not rest }}" - help: "Use Django for UI rendering" - when: "{{ template_type == 'django' }}" - -queue: - type: bool - default: false - help: "Setup queue system" - when: "{{ template_type == 'django' }}" - -primary_color: - type: str - default: "#425563" - when: "{{ ui and template_type == 'django' }}" - help: "Primary color for the theme" +# gis: +# type: bool +# default: false +# help: "Setup to use GIS software (GDAL, GEODjango)" +# when: "{{ template_type == 'django' }}" + +# rest: +# type: bool +# default: false +# help: "Need REST APIs" +# when: "{{ template_type == 'django' }}" + +# ldap: +# type: bool +# default: false +# help: "LDAP Authentication" +# when: "{{ template_type == 'django' }}" + +# ui: +# type: bool +# default: "{{ not rest }}" +# help: "Use Django for UI rendering" +# when: "{{ template_type == 'django' }}" + +# queue: +# type: bool +# default: false +# help: "Setup queue system" +# when: "{{ template_type == 'django' }}" + +# primary_color: +# type: str +# default: "#425563" +# when: "{{ ui and template_type == 'django' }}" +# help: "Primary color for the theme" debug: type: bool @@ -102,6 +102,7 @@ debug: _subdirectory: "{{ template_type }}" -_tasks: - - "python3 -m venv .venv" - - ". .venv/bin/activate && python3 nina-python-init.py {{ default_branch_name }} {{ template_type }} {% if debug %}--debug{% endif%} && rm nina-python-init.py" +_envops: + keep_trailing_newline: true + trim_blocks: true + lstrip_blocks: true diff --git a/ctt.toml b/ctt.toml index 8603e65..c699517 100644 --- a/ctt.toml +++ b/ctt.toml @@ -1,52 +1,10 @@ [defaults] -template_type = "python" debug = true +template_type = "python" [output.".ctt/defaults"] debug = true -[output.".ctt/django-full"] -gis = true -rest = true -template_type = "django" -debug = true -ui = true - -[output.".ctt/django-gis"] -gis = true -rest = false -template_type = "django" -ui = false -debug = true - -[output.".ctt/django-rest"] -rest = true -template_type = "django" -ui = false -debug = true - -[output.".ctt/django-simple"] -gis = false -rest = false -template_type = "django" -ui = false -debug = true - -[output.".ctt/django-ui"] -gis = false -rest = false -template_type = "django" -ui = true -debug = true - -[output.".ctt/django-queue"] -gis = false -rest = false -template_type = "django" -ui = false -queue = true -debug = true - [output.".ctt/python"] -docker = true debug = true +docker = true diff --git a/django/.dockerignore.jinja b/django/.dockerignore.jinja deleted file mode 100644 index e0ee581..0000000 --- a/django/.dockerignore.jinja +++ /dev/null @@ -1 +0,0 @@ -{% extends 'python/{% if docker %}.dockerignore{% endif %}.jinja' %} diff --git a/django/.editorconfig.jinja b/django/.editorconfig.jinja deleted file mode 100644 index 6f2770b..0000000 --- a/django/.editorconfig.jinja +++ /dev/null @@ -1 +0,0 @@ -{% extends "python/.editorconfig.jinja" %} diff --git a/django/.env.example b/django/.env.example deleted file mode 100644 index 6bed8a9..0000000 --- a/django/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -POSTGRES_PASSWORD=postgres -DJANGO_SECRET_KEY=secret diff --git a/django/.env.jinja b/django/.env.jinja deleted file mode 100644 index 2dcb0ab..0000000 --- a/django/.env.jinja +++ /dev/null @@ -1,2 +0,0 @@ -POSTGRES_PASSWORD={{ 999999999999999999999999999999999|ans_random|hash('sha512') }} -DJANGO_SECRET_KEY={{ 999999999999999999999999999999999|ans_random|hash('sha512') }} diff --git a/django/.github/workflows/ci.yml.jinja b/django/.github/workflows/ci.yml.jinja deleted file mode 100644 index ededfeb..0000000 --- a/django/.github/workflows/ci.yml.jinja +++ /dev/null @@ -1,56 +0,0 @@ -name: CI - -# Enable Buildkit and let compose use it to speed up image building -env: - DOCKER_BUILDKIT: 1 - COMPOSE_DOCKER_CLI_BUILD: 1 - -on: - pull_request: - branches: ['{{ default_branch_name }}'] - paths-ignore: ['docs/**'] - - push: - branches: ['{{ default_branch_name }}'] - paths-ignore: ['docs/**'] - -concurrency: - group: {% raw %}${{ github.head_ref || github.run_id }}{% endraw %} - cancel-in-progress: true - -jobs: - linter: - runs-on: ubuntu-latest - steps: - - name: Checkout Code Repository - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - # Consider using pre-commit.ci for open source project - - name: Run pre-commit - uses: pre-commit/action@v3.0.0 - - pytest: - runs-on: ubuntu-latest - - steps: - - name: Checkout Code Repository - uses: actions/checkout@v4 - - - name: Setup secrets - run: cp .env.example .env - - - name: Build the Stack - run: docker compose --profile dev build - - - name: Run DB Migrations - run: docker compose --profile dev run --rm django-dev manage.py migrate - - - name: Run Django Tests - run: docker compose --profile dev run django-dev pytest - - - name: Tear down the Stack - run: docker compose --profile dev down diff --git a/django/.github/workflows/docs.yml b/django/.github/workflows/docs.yml deleted file mode 100644 index 6203f93..0000000 --- a/django/.github/workflows/docs.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Publish -on: - workflow_dispatch: - push: - pull_request: - -jobs: - build: - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - permissions: - contents: read - pages: write - id-token: write - - environment: - # environment created automatically by GitHub - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install Nix - uses: cachix/install-nix-action@v27 - with: - nix_path: nixpkgs=channel:nixos-unstable - - - name: Build - run: cd docs && nix-shell --run "mdbook build" - - - name: Archive book - uses: actions/upload-artifact@v4 - with: - name: book - path: docs/book/* - - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 - with: - path: "docs/book" - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 diff --git a/django/.github/workflows/publish.yml b/django/.github/workflows/publish.yml deleted file mode 100644 index e9e5db7..0000000 --- a/django/.github/workflows/publish.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Docker -on: - workflow_dispatch: - push: - pull_request: - -env: - REGISTRY: ghcr.io - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - context: . - target: django - image: ghcr.io/${{ github.repository }}/backend-django - - context: ./nginx - image: ghcr.io/${{ github.repository }}/backend-nginx - - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ matrix.image }} - tags: | - type=ref,event=branch - type=sha - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: ${{ matrix.context }} - target: ${{ matrix.target }} - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/django/.gitignore.jinja b/django/.gitignore.jinja deleted file mode 100644 index 024fb7d..0000000 --- a/django/.gitignore.jinja +++ /dev/null @@ -1,158 +0,0 @@ -{% extends 'python/.gitignore.jinja' %} - -{% block extra %} -### Node js - https://github.com/github/gitignore/blob/main/Node.gitignore -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp -.cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* - - - -### Django: -staticfiles/ - -### mkdocs documentation -/site - - - -### VisualStudioCode template -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for devcontainer -.devcontainer/bash_history - - -{% endblock %} diff --git a/django/.pre-commit-config.yaml.jinja b/django/.pre-commit-config.yaml.jinja deleted file mode 100644 index 0bf83cb..0000000 --- a/django/.pre-commit-config.yaml.jinja +++ /dev/null @@ -1,16 +0,0 @@ -{% extends 'python/.pre-commit-config.yaml.jinja' %} - -{% block extra %} - - repo: https://github.com/adamchainz/django-upgrade - rev: '1.15.0' - hooks: - - id: django-upgrade - args: ['--target-version', '5.0'] - - - repo: https://github.com/Yelp/detect-secrets - rev: v1.4.0 - hooks: - - id: detect-secrets - args: [--exclude-files=src/fixtures/users.json] - -{% endblock %} diff --git a/django/.vscode/extensions.json.jinja b/django/.vscode/extensions.json.jinja deleted file mode 100644 index 5174424..0000000 --- a/django/.vscode/extensions.json.jinja +++ /dev/null @@ -1,5 +0,0 @@ -{% extends 'python/.vscode/extensions.json.jinja' %} - -{% block extra %}"ms-azuretools.vscode-docker", - "batisteo.vscode-django", - "mrorz.language-gettext",{% endblock %} diff --git a/django/.vscode/settings.json.jinja b/django/.vscode/settings.json.jinja deleted file mode 100644 index 4a96e2d..0000000 --- a/django/.vscode/settings.json.jinja +++ /dev/null @@ -1 +0,0 @@ -{% extends 'python/.vscode/settings.json.jinja' %} diff --git a/django/Dockerfile.jinja b/django/Dockerfile.jinja deleted file mode 100644 index 74d19bb..0000000 --- a/django/Dockerfile.jinja +++ /dev/null @@ -1,75 +0,0 @@ -FROM debian:12.5 as base -RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \ - --mount=target=/var/cache/apt,type=cache,sharing=locked \ - apt-get update && apt-get install --no-install-recommends -yq python3 python3-pip git python3-venv python3-dev gettext - -{% if gis %} -# GDAL and gis dependencies -RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \ - --mount=target=/var/cache/apt,type=cache,sharing=locked \ - apt-get install --no-install-recommends -yq gdal-bin proj-bin -{% endif %} - - -{% if ldap %} -# LDAP dependencies -RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \ - --mount=target=/var/cache/apt,type=cache,sharing=locked \ - apt-get install --no-install-recommends -yq libldap2-dev libsasl2-dev slapd ldap-utils tox \ - lcov valgrind build-essential -{% endif %} - - -WORKDIR /app -RUN python3 -m venv .venv -ENV PYTHONPATH=/app/.venv/lib -ENV PATH=/app/.venv/bin:$PATH -COPY ./pyproject.toml . -COPY src/manage.py src/ -RUN pip install -e . - - -FROM scratch as source -WORKDIR /app -COPY src src - -{% if ui %}# SCSS build - bootstrap customization -FROM node:14 AS theme -WORKDIR /app -COPY theme/package.json . -RUN npm i -g gulp -RUN npm install -COPY theme/src src -COPY theme/gulpfile.js . -COPY src/static static -RUN gulp build{% endif %} - - -FROM base as production -RUN pip install -e .[prod] - - -# Compile the translations for multilanguage -FROM base as translation -COPY --from=source /app . -RUN DATABASE_URL="" DJANGO_BASE_SCHEMA_URL="" \ - DJANGO_SETTINGS_MODULE="config.settings.test" \ - manage.py compilemessages - -FROM base as django -COPY --from=production /app . -COPY --from=translation /app/src/locale /app/src/locale -COPY --from=source /app .{% if ui %} -COPY --from=theme /app/static src/static{% endif %} -RUN mkdir media -COPY entrypoint.sh . -ENTRYPOINT ["./entrypoint.sh"] - -FROM base as dev -RUN pip install -e .[dev] - -COPY --from=django /app/src src -COPY --from=translation /app/src/locale /app/src/locale -COPY --from=django /app/entrypoint.sh . -COPY entrypoint.sh . -ENTRYPOINT ["./entrypoint.sh"] diff --git a/django/README.md.jinja b/django/README.md.jinja deleted file mode 100644 index e13ea1e..0000000 --- a/django/README.md.jinja +++ /dev/null @@ -1,74 +0,0 @@ -# {{ project_name }} -A django project generated from: ninanor/django-template - -Features: -- Docker -{% if rest %}- REST APIs{% endif %} -{% if ui %}- UI rendered by django{% endif %} -{% if gis %}- Geo Django{% endif %} -{% if ldap %}- LDAP{% endif %} - -## Requirements -- docker - - -## How to use -First, if you are lazy execute -``` -source helpers.sh # or . helpers.sh -``` -This will create some shortcuts to run docker commands. - -### Development setup -``` -docker compose --profile dev up -d --build -# or dpcli_dev up -d --build -``` -This will build the docker images for local development and startup everything. -**NOTE**: the `docker-compose.yml` uses bind-mounts, so editing your local django files will trigger a server reload without needing to rebuild the whole image. -In case you want to install new libraries (via `apt-get` or `pip`) ou will need to rebuild. - -The development setup will by default create a administrator user (admin@nina.no) with password: admin. -At every container start it will apply new migrations. - -#### Django commands -Django provides useful command line tools that can be executed with `manage.py`, to see a list of all the available commands run inside the django container `src/manage.py help`. -Check [Django documentation](https://docs.djangoproject.com/en/5.0/ref/django-admin/) for a list of the builtin commands. -Here are some examples of how to run them from your command line: -``` -djcli_dev makemigrations # it will detect changes in your model files and will create SQL scripts to migrate tables accordingly -``` -This is actually an alias for -``` -docker compose --profile dev exec -it django-dev src/manage.py makemigrations -``` - -You can then review the migration script created and apply it with: -``` -djcli_dev migrate -``` - -Other useful commands: -``` -createsuperuser # creates a new administrator account -shell_plus # open an interactive python shell -showmigrations # shows a list of migrations, useful to know which ones are applyied -dumpdata # dump data from a table into a json file -loaddata # load data from a json file to a table -models2puml # -``` - -### Production setup -This setup will create docker images optimized for production, without devtools installed -``` -docker compose --profile prod up -d --build -# or dpcli_prod up -d --build -``` - -## How to update -``` -copier update --trust -``` - -This will try to check differences between your project and the template, if no conflicts are found you are done. -Check this [page](https://copier.readthedocs.io/en/stable/updating/) for more specific info about this feature. diff --git a/django/docker-compose.yml.jinja b/django/docker-compose.yml.jinja deleted file mode 100644 index ef2ff7a..0000000 --- a/django/docker-compose.yml.jinja +++ /dev/null @@ -1,142 +0,0 @@ -volumes: - pgdata: {} - statics: {} - -x-django-env: &django-env - DATABASE_URL: "postgis://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres?sslmode=disable" - DJANGO_SETTINGS_MODULE: config.settings.production - DJANGO_ACCOUNT_ALLOW_REGISTRATION: "False" - USE_DOCKER: "yes" - DJANGO_BASE_SCHEMA_URL: "http://django:8000"{% if ldap %} - AUTH_LDAP_SERVER_URI: "ldap://ldap:10389" - AUTH_LDAP_BIND_DN: '' - AUTH_LDAP_BIND_PASSWORD: '' - AUTH_LDAP_USER_SEARCH_BASE: "ou=people,dc=planetexpress,dc=com" - {% endif %} - -x-django-prod-env: &django-prod-env - <<: *django-env - DJANGO_SECRET_KEY: "${DJANGO_SECRET_KEY}" - DJANGO_SERVER_EMAIL: "" - DJANGO_ADMIN_URL: admin/ - DJANGO_SECURE_SSL_REDIRECT: False - WEB_CONCURRENCY: 4 - DJANGO_ALLOWED_HOSTS: "localhost,django" - -x-django-dev-env: &django-dev-env - <<: *django-env - DJANGO_SETTINGS_MODULE: config.settings.local - IPYTHONDIR: "/app/.ipython" - -x-django: &django - build: - target: django - depends_on: - - postgres - environment: - <<: *django-env - - -x-django-prod: &django-prod - <<: *django - depends_on: - - postgres - profiles: - - prod - command: gunicorn config.wsgi --bind 0.0.0.0:8000 --chdir=/app - -x-django-dev: &django-dev - <<: *django - build: - target: dev - profiles: - - dev - environment: - <<: *django-dev-env - volumes: - - ./src:/app/src - - ./media:/app/media - command: manage.py runserver 0.0.0.0:8000 - #command: python -m pdb -c continue manage.py runserver 0.0.0.0:8000 --nothreading --noreload - -services: - django: - <<: *django-prod - environment: - <<: *django-prod-env - DJANGO_COLLECTSTATIC: 1 - DJANGO_MIGRATE: 1 - volumes: - - statics:/app/staticfiles - - django-dev: - <<: *django-dev - tty: true - stdin_open: true - hostname: django - environment: - <<: *django-dev-env - DJANGO_MIGRATE: 1 - -{% if queue %} - queue: - <<: *django-prod - environment: - <<: *django-prod-env - WAIT_FOR_HTTP: http://django:8000/ht/ - command: manage.py procrastinate worker - - queue-dev: - <<: *django-dev - environment: - <<: *django-dev-env - WAIT_FOR_HTTP: http://django:8000/ht/ - command: manage.py procrastinate worker -{% endif %} - -{% if ui %} - theme: - build: - context: ./theme - profiles: - - dev - volumes: - - ./theme/src:/app/src - - ./src/static:/app/static -{% endif %} - - postgres: - {% if gis %}image: postgis/postgis:16-3.4{% else %}image: postgres:16{% endif %} - volumes: - - pgdata:/var/lib/postgresql/data - environment: - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} - ports: - - 5432:5432 - - nginx: - build: - context: ./nginx - profiles: - - prod - volumes: - - statics:/statics - ports: - - 8000:80 - - nginx-dev: - hostname: nginx - profiles: - - dev - build: - context: ./nginx - volumes: - - ./media:/media_files - ports: - - 8000:80 - {% if ldap %} - ldap: - image: ghcr.io/rroemhild/docker-test-openldap:master - ports: - - 10389:10389 - {% endif %} diff --git a/django/docs/.gitignore b/django/docs/.gitignore deleted file mode 100644 index 7585238..0000000 --- a/django/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -book diff --git a/django/docs/README.md b/django/docs/README.md deleted file mode 100644 index daa678a..0000000 --- a/django/docs/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# How to document - -``` -nix-shell - -mdbook serve -mdbook build -``` diff --git a/django/docs/book.toml.jinja b/django/docs/book.toml.jinja deleted file mode 100644 index 035f200..0000000 --- a/django/docs/book.toml.jinja +++ /dev/null @@ -1,12 +0,0 @@ -[book] -authors = [] -language = "en" -multilingual = false -src = "src" - -[preprocessor.kroki-preprocessor] - -[output.html] -git-repository-url = "https://github.com/{{Β repo_org }}/{{ repo_name }}/" -edit-url-template = "https://github.com/{{Β repo_org }}/{{ repo_name }}/edit/{{ default_branch_name }}/docs/{path}" -additional-css = ["theme/css/kroki.css"] diff --git a/django/docs/shell.nix b/django/docs/shell.nix deleted file mode 100644 index ae04d7b..0000000 --- a/django/docs/shell.nix +++ /dev/null @@ -1,9 +0,0 @@ -with import { -}; - -let in pkgs.mkShell rec { - buildInputs = [ - mdbook - mdbook-kroki-preprocessor - ]; -} diff --git a/django/docs/src/README.md b/django/docs/src/README.md deleted file mode 100644 index e10b99d..0000000 --- a/django/docs/src/README.md +++ /dev/null @@ -1 +0,0 @@ -# Introduction diff --git a/django/docs/src/SUMMARY.md b/django/docs/src/SUMMARY.md deleted file mode 100644 index bfb7c90..0000000 --- a/django/docs/src/SUMMARY.md +++ /dev/null @@ -1,2 +0,0 @@ -# Summary -[Introduction](README.md) diff --git a/django/docs/theme/css/kroki.css b/django/docs/theme/css/kroki.css deleted file mode 100644 index 6299791..0000000 --- a/django/docs/theme/css/kroki.css +++ /dev/null @@ -1,4 +0,0 @@ -.content > main > pre > svg { - width: 100% !important; - height: auto !important; -} diff --git a/django/entrypoint.sh.jinja b/django/entrypoint.sh.jinja deleted file mode 100755 index 4d8756e..0000000 --- a/django/entrypoint.sh.jinja +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "python/{% if docker %}entrypoint.sh{% endif %}.jinja" %} - -{% block setup_commands %} -manage.py wait_for_database - -if [[ -z "${WAIT_FOR_HTTP}" ]] -then - echo "No HTTP service to wait for" -else - manage.py wait_for_http "$WAIT_FOR_HTTP" -fi - -if [[ -z "${DJANGO_MIGRATE}" ]] -then - echo "Skip migration and setup" -else - manage.py makemigrations - manage.py migrate - manage.py setup -fi - -if [[ -z "${DJANGO_COLLECTSTATIC}" ]] -then - echo "Skip collectstatic" -else - manage.py collectstatic --noinput -fi -{% endblock %} diff --git a/django/helpers.sh b/django/helpers.sh deleted file mode 100755 index df329ab..0000000 --- a/django/helpers.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -alias dpcli_dev="docker compose --profile dev" -alias dpcli_prod="docker compose --profile prod" - -alias djcli_dev="docker compose --profile dev exec -it django-dev manage.py" -alias djcli_prod="docker compose --profile prod -it django manage.py" diff --git a/django/media/.gitignore b/django/media/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/django/media/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/django/nginx/Dockerfile b/django/nginx/Dockerfile deleted file mode 100644 index 3534afe..0000000 --- a/django/nginx/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM nginx:1.23 - -COPY default.conf.template /etc/nginx/templates/default.conf.template -RUN mkdir /statics /media_files diff --git a/django/nginx/default.conf.template b/django/nginx/default.conf.template deleted file mode 100644 index 1c5b129..0000000 --- a/django/nginx/default.conf.template +++ /dev/null @@ -1,66 +0,0 @@ -map $http_upgrade $connection_upgrade { - default upgrade; - '' close; -} - -upstream django { - server django:8000; - keepalive 64; -} - -server { - listen 80; - resolver 127.0.0.11; - - #access_log /var/log/nginx/host.access.log main; - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } - - client_max_body_size 300m; - - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-NginX-Proxy true; - proxy_set_header Cookie $http_cookie; - proxy_redirect off; - - location /static/ { - alias /statics/; - try_files $uri @proxy; - } - - location /media/ { - alias /media_files/; - add_header 'Access-Control-Allow-Origin' '*'; - } - - location @proxy { - proxy_pass http://django; - proxy_http_version 1.1; - proxy_set_header Host $http_host; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - } - - location / { - # TODO: use a better solution to upload files, for example s3 + tusd - # allow upload of big file - this is a temporary solution - client_max_body_size 8000M; - client_body_buffer_size 8000M; - client_body_timeout 360; - - proxy_pass http://django; - proxy_http_version 1.1; - proxy_set_header Host $http_host; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - } -} diff --git a/django/nina-python-init.py.jinja b/django/nina-python-init.py.jinja deleted file mode 100755 index 948c59f..0000000 --- a/django/nina-python-init.py.jinja +++ /dev/null @@ -1 +0,0 @@ -{% extends 'python/nina-python-init.py' %} diff --git a/django/pyproject.toml.jinja b/django/pyproject.toml.jinja deleted file mode 100644 index d29333c..0000000 --- a/django/pyproject.toml.jinja +++ /dev/null @@ -1,79 +0,0 @@ -{% extends 'python/pyproject.toml.jinja' %} - -{% block dependencies %} - {{ super() }} - "python-slugify>=8.0.1", - "Pillow>=10.3.0", - "rcssmin", - "argon2-cffi", - "psycopg[binary]", - "backoff", - "requests", - "django>=5.0.0", - "django-model-utils", - "django-allauth", - "django-crispy-forms", - "crispy-bootstrap5", - "django-health-check", - "django-probes", - "django-postgres-extra", - "django-solo", - "django-appconf>=1.0.6", - "django-cors-headers>=4.3.1", - "django-filter>=24.1", - "slippers", - "django-tables2>=2.7.0", - "django-autocomplete-light>=3.11.0", - {%- if rest %}"dj-rest-auth", - "django-rest-framework", - "drf-spectacular", - "djangorestframework-simplejwt", - "django-cors-headers",{% endif %} - {%- if ldap %}"django-auth-ldap",{% endif %} - {%- if queue %}"procrastinate[django]",{% endif %} -{% endblock %} - -{% block project_extra %} -{{ super() }} -dev = [ - "Werkzeug[watchdog]", - "ipdb", - "pytest", - "pytest-sugar", - "coverage", - "pre-commit", - "factory-boy", - "django-debug-toolbar", - "django-extensions", - "django-coverage-plugin", - "pytest-django", - "django-models2puml>=0.2" -] -prod = [ - "gunicorn", - "sentry-sdk>=1.40.5" -] -{% endblock %} - -{% block project_scripts %} -"manage.py" = "{{ project_slug }}:django_manage" -{% endblock %} - -{% block extra %} -# ==== pytest ==== -[tool.pytest.ini_options] -addopts = "--ds=config.settings.test --reuse-db" -minversion = "6.0" -python_files = [ - "tests.py", - "test_*.py" -] - -# ==== Coverage ==== -[tool.coverage] - -[tool.coverage.run] -include = ["app/**"] -omit = ["*/migrations/*", "*/tests/*"] -plugins = ["django_coverage_plugin"] -{% endblock %} diff --git a/django/src/apps/contrib/__init__.py b/django/src/apps/contrib/__init__.py deleted file mode 100644 index dec79d7..0000000 --- a/django/src/apps/contrib/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -"""To understand why this file is here, please read: - -http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django -""" diff --git a/django/src/apps/contrib/sites/__init__.py b/django/src/apps/contrib/sites/__init__.py deleted file mode 100644 index dec79d7..0000000 --- a/django/src/apps/contrib/sites/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -"""To understand why this file is here, please read: - -http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django -""" diff --git a/django/src/apps/contrib/sites/migrations/0001_initial.py b/django/src/apps/contrib/sites/migrations/0001_initial.py deleted file mode 100644 index aee0dea..0000000 --- a/django/src/apps/contrib/sites/migrations/0001_initial.py +++ /dev/null @@ -1,41 +0,0 @@ -import django.contrib.sites.models -from django.contrib.sites.models import _simple_domain_name_validator -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [] - - operations = [ - migrations.CreateModel( - name="Site", - fields=[ - ( - "id", - models.AutoField( - verbose_name="ID", - serialize=False, - auto_created=True, - primary_key=True, - ), - ), - ( - "domain", - models.CharField( - max_length=100, - verbose_name="domain name", - validators=[_simple_domain_name_validator], - ), - ), - ("name", models.CharField(max_length=50, verbose_name="display name")), - ], - options={ - "ordering": ("domain",), - "db_table": "django_site", - "verbose_name": "site", - "verbose_name_plural": "sites", - }, - bases=(models.Model,), - managers=[("objects", django.contrib.sites.models.SiteManager())], - ), - ] diff --git a/django/src/apps/contrib/sites/migrations/0002_alter_domain_unique.py b/django/src/apps/contrib/sites/migrations/0002_alter_domain_unique.py deleted file mode 100644 index 10b653b..0000000 --- a/django/src/apps/contrib/sites/migrations/0002_alter_domain_unique.py +++ /dev/null @@ -1,19 +0,0 @@ -import django.contrib.sites.models -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [("sites", "0001_initial")] - - operations = [ - migrations.AlterField( - model_name="site", - name="domain", - field=models.CharField( - max_length=100, - unique=True, - validators=[django.contrib.sites.models._simple_domain_name_validator], - verbose_name="domain name", - ), - ), - ] diff --git a/django/src/apps/contrib/sites/migrations/0003_set_site_domain_and_name.py b/django/src/apps/contrib/sites/migrations/0003_set_site_domain_and_name.py deleted file mode 100644 index e11c52a..0000000 --- a/django/src/apps/contrib/sites/migrations/0003_set_site_domain_and_name.py +++ /dev/null @@ -1,62 +0,0 @@ -"""To understand why this file is here, please read: - -http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django -""" - -from django.conf import settings -from django.db import migrations - - -def _update_or_create_site_with_sequence(site_model, connection, domain, name): - """Update or create the site with default ID and keep the DB sequence in sync.""" - site, created = site_model.objects.update_or_create( - id=settings.SITE_ID, - defaults={ - "domain": domain, - "name": name, - }, - ) - if created: - # We provided the ID explicitly when creating the Site entry, therefore the DB - # sequence to auto-generate them wasn't used and is now out of sync. If we - # don't do anything, we'll get a unique constraint violation the next time a - # site is created. - # To avoid this, we need to manually update DB sequence and make sure it's - # greater than the maximum value. - max_id = site_model.objects.order_by("-id").first().id - with connection.cursor() as cursor: - cursor.execute("SELECT last_value from django_site_id_seq") - (current_id,) = cursor.fetchone() - if current_id <= max_id: - cursor.execute( - "alter sequence django_site_id_seq restart with %s", - [max_id + 1], - ) - - -def update_site_forward(apps, schema_editor): - """Set site domain and name.""" - Site = apps.get_model("sites", "Site") - _update_or_create_site_with_sequence( - Site, - schema_editor.connection, - "app.nina.no", - "NINA App", - ) - - -def update_site_backward(apps, schema_editor): - """Revert site domain and name to default.""" - Site = apps.get_model("sites", "Site") - _update_or_create_site_with_sequence( - Site, - schema_editor.connection, - "example.com", - "example.com", - ) - - -class Migration(migrations.Migration): - dependencies = [("sites", "0002_alter_domain_unique")] - - operations = [migrations.RunPython(update_site_forward, update_site_backward)] diff --git a/django/src/apps/contrib/sites/migrations/0004_alter_options_ordering_domain.py b/django/src/apps/contrib/sites/migrations/0004_alter_options_ordering_domain.py deleted file mode 100644 index 095ca00..0000000 --- a/django/src/apps/contrib/sites/migrations/0004_alter_options_ordering_domain.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 3.1.7 on 2021-02-04 14:49 - -from django.db import migrations - - -class Migration(migrations.Migration): - dependencies = [ - ("sites", "0003_set_site_domain_and_name"), - ] - - operations = [ - migrations.AlterModelOptions( - name="site", - options={ - "ordering": ["domain"], - "verbose_name": "site", - "verbose_name_plural": "sites", - }, - ), - ] diff --git a/django/src/apps/contrib/sites/migrations/__init__.py b/django/src/apps/contrib/sites/migrations/__init__.py deleted file mode 100644 index 1c7ecc8..0000000 --- a/django/src/apps/contrib/sites/migrations/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -To understand why this file is here, please read: - -http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django -""" diff --git a/django/src/apps/core/__init__.py b/django/src/apps/core/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/apps/core/apps.py b/django/src/apps/core/apps.py deleted file mode 100644 index 7773b07..0000000 --- a/django/src/apps/core/apps.py +++ /dev/null @@ -1,7 +0,0 @@ -from django.apps import AppConfig -from django.utils.translation import gettext_lazy as _ - - -class CoreConfig(AppConfig): - name = "apps.core" - verbose_name = _("Core") diff --git a/django/src/apps/core/context_processors.py b/django/src/apps/core/context_processors.py deleted file mode 100644 index 69ed17b..0000000 --- a/django/src/apps/core/context_processors.py +++ /dev/null @@ -1,9 +0,0 @@ -from django.conf import settings -from django.http import HttpRequest -from django.template import Context - - -def context_settings(request: HttpRequest) -> Context: - return { - "PROJECT_NAME": settings.PROJECT_NAME, - } diff --git a/django/src/apps/core/management/commands/__init__.py b/django/src/apps/core/management/commands/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/apps/core/management/commands/setup.py b/django/src/apps/core/management/commands/setup.py deleted file mode 100644 index 0ebc28c..0000000 --- a/django/src/apps/core/management/commands/setup.py +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Self - -from apps.users.models import User - -from django.core.management import call_command -from django.core.management.base import BaseCommand - - -class Command(BaseCommand): - def handle(self: Self, **options) -> None: - if User.objects.all().first() is None: - call_command("loaddata", "users.json") diff --git a/django/src/apps/core/management/commands/wait_for_http.py b/django/src/apps/core/management/commands/wait_for_http.py deleted file mode 100644 index 958de42..0000000 --- a/django/src/apps/core/management/commands/wait_for_http.py +++ /dev/null @@ -1,90 +0,0 @@ -"""Django management command ``wait_for_http``""" - -from typing import Self - -import backoff -import requests - -from django.core.management.base import BaseCommand, CommandError, CommandParser - - -@backoff.on_exception( - backoff.expo, - ( - requests.exceptions.RequestException, - requests.exceptions.Timeout, - requests.exceptions.ConnectionError, - ), - max_time=60, -) -def run_request(url: str) -> None: - response = requests.get(url=url, timeout=60) - response.raise_for_status() - - -def wait_for_http(**opts) -> None: # noqa: ANN003 - """The main loop waiting for the http connection to come up.""" - url = opts["url"] - run_request(url=url) - print("Connection successfull") - - -class Command(BaseCommand): - """A readiness probe you can use for Kubernetes. - - If the service is ready, i.e. willing to accept connections - and handling requests, then this call will exit successfully. Otherwise - the command exits with an error status after reaching a timeout. - """ - - help = "Probes for http service availability" - - def add_arguments(self: Self, parser: CommandParser) -> None: - parser.add_argument("url", type=str, help="HTTP Healthcheck endpoint") - parser.add_argument( - "--timeout", - "-t", - type=int, - default=180, - metavar="SECONDS", - action="store", - help="how long to wait for the http service" - + "before timing out (seconds), default: 180", - ) - parser.add_argument( - "--stable", - "-s", - type=int, - default=5, - metavar="SECONDS", - action="store", - help="how long to observe whether connection" - + "is stable (seconds), default: 5", - ) - parser.add_argument( - "--wait-when-down", - "-d", - type=int, - default=2, - metavar="SECONDS", - action="store", - help="delay between checks when http service is down (seconds), default: 2", - ) - parser.add_argument( - "--wait-when-alive", - "-a", - type=int, - default=1, - metavar="SECONDS", - action="store", - help="delay between checks when http service is up (seconds), default: 1", - ) - - def handle(self: Self, **options) -> None: # noqa: ANN003 - """Wait for a http connection to come up. Exit with error - status when a timeout threshold is surpassed. - """ - try: - wait_for_http(**options) - except TimeoutError as err: - raise CommandError(err) from err diff --git a/django/src/apps/core/templates/core/app.html b/django/src/apps/core/templates/core/app.html deleted file mode 100755 index 01f0c51..0000000 --- a/django/src/apps/core/templates/core/app.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends 'core/base.html' %} - -{% block body %} - {% include 'core/partials/navigation.html' %} - {# djlint:off H021 #} -
- {% if messages %} - {% for message in messages %} -
- {{ message }} - -
- {% endfor %} - {% endif %} - {% block content-wrapper %} -
- {# djlint:on #} - {% block content %} - {% endblock content %} -
- {% endblock content-wrapper %} -
-{% endblock body %} diff --git a/django/src/apps/core/templates/core/base.html.jinja b/django/src/apps/core/templates/core/base.html.jinja deleted file mode 100644 index e955014..0000000 --- a/django/src/apps/core/templates/core/base.html.jinja +++ /dev/null @@ -1,57 +0,0 @@ -{% raw %} -{% load static i18n %} - - -{% get_current_language as LANGUAGE_CODE %} - - - - - - {% block title %}{% endblock title %} - - - - - {% block seo %} - - - {% endblock seo %} - - {% block css %} - {% endraw %}{% if ui %} - - - {% endif %}{% raw %} - {% endblock css %} - {% block head_javascript %} - {% endblock head_javascript %} - - - {% block body %} - {% endblock body %} - {% block modal %} - {% endblock modal %} - {% block body_javascript %} - - - - - - - - - - - - - - - - - - {% endblock body_javascript %} - - -{% endraw %} diff --git a/django/src/apps/core/templates/core/partials/navigation.html b/django/src/apps/core/templates/core/partials/navigation.html deleted file mode 100755 index 41d7401..0000000 --- a/django/src/apps/core/templates/core/partials/navigation.html +++ /dev/null @@ -1,36 +0,0 @@ -{% load i18n %} - - diff --git a/django/src/apps/core/templates/core/partials/user-dropdown.html b/django/src/apps/core/templates/core/partials/user-dropdown.html deleted file mode 100644 index d61d85c..0000000 --- a/django/src/apps/core/templates/core/partials/user-dropdown.html +++ /dev/null @@ -1,34 +0,0 @@ -{% load i18n %} - - diff --git a/django/src/apps/users/__init__.py b/django/src/apps/users/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/apps/users/adapters.py b/django/src/apps/users/adapters.py deleted file mode 100644 index a4880a6..0000000 --- a/django/src/apps/users/adapters.py +++ /dev/null @@ -1,13 +0,0 @@ -from __future__ import annotations - -from typing import Self - -from allauth.account.adapter import DefaultAccountAdapter - -from django.conf import settings -from django.http import HttpRequest - - -class AccountAdapter(DefaultAccountAdapter): - def is_open_for_signup(self: Self, request: HttpRequest) -> bool: - return getattr(settings, "ACCOUNT_ALLOW_REGISTRATION", True) diff --git a/django/src/apps/users/admin.py b/django/src/apps/users/admin.py deleted file mode 100644 index b6242eb..0000000 --- a/django/src/apps/users/admin.py +++ /dev/null @@ -1,49 +0,0 @@ -from apps.users.forms import UserAdminChangeForm, UserAdminCreationForm - -from django.conf import settings -from django.contrib import admin -from django.contrib.auth import admin as auth_admin -from django.contrib.auth import decorators, get_user_model -from django.utils.translation import gettext_lazy as _ - -User = get_user_model() - -if settings.DJANGO_ADMIN_FORCE_ALLAUTH: - # Force the `admin` sign in process to go through the `django-allauth` workflow: - # https://django-allauth.readthedocs.io/en/stable/advanced.html#admin - admin.site.login = decorators.login_required(admin.site.login) # type: ignore[method-assign] - - -@admin.register(User) -class UserAdmin(auth_admin.UserAdmin): - form = UserAdminChangeForm - add_form = UserAdminCreationForm - fieldsets = ( - (None, {"fields": ("email", "password")}), - (_("Personal info"), {"fields": ("first_name", "last_name")}), - ( - _("Permissions"), - { - "fields": ( - "is_active", - "is_staff", - "is_superuser", - "groups", - "user_permissions", - ), - }, - ), - (_("Important dates"), {"fields": ("last_login", "date_joined")}), - ) - list_display = ["email", "first_name", "last_name", "is_superuser"] - search_fields = ["email", "first_name", "last_name"] - ordering = ["id"] - add_fieldsets = ( - ( - None, - { - "classes": ("wide",), - "fields": ("email", "password1", "password2"), - }, - ), - ) diff --git a/django/src/apps/users/apps.py b/django/src/apps/users/apps.py deleted file mode 100644 index 4ea8228..0000000 --- a/django/src/apps/users/apps.py +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Self - -from django.apps import AppConfig -from django.utils.translation import gettext_lazy as _ - - -class UsersConfig(AppConfig): - name = "apps.users" - verbose_name = _("Users") - - def ready(self: Self) -> None: - try: - import apps.users.signals # noqa: F401 - except ImportError: - pass diff --git a/django/src/apps/users/context_processors.py b/django/src/apps/users/context_processors.py deleted file mode 100644 index c2ec34b..0000000 --- a/django/src/apps/users/context_processors.py +++ /dev/null @@ -1,9 +0,0 @@ -from django.conf import settings -from django.http import HttpRequest - - -def allauth_settings(request: HttpRequest) -> dict: - """Expose some settings from django-allauth in templates.""" - return { - "ACCOUNT_ALLOW_REGISTRATION": settings.ACCOUNT_ALLOW_REGISTRATION, - } diff --git a/django/src/apps/users/filters.py b/django/src/apps/users/filters.py deleted file mode 100644 index 9a82d64..0000000 --- a/django/src/apps/users/filters.py +++ /dev/null @@ -1,12 +0,0 @@ -from django_filters import FilterSet - -from .models import User - - -class UserFilterSet(FilterSet): - class Meta: - model = User - fields = [ - "email", - "id", - ] diff --git a/django/src/apps/users/forms.py b/django/src/apps/users/forms.py deleted file mode 100644 index 6477e07..0000000 --- a/django/src/apps/users/forms.py +++ /dev/null @@ -1,34 +0,0 @@ -from allauth.account.forms import SignupForm - -from django.contrib.auth import forms as admin_forms -from django.contrib.auth import get_user_model -from django.forms import EmailField -from django.utils.translation import gettext_lazy as _ - -User = get_user_model() - - -class UserAdminChangeForm(admin_forms.UserChangeForm): - class Meta(admin_forms.UserChangeForm.Meta): - model = User - field_classes = {"email": EmailField} - - -class UserAdminCreationForm(admin_forms.UserCreationForm): - """Form for User Creation in the Admin Area. - To change user signup, see UserSignupForm. - """ - - class Meta(admin_forms.UserCreationForm.Meta): - model = User - fields = ("email",) - field_classes = {"email": EmailField} - error_messages = { - "email": {"unique": _("This email has already been taken.")}, - } - - -class UserSignupForm(SignupForm): - """Form that will be rendered on a user sign up section/screen. - Default fields will be added automatically. - """ diff --git a/django/src/apps/users/managers.py b/django/src/apps/users/managers.py deleted file mode 100644 index 956d7f9..0000000 --- a/django/src/apps/users/managers.py +++ /dev/null @@ -1,54 +0,0 @@ -from typing import TYPE_CHECKING, Self - -from django.contrib.auth.hashers import make_password -from django.contrib.auth.models import UserManager as DjangoUserManager - -if TYPE_CHECKING: - from apps.users.models import User -else: - User = None - - -class UserManager(DjangoUserManager): - """Custom manager for the User model.""" - - def _create_user( - self: Self, - email: str, - password: str | None, - **extra_fields, - ) -> User: - """Create and save a user with the given email and password.""" - if not email: - raise ValueError("The given email must be set") - email = self.normalize_email(email) - user = self.model(email=email, **extra_fields) - user.password = make_password(password) - user.save(using=self._db) - return user - - def create_user( - self: Self, - email: str, - password: str | None = None, - **extra_fields, - ) -> User: - extra_fields.setdefault("is_staff", False) - extra_fields.setdefault("is_superuser", False) - return self._create_user(email, password, **extra_fields) - - def create_superuser( - self: Self, - email: str, - password: str | None = None, - **extra_fields, - ) -> User: - extra_fields.setdefault("is_staff", True) - extra_fields.setdefault("is_superuser", True) - - if extra_fields.get("is_staff") is not True: - raise ValueError("Superuser must have is_staff=True.") - if extra_fields.get("is_superuser") is not True: - raise ValueError("Superuser must have is_superuser=True.") - - return self._create_user(email, password, **extra_fields) diff --git a/django/src/apps/users/migrations/0001_initial.py b/django/src/apps/users/migrations/0001_initial.py deleted file mode 100644 index 2770d9b..0000000 --- a/django/src/apps/users/migrations/0001_initial.py +++ /dev/null @@ -1,110 +0,0 @@ -# Generated by Django 4.2.6 on 2023-10-25 11:37 -import apps.users.managers - -import django.utils.timezone -from django.db import migrations, models - - -class Migration(migrations.Migration): - initial = True - - dependencies = [ - ("auth", "0012_alter_user_first_name_max_length"), - ] - - operations = [ - migrations.CreateModel( - name="User", - fields=[ - ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("password", models.CharField(max_length=128, verbose_name="password")), - ( - "last_login", - models.DateTimeField( - blank=True, - null=True, - verbose_name="last login", - ), - ), - ( - "is_superuser", - models.BooleanField( - default=False, - help_text="Designates that this user has all permissions without explicitly assigning them.", - verbose_name="superuser status", - ), - ), - ( - "is_staff", - models.BooleanField( - default=False, - help_text="Designates whether the user can log into this admin site.", - verbose_name="staff status", - ), - ), - ( - "is_active", - models.BooleanField( - default=True, - help_text="Designates whether this user should be treated as active. Unselect this instead of deleting accounts.", - verbose_name="active", - ), - ), - ( - "date_joined", - models.DateTimeField( - default=django.utils.timezone.now, - verbose_name="date joined", - ), - ), - ( - "email", - models.EmailField( - max_length=254, - unique=True, - verbose_name="email address", - ), - ), - ("first_name", models.CharField(max_length=200)), - ("last_name", models.CharField(max_length=200)), - ( - "groups", - models.ManyToManyField( - blank=True, - help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.", - related_name="user_set", - related_query_name="user", - to="auth.group", - verbose_name="groups", - ), - ), - ( - "user_permissions", - models.ManyToManyField( - blank=True, - help_text="Specific permissions for this user.", - related_name="user_set", - related_query_name="user", - to="auth.permission", - verbose_name="user permissions", - ), - ), - ], - options={ - "verbose_name": "user", - "verbose_name_plural": "users", - "abstract": False, - }, - managers=[ - ("objects", apps.users.managers.UserManager()), - ], - ), - ] diff --git a/django/src/apps/users/migrations/__init__.py b/django/src/apps/users/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/apps/users/models.py b/django/src/apps/users/models.py deleted file mode 100644 index a36b11e..0000000 --- a/django/src/apps/users/models.py +++ /dev/null @@ -1,32 +0,0 @@ -from typing import Self - -from apps.users.managers import UserManager - -from django.contrib.auth.models import AbstractUser -from django.db.models import CharField, EmailField -from django.urls import reverse -from django.utils.translation import gettext_lazy as _ - - -class User(AbstractUser): - """Default custom user model.""" - - email = EmailField(_("email address"), unique=True) - username = None # type: ignore - first_name = CharField(max_length=200) - last_name = CharField(max_length=200) - - USERNAME_FIELD = "email" - REQUIRED_FIELDS = [] - - objects = UserManager() - - def get_absolute_url(self: Self) -> str: - """Get URL for user's detail view. - - Returns - ------- - str: URL for user detail. - - """ - return reverse("users:detail", kwargs={"pk": self.id}) diff --git a/django/src/apps/users/tables.py b/django/src/apps/users/tables.py deleted file mode 100644 index c3bab51..0000000 --- a/django/src/apps/users/tables.py +++ /dev/null @@ -1,14 +0,0 @@ -from apps.ui.tables import UITable - -from .models import User - - -class UserTable(UITable): - class Meta: - model = User - fields = [ - "id", - "email", - "first_name", - "last_name", - ] diff --git a/django/src/apps/users/urls.py b/django/src/apps/users/urls.py deleted file mode 100644 index 0768d50..0000000 --- a/django/src/apps/users/urls.py +++ /dev/null @@ -1,18 +0,0 @@ -from apps.users.views import ( - UserDetail, - UsersList, - UserUpdate, - user_redirect_view, - user_update_view, -) - -from django.urls import path - -app_name = "users" -urlpatterns = [ - path("", view=UsersList.as_view(), name="list"), - path("~redirect/", view=user_redirect_view, name="redirect"), - path("~update/", view=user_update_view, name="update"), - path("/", view=UserDetail.as_view(), name="detail"), - path("/edit/", view=UserUpdate.as_view(), name="edit"), -] diff --git a/django/src/apps/users/views.py b/django/src/apps/users/views.py deleted file mode 100644 index 32300c4..0000000 --- a/django/src/apps/users/views.py +++ /dev/null @@ -1,73 +0,0 @@ -from typing import Self - -from apps.ui.views import UIDetailView, UIListView, UIUpdateView - -from django.contrib.auth import get_user_model -from django.contrib.auth.mixins import LoginRequiredMixin -from django.contrib.messages.views import SuccessMessageMixin -from django.urls import reverse -from django.utils.translation import gettext_lazy as _ -from django.views.generic import DetailView, RedirectView, UpdateView - -from .filters import UserFilterSet -from .tables import UserTable - -User = get_user_model() - - -class UserDetailView(LoginRequiredMixin, DetailView): - model = User - slug_field = "id" - slug_url_kwarg = "id" - - -user_detail_view = UserDetailView.as_view() - - -class UserUpdateView(LoginRequiredMixin, SuccessMessageMixin, UpdateView): - model = User - fields = ["first_name", "last_name"] - success_message = _("Information successfully updated") - - def get_success_url(self: Self) -> str: - if not self.request.user.is_authenticated: - raise Exception("User is not authenticated") - return self.request.user.get_absolute_url() - - def get_object(self: Self) -> User: - return self.request.user - - -user_update_view = UserUpdateView.as_view() - - -class UserRedirectView(LoginRequiredMixin, RedirectView): - permanent = False - - def get_redirect_url(self: Self) -> str: - return reverse("users:detail", kwargs={"pk": self.request.user.pk}) - - -user_redirect_view = UserRedirectView.as_view() - - -class UsersList(UIListView): - model = User - table_class = UserTable - filterset_class = UserFilterSet - active_dropdown = "users" - active_route = "users_list" - - -class UserUpdate(UIUpdateView): - model = User - fields = [ - "first_name", - "last_name", - ] - active_dropdown = "users" - - -class UserDetail(UIDetailView): - model = User - active_dropdown = "users" diff --git a/django/src/apps/{% if ui %}ui{% endif %}/__init__.py b/django/src/apps/{% if ui %}ui{% endif %}/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/apps/{% if ui %}ui{% endif %}/pagination.py b/django/src/apps/{% if ui %}ui{% endif %}/pagination.py deleted file mode 100644 index d2033a0..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/pagination.py +++ /dev/null @@ -1,99 +0,0 @@ -import logging -import traceback -from typing import Self - -from django.core.paginator import Paginator -from django.db import connection -from django.db.models.query import QuerySet -from django.utils.functional import cached_property - - -class EstimateWithoutFiltersPaginator(Paginator): - """ - Combination of ideas from: - - https://gist.github.com/safar/3bbf96678f3e479b6cb683083d35cb4d - - https://medium.com/@hakibenita/optimizing-django-admin-paginator-53c4eb6bfca3 - Overrides the count method of QuerySet objects to avoid timeouts. - - get an estimate instead of actual count when not filtered - (this estimate can be stale and hence not fit for - situations where the count of objects actually matter). - - If any other exception occured fall back to default behaviour. - """ - - def __init__(self: Self, *args, qs: QuerySet = None, **kwargs) -> Self: - """ - read additional qs parameter, look at FilterCompatibleTablePagination.paginate - this is necessary because django_tables2.Table - would pass an object that isn't a queryset - """ - super().__init__(*args, **kwargs) - self.qs = qs - - @cached_property - def count(self: Self) -> int: - """ - Returns an estimated number of objects, across all pages. - """ - object_list = None - - if hasattr(self.object_list, "query"): - object_list = self.object_list - - if hasattr(self.qs, "query"): - object_list = self.qs - - try: - """ - beware - don't try to test object_list, this would actually execute an - under-performant query because the queryset are lazy evalueted - just try to check and if somethings fail, just skip this - """ - if not object_list.query.where: - with connection.cursor() as cursor: - # Obtain estimated values (only valid with PostgreSQL) - # in case of negative number return 0 - table_name = object_list.query.model._meta.db_table - cursor.execute( - "SELECT reltuples FROM pg_class WHERE relname = %s", - [table_name], - ) - estimate = int(cursor.fetchone()[0]) - if estimate < 0: - logging.warn( - f"{table_name} returned negative estimate {estimate}," - + " this may require VACUUM/ANALYZE such table", - ) - return 0 - return estimate - except Exception: - # If any other exception occurred fall back to default behaviour - logging.warning(traceback.format_exc()) - - return super().count - - -class FilterCompatibleTablePagination: - def paginate( - self: Self, - per_page: int = None, - page: int = 1, - *args, - paginator_class: Paginator = None, - **kwargs, - ) -> Self: - per_page = per_page or self._meta.per_page - """ - inject the original queryset inside the paginator, - so that it can understand if any where is present - self.data.data reads from Table data - """ - self.paginator = EstimateWithoutFiltersPaginator( - self.rows, - per_page, - *args, - qs=self.data.data, - **kwargs, - ) - self.page = self.paginator.page(page) - - return self diff --git a/django/src/apps/{% if ui %}ui{% endif %}/tables.py b/django/src/apps/{% if ui %}ui{% endif %}/tables.py deleted file mode 100644 index f941a52..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/tables.py +++ /dev/null @@ -1,24 +0,0 @@ -from typing import Any, Self - -from django_tables2 import Column, Table - -from django.utils.html import format_html - - -class UITable(Table): - """ - Official table mixin, mostly used as base for the UI - """ - - extra = Column(verbose_name="Actions", empty_values=(), orderable=False) - - def __init__(self: Self, *args, show_total: bool = True, **kwargs) -> Self: # noqa: ANN002 - super().__init__(*args, **kwargs) - self._template = "ui/partials/table.html" - self.show_total = show_total - - def render_extra(self: Self, value: Any, record: Any) -> str: # noqa: ANN401 - return format_html( - '', - f"{record.id}/", - ) diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/components.yaml b/django/src/apps/{% if ui %}ui{% endif %}/templates/components.yaml deleted file mode 100644 index dd63c79..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/components.yaml +++ /dev/null @@ -1,3 +0,0 @@ -components: - sidenav-dropdown: "ui/components/sidenav-dropdown.html" - sidenav-item: "ui/components/sidenav-item.html" diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/base.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/base.html deleted file mode 100644 index 29010a5..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/base.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends 'base.html' %} - -{% block body %} - {% include 'ui/partials/sidenav.html' %} -
- {% include 'ui/partials/topbar.html' %} - {% if messages %} - {% for message in messages %} -
- {{ message }} - -
- {% endfor %} - {% endif %} - {% block content %} - {% endblock content %} -
-{% endblock body %} -{% block body_javascript %} - {{ block.super }} - {% if form %}{{ form.media }}{% endif %} - {% if filter.form %}{{ filter.form.media }}{% endif %} -{% endblock body_javascript %} diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/components/fa_icon.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/components/fa_icon.html deleted file mode 100644 index 91b70e6..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/components/fa_icon.html +++ /dev/null @@ -1,7 +0,0 @@ -{% load slippers %} - -{% var icon_name=icon|default:"user" %} -{% var icon_style=icon_style|default:"fas" %} -{% var class=class|default:"" %} - - diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/components/sidenav-dropdown.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/components/sidenav-dropdown.html deleted file mode 100644 index 0ae9353..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/components/sidenav-dropdown.html +++ /dev/null @@ -1,25 +0,0 @@ -{% load i18n fontawesome %} - - diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/components/sidenav-item.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/components/sidenav-item.html deleted file mode 100644 index a6d4b6c..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/components/sidenav-item.html +++ /dev/null @@ -1,8 +0,0 @@ -{% load i18n fontawesome %} - - diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/create.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/create.html deleted file mode 100644 index bdadbb7..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/create.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends 'ui/base.html' %} - -{% load crispy_forms_tags %} -{% load i18n %} - -{% block content %} -

{% translate 'Create' %} {{ title }}

-
-
-
- {{ form|crispy }} - {% csrf_token %} - -
-
-
-{% endblock content %} diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/delete.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/delete.html deleted file mode 100644 index ad3384e..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/delete.html +++ /dev/null @@ -1,59 +0,0 @@ -{% extends 'ui/base.html' %} - -{% load crispy_forms_tags %} -{% load i18n fontawesome static %} - -{% block content %} -
-

{{ object }}

- {% block tags %} - {% endblock tags %} -
- {% fa_icon icon='arrow-left' %} {% trans 'Back' %} - {% block page_actions %} - {% endblock page_actions %} -
-
-
-
- {% if not protected %} - - - - - - - - - {% for model_name, object_count in model_count %} - - - - - {% endfor %} - -
NameAmount
{{ model_name|capfirst }}{{ object_count }}
-
-

- {% trans 'Warning:' %} {% trans 'Deleting will cause deletion also of these related objects' %}. -

-
    - {{ deletable_objects|unordered_list }} -
-
-
- {{ form|crispy }} - {% csrf_token %} - -
- {% else %} -

{% blocktrans %}The following objects prevents the deletion, you must delete them first.{% endblocktrans %}

-
    - {{ protected|unordered_list }} -
- {% endif %} -
-
- {% block extra %} - {% endblock extra %} -{% endblock content %} diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/detail.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/detail.html deleted file mode 100644 index 8b6c9bd..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/detail.html +++ /dev/null @@ -1,35 +0,0 @@ -{% extends 'ui/base.html' %} - -{% load crispy_forms_tags %} -{% load i18n fontawesome %} - -{% block content %} -
-

- {% block content-title %} - {{ object }} - {% endblock content-title %} -

- {% block tags %} - {% endblock tags %} -
- {% fa_icon icon='arrow-left' %} {% trans 'Back' %} - {% if not prevent_delete %} - {# djlint:off D018 #} - {% fa_icon icon='trash' %} {% trans 'Delete' %} - {% endif %} - {% block page_actions %} - {% endblock page_actions %} -
-
- {% block card %} -
-
- {% block inner %} - {% endblock inner %} -
-
- {% endblock card %} - {% block extra %} - {% endblock extra %} -{% endblock content %} diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/form.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/form.html deleted file mode 100644 index 89faffd..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/form.html +++ /dev/null @@ -1,42 +0,0 @@ -{% extends 'ui/base.html' %} - -{% load crispy_forms_tags %} -{% load i18n fontawesome %} - -{% block content %} -
-

{{ page_title }}

- {% block tags %} - {% endblock tags %} -
- {% fa_icon icon='arrow-left' %} {% trans 'Back' %} - {% block page_actions %} - {% endblock page_actions %} -
-
-
-
- {% block pre-form %} - {{ pre_form_text }} - {% endblock pre-form %} -
- {{ form|crispy }} - {% csrf_token %} - -
- {% block post-form %} - {{ post_form_text }} - {% endblock post-form %} -
-
- {% block extra %} - {% endblock extra %} -{% endblock content %} diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/index.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/index.html deleted file mode 100644 index a63be81..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/index.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends 'ui/base.html' %} - -{% block content %} -{% endblock content %} diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/list.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/list.html deleted file mode 100644 index 9f82bd4..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/list.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends 'ui/base.html' %} - -{% load render_table from django_tables2 %} -{% load crispy_forms_tags i18n fontawesome %} - -{% block content %} -
-

- {% block content-title %} - {{ title }} - {% endblock content-title %} -

- {% block tags %} - {% endblock tags %} -
- {% if create_path %}Create{% endif %} - {% block page_actions %} - {% endblock page_actions %} -
-
- {% if filter %} -
-
-
- {{ filter.form | crispy }} -
- -
-
-
-
- {% endif %} -
-
{% render_table table %}
-
-{% endblock content %} diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/pagination-jump.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/pagination-jump.html deleted file mode 100644 index c14b28f..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/pagination-jump.html +++ /dev/null @@ -1,22 +0,0 @@ - -
- - -
- diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/pagination.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/pagination.html deleted file mode 100644 index 3c433c3..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/pagination.html +++ /dev/null @@ -1,57 +0,0 @@ - -{% load pagination %} - -
- -
{% include 'ui/partials/pagination-jump.html' %}
-
diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/sidenav.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/sidenav.html deleted file mode 100644 index 3baa1f2..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/sidenav.html +++ /dev/null @@ -1,17 +0,0 @@ -{% load i18n fontawesome slippers %} - - diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/table.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/table.html deleted file mode 100644 index c77d605..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/table.html +++ /dev/null @@ -1,118 +0,0 @@ -{% load django_tables2 %} -{% load i18n %} - -{% block table-wrapper %} - {% if table.show_total %} -

- Showing {{ table.page.start_index }}-{{ table.page.end_index }} of {{ table.paginator.count }} -

- {% endif %} -
- {% block table %} - - {% block table.thead %} - {% if table.show_header %} - - - {% for column in table.columns %} - - {% endfor %} - - - {% endif %} - {% endblock table.thead %} - {% block table.tbody %} - - {% for row in table.paginated_rows %} - {% block table.tbody.row %} - - {% for column, cell in row.items %} - - {% endfor %} - - {% endblock table.tbody.row %} - {% empty %} - {% if table.empty_text %} - {% block table.tbody.empty_text %} - - - - {% endblock table.tbody.empty_text %} - {% endif %} - {% endfor %} - - {% endblock table.tbody %} -
- {% if column.orderable %} - {{ column.header }} - {% else %} - {{ column.header }} - {% endif %} - {% if column.footer %} -
- {{ column.footer }} - {% endif %} - {% if column.orderable %}
{% endif %} -
- {% if column.localize == None %} - {{ cell }} - {% else %} - {% if column.localize %} - {{ cell|localize }} - {% else %} - {{ cell|unlocalize }} - {% endif %} - {% endif %} -
{{ table.empty_text }}
- {% endblock table %} -
- {% block pagination %} - {% if table.show_total %} -

- Showing {{ table.page.start_index }}-{{ table.page.end_index }} of {{ table.paginator.count }} -

- {% endif %} - {% if table.page and table.paginator.num_pages > 1 %} -
- -
{% include 'ui/partials/pagination-jump.html' %}
-
- {% endif %} - {% endblock pagination %} -{% endblock table-wrapper %} diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/topbar.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/topbar.html deleted file mode 100644 index 423bdbb..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/partials/topbar.html +++ /dev/null @@ -1,14 +0,0 @@ -{% load i18n fontawesome %} - - diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/update.html b/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/update.html deleted file mode 100644 index aea1035..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templates/ui/update.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends 'ui/base.html' %} - -{% load crispy_forms_tags %} -{% load i18n fontawesome static %} - -{% block content %} -
-

{{ object }}

- {% block tags %} - {% endblock tags %} -
- {% fa_icon icon='arrow-left' %} {% trans 'Back' %} - {% if not prevent_delete %} - {# djlint:off D018 #} - {% fa_icon icon='trash' %} {% trans 'Delete' %} - {% endif %} - {% block page_actions %} - {% endblock page_actions %} -
-
-
-
-
- {{ form|crispy }} - {% csrf_token %} - {% block form_extra %} - {% endblock form_extra %} - {% if not readonly %} - - {% endif %} -
-
-
- {% block extra %} - {% endblock extra %} -{% endblock content %} diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templatetags/__init__.py b/django/src/apps/{% if ui %}ui{% endif %}/templatetags/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templatetags/fontawesome.py b/django/src/apps/{% if ui %}ui{% endif %}/templatetags/fontawesome.py deleted file mode 100644 index ef298ff..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templatetags/fontawesome.py +++ /dev/null @@ -1,11 +0,0 @@ -from slippers.templatetags.slippers import register_components - -from django import template - -register = template.Library() -register_components( - { - "fa_icon": "ui/components/fa_icon.html", - }, - register, -) diff --git a/django/src/apps/{% if ui %}ui{% endif %}/templatetags/pagination.py b/django/src/apps/{% if ui %}ui{% endif %}/templatetags/pagination.py deleted file mode 100644 index 4ad7fec..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/templatetags/pagination.py +++ /dev/null @@ -1,27 +0,0 @@ -from django import http, template -from django.core.paginator import Page - -register = template.Library() - - -@register.simple_tag -def query_transform(request: http.HttpRequest, **kwargs) -> str: - updated = request.GET.copy() - for k, v in kwargs.items(): - if v is not None: - updated[k] = v - else: - updated.pop(k, 0) - - return updated.urlencode() - - -@register.simple_tag -def page_result(page_object: Page, **kwargs) -> str: - first = ((page_object.number - 1) * page_object.paginator.per_page) + 1 - first = first if page_object.paginator.count > 0 else 0 - second = (page_object.number * page_object.paginator.per_page) + 1 - second = ( - second if second < page_object.paginator.count else page_object.paginator.count - ) - return f"{first}-{second} of {page_object.paginator.count} results" diff --git a/django/src/apps/{% if ui %}ui{% endif %}/urls.py b/django/src/apps/{% if ui %}ui{% endif %}/urls.py deleted file mode 100644 index c41b35f..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/urls.py +++ /dev/null @@ -1,12 +0,0 @@ -from django.urls import path - -from .views import UITemplateView - -app_name = "ui" -urlpatterns = [ - path( - "dashboard/", - view=UITemplateView.as_view(template_name="ui/base.html"), - name="dashboard", - ), -] diff --git a/django/src/apps/{% if ui %}ui{% endif %}/utils.py b/django/src/apps/{% if ui %}ui{% endif %}/utils.py deleted file mode 100644 index f73e631..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/utils.py +++ /dev/null @@ -1,23 +0,0 @@ -from django.contrib.admin.utils import NestedObjects -from django.db.models import Model -from django.utils.encoding import force_str -from django.utils.text import capfirst - - -# https://stackoverflow.com/questions/12158714/how-to-show-related-items-using-deleteview-in-django -def get_deleted_objects(objs: list[Model]) -> tuple[list[Model], int, list[Model]]: - collector = NestedObjects(using="default") - collector.collect(objs) - - def format_callback(obj: Model) -> str: - opts = obj._meta - no_edit_link = f"{capfirst(opts.verbose_name)}: {force_str(obj)}" - return no_edit_link - - to_delete = collector.nested(format_callback) - protected = [format_callback(obj) for obj in collector.protected] - model_count = { - model._meta.verbose_name_plural: len(objs) - for model, objs in collector.model_objs.items() - } - return to_delete, model_count, protected diff --git a/django/src/apps/{% if ui %}ui{% endif %}/views.py b/django/src/apps/{% if ui %}ui{% endif %}/views.py deleted file mode 100644 index c4b0385..0000000 --- a/django/src/apps/{% if ui %}ui{% endif %}/views.py +++ /dev/null @@ -1,208 +0,0 @@ -from typing import Self - -from django_filters.views import FilterMixin -from django_tables2 import SingleTableView - -from django.db.models import Model -from django.http import HttpResponse, HttpResponseRedirect -from django.template import Context -from django.urls import reverse_lazy -from django.views.generic import ( - CreateView, - DeleteView, - DetailView, - FormView, - TemplateView, - UpdateView, -) - -from .utils import get_deleted_objects - - -class FilterableSingleTableView(FilterMixin, SingleTableView): - """ - Override get context data to avoid calling the view pagination - """ - - def get_context_data( - self: Self, - object_list: list[Model] = None, - **kwargs, - ) -> Context: - # Create the filterset - filterset_class = self.get_filterset_class() - kwargs = { - "data": self.request.GET or None, - "request": self.request, - "queryset": self.get_queryset(), - } - self.filterset = filterset_class(**kwargs) - - # Assign the result to object list - if ( - not self.filterset.is_bound - or self.filterset.is_valid() - or not self.get_strict() - ): - self.object_list = self.filterset.qs - else: - self.object_list = self.filterset.queryset.none() - - queryset = object_list if object_list is not None else self.object_list - context = { - "paginator": None, - "page_obj": None, - "is_paginated": False, - "object_list": queryset, - "filter": self.filterset, - } - context.update(kwargs) - - # Using the filtered queryset populate the table - table = self.get_table(**self.get_table_kwargs()) - context[self.get_context_table_name(table)] = table - return context - - -class UINavigationMixin: - active_dropdown = None - active_route = None - create_path = None - delete_path = None - - def get_create_path(self: Self) -> str: - if self.create_path: - return reverse_lazy(self.create_path) - return None - - def get_delete_path(self: Self) -> str: - if self.create_path: - return reverse_lazy(self.delete_path) - return None - - def get_context_data(self: Self, **kwargs) -> Context: - ctx = super().get_context_data(**kwargs) - ctx["sidenav_active_dropdown"] = self.active_dropdown - ctx["sidenav_active_route"] = self.active_route - ctx["create_path"] = self.get_create_path() - ctx["delete_path"] = self.get_delete_path() - return ctx - - -class UITitleMixin: - active_dropdown = None - active_route = None - - def get_context_data(self: Self, **kwargs) -> Context: - ctx = super().get_context_data(**kwargs) - if self.model: - ctx["title"] = self.model._meta.verbose_name_plural.title() - elif self.queryset: - ctx["title"] = self.queryset.model._meta.verbose_name_plural.title() - else: - ctx["title"] = "" - return ctx - - -class UITemplateView(UINavigationMixin, TemplateView): - pass - - -class UICreateView(UITitleMixin, UINavigationMixin, CreateView): - template_name = "ui/create.html" - - -class UIDetailView(UITitleMixin, UINavigationMixin, DetailView): - template_name = "ui/detail.html" - - -class UIListView( - UITitleMixin, - UINavigationMixin, - FilterableSingleTableView, -): - paginate_by = 30 - ordering = ("-id",) - template_name = "ui/list.html" - - -class UIUpdateView(UITitleMixin, UINavigationMixin, UpdateView): - template_name = "ui/update.html" - readonly = False - - def get_context_data(self: Self, *args, **kwargs) -> Context: - ctx = super().get_context_data(*args, **kwargs) - ctx["readonly"] = self.readonly - return ctx - - -class UIFormView(UITitleMixin, UINavigationMixin, FormView): - template_name = "ui/form.html" - - def get_context_data(self: Self, **kwargs) -> Context: - ctx = super().get_context_data(**kwargs) - ctx["form_action"] = "" - ctx["form_method"] = "post" - return ctx - - -class UIActionView(DetailView): - def get_redirect_url(self: Self) -> HttpResponse: - if self.redirect_url: - return self.redirect_url - - raise NotImplementedError("you must implement get_redirect_url") - - def get_success_url(self: Self, *args, **kwargs) -> str: - if self.success_url: - return self.success_url - - raise NotImplementedError("you must implement get_success_url") - - def do_action(self: Self, *args, **kwargs) -> HttpResponse: - return HttpResponseRedirect(self.get_success_url(*args, **kwargs)) - - def post(self: Self, *args, **kwargs) -> HttpResponse: - self.object = self.get_object() - return self.do_action(*args, **kwargs) - - def get(self: Self, *args, **kwargs) -> HttpResponse: - return HttpResponseRedirect(self.get_redirect_url(*args, **kwargs)) - - -class UIActionConfirmView(FormView): - def get_redirect_url(self: Self) -> str: - if self.redirect_url: - return self.redirect_url - - raise NotImplementedError("you must implement get_redirect_url") - - def get_context_data(self: Self, **kwargs) -> Context: - kwargs.setdefault("view", self) - if self.extra_context is not None: - kwargs.update(self.extra_context) - return kwargs - - def get_success_url(self: Self, *args, **kwargs) -> str: - if self.success_url: - return self.success_url - - raise NotImplementedError("you must implement get_success_url") - - def do_action(self: Self, *args, **kwargs) -> HttpResponse: - return HttpResponseRedirect(self.get_success_url(*args, **kwargs)) - - def post(self: Self, *args, **kwargs) -> HttpResponse: - return self.do_action(*args, **kwargs) - - -class UIDeleteView(UITitleMixin, UINavigationMixin, DeleteView): - template_name = "ui/delete.html" - - def get_context_data(self: Self, **kwargs) -> Context: - context = super().get_context_data(**kwargs) - deletable_objects, model_count, protected = get_deleted_objects([self.object]) - context["deletable_objects"] = deletable_objects - context["model_count"] = dict(model_count).items() - context["protected"] = protected - return context diff --git a/django/src/config/__init__.py b/django/src/config/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/config/settings/__init__.py b/django/src/config/settings/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/config/settings/base.py.jinja b/django/src/config/settings/base.py.jinja deleted file mode 100644 index f8e6aee..0000000 --- a/django/src/config/settings/base.py.jinja +++ /dev/null @@ -1,359 +0,0 @@ -"""Base settings to build other settings files upon.""" - -from pathlib import Path - -import environ -from django.utils.translation import gettext_lazy as _{% if ldap %} -import ldap -from django_auth_ldap.config import LDAPSearch{% endif %} - -BASE_DIR = Path(__file__).resolve(strict=True).parent.parent.parent.parent -SRC_DIR = BASE_DIR / "src" -APPS_DIR = SRC_DIR / "apps" -env = environ.FileAwareEnv() - -READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False) -if READ_DOT_ENV_FILE: - # OS environment variables take precedence over variables from .env - env.read_env(str(BASE_DIR / ".env")) - -PROJECT_NAME = "{{ project_name }}" - -# GENERAL -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#debug -DEBUG = env.bool("DJANGO_DEBUG", False) -# Local time zone. Choices are -# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name -# though not all of them may be available with every OS. -# In Windows, this must be set to your system time zone. -TIME_ZONE = "CET" -# https://docs.djangoproject.com/en/dev/ref/settings/#language-code -LANGUAGE_CODE = "en-us" -# https://docs.djangoproject.com/en/dev/ref/settings/#languages - -LANGUAGES = [ - ("en", _("English")), - ("no", _("Norsk")), -] -# https://docs.djangoproject.com/en/dev/ref/settings/#site-id -SITE_ID = 1 -# https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n -USE_I18N = True -# https://docs.djangoproject.com/en/dev/ref/settings/#use-tz -USE_TZ = True -# https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths -LOCALE_PATHS = [str(SRC_DIR / "locale")] - -# DATABASES -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#databases -DATABASES = {"default": env.db("DATABASE_URL")} -DATABASES["default"]["ENGINE"] = "psqlextra.backend" -{% if gis %} -POSTGRES_EXTRA_DB_BACKEND_BASE = "django.contrib.gis.db.backends.postgis" -{% endif %} -DATABASES["default"]["ATOMIC_REQUESTS"] = True -# https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-DEFAULT_AUTO_FIELD -DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" -DATABASES["default"]["CONN_MAX_AGE"] = env.int( - "CONN_MAX_AGE", default=None -) # noqa F405 - -# URLS -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#root-urlconf -ROOT_URLCONF = "config.urls" -# https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application -WSGI_APPLICATION = "config.wsgi.application" - -# APPS -# ------------------------------------------------------------------------------ -DJANGO_APPS = [ - "django.contrib.auth", - "django.contrib.contenttypes", - "django.contrib.sessions", - "django.contrib.sites", - "django.contrib.messages", - "django.contrib.staticfiles", - # "django.contrib.humanize", # Handy template tags - "django.contrib.admin", - "django.forms",{% if gis %} - "django.contrib.gis",{% endif %} -] - -THIRD_PARTY_APPS = [ - "crispy_forms", - "crispy_bootstrap5", - "allauth", - "allauth.account", - "allauth.socialaccount", - "allauth.socialaccount.providers.openid_connect",{% if rest %} - "drf_spectacular", - "corsheaders", - "rest_framework", - "rest_framework.authtoken", - "dj_rest_auth",{% endif %} - "django_probes", - "health_check", - "health_check.db", - "health_check.contrib.migrations", - "psqlextra", - "solo",{% if ui %} - "slippers", - "django_tables2",{% endif %} - {% if queue %}"procrastinate.contrib.django",{% endif %} - -] - -LOCAL_APPS = [ - "apps.users", - "apps.core",{% if ui %} - "apps.ui",{% endif %} - "{{ project_slug }}", -] -# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps -INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS - -# MIGRATIONS -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#migration-modules -MIGRATION_MODULES = {"sites": "apps.contrib.sites.migrations"} - -# AUTHENTICATION -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#authentication-backends -AUTHENTICATION_BACKENDS = [{% if ldap %} - 'django_auth_ldap.backend.LDAPBackend',{% endif %} - "django.contrib.auth.backends.ModelBackend", - "allauth.account.auth_backends.AuthenticationBackend", -] -# https://docs.djangoproject.com/en/dev/ref/settings/#auth-user-model -AUTH_USER_MODEL = "users.User" -# https://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url -LOGIN_REDIRECT_URL = "users:redirect" -# https://docs.djangoproject.com/en/dev/ref/settings/#login-url -LOGIN_URL = "account_login" - -# PASSWORDS -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers -PASSWORD_HASHERS = [ - # https://docs.djangoproject.com/en/dev/topics/auth/passwords/#using-argon2-with-django - "django.contrib.auth.hashers.Argon2PasswordHasher", - "django.contrib.auth.hashers.PBKDF2PasswordHasher", - "django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher", - "django.contrib.auth.hashers.BCryptSHA256PasswordHasher", -] -# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators -AUTH_PASSWORD_VALIDATORS = [ - { - "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", # noqa: E501 - }, - {"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"}, - {"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"}, - {"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"}, -] - -# MIDDLEWARE -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#middleware -MIDDLEWARE = [{% if rest %} - "corsheaders.middleware.CorsMiddleware",{% endif %} - "django.middleware.security.SecurityMiddleware", - "django.contrib.sessions.middleware.SessionMiddleware", - "django.middleware.locale.LocaleMiddleware", - "django.middleware.common.CommonMiddleware", - "django.middleware.csrf.CsrfViewMiddleware", - "django.contrib.auth.middleware.AuthenticationMiddleware", - "django.contrib.messages.middleware.MessageMiddleware", - "django.middleware.clickjacking.XFrameOptionsMiddleware", - "allauth.account.middleware.AccountMiddleware", -] - -# STATIC -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#static-root -STATIC_ROOT = str(BASE_DIR / "staticfiles") -# https://docs.djangoproject.com/en/dev/ref/settings/#static-url -STATIC_URL = "/static/" -# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS -STATICFILES_DIRS = [str(SRC_DIR / "static")] -# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders -STATICFILES_FINDERS = [ - "django.contrib.staticfiles.finders.FileSystemFinder", - "django.contrib.staticfiles.finders.AppDirectoriesFinder", -] - -# MEDIA -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#media-root -MEDIA_ROOT = str(BASE_DIR / "media") -# https://docs.djangoproject.com/en/dev/ref/settings/#media-url -MEDIA_URL = "/media/" - -# TEMPLATES -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#templates -TEMPLATES = [ - { - # https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND - "BACKEND": "django.template.backends.django.DjangoTemplates", - # https://docs.djangoproject.com/en/dev/ref/settings/#dirs - "DIRS": [str(SRC_DIR / "templates")], - # https://docs.djangoproject.com/en/dev/ref/settings/#app-dirs - "APP_DIRS": True, - "OPTIONS": { - # https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors - "context_processors": [ - "django.template.context_processors.debug", - "django.template.context_processors.request", - "django.contrib.auth.context_processors.auth", - "django.template.context_processors.i18n", - "django.template.context_processors.media", - "django.template.context_processors.static", - "django.template.context_processors.tz", - "django.contrib.messages.context_processors.messages", - "apps.users.context_processors.allauth_settings", - "apps.core.context_processors.context_settings", - ], - }, - }, -] - -# https://docs.djangoproject.com/en/dev/ref/settings/#form-renderer -FORM_RENDERER = "django.forms.renderers.TemplatesSetting" - -# http://django-crispy-forms.readthedocs.io/en/latest/install.html#template-packs -CRISPY_TEMPLATE_PACK = "bootstrap5" -CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5" - -# FIXTURES -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#fixture-dirs -FIXTURE_DIRS = (str(SRC_DIR / "fixtures"),) - -# SECURITY -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-httponly -SESSION_COOKIE_HTTPONLY = True -# https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-httponly -CSRF_COOKIE_HTTPONLY = True -# https://docs.djangoproject.com/en/dev/ref/settings/#x-frame-options -X_FRAME_OPTIONS = "DENY" - -# EMAIL -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend -EMAIL_BACKEND = env( - "DJANGO_EMAIL_BACKEND", - default="django.core.mail.backends.smtp.EmailBackend", -) -# https://docs.djangoproject.com/en/dev/ref/settings/#email-timeout -EMAIL_TIMEOUT = 5 - -# ADMIN -# ------------------------------------------------------------------------------ -# Django Admin URL. -ADMIN_URL = "admin/" -# https://docs.djangoproject.com/en/dev/ref/settings/#admins -ADMINS = [("""{{ author_name }}""", "{{ email }}")] -# https://docs.djangoproject.com/en/dev/ref/settings/#managers -MANAGERS = ADMINS -# https://cookiecutter-django.readthedocs.io/en/latest/settings.html#other-environment-settings -# Force the `admin` sign in process to go through the `django-allauth` workflow -DJANGO_ADMIN_FORCE_ALLAUTH = env.bool("DJANGO_ADMIN_FORCE_ALLAUTH", default=False) - -# LOGGING -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#logging -# See https://docs.djangoproject.com/en/dev/topics/logging for -# more details on how to customize your logging configuration. -LOGGING = { - "version": 1, - "disable_existing_loggers": False, - "formatters": { - "verbose": { - "format": "%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s", # noqa: E501 - }, - }, - "handlers": { - "console": { - "level": "DEBUG", - "class": "logging.StreamHandler", - "formatter": "verbose", - }, - }, - "loggers": { - "rules": { - "handlers": ["console"], - "level": "DEBUG", - "propagate": True, - }, - }, - "root": {"level": "INFO", "handlers": ["console"]}, -} - - -# django-allauth -# ------------------------------------------------------------------------------ -ACCOUNT_ALLOW_REGISTRATION = env.bool("DJANGO_ACCOUNT_ALLOW_REGISTRATION", False) -# https://django-allauth.readthedocs.io/en/latest/configuration.html -ACCOUNT_AUTHENTICATION_METHOD = "email" -# https://django-allauth.readthedocs.io/en/latest/configuration.html -ACCOUNT_EMAIL_REQUIRED = True -# https://django-allauth.readthedocs.io/en/latest/configuration.html -ACCOUNT_USERNAME_REQUIRED = False -# https://django-allauth.readthedocs.io/en/latest/configuration.html -ACCOUNT_USER_MODEL_USERNAME_FIELD = None -# https://django-allauth.readthedocs.io/en/latest/configuration.html -ACCOUNT_EMAIL_VERIFICATION = "none" -# https://django-allauth.readthedocs.io/en/latest/configuration.html -ACCOUNT_ADAPTER = "apps.users.adapters.AccountAdapter" -# https://django-allauth.readthedocs.io/en/latest/forms.html -ACCOUNT_FORMS = {"signup": "apps.users.forms.UserSignupForm"} - -{% if rest %}# Django REST-Framework -REST_FRAMEWORK = { - 'DEFAULT_PERMISSION_CLASSES': [ - 'rest_framework.permissions.IsAuthenticated', - ], - 'DEFAULT_AUTHENTICATION_CLASSES': ( - 'dj_rest_auth.jwt_auth.JWTCookieAuthentication', - ), - 'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema', -} - -# DJ Rest Auth -REST_AUTH = { - 'USE_JWT': True, - 'JWT_AUTH_COOKIE': 'token', - 'JWT_AUTH_REFRESH_COOKIE': 'refresh', -} - -# DRF Spectacular -SPECTACULAR_SETTINGS = { - 'TITLE': '{{ project_name }} API', - 'DESCRIPTION': 'APIs for {{ project_name }} project', - 'VERSION': '1.0.0', - 'SERVE_INCLUDE_SCHEMA': False, -} - -# CORS Headers -CORS_ALLOWED_ORIGINS = env.list('CORS_ALLOWED_ORIGINS', default=[]) -CORS_URLS_REGEX = r"^/api/.*$" -CORS_ALLOW_CREDENTIALS = True{% endif %} -{% if ldap %} -# LDAP -AUTH_LDAP_SERVER_URI = env('AUTH_LDAP_SERVER_URI', default=None) - -if AUTH_LDAP_SERVER_URI: - AUTH_LDAP_BIND_DN = env('AUTH_LDAP_BIND_DN', default='') - AUTH_LDAP_BIND_PASSWORD = env('AUTH_LDAP_BIND_PASSWORD', default='') - - AUTH_LDAP_USER_SEARCH = LDAPSearch( - env('AUTH_LDAP_USER_SEARCH_BASE'), - ldap.SCOPE_SUBTREE, - '(uid=%(user)s)', - ) -{% endif %} diff --git a/django/src/config/settings/local.py b/django/src/config/settings/local.py deleted file mode 100644 index f2aefd1..0000000 --- a/django/src/config/settings/local.py +++ /dev/null @@ -1,61 +0,0 @@ -from .base import * # noqa -from .base import env - -# GENERAL -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#debug -DEBUG = True -# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key -SECRET_KEY = env( - "DJANGO_SECRET_KEY", - default="local_secret_key", -) -# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts -ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "django", "django-dev"] # noqa: S104 - -# CACHES -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#caches -CACHES = { - "default": { - "BACKEND": "django.core.cache.backends.locmem.LocMemCache", - "LOCATION": "", - }, -} - -# EMAIL -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend -EMAIL_BACKEND = env( - "DJANGO_EMAIL_BACKEND", - default="django.core.mail.backends.console.EmailBackend", -) - -# django-debug-toolbar -# ------------------------------------------------------------------------------ -# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#prerequisites -INSTALLED_APPS += ["debug_toolbar"] # noqa: F405 -# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#middleware -MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"] # noqa: F405 -# https://django-debug-toolbar.readthedocs.io/en/latest/configuration.html#debug-toolbar-config -DEBUG_TOOLBAR_CONFIG = { - "DISABLE_PANELS": ["debug_toolbar.panels.redirects.RedirectsPanel"], - "SHOW_TEMPLATE_CONTEXT": True, - "SHOW_TOOLBAR_CALLBACK": lambda _: True, -} -# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#internal-ips -INTERNAL_IPS = ["127.0.0.1", "10.0.2.2"] - -# django-extensions -# ------------------------------------------------------------------------------ -# https://django-extensions.readthedocs.io/en/latest/installation_instructions.html#configuration -INSTALLED_APPS += ["django_extensions"] - -# Your stuff... -# ------------------------------------------------------------------------------ -CORS_ALLOWED_ORIGIN_REGEXES = [ - r"^http://localhost\:\d{4}$", -] - - -INSTALLED_APPS += ["models2puml"] diff --git a/django/src/config/settings/production.py b/django/src/config/settings/production.py deleted file mode 100644 index 2df9433..0000000 --- a/django/src/config/settings/production.py +++ /dev/null @@ -1,178 +0,0 @@ -import logging - -from .base import * # noqa -from .base import env - -# GENERAL -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key -SECRET_KEY = env("DJANGO_SECRET_KEY") -# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts -ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=[""]) - -# DATABASES -# ------------------------------------------------------------------------------ -DATABASES["default"]["CONN_MAX_AGE"] = env.int("CONN_MAX_AGE", default=60) # noqa: F405 - -# CACHES -# ------------------------------------------------------------------------------ -# CACHES = { -# "default": { -# "BACKEND": "django_redis.cache.RedisCache", -# "LOCATION": env("REDIS_URL"), -# "OPTIONS": { -# "CLIENT_CLASS": "django_redis.client.DefaultClient", -# # Mimicing memcache behavior. -# # https://github.com/jazzband/django-redis#memcached-exceptions-behavior -# "IGNORE_EXCEPTIONS": True, -# }, -# } -# } - -# SECURITY -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#secure-proxy-ssl-header -SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") -# https://docs.djangoproject.com/en/dev/ref/settings/#secure-ssl-redirect -SECURE_SSL_REDIRECT = env.bool("DJANGO_SECURE_SSL_REDIRECT", default=True) -# https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-secure -SESSION_COOKIE_SECURE = env.bool("SESSION_COOKIE_SECURE", default=True) -# https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-secure -CSRF_COOKIE_SECURE = env.bool("CSRF_COOKIE_SECURE", default=True) -# https://docs.djangoproject.com/en/dev/topics/security/#ssl-https -# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-seconds -# TODO: set this to 60 seconds first and then to 518400 once you prove the former works -SECURE_HSTS_SECONDS = 60 -# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-include-subdomains -SECURE_HSTS_INCLUDE_SUBDOMAINS = env.bool( - "DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS", - default=True, -) -# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-preload -SECURE_HSTS_PRELOAD = env.bool("DJANGO_SECURE_HSTS_PRELOAD", default=True) -# https://docs.djangoproject.com/en/dev/ref/middleware/#x-content-type-options-nosniff -SECURE_CONTENT_TYPE_NOSNIFF = env.bool( - "DJANGO_SECURE_CONTENT_TYPE_NOSNIFF", - default=True, -) - -# STATIC -# ------------------------ -STORAGES = { - "default": { - "BACKEND": "django.core.files.storage.FileSystemStorage", - }, - "staticfiles": { - "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage", - }, -} - -# MEDIA -# ------------------------------------------------------------------------------ - -# EMAIL -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email -DEFAULT_FROM_EMAIL = env( - "DJANGO_DEFAULT_FROM_EMAIL", - default="NINA ", -) -# https://docs.djangoproject.com/en/dev/ref/settings/#server-email -SERVER_EMAIL = env("DJANGO_SERVER_EMAIL", default=DEFAULT_FROM_EMAIL) -# https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix -EMAIL_SUBJECT_PREFIX = env( - "DJANGO_EMAIL_SUBJECT_PREFIX", - default="[NINA] ", -) - -# ADMIN -# ------------------------------------------------------------------------------ -# Django Admin URL regex. -ADMIN_URL = env("DJANGO_ADMIN_URL") - -EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" - - -# LOGGING -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#logging -# See https://docs.djangoproject.com/en/dev/topics/logging for -# more details on how to customize your logging configuration. -# A sample logging configuration. The only tangible logging -# performed by this configuration is to send an email to -# the site admins on every HTTP 500 error when DEBUG=False. -LOGGING = { - "version": 1, - "disable_existing_loggers": False, - "filters": {"require_debug_false": {"()": "django.utils.log.RequireDebugFalse"}}, - "formatters": { - "verbose": { - "format": "%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s", # noqa: E501 - }, - }, - "handlers": { - "mail_admins": { - "level": "ERROR", - "filters": ["require_debug_false"], - "class": "django.utils.log.AdminEmailHandler", - }, - "console": { - "level": "DEBUG", - "class": "logging.StreamHandler", - "formatter": "verbose", - }, - }, - "root": {"level": "INFO", "handlers": ["console"]}, - "loggers": { - "django.request": { - "handlers": ["mail_admins"], - "level": "ERROR", - "propagate": True, - }, - "django.security.DisallowedHost": { - "level": "ERROR", - "handlers": ["console", "mail_admins"], - "propagate": True, - }, - }, -} - -SENTRY_DSN = env("SENTRY_DSN", default=None) -if SENTRY_DSN: - import sentry_sdk - from sentry_sdk.integrations.django import DjangoIntegration - from sentry_sdk.integrations.logging import LoggingIntegration - - SENTRY_LOG_LEVEL = env.int("DJANGO_SENTRY_LOG_LEVEL", logging.INFO) - - sentry_logging = LoggingIntegration( - level=SENTRY_LOG_LEVEL, # Capture info and above as breadcrumbs - event_level=logging.ERROR, # Send errors as events - ) - - integrations = [sentry_logging, DjangoIntegration()] - - sentry_sdk.init( - dsn=SENTRY_DSN, - integrations=integrations, - environment=env("SENTRY_ENVIRONMENT", default="production"), - traces_sample_rate=env.float("SENTRY_TRACES_SAMPLE_RATE", default=0.1), - ) - - LOGGING["loggers"] = { - "django.db.backends": { - "level": "ERROR", - "handlers": ["console"], - "propagate": False, - }, - # Errors logged by the SDK itself - "sentry_sdk": {"level": "ERROR", "handlers": ["console"], "propagate": False}, - "django.security.DisallowedHost": { - "level": "ERROR", - "handlers": ["console"], - "propagate": False, - }, - } - -# Your stuff... -# ------------------------------------------------------------------------------ diff --git a/django/src/config/settings/test.py b/django/src/config/settings/test.py deleted file mode 100644 index c087ad4..0000000 --- a/django/src/config/settings/test.py +++ /dev/null @@ -1,35 +0,0 @@ -"""With these settings, tests run faster.""" - -from .base import * # noqa -from .base import env - -# GENERAL -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key -SECRET_KEY = env( - "DJANGO_SECRET_KEY", - default="test_secret_key", -) -# https://docs.djangoproject.com/en/dev/ref/settings/#test-runner -TEST_RUNNER = "django.test.runner.DiscoverRunner" - -# PASSWORDS -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers -PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"] - -# EMAIL -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend -EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend" - -# DEBUGGING FOR TEMPLATES -# ------------------------------------------------------------------------------ -TEMPLATES[0]["OPTIONS"]["debug"] = True # type: ignore # noqa: F405 - -# MEDIA -# ------------------------------------------------------------------------------ -# https://docs.djangoproject.com/en/dev/ref/settings/#media-url -MEDIA_URL = "http://media.testserver" -# Your stuff... -# ------------------------------------------------------------------------------ diff --git a/django/src/config/urls.py.jinja b/django/src/config/urls.py.jinja deleted file mode 100644 index b97ca33..0000000 --- a/django/src/config/urls.py.jinja +++ /dev/null @@ -1,48 +0,0 @@ -from django.conf import settings -from django.contrib import admin -from django.urls import include, path -from django.views import defaults as default_views -from django.views.generic import TemplateView - -urlpatterns = [ - path(settings.ADMIN_URL, admin.site.urls),{% if ui %} - path("", TemplateView.as_view(template_name="pages/home.html"), name="home"), - path( - "about/", - TemplateView.as_view(template_name="pages/about.html"), - name="about", - ), - # User management - path("users/", include("apps.users.urls", namespace="users")), - path("accounts/", include("allauth.urls")), - {% endif %} - path("ht/", include("health_check.urls")),{% if rest %} - path("api/", include('config.routers')),{% endif %} -] - - -if settings.DEBUG: - # This allows the error pages to be debugged during development, just visit - # these url in browser to see how these error pages look like. - urlpatterns += [ - path( - "400/", - default_views.bad_request, - kwargs={"exception": Exception("Bad Request!")}, - ), - path( - "403/", - default_views.permission_denied, - kwargs={"exception": Exception("Permission Denied")}, - ), - path( - "404/", - default_views.page_not_found, - kwargs={"exception": Exception("Page not Found")}, - ), - path("500/", default_views.server_error), - ] - if "debug_toolbar" in settings.INSTALLED_APPS: - import debug_toolbar - - urlpatterns = [path("__debug__/", include(debug_toolbar.urls))] + urlpatterns diff --git a/django/src/config/wsgi.py b/django/src/config/wsgi.py deleted file mode 100644 index 52ef50e..0000000 --- a/django/src/config/wsgi.py +++ /dev/null @@ -1,38 +0,0 @@ -"""WSGI config for the project. - -This module contains the WSGI application used by Django's development server -and any production WSGI deployments. It should expose a module-level variable -named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover -this application via the ``WSGI_APPLICATION`` setting. - -Usually you will have the standard Django WSGI application here, but it also -might make sense to replace the whole Django WSGI application with a custom one -that later delegates to the Django one. For example, you could introduce WSGI -middleware here, or combine a Django application with an application of another -framework. - -""" - -import os -import sys -from pathlib import Path - -from django.core.wsgi import get_wsgi_application - -# This allows easy placement of apps within the interior -# app directory. -BASE_DIR = Path(__file__).resolve(strict=True).parent.parent -sys.path.append(str(BASE_DIR / "apps")) -# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks -# if running multiple sites in the same mod_wsgi process. To fix this, use -# mod_wsgi daemon mode with each site in its own daemon process, or use -# os.environ["DJANGO_SETTINGS_MODULE"] = "config.settings.production" -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.production") - -# This application object is used by any WSGI server configured to use this -# file. This includes Django's development server, if the WSGI_APPLICATION -# setting points here. -application = get_wsgi_application() -# Apply WSGI middleware here. -# from helloworld.wsgi import HelloWorldApplication -# application = HelloWorldApplication(application) diff --git a/django/src/config/{% if rest %}routers.py{% endif %} b/django/src/config/{% if rest %}routers.py{% endif %} deleted file mode 100644 index 1980993..0000000 --- a/django/src/config/{% if rest %}routers.py{% endif %} +++ /dev/null @@ -1,9 +0,0 @@ -from django.urls import path -from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView - - -urlpatterns = [ - path('schema/', SpectacularAPIView.as_view(), name='schema'), - path('docs/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'), - path('docs/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'), -] diff --git a/django/src/fixtures/users.json b/django/src/fixtures/users.json deleted file mode 100644 index 5ae5430..0000000 --- a/django/src/fixtures/users.json +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "model": "users.user", - "pk": 1, - "fields": { - "password": "pbkdf2_sha256$180000$10jDVElGx6nr$0o2RbVZhcE/BAHG6pCvAX4DI8V4mjIHgnN0pdNOKkr8=", - "last_login": "2023-05-27T09:22:46.831Z", - "is_superuser": true, - "first_name": "", - "last_name": "", - "email": "admin@nina.no", - "is_staff": true, - "is_active": true, - "date_joined": "2023-05-27T08:35:08.845Z", - "groups": [], - "user_permissions": [] - } - } - ] diff --git a/django/src/locale/no/LC_MESSAGES/django.po.jinja b/django/src/locale/no/LC_MESSAGES/django.po.jinja deleted file mode 100644 index a605ef0..0000000 --- a/django/src/locale/no/LC_MESSAGES/django.po.jinja +++ /dev/null @@ -1,352 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-26 10:06+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/apps/core/apps.py:7 -msgid "Core" -msgstr "" - -#: src/apps/templates/account/account_inactive.html:6 -#: src/apps/templates/account/account_inactive.html:9 -msgid "Account Inactive" -msgstr "" - -#: src/apps/templates/account/account_inactive.html:10 -msgid "This account is inactive." -msgstr "" - -#: src/apps/templates/account/email.html:7 -msgid "Account" -msgstr "" - -#: src/apps/templates/account/email.html:10 -msgid "E-mail Addresses" -msgstr "" - -#: src/apps/templates/account/email.html:12 -msgid "The following e-mail addresses are associated with your account:" -msgstr "" - -#: src/apps/templates/account/email.html:27 -msgid "Verified" -msgstr "" - -#: src/apps/templates/account/email.html:29 -msgid "Unverified" -msgstr "" - -#: src/apps/templates/account/email.html:32 -msgid "Primary" -msgstr "" - -#: src/apps/templates/account/email.html:40 -msgid "Make Primary" -msgstr "" - -#: src/apps/templates/account/email.html:43 -msgid "Re-send Verification" -msgstr "" - -#: src/apps/templates/account/email.html:46 -msgid "Remove" -msgstr "" - -#: src/apps/templates/account/email.html:52 -{% if ui %}#: src/apps/ui/templates/ui/delete.html:38{% endif %} -msgid "Warning:" -msgstr "" - -#: src/apps/templates/account/email.html:52 -msgid "" -"You currently do not have any e-mail address set up. You should really add " -"an e-mail address so you can receive notifications, reset your password, etc." -msgstr "" - -#: src/apps/templates/account/email.html:55 -msgid "Add E-mail Address" -msgstr "" - -#: src/apps/templates/account/email.html:59 -msgid "Add E-mail" -msgstr "" - -#: src/apps/templates/account/email.html:66 -msgid "Do you really want to remove the selected e-mail address?" -msgstr "" - -#: src/apps/templates/account/email_confirm.html:7 -#: src/apps/templates/account/email_confirm.html:10 -msgid "Confirm E-mail Address" -msgstr "" - -#: src/apps/templates/account/email_confirm.html:14 -#, python-format -msgid "" -"Please confirm that %(email)s is an e-mail " -"address for user %(user_display)s." -msgstr "" - -#: src/apps/templates/account/email_confirm.html:19 -msgid "Confirm" -msgstr "" - -#: src/apps/templates/account/email_confirm.html:24 -#, python-format -msgid "" -"This e-mail confirmation link expired or is invalid. Please issue a new e-mail confirmation request." -msgstr "" - -#: src/apps/templates/account/login.html:8 -#: src/apps/templates/account/login.html:11 -#: src/apps/templates/account/login.html:30 -msgid "Sign In" -msgstr "" - -#: src/apps/templates/account/login.html:14 -#, python-format -msgid "" -"If you have not created an account yet, then please sign up first." -msgstr "" - -#: src/apps/templates/account/login.html:29 -msgid "Forgot Password?" -msgstr "" - -#: src/apps/templates/account/logout.html:6 -#: src/apps/templates/account/logout.html:9 -#: src/apps/templates/account/logout.html:18 -msgid "Sign Out" -msgstr "" - -#: src/apps/templates/account/logout.html:10 -msgid "Are you sure you want to sign out?" -msgstr "" - -#: src/apps/templates/account/password_change.html:7 -#: src/apps/templates/account/password_change.html:10 -#: src/apps/templates/account/password_change.html:16 -#: src/apps/templates/account/password_reset_from_key.html:7 -#: src/apps/templates/account/password_reset_from_key.html:14 -#: src/apps/templates/account/password_reset_from_key_done.html:6 -#: src/apps/templates/account/password_reset_from_key_done.html:9 -msgid "Change Password" -msgstr "" - -#: src/apps/templates/account/password_reset.html:8 -#: src/apps/templates/account/password_reset.html:11 -#: src/apps/templates/account/password_reset_done.html:7 -#: src/apps/templates/account/password_reset_done.html:10 -msgid "Password Reset" -msgstr "" - -#: src/apps/templates/account/password_reset.html:16 -msgid "" -"Forgotten your password? Enter your e-mail address below, and we'll send you " -"an e-mail allowing you to reset it." -msgstr "" - -#: src/apps/templates/account/password_reset.html:25 -msgid "Reset My Password" -msgstr "" - -#: src/apps/templates/account/password_reset.html:27 -msgid "Please contact us if you have any trouble resetting your password." -msgstr "" - -#: src/apps/templates/account/password_reset_done.html:15 -msgid "" -"We have sent you an e-mail. Please contact us if you do not receive it " -"within a few minutes." -msgstr "" - -#: src/apps/templates/account/password_reset_from_key.html:12 -msgid "Bad Token" -msgstr "" - -#: src/apps/templates/account/password_reset_from_key.html:20 -#, python-format -msgid "" -"The password reset link was invalid, possibly because it has already been " -"used. Please request a new password reset." -msgstr "" - -#: src/apps/templates/account/password_reset_from_key.html:30 -msgid "change password" -msgstr "" - -#: src/apps/templates/account/password_reset_from_key.html:33 -#: src/apps/templates/account/password_reset_from_key_done.html:10 -msgid "Your password is now changed." -msgstr "" - -#: src/apps/templates/account/password_set.html:7 -#: src/apps/templates/account/password_set.html:10 -#: src/apps/templates/account/password_set.html:19 -msgid "Set Password" -msgstr "" - -#: src/apps/templates/account/signup.html:7 -msgid "Signup" -msgstr "" - -#: src/apps/templates/account/signup.html:10 -#: src/apps/templates/account/signup.html:25 -msgid "Sign Up" -msgstr "" - -#: src/apps/templates/account/signup.html:12 -#, python-format -msgid "" -"Already have an account? Then please sign in." -msgstr "" - -#: src/apps/templates/account/signup_closed.html:6 -#: src/apps/templates/account/signup_closed.html:9 -msgid "Sign Up Closed" -msgstr "" - -#: src/apps/templates/account/signup_closed.html:10 -msgid "We are sorry, but the sign up is currently closed." -msgstr "" - -#: src/apps/templates/account/verification_sent.html:6 -#: src/apps/templates/account/verification_sent.html:9 -#: src/apps/templates/account/verified_email_required.html:6 -#: src/apps/templates/account/verified_email_required.html:9 -msgid "Verify Your E-mail Address" -msgstr "" - -#: src/apps/templates/account/verification_sent.html:11 -msgid "" -"We have sent an e-mail to you for verification. Follow the link provided to " -"finalize the signup process. Please contact us if you do not receive it " -"within a few minutes." -msgstr "" - -#: src/apps/templates/account/verified_email_required.html:12 -msgid "" -"This part of the site requires us to verify that\n" -"you are who you claim to be. For this purpose, we require that you\n" -"verify ownership of your e-mail address. " -msgstr "" - -#: src/apps/templates/account/verified_email_required.html:17 -msgid "" -"We have sent an e-mail to you for\n" -"verification. Please click on the link inside this e-mail. Please\n" -"contact us if you do not receive it within a few minutes." -msgstr "" - -#: src/apps/templates/account/verified_email_required.html:22 -#, python-format -msgid "" -"Note: you can still change your e-" -"mail address." -msgstr "" -{% if ui %} - -#: src/apps/ui/templates/ui/create.html:7 -#: src/apps/ui/templates/ui/create.html:13 -msgid "Create" -msgstr "" - -#: src/apps/ui/templates/ui/delete.html:12 -#: src/apps/ui/templates/ui/detail.html:16 -#: src/apps/ui/templates/ui/form.html:12 -#: src/apps/ui/templates/ui/update.html:12 -msgid "Back" -msgstr "" - -#: src/apps/ui/templates/ui/delete.html:38 -msgid "Deleting will cause deletion also of these related objects" -msgstr "" - -#: src/apps/ui/templates/ui/delete.html:47 -#: src/apps/ui/templates/ui/detail.html:19 -#: src/apps/ui/templates/ui/update.html:15 -msgid "Delete" -msgstr "" - -#: src/apps/ui/templates/ui/delete.html:50 -msgid "" -"The following objects prevents the deletion, you must delete them first." -msgstr "" - -#: src/apps/ui/templates/ui/form.html:30 -msgid "Submit" -msgstr "" - -#: src/apps/ui/templates/ui/list.html:27 -msgid "Search" -msgstr "" - -#: src/apps/ui/templates/ui/partials/table.html:86 -msgid "previous" -msgstr "" - -#: src/apps/ui/templates/ui/partials/table.html:106 -msgid "next" -msgstr "" - -#: src/apps/ui/templates/ui/update.html:29 -msgid "Update" -msgstr "" - -{% endif %} -#: src/apps/users/admin.py:22 -msgid "Personal info" -msgstr "" - -#: src/apps/users/admin.py:24 -msgid "Permissions" -msgstr "" - -#: src/apps/users/admin.py:35 -msgid "Important dates" -msgstr "" - -#: src/apps/users/apps.py:9 -msgid "Users" -msgstr "" - -#: src/apps/users/forms.py:26 -msgid "This email has already been taken." -msgstr "" - -#: src/apps/users/models.py:13 -msgid "email address" -msgstr "" - -#: src/apps/users/views.py:29 -msgid "Information successfully updated" -msgstr "" - -#: src/config/settings/base.py:33 -msgid "English" -msgstr "" - -#: src/config/settings/base.py:34 -msgid "Norsk" -msgstr "" - -#: src/{{ project_slug }}/apps.py:9 -msgid "{{ project_name}}" -msgstr "" diff --git a/django/src/manage.py.jinja b/django/src/manage.py.jinja deleted file mode 100755 index 6cce71b..0000000 --- a/django/src/manage.py.jinja +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python - -from {{ project_slug }} import django_manage - -if __name__ == "__main__": - django_manage() diff --git a/django/src/static/css/.gitkeep b/django/src/static/css/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/static/fonts/.gitkeep b/django/src/static/fonts/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/static/images/favicons/favicon.ico b/django/src/static/images/favicons/favicon.ico deleted file mode 100644 index 7240423..0000000 Binary files a/django/src/static/images/favicons/favicon.ico and /dev/null differ diff --git a/django/src/static/js/.gitkeep b/django/src/static/js/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/static/vendor/.gitkeep b/django/src/static/vendor/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/static/{% if ui %}.gitignore{% endif %}.jinja b/django/src/static/{% if ui %}.gitignore{% endif %}.jinja deleted file mode 100644 index b4dcb84..0000000 --- a/django/src/static/{% if ui %}.gitignore{% endif %}.jinja +++ /dev/null @@ -1,7 +0,0 @@ -vendor/* -css/* -js/* - -!vendor/.gitkeep -!css/.gitkeep -!js/.gitkeep diff --git a/django/src/templates/403.html b/django/src/templates/403.html deleted file mode 100644 index 40954bb..0000000 --- a/django/src/templates/403.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Forbidden (403) -{% endblock title %} -{% block content %} -

Forbidden (403)

-

- {% if exception %} - {{ exception }} - {% else %} - You're not allowed to access this page. - {% endif %} -

-{% endblock content %} diff --git a/django/src/templates/404.html b/django/src/templates/404.html deleted file mode 100644 index 2399b79..0000000 --- a/django/src/templates/404.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Page not found -{% endblock title %} -{% block content %} -

Page not found

-

- {% if exception %} - {{ exception }} - {% else %} - This is not the page you were looking for. - {% endif %} -

-{% endblock content %} diff --git a/django/src/templates/500.html b/django/src/templates/500.html deleted file mode 100644 index c4e2fa3..0000000 --- a/django/src/templates/500.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Server Error -{% endblock title %} -{% block content %} -

Ooops!!! 500

-

Looks like something went wrong!

-

- We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing. -

-{% endblock content %} diff --git a/django/src/templates/account/account_inactive.html b/django/src/templates/account/account_inactive.html deleted file mode 100644 index 036adb4..0000000 --- a/django/src/templates/account/account_inactive.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} - -{% block head_title %} - {% translate "Account Inactive" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Account Inactive" %}

-

{% translate "This account is inactive." %}

-{% endblock inner %} diff --git a/django/src/templates/account/base.html b/django/src/templates/account/base.html deleted file mode 100644 index 6683775..0000000 --- a/django/src/templates/account/base.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "app.html" %} - -{% block title %} - {% block head_title %} - {% endblock head_title %} -{% endblock title %} -{% block content %} -
-
- {% block inner %} - {% endblock inner %} -
-
-{% endblock content %} diff --git a/django/src/templates/account/email.html b/django/src/templates/account/email.html deleted file mode 100644 index 1d2637e..0000000 --- a/django/src/templates/account/email.html +++ /dev/null @@ -1,78 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} -{% load crispy_forms_tags %} - -{% block head_title %} - {% translate "Account" %} -{% endblock head_title %} -{% block inner %} -

{% translate "E-mail Addresses" %}

- {% if user.emailaddress_set.all %} -

{% translate "The following e-mail addresses are associated with your account:" %}

- - {% else %} -

- {% translate "Warning:" %} {% translate "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %} -

- {% endif %} -

{% translate "Add E-mail Address" %}

-
- {% csrf_token %} - {{ form|crispy }} - -
-{% endblock inner %} -{% block inline_javascript %} - {{ block.super }} - -{% endblock inline_javascript %} diff --git a/django/src/templates/account/email_confirm.html b/django/src/templates/account/email_confirm.html deleted file mode 100644 index 95ef44f..0000000 --- a/django/src/templates/account/email_confirm.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} -{% load account %} - -{% block head_title %} - {% translate "Confirm E-mail Address" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Confirm E-mail Address" %}

- {% if confirmation %} - {% user_display confirmation.email_address.user as user_display %} -

- {% blocktranslate with confirmation.email_address.email as email %}Please confirm that {{ email }} is an e-mail address for user {{ user_display }}.{% endblocktranslate %} -

-
- {% csrf_token %} - -
- {% else %} - {% url 'account_email' as email_url %} -

- {% blocktranslate %}This e-mail confirmation link expired or is invalid. Please issue a new e-mail confirmation request.{% endblocktranslate %} -

- {% endif %} -{% endblock inner %} diff --git a/django/src/templates/account/login.html b/django/src/templates/account/login.html deleted file mode 100644 index 56c261b..0000000 --- a/django/src/templates/account/login.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} -{% load account %} -{% load crispy_forms_tags %} - -{% block head_title %} - {% translate "Sign In" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Sign In" %}

- {% if ACCOUNT_ALLOW_REGISTRATION %} -

- {% blocktranslate trimmed %} - If you have not created an account yet, then please - sign up first. - {% endblocktranslate %} -

- {% endif %} - -{% endblock inner %} diff --git a/django/src/templates/account/logout.html b/django/src/templates/account/logout.html deleted file mode 100644 index e314020..0000000 --- a/django/src/templates/account/logout.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} - -{% block head_title %} - {% translate "Sign Out" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Sign Out" %}

-

{% translate "Are you sure you want to sign out?" %}

-
- {% csrf_token %} - {% if redirect_field_value %} - - {% endif %} - -
-{% endblock inner %} diff --git a/django/src/templates/account/password_change.html b/django/src/templates/account/password_change.html deleted file mode 100644 index 029aa54..0000000 --- a/django/src/templates/account/password_change.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} -{% load crispy_forms_tags %} - -{% block head_title %} - {% translate "Change Password" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Change Password" %}

-
- {% csrf_token %} - {{ form|crispy }} - -
-{% endblock inner %} diff --git a/django/src/templates/account/password_reset.html b/django/src/templates/account/password_reset.html deleted file mode 100644 index ee35e75..0000000 --- a/django/src/templates/account/password_reset.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} -{% load account %} -{% load crispy_forms_tags %} - -{% block head_title %} - {% translate "Password Reset" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Password Reset" %}

- {% if user.is_authenticated %} - {% include "account/snippets/already_logged_in.html" %} - {% endif %} -

- {% translate "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %} -

-
- {% csrf_token %} - {{ form|crispy }} - -
-

{% blocktranslate %}Please contact us if you have any trouble resetting your password.{% endblocktranslate %}

-{% endblock inner %} diff --git a/django/src/templates/account/password_reset_done.html b/django/src/templates/account/password_reset_done.html deleted file mode 100644 index 8efc4aa..0000000 --- a/django/src/templates/account/password_reset_done.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} -{% load account %} - -{% block head_title %} - {% translate "Password Reset" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Password Reset" %}

- {% if user.is_authenticated %} - {% include "account/snippets/already_logged_in.html" %} - {% endif %} -

- {% blocktranslate %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktranslate %} -

-{% endblock inner %} diff --git a/django/src/templates/account/password_reset_from_key.html b/django/src/templates/account/password_reset_from_key.html deleted file mode 100644 index b880bf9..0000000 --- a/django/src/templates/account/password_reset_from_key.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} -{% load crispy_forms_tags %} - -{% block head_title %} - {% translate "Change Password" %} -{% endblock head_title %} -{% block inner %} -

- {% if token_fail %} - {% translate "Bad Token" %} - {% else %} - {% translate "Change Password" %} - {% endif %} -

- {% if token_fail %} - {% url 'account_reset_password' as passwd_reset_url %} -

- {% blocktranslate %}The password reset link was invalid, possibly because it has already been used. Please request a new password reset.{% endblocktranslate %} -

- {% else %} - {% if form %} -
- {% csrf_token %} - {{ form|crispy }} - -
- {% else %} -

{% translate "Your password is now changed." %}

- {% endif %} - {% endif %} -{% endblock inner %} diff --git a/django/src/templates/account/password_reset_from_key_done.html b/django/src/templates/account/password_reset_from_key_done.html deleted file mode 100644 index 28db548..0000000 --- a/django/src/templates/account/password_reset_from_key_done.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} - -{% block head_title %} - {% translate "Change Password" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Change Password" %}

-

{% translate "Your password is now changed." %}

-{% endblock inner %} diff --git a/django/src/templates/account/password_set.html b/django/src/templates/account/password_set.html deleted file mode 100644 index 56fb618..0000000 --- a/django/src/templates/account/password_set.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} -{% load crispy_forms_tags %} - -{% block head_title %} - {% translate "Set Password" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Set Password" %}

-
- {% csrf_token %} - {{ form|crispy }} - -
-{% endblock inner %} diff --git a/django/src/templates/account/signup.html b/django/src/templates/account/signup.html deleted file mode 100644 index 04bcbf9..0000000 --- a/django/src/templates/account/signup.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} -{% load crispy_forms_tags %} - -{% block head_title %} - {% translate "Signup" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Sign Up" %}

-

- {% blocktranslate %}Already have an account? Then please sign in.{% endblocktranslate %} -

- -{% endblock inner %} diff --git a/django/src/templates/account/signup_closed.html b/django/src/templates/account/signup_closed.html deleted file mode 100644 index 94c4327..0000000 --- a/django/src/templates/account/signup_closed.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} - -{% block head_title %} - {% translate "Sign Up Closed" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Sign Up Closed" %}

-

{% translate "We are sorry, but the sign up is currently closed." %}

-{% endblock inner %} diff --git a/django/src/templates/account/verification_sent.html b/django/src/templates/account/verification_sent.html deleted file mode 100644 index de2a33f..0000000 --- a/django/src/templates/account/verification_sent.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} - -{% block head_title %} - {% translate "Verify Your E-mail Address" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Verify Your E-mail Address" %}

-

- {% blocktranslate %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktranslate %} -

-{% endblock inner %} diff --git a/django/src/templates/account/verified_email_required.html b/django/src/templates/account/verified_email_required.html deleted file mode 100644 index aab0877..0000000 --- a/django/src/templates/account/verified_email_required.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "account/base.html" %} - -{% load i18n %} - -{% block head_title %} - {% translate "Verify Your E-mail Address" %} -{% endblock head_title %} -{% block inner %} -

{% translate "Verify Your E-mail Address" %}

- {% url 'account_email' as email_url %} -

- {% blocktranslate %}This part of the site requires us to verify that -you are who you claim to be. For this purpose, we require that you -verify ownership of your e-mail address. {% endblocktranslate %} -

-

- {% blocktranslate %}We have sent an e-mail to you for -verification. Please click on the link inside this e-mail. Please -contact us if you do not receive it within a few minutes.{% endblocktranslate %} -

-

- {% blocktranslate %}Note: you can still change your e-mail address.{% endblocktranslate %} -

-{% endblock inner %} diff --git a/django/src/templates/app.html b/django/src/templates/app.html deleted file mode 100644 index e37ee44..0000000 --- a/django/src/templates/app.html +++ /dev/null @@ -1 +0,0 @@ -{% extends 'core/app.html' %} diff --git a/django/src/templates/base.html.jinja b/django/src/templates/base.html.jinja deleted file mode 100644 index e09eb91..0000000 --- a/django/src/templates/base.html.jinja +++ /dev/null @@ -1,13 +0,0 @@ -{% raw %} -{% extends 'core/base.html' %} - -{% block title %}{% endraw %} - {{ project_name }} -{% raw %}{% endblock title %} - -{% block description %}{% endraw %} - {{ project_name }} -{% raw %}{% endblock description %} - - -{% endraw %} diff --git a/django/src/templates/pages/about.html b/django/src/templates/pages/about.html deleted file mode 100644 index f781cd2..0000000 --- a/django/src/templates/pages/about.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "app.html" %} - -{% block content %} -

About

-{% endblock content %} diff --git a/django/src/templates/pages/home.html b/django/src/templates/pages/home.html deleted file mode 100644 index afbef1a..0000000 --- a/django/src/templates/pages/home.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "app.html" %} - -{% block content %} -{% endblock content %} diff --git a/django/src/templates/users/user_detail.html b/django/src/templates/users/user_detail.html deleted file mode 100644 index 098dab6..0000000 --- a/django/src/templates/users/user_detail.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "core/app.html" %} - -{% load static %} - -{% block title %} - User: - {{ object }} -{% endblock title %} -{% block content %} -
-
-
-

{{ object }}

-
-
- {% if object == request.user %} - -
-
- My Info - E-Mail - -
-
- - {% endif %} -
-{% endblock content %} diff --git a/django/src/templates/users/user_form.html b/django/src/templates/users/user_form.html deleted file mode 100644 index a932af9..0000000 --- a/django/src/templates/users/user_form.html +++ /dev/null @@ -1,23 +0,0 @@ -{% raw %} -{% extends "core/app.html" %} - -{% load crispy_forms_tags %} - -{% block title %} - {{ user }} -{% endblock title %} -{% block content %} -

{{ user }}

-
- {% csrf_token %} - {{ form|crispy }} -
-
- -
-
-
-{% endblock content %} -{% endraw%} diff --git a/django/src/{{ project_slug }}/__init__.py b/django/src/{{ project_slug }}/__init__.py deleted file mode 100644 index e540520..0000000 --- a/django/src/{{ project_slug }}/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -import os -import sys -from pathlib import Path - - -def django_manage() -> None: - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") - - try: - from django.core.management import execute_from_command_line - except ImportError: - # The above import may fail for some other reason. Ensure that the - # issue is really that Django is missing to avoid masking other - # exceptions on Python 2. - try: - import django # noqa - except ImportError as e: - raise ImportError( - "Couldn't import Django. Are you sure it's installed and " - "available on your PYTHONPATH environment variable? Did you " - "forget to activate a virtual environment?", - ) from e - - raise - - # This allows easy placement of apps within the interior - # apps directory. - current_path = Path(__file__).parent.parent.resolve() - sys.path.append(str(current_path / "apps")) - - execute_from_command_line(sys.argv) diff --git a/django/src/{{ project_slug }}/admin.py b/django/src/{{ project_slug }}/admin.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/{{ project_slug }}/apps.py.jinja b/django/src/{{ project_slug }}/apps.py.jinja deleted file mode 100644 index 058df7e..0000000 --- a/django/src/{{ project_slug }}/apps.py.jinja +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Self - -from django.apps import AppConfig as DjangoAppConfig -from django.utils.translation import gettext_lazy as _ - - -class AppConfig(DjangoAppConfig): - name = "{{ project_slug }}" - verbose_name = _("{{ project_name }}") - - def ready(self: Self) -> None: - try: - import {{ project_slug }}.signals # noqa: F401 - except ImportError: - pass diff --git a/django/src/{{ project_slug }}/migrations/__init__.py b/django/src/{{ project_slug }}/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/{{ project_slug }}/models.py b/django/src/{{ project_slug }}/models.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/{{ project_slug }}/{% if api %}api{% endif %}/serializers.py b/django/src/{{ project_slug }}/{% if api %}api{% endif %}/serializers.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/{{ project_slug }}/{% if api %}api{% endif %}/urls.py b/django/src/{{ project_slug }}/{% if api %}api{% endif %}/urls.py deleted file mode 100644 index de32dd2..0000000 --- a/django/src/{{ project_slug }}/{% if api %}api{% endif %}/urls.py +++ /dev/null @@ -1,7 +0,0 @@ -from rest_framework import routers - -router = routers.SimpleRouter() - -# register here - -urlpatterns = router.urls diff --git a/django/src/{{ project_slug }}/{% if api %}api{% endif %}/views.py b/django/src/{{ project_slug }}/{% if api %}api{% endif %}/views.py deleted file mode 100644 index e69de29..0000000 diff --git a/django/src/{{ project_slug }}/{% if queue %}tasks.py{% endif %} b/django/src/{{ project_slug }}/{% if queue %}tasks.py{% endif %} deleted file mode 100644 index 8c8e967..0000000 --- a/django/src/{{ project_slug }}/{% if queue %}tasks.py{% endif %} +++ /dev/null @@ -1,6 +0,0 @@ -from procrastinate.contrib.django import app - - -@app.task(name="print-hello") -def print_hello(): - print("hello") diff --git a/django/{% if ui %}theme{% endif %}/Dockerfile b/django/{% if ui %}theme{% endif %}/Dockerfile deleted file mode 100644 index 025595d..0000000 --- a/django/{% if ui %}theme{% endif %}/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM node:14 -WORKDIR /app -COPY ./package.json . -RUN npm i -g gulp -RUN npm install -COPY ./gulpfile.js . -CMD gulp diff --git a/django/{% if ui %}theme{% endif %}/gulpfile.js b/django/{% if ui %}theme{% endif %}/gulpfile.js deleted file mode 100644 index 44088a5..0000000 --- a/django/{% if ui %}theme{% endif %}/gulpfile.js +++ /dev/null @@ -1,117 +0,0 @@ -/* -========================================================= -* Volt Free - Bootstrap 5 Dashboard -========================================================= -* Product Page: https://themesberg.com/product/admin-dashboard/volt-premium-bootstrap-5-dashboard -* Copyright 2020 Themesberg (https://www.themesberg.com) -* License (https://themesberg.com/licensing) -* Designed and coded by https://themesberg.com -========================================================= -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Please contact us to request a removal. -*/ - -var autoprefixer = require('gulp-autoprefixer'); -var browserSync = require('browser-sync').create(); -var cleanCss = require('gulp-clean-css'); -var gulp = require('gulp'); -const npmDist = require('gulp-npm-dist'); -var sass = require('gulp-sass')(require('sass')); -var wait = require('gulp-wait'); -var sourcemaps = require('gulp-sourcemaps'); - -// Define paths - -const paths = { - dist: { - base: './static/', - css: './static/css', - js: './static/js', - img: './static/images', - vendor: './static/vendor', - }, - base: { - base: './', - node: './node_modules' - }, - src: { - base: './src/', - js: './src/js/*.*', - scss: './src/sass', - node_modules: './node_modules/', - } -}; - -// Compile SCSS -gulp.task('scss', function () { - return gulp.src([paths.src.scss + '/custom/**/*.scss', paths.src.scss + '/volt/**/*.scss', paths.src.scss + '/volt.scss']) - .pipe(wait(500)) - .pipe(sourcemaps.init()) - .pipe(sass().on('error', sass.logError)) - .pipe(autoprefixer({ - overrideBrowserslist: ['> 1%'] - })) - .pipe(sourcemaps.write('.')) - .pipe(gulp.dest(paths.dist.css)) - // .pipe(browserSync.stream()); -}); - -gulp.task('js', function () { - return gulp.src([paths.src.js]) - .pipe(gulp.dest(paths.dist.js)) - // .pipe(browserSync.stream()); -}); - -gulp.task('vendor', function() { - return gulp.src(npmDist(), { base: paths.src.node_modules }) - .pipe(gulp.dest(paths.dist.vendor)); -}); - -gulp.task('serve', gulp.series('scss', 'js', 'vendor', function() { - // browserSync.init({ - // server: paths.src.base - // }); - - gulp.watch([paths.src.scss + '/volt/**/*.scss', paths.src.scss + '/custom/**/*.scss', paths.src.scss + '/volt.scss'], gulp.series('scss')); - gulp.watch([paths.src.js], gulp.series('js')); - // gulp.watch([paths.src.vendor], gulp.series('vendor')); -})); - -// Minify CSS -gulp.task('minify:css', function () { - return gulp.src([ - paths.dist.css + '/volt.css' - ]) - .pipe(cleanCss()) - .pipe(gulp.dest(paths.dist.css)) -}); - -// Compile and copy scss/css -gulp.task('dist:css', function () { - return gulp.src([paths.src.scss + '/volt/**/*.scss', paths.src.scss + '/custom/**/*.scss', paths.src.scss + '/volt.scss']) - .pipe(wait(500)) - .pipe(sourcemaps.init()) - .pipe(sass().on('error', sass.logError)) - .pipe(autoprefixer({ - overrideBrowserslist: ['> 1%'] - })) - .pipe(sourcemaps.write('.')) - .pipe(gulp.dest(paths.dist.css)) -}); - - -// Copy assets -gulp.task('dist:js', function () { - return gulp.src(paths.src.js) - .pipe(gulp.dest(paths.dist.js)) -}); - -// Copy node_modules to vendor -gulp.task('dist:vendor', function() { - return gulp.src(npmDist(), { base: paths.src.node_modules }) - .pipe(gulp.dest(paths.dist.vendor)); -}); - -gulp.task('build', gulp.series('dist:css', 'dist:js', 'minify:css', 'dist:vendor')); - -// Default -gulp.task('default', gulp.series('serve')); diff --git a/django/{% if ui %}theme{% endif %}/package.json b/django/{% if ui %}theme{% endif %}/package.json deleted file mode 100644 index f385f66..0000000 --- a/django/{% if ui %}theme{% endif %}/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@themesberg/volt-bootstrap-5-dashboard", - "version": "1.4.1", - "main": "gulpfile.js", - "repository": { - "type": "git", - "url": "https://github.com/themesberg/volt-bootstrap-5-dashboard" - }, - "license": "https://github.com/themesberg/volt-bootstrap-5-dashboard/blob/master/LICENSE.md", - "dependencies": { - "@popperjs/core": "^2.9.2", - "bootstrap": "5.2.0", - "chartist": "^0.11.4", - "chartist-plugin-tooltips": "^0.0.17", - "notyf": "^3.10.0", - "nouislider": "^15.2.0", - "onscreen": "^1.4.0", - "sass": "^1.47.0", - "simplebar": "^5.3.4", - "smooth-scroll": "^16.1.3", - "sweetalert2": "^11.0.18", - "vanillajs-datepicker": "^1.2.0", - "waypoints": "^4.0.1" - }, - "devDependencies": { - "browser-sync": "^2.27.4", - "del": "^6.0.0", - "gulp": "^4.0.2", - "gulp-autoprefixer": "^8.0.0", - "gulp-clean-css": "^4.3.0", - "gulp-cssbeautify": "^3.0.0", - "gulp-file-include": "^2.3.0", - "gulp-header": "^2.0.9", - "gulp-htmlmin": "^5.0.1", - "gulp-npm-dist": "^1.0.3", - "gulp-plumber": "^1.2.1", - "gulp-rename": "^2.0.0", - "gulp-sass": "^5.0.0", - "gulp-sourcemaps": "^3.0.0", - "gulp-uglify": "^3.0.2", - "gulp-wait": "^0.0.2", - "merge-stream": "^2.0.0" - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/js/app.js b/django/{% if ui %}theme{% endif %}/src/js/app.js deleted file mode 100644 index e69de29..0000000 diff --git a/django/{% if ui %}theme{% endif %}/src/sass/custom/_additional.scss b/django/{% if ui %}theme{% endif %}/src/sass/custom/_additional.scss deleted file mode 100644 index 4397481..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/custom/_additional.scss +++ /dev/null @@ -1,53 +0,0 @@ -@import '../volt/variables'; - -.no-linebreaks { - p:last-child { - padding-bottom: 0; - margin-bottom: 0; - } -} - -body.prevent-overflow { - overflow-x: hidden !important; - min-height: 100vh !important; -} - -$radius: 0.5rem; - -.custom-table table.table { - thead th { - border: 0 !important; - - &.orderable a::after { - margin-left: 0.2rem; - font-family: 'Font Awesome 5 Free'; - display: inline-block; - font-style: normal; - font-variant: normal; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - font-weight: 900; - content: '\f0dc'; - } - &.orderable.asc a::after { - content: '\f0de'; - } - &.orderable.desc a::after { - content: '\f0dd'; - } - - &:first-child { - border-bottom-left-radius: $radius !important; - border-top-left-radius: $radius !important; - } - - &:last-child { - border-bottom-right-radius: $radius; - border-top-right-radius: $radius; - } - } -} - -#jumpToPageForm { - max-width: 10rem; -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/custom/_variables.scss.jinja b/django/{% if ui %}theme{% endif %}/src/sass/custom/_variables.scss.jinja deleted file mode 100644 index 7fe5cd6..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/custom/_variables.scss.jinja +++ /dev/null @@ -1 +0,0 @@ -$primary: {{ primary_color }}; diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt.scss deleted file mode 100755 index 695dc2c..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt.scss +++ /dev/null @@ -1,91 +0,0 @@ -/* - -========================================================= -* Volt - Free Bootstrap 5 Dashboard -========================================================= - -* Product Page: https://themesberg.com/product/admin-dashboard/volt-bootstrap-5-dashboard -* Copyright 2021 Themesberg (https://www.themesberg.com) - -* Designed and coded by https://themesberg.com - -========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Please contact us to request a removal. Contact us if you want to remove it. - -*/ - -@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap'); - -// update variables here -@import "custom/variables"; - -@import "../../node_modules/bootstrap/scss/functions"; -@import "volt/variables"; - -// Third party -@import '../../node_modules/vanillajs-datepicker/sass/datepicker.scss'; - -// Bootstrap -@import "../../node_modules/bootstrap/scss/variables"; -@import "../../node_modules/bootstrap/scss/mixins"; -@import "../../node_modules/bootstrap/scss/maps"; -@import "../../node_modules/bootstrap/scss/utilities"; - -// Modify utilities here -@import "volt/utilities"; - -// Bootstrap Layout & components -@import "../../node_modules/bootstrap/scss/root"; -@import "../../node_modules/bootstrap/scss/reboot"; -@import "../../node_modules/bootstrap/scss/type"; -@import "../../node_modules/bootstrap/scss/images"; -@import "../../node_modules/bootstrap/scss/containers"; -@import "../../node_modules/bootstrap/scss/grid"; -@import "../../node_modules/bootstrap/scss/tables"; -@import "../../node_modules/bootstrap/scss/forms"; -@import "../../node_modules/bootstrap/scss/buttons"; -@import "../../node_modules/bootstrap/scss/transitions"; -@import "../../node_modules/bootstrap/scss/dropdown"; -@import "../../node_modules/bootstrap/scss/button-group"; -@import "../../node_modules/bootstrap/scss/nav"; -@import "../../node_modules/bootstrap/scss/navbar"; -@import "../../node_modules/bootstrap/scss/card"; -@import "../../node_modules/bootstrap/scss/accordion"; -@import "../../node_modules/bootstrap/scss/breadcrumb"; -@import "../../node_modules/bootstrap/scss/pagination"; -@import "../../node_modules/bootstrap/scss/badge"; -@import "../../node_modules/bootstrap/scss/alert"; -@import "../../node_modules/bootstrap/scss/progress"; -@import "../../node_modules/bootstrap/scss/list-group"; -@import "../../node_modules/bootstrap/scss/close"; -@import "../../node_modules/bootstrap/scss/toasts"; -@import "../../node_modules/bootstrap/scss/modal"; -@import "../../node_modules/bootstrap/scss/tooltip"; -@import "../../node_modules/bootstrap/scss/popover"; -@import "../../node_modules/bootstrap/scss/carousel"; -@import "../../node_modules/bootstrap/scss/spinners"; -@import "../../node_modules/bootstrap/scss/offcanvas"; - -// Helpers -@import "../../node_modules/bootstrap/scss/helpers"; - -// Utilities -@import "../../node_modules/bootstrap/scss/utilities/api"; -// scss-docs-end import-stack - -// volt mixins & functions -@import "volt/mixins"; -@import "volt/functions"; - -// Layout -@import "volt/layout"; - -// Components -@import "volt/components"; - -// Forms -@import "volt/forms"; - -// write your custom styles here! -@import 'custom/additional'; diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/_components.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/_components.scss deleted file mode 100644 index d317837..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/_components.scss +++ /dev/null @@ -1,30 +0,0 @@ -@import "components/body"; -@import "components/accordions"; -@import "components/animations"; -@import "components/alerts"; -@import "components/avatars"; -@import "components/badge"; -@import "components/buttons"; -@import "components/breadcrumb"; -@import "components/card"; -@import "components/carousel"; -@import "components/close"; -@import "components/custom-forms"; -@import "components/charts"; -@import "components/dropdown"; -@import "components/icons"; -@import "components/images"; -@import "components/list-group"; -@import "components/modal"; -@import "components/nav"; -@import "components/pagination"; -@import "components/popover"; -@import "components/progress"; -@import "components/shapes"; -@import "components/datepicker"; -@import "components/steps"; -@import "components/tables"; -@import "components/type"; -@import "components/timelines"; -@import "components/tooltip"; -@import "components/scrollbar"; diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/_forms.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/_forms.scss deleted file mode 100644 index 81e13cc..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/_forms.scss +++ /dev/null @@ -1,4 +0,0 @@ -@import "forms/form-control"; -@import "forms/form-check"; -@import "forms/input-group"; -@import "forms/form-select"; diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/_functions.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/_functions.scss deleted file mode 100755 index ff6b476..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/_functions.scss +++ /dev/null @@ -1,23 +0,0 @@ -// Retrieve color Sass maps - -@function section-color($key: "primary") { - @return map-get($section-colors, $key); -} - -// Lines colors - -@function shapes-primary-color($key: "step-1-gradient-bg") { - @return map-get($shapes-primary-colors, $key); -} - -@function shapes-default-color($key: "step-1-gradient-bg") { - @return map-get($shapes-default-colors, $key); -} - -@function lines-light-color($key: "step-1-gradient-bg") { - @return map-get($shapes-light-colors, $key); -} - -@function shapes-dark-color($key: "step-1-gradient-bg") { - @return map-get($shapes-dark-colors, $key); -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/_layout.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/_layout.scss deleted file mode 100644 index c540e57..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/_layout.scss +++ /dev/null @@ -1,9 +0,0 @@ -@import "layout/navbar"; -@import "layout/section"; -@import "layout/footer"; -@import "layout/sidebar"; -@import "layout/sidenav"; - -main.content { - min-height: 100vh; -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/_mixins.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/_mixins.scss deleted file mode 100755 index 30b0088..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/_mixins.scss +++ /dev/null @@ -1,7 +0,0 @@ -@import "mixins/animations"; -@import "mixins/background-variant"; -@import "mixins/icon"; -@import "mixins/modals"; -@import "mixins/popover"; -@import "mixins/transform"; -@import "mixins/utilities"; diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/_utilities.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/_utilities.scss deleted file mode 100755 index f3c2c14..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/_utilities.scss +++ /dev/null @@ -1,95 +0,0 @@ -// check docs https://v5.getbootstrap.com/docs/5.0/utilities/api/ - -$utilities: map-merge( - $utilities, - ( - "blur": ( - property: backdrop-filter, - class: blur, - values: ( - 0: blur(0), - 1: blur(1px), - 2: blur(2px), - 3: blur(3px), - 4: blur(4px), - 5: blur(5px), - 6: blur(6px), - 7: blur(7px), - 8: blur(8px), - 9: blur(91px), - 10: blur(10px), - 11: blur(11px), - 12: blur(12px), - 13: blur(13px), - 14: blur(14px), - ), - ), - "opacity": ( - property: opacity, - class: o, - values: ( - 0: 0, - 25: 0.25, - 50: 0.5, - 75: 0.75, - 100: 1, - ), - ), - "z-index": ( - property: z-index, - class: z, - values: ( - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 999: 999, - ), - ), - "viewport-height": ( - property: height, - class: vh, - responsive: true, - values: ( - 100: 100vh, - ), - ), - "font-weight": ( - property: font-weight, - class: fw, - values: ( - light: $font-weight-light, - lighter: $font-weight-lighter, - normal: $font-weight-normal, - bold: $font-weight-bold, - bolder: $font-weight-bolder, - extrabold: $font-weight-extrabold, - black: $font-weight-black, - ), - ), - "max-width": ( - property: max-width, - class: fmxw, - values: ( - 100: 100px, - 200: 200px, - 300: 300px, - 400: 400px, - 500: 500px, - 999: 999px, - ), - ), - "min-height": ( - property: min-height, - class: fmxh, - values: ( - 100: 100px, - 200: 200px, - 300: 300px, - 400: 400px, - 500: 500px, - 999: 999px, - ), - ), - ) -); diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/_variables.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/_variables.scss deleted file mode 100644 index 42bf974..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/_variables.scss +++ /dev/null @@ -1,1661 +0,0 @@ -// Variables -// -// Variables should follow the `$component-state-property-size` formula for -// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs. - -// Color system - -// Shades of grey -$white : #ffffff !default; -$gray-50: #F9FAFB !default; -$gray-100: #F2F4F6 !default; -$gray-200: #E5E7EB !default; -$gray-300: #D1D5DB !default; -$gray-400: #9CA3AF !default; -$gray-500: #6B7280 !default; -$gray-600: #4B5563 !default; -$gray-700: #374151 !default; -$gray-800: #1F2937 !default; -$gray-900: #111827 !default; -$dark : $gray-800 !default; -$black : $gray-900 !default; - -// fusv-disable -$grays: ("100": $gray-100, - "200": $gray-200, - "300": $gray-300, - "400": $gray-400, - "500": $gray-500, - "600": $gray-600, - "700": $gray-700, - "800": $gray-800, - "900": $gray-900) !default; -// fusv-enable - -// Generic colors -$blue : #2361ce !default; -$indigo : #4F46E5 !default; -$purple : #7C3AED !default; -$pink : #EF4683 !default; -$red : #E11D48 !default; -$orange : #FBA918 !default; -$brown : #b9a084 !default; -$yellow : #f3c78e !default; -$yellow-100 : #ffeed6 !default; -$yellow-200 : #f5dbb8 !default; -$green : #10B981 !default; -$teal : #1E90FF !default; -$cyan : #63b1bd !default; -$soft-indigo: #f5e8ff !default; -$soft-green : #2CA58D !default; - -// scss-docs-start colors-map -$colors: ("blue": $blue, - "indigo": $indigo, - "purple": $purple, - "pink": $pink, - "red": $red, - "orange": $orange, - "yellow": $yellow, - "green": $green, - "teal": $teal, - "cyan": $cyan, - "white": $white, - "gray": $gray-600, - "gray-dark": $gray-800) !default; -// scss-docs-end colors-map - -// Color scheme -$primary : #1F2937 !default; -$secondary: #f0bc74 !default; -$tertiary : #31316A !default; - -// Series names and colors. This can be extended or customized as desired. Just add more series and colors. -$ct-series-names: (a, b, c, d, e, f, g) !default !default; -$ct-series-colors: (#262B40, - #F8BD7A, - #2CA58D, - #31316A, - #C96480, - #ffffff, - #F8BD7A, - -) !default; - - -$success: $green !default; -$info : $blue !default; -$warning: $yellow !default; -$danger : $red !default; -$gray : $gray-900 !default; -$light : $gray-400 !default; -$lighten: $gray-300 !default; -$soft : $gray-200 !default; -$dark : $dark !default; - -// Brands colors -$facebook : #3b5999 !default; -$twitter : #1da1f2 !default; -$google : #DB4337 !default; -$instagram: #e4405f !default; -$pinterest: #bd081c !default; -$youtube : #cd201f !default; -$slack : #3aaf85 !default; -$dribbble : #ea4c89 !default; -$github : #222222 !default; -$dropbox : #1E90FF !default; -$twitch : #4B367C !default; -$paypal : #ecb32c !default; -$behance : #0057ff !default; -$reddit : #E84422 !default; - -// Brand colors -$brand-colors: ("facebook": $facebook, - "twitter": $twitter, - "google": $google, - "instagram": $instagram, - "pinterest": $pinterest, - "youtube": $youtube, - "slack": $slack, - "dribbble": $dribbble, - "dropbox": $dropbox, - "twitch": $twitch, - "paypal": $paypal, - "behance": $behance, - "reddit" : $reddit, - "github": $github) !default; - -// Theme colors -$theme-colors: ( - "primary": $primary, - "secondary": $secondary, - "tertiary": $tertiary, - "success": $success, - "info": $info, - "warning": $warning, - "danger": $danger, - "error": $danger, - "white": $white, - "indigo": $indigo, - "purple": $purple, - "yellow-100": $yellow-100, - "yellow-200": $yellow-200, - "gray-50": $gray-50, - "gray-100": $gray-100, - "gray-200": $gray-200, - "gray-300": $gray-300, - "gray-400": $gray-400, - "gray-500": $gray-500, - "gray-600": $gray-600, - "gray-700": $gray-700, - "gray-800": $gray-800, - "gray-900": $gray-900 - ) !default; - - // Navbar colors - $navbar-colors: ("primary": $primary, -) !default; - -// Set a specific jump point for requesting color jumps -$theme-color-interval: 8% !default; - -// The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.0 are 3, 4.5 and 7. -// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast -$min-contrast-ratio: 3 !default; - -// Customize the light and dark text colors for use in our color contrast function. -$color-contrast-dark : $dark !default; -$color-contrast-light: $white !default; - -// fusv-disable -$blue-100: tint-color($blue, 8) !default; -$blue-200: tint-color($blue, 6) !default; -$blue-300: tint-color($blue, 4) !default; -$blue-400: tint-color($blue, 2) !default; -$blue-500: $blue !default; -$blue-600: shade-color($blue, 2) !default; -$blue-700: shade-color($blue, 4) !default; -$blue-800: shade-color($blue, 6) !default; -$blue-900: shade-color($blue, 8) !default; - -$indigo-100: tint-color($indigo, 8) !default; -$indigo-200: tint-color($indigo, 6) !default; -$indigo-300: tint-color($indigo, 4) !default; -$indigo-400: tint-color($indigo, 2) !default; -$indigo-500: $indigo !default; -$indigo-600: shade-color($indigo, 2) !default; -$indigo-700: shade-color($indigo, 4) !default; -$indigo-800: shade-color($indigo, 6) !default; -$indigo-900: shade-color($indigo, 8) !default; - -$purple-100: tint-color($purple, 8) !default; -$purple-200: tint-color($purple, 6) !default; -$purple-300: tint-color($purple, 4) !default; -$purple-400: tint-color($purple, 2) !default; -$purple-500: $purple !default; -$purple-600: shade-color($purple, 2) !default; -$purple-700: shade-color($purple, 4) !default; -$purple-800: shade-color($purple, 6) !default; -$purple-900: shade-color($purple, 8) !default; - -$pink-100: tint-color($pink, 8) !default; -$pink-200: tint-color($pink, 6) !default; -$pink-300: tint-color($pink, 4) !default; -$pink-400: tint-color($pink, 2) !default; -$pink-500: $pink !default; -$pink-600: shade-color($pink, 2) !default; -$pink-700: shade-color($pink, 4) !default; -$pink-800: shade-color($pink, 6) !default; -$pink-900: shade-color($pink, 8) !default; - -$red-100: tint-color($red, 8) !default; -$red-200: tint-color($red, 6) !default; -$red-300: tint-color($red, 4) !default; -$red-400: tint-color($red, 2) !default; -$red-500: $red !default; -$red-600: shade-color($red, 2) !default; -$red-700: shade-color($red, 4) !default; -$red-800: shade-color($red, 6) !default; -$red-900: shade-color($red, 8) !default; - -$orange-100: tint-color($orange, 8) !default; -$orange-200: tint-color($orange, 6) !default; -$orange-300: tint-color($orange, 4) !default; -$orange-400: tint-color($orange, 2) !default; -$orange-500: $orange !default; -$orange-600: shade-color($orange, 2) !default; -$orange-700: shade-color($orange, 4) !default; -$orange-800: shade-color($orange, 6) !default; -$orange-900: shade-color($orange, 8) !default; - -$yellow-100: tint-color($yellow, 8) !default; -$yellow-200: tint-color($yellow, 6) !default; -$yellow-300: tint-color($yellow, 4) !default; -$yellow-400: tint-color($yellow, 2) !default; -$yellow-500: $yellow !default; -$yellow-600: shade-color($yellow, 2) !default; -$yellow-700: shade-color($yellow, 4) !default; -$yellow-800: shade-color($yellow, 6) !default; -$yellow-900: shade-color($yellow, 8) !default; - -$green-100: tint-color($green, 8) !default; -$green-200: tint-color($green, 6) !default; -$green-300: tint-color($green, 4) !default; -$green-400: tint-color($green, 2) !default; -$green-500: $green !default; -$green-600: shade-color($green, 2) !default; -$green-700: shade-color($green, 4) !default; -$green-800: shade-color($green, 6) !default; -$green-900: shade-color($green, 8) !default; - -$teal-100: tint-color($teal, 8) !default; -$teal-200: tint-color($teal, 6) !default; -$teal-300: tint-color($teal, 4) !default; -$teal-400: tint-color($teal, 2) !default; -$teal-500: $teal !default; -$teal-600: shade-color($teal, 2) !default; -$teal-700: shade-color($teal, 4) !default; -$teal-800: shade-color($teal, 6) !default; -$teal-900: shade-color($teal, 8) !default; - -$cyan-100: tint-color($cyan, 8) !default; -$cyan-200: tint-color($cyan, 6) !default; -$cyan-300: tint-color($cyan, 4) !default; -$cyan-400: tint-color($cyan, 2) !default; -$cyan-500: $cyan !default; -$cyan-600: shade-color($cyan, 2) !default; -$cyan-700: shade-color($cyan, 4) !default; -$cyan-800: shade-color($cyan, 6) !default; -$cyan-900: shade-color($cyan, 8) !default; -// fusv-enable - -// Characters which are escaped by the escape-svg function -$escaped-characters: (("<", "%3c"), - (">", "%3e"), - ("#", "%23"), - ("(", "%28"), - (")", "%29"), -) !default; - -// Options -// -// Quickly modify global styling by enabling or disabling optional features. - -$enable-caret : true !default; -$enable-rounded : true !default; -$enable-shadows : true !default; -$enable-gradients : false !default; -$enable-transitions : true !default; -$enable-reduced-motion : true !default; -$enable-grid-classes : true !default; -$enable-button-pointers : true !default; -$enable-rfs : true !default; -$enable-validation-icons : true !default; -$enable-negative-margins : true !default; -$enable-deprecation-messages: true !default; -$enable-important-utilities : true !default; - -// Gradient -// -// The gradient which is added to components if `$enable-gradients` is `true` -// This gradient is also added to elements with `.bg-gradient` -$gradient: linear-gradient(180deg, rgba($white, .15), rgba($white, 0)) !default; - -// Spacing -// -// Control the default styling of most Bootstrap elements by modifying these -// variables. Mostly focused on spacing. -// You can add more entries to the $spacers map, should you need more variation. - -$spacer: 1rem !default; -$spacers: (0: 0, - 1: $spacer * 0.25, - 2: $spacer * 0.5, - 3: $spacer, - 4: $spacer * 1.5, - 5: $spacer * 3, - 6: ($spacer * 5), - 7: ($spacer * 8), - 8: ($spacer * 10), - 9: ($spacer * 11), - 10: ($spacer * 14), - 11: ($spacer * 16), - 12: ($spacer * 20), - 'sm': ($spacer * 1), - 'md': ($spacer * 2), - 'lg': ($spacer * 4), - 'xl': ($spacer * 8)) !default; - -$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default; - -// Body -// -// Settings for the `` element. - -$body-bg : $gray-100 !default; -$body-color : $gray-700 !default; -$body-text-align: null !default; - - -// Links -// -// Style anchor elements. - -$link-color : $primary !default; -$link-decoration : none !default; -$link-hover-color : darken($link-color, 50%) !default; -$link-hover-decoration : none !default; -// Darken percentage for links with `.text-*` class (e.g. `.text-success`) -$emphasized-link-hover-darken-percentage: 10% !default; - -$stretched-link-pseudo-element: after !default; -$stretched-link-z-index : 1 !default; - -// Paragraphs -// -// Style p element. - -$paragraph-margin-bottom: 1rem !default; - - -// Grid breakpoints -// -// Define the minimum dimensions at which your layout will change, -// adapting to different screen sizes, for use in media queries. - -// scss-docs-start grid-breakpoints -$grid-breakpoints: (xs: 0, - sm: 576px, - md: 768px, - lg: 992px, - xl: 1200px, - xxl: 1400px) !default; -// scss-docs-end grid-breakpoints - -// Grid containers -// -// Define the maximum width of `.container` for different screen sizes. - -// scss-docs-start container-max-widths -$container-max-widths: (sm: 540px, - md: 720px, - lg: 960px, - xl: 1140px) !default; -// scss-docs-end container-max-widths - -// Grid columns -// -// Set the number of columns and specify the width of the gutters. - -$grid-columns : 12 !default; -$grid-gutter-width: 1.5rem !default; -$grid-row-columns : 6 !default; - -$gutters: $spacers !default; - -// Container padding - -$container-padding-x: 1rem !default; - - -// Components -// -// Define common padding and border radius sizes and more. - -$border-width : .0625rem !default; -$border-width-md : 0.125rem !default; -$border-width-lg : 0.25rem !default; -$border-width-xl : 0.375rem !default; -$border-color-white: $white !default; -$border-color : $gray-200 !default; - - -$border-radius : .5rem !default; -$border-radius-sm : .35rem !default; -$border-radius-lg : 1rem !default; -$border-radius-xl : 3rem !default; -$border-radius-pill: 50rem !default; -$circle-radius : 50% !default; - -$component-active-color : $white !default; -$component-active-bg : $primary !default; -$component-active-border-color: $primary !default; - -$component-hover-color : $gray-300 !default; -$component-hover-bg : $gray-300 !default; -$component-hover-border-color: $gray-300 !default; - -$rounded-pill: 50rem !default; - -$box-shadow : 0 1px 3px 0 rgba(0, 0, 0, 0.1),0 1px 2px 0 rgba(0, 0, 0, 0.06) !default; -$box-shadow-sm : 0 2px 5px rgba(140, 152, 164, .2) !default; -$box-shadow-lg : 0 1rem 3rem rgba($black, .175) !default; -$box-shadow-inset: inset 0 1px 2px rgba($black, .0125) !default; - -$component-active-color: $white !default; -$component-active-bg : $primary !default; - -$caret-width : .3em !default; -$caret-vertical-align: $caret-width * .85 !default; -$caret-spacing : $caret-width * .85 !default; - -$transition-base : all .2s ease !default; -$transition-transform: transform .2s ease !default; -$transition-fade : opacity .15s linear !default; -$transition-collapse : height .35s ease !default; -$transition-tabs : all 0.2s !default; - -// scss-docs-start embed-responsive-aspect-ratios -$embed-responsive-aspect-ratios: ("21by9": (x: 21, - y: 9), - "16by9": (x: 16, - y: 9), - "4by3": (x: 4, - y: 3), - "1by1": (x: 1, - y: 1)) !default; -// scss-docs-end embed-responsive-aspect-ratios - -// Typography -// -// Font, line-height, and color for body text, headings, and more. - -// font awesome -$fontawesome-webfonts-path: '../vendor/font-awesome/webfonts' !default; -$font-awesome-5 : 'Font Awesome 5 Free' !default; - -// stylelint-disable value-keyword-case -$font-family-sans-serif: 'Inter', sans-serif !default; -// stylelint-enable value-keyword-case -$font-family-base: var(--bs-font-sans-serif) !default; -$font-family-code: var(--bs-font-monospace) !default; - -// $font-size-root effects the value of `rem`, which is used for as well font sizes, paddings and margins -// $font-size-base effects the font size of the body text -$font-size-root: null !default; -$font-size-base: 1rem !default; // Assumes the browser default, typically `16px` -$font-size-xs : ($font-size-base * .75) !default; -$font-size-sm : ($font-size-base * .875) !default; -$font-size-md : ($font-size-base * 1) !default; -$font-size-lg : ($font-size-base * 1.25) !default; -$font-size-xl : ($font-size-base * 1.5) !default; -$font-size-xxl : ($font-size-base * 2) !default; - -$font-weight-lighter: lighter !default; -$font-weight-light: 300 !default; -$font-weight-normal: 400 !default; -$font-weight-bold: 500 !default; -$font-weight-bolder: 600 !default; -$font-weight-extrabold: 700 !default; -$font-weight-black: 800 !default; - -$font-weight-base: $font-weight-normal !default; - -$line-height-base: 1.5 !default; -$line-height-sm : 1.25 !default; -$line-height-lg : 2 !default; - -$h1-font-size: $font-size-base * 2.5 !default; -$h2-font-size: $font-size-base * 2 !default; -$h3-font-size: $font-size-base * 1.75 !default; -$h4-font-size: $font-size-base * 1.5 !default; -$h5-font-size: $font-size-base * 1.25 !default; -$h6-font-size: $font-size-base !default; - -$headings-margin-bottom: $spacer * 0.5 !default; -$headings-font-family : null !default; -$headings-font-style : null !default; -$headings-font-weight : $font-weight-bold !default; -$headings-line-height : 1.3 !default; -$headings-color : $dark !default; - -// Display headings -$display1-size: 5rem !default; -$display2-size: 3.5rem !default; -$display3-size: 2.5rem !default; -$display4-size: 1.875rem !default; - -// scss-docs-start display-headings -$display-font-sizes: (1: 5rem, - 2: 3.5rem, - 3: 2.5rem, - 4: 1.875rem, - 5: 1.2rem, - 6: 1rem) !default; - -$display-font-weight: $font-weight-bold !default; -$display-line-height: $headings-line-height !default; -// scss-docs-end display-headings - -$paragraph-font-size : 1rem !default; -$paragraph-font-weight: 300 !default; -$paragraph-line-height: 1.6 !default; - -$lead-font-size : $font-size-base * 1.25 !default; -$lead-font-weight: 300 !default; - -$small-font-size: .875em !default; - -$sub-sup-font-size: .75em !default; - -$text-muted: #58677d !default; - -$initialism-font-size: $small-font-size !default; - -$blockquote-margin-y : $spacer !default; -$blockquote-font-size : $font-size-base * 1.25 !default; -$blockquote-footer-color : $gray-600 !default; -$blockquote-footer-font-size: $small-font-size !default; - -$hr-margin-y: $spacer !default; -$hr-color : inherit !default; -$hr-height : $border-width !default; -$hr-opacity : .25 !default; - -$legend-margin-bottom: .5rem !default; -$legend-font-size : 1.5rem !default; -$legend-font-weight : null !default; - -$mark-padding: .2em !default; - -$dt-font-weight: $font-weight-bold !default; - -$nested-kbd-font-weight: $font-weight-bold !default; - -$list-inline-padding: .5rem !default; - -$mark-bg: #fcf8e3 !default; - - -// Tables -// -// Customizes the `.table` component with basic values, each used across all table variations. - -// scss-docs-start table-variables -$table-cell-padding-y : .75rem !default; -$table-cell-padding-x : .5rem !default; -$table-cell-padding-y-sm: .25rem !default; -$table-cell-padding-x-sm: .25rem !default; - -$table-cell-vertical-align: top !default; - -$table-color: $body-color !default; -$table-bg : transparent !default; - -$table-striped-color : $table-color !default; -$table-striped-bg-factor: .05 !default; -$table-striped-bg : rgba($black, $table-striped-bg-factor) !default; - -$table-active-color : $table-color !default; -$table-active-bg-factor: .1 !default; -$table-active-bg : rgba($black, $table-active-bg-factor) !default; - -$table-hover-color : $table-color !default; -$table-hover-bg-factor: .075 !default; -$table-hover-bg : rgba($black, $table-hover-bg-factor) !default; - -$table-border-factor: .1 !default; -$table-border-width : $border-width !default; -$table-border-color : $border-color !default; - -$table-striped-order: odd !default; - -$table-group-seperator-color: $light !default; - -$table-caption-color: $text-muted !default; - -$table-bg-scale: -80% !default; - -$table-head-spacer-y : .75rem !default; -$table-head-spacer-x : 1rem !default; -$table-head-font-size : .75rem !default; -$table-head-text-transform: uppercase !default; -$table-body-font-size : $font-size-sm !default; - -$table-variants: ("primary": shift-color($primary, $table-bg-scale), - "secondary": shift-color($secondary, $table-bg-scale), - "success": shift-color($success, $table-bg-scale), - "info": shift-color($info, $table-bg-scale), - "warning": shift-color($warning, $table-bg-scale), - "danger": shift-color($danger, $table-bg-scale), - "light": $light, - "dark": $dark, -) !default; - -// Accordion -$accordion-padding-y : 1rem !default; -$accordion-padding-x : 1.25rem !default; -$accordion-color : $body-color !default; -$accordion-bg : transparent !default; -$accordion-border-width : $border-width !default; -$accordion-border-color : $gray-400 !default; -$accordion-border-radius: $border-radius !default; - -$accordion-body-padding-y: $accordion-padding-y !default; -$accordion-body-padding-x: $accordion-padding-x !default; - -$accordion-button-padding-y : $accordion-padding-y !default; -$accordion-button-padding-x : $accordion-padding-x !default; -$accordion-button-color : $accordion-color !default; -$accordion-button-bg : $accordion-bg !default; -$accordion-button-active-bg : $light !default; -$accordion-button-active-color: shade-color($primary, 10%) !default; - - -$accordion-icon-width : 1.25rem !default !default; -$accordion-icon-color : $accordion-color !default !default; -$accordion-icon-active-color: $accordion-button-active-color !default !default; -$accordion-icon-transition : transform .2s ease-in-out !default !default; -$accordion-icon-transform : rotate(180deg) !default !default; - -$accordion-button-icon : url("data:image/svg+xml,") !default !default; -$accordion-button-active-icon: url("data:image/svg+xml,") !default !default; - -// Buttons + Forms -// -// Shared variables that are reassigned to `$input-` and `$btn-` specific variables. - -$input-btn-padding-y : .5rem !default; -$input-btn-padding-x : 1rem !default; -$input-btn-font-family: null !default; -$input-btn-font-size : $font-size-sm !default; -$input-btn-line-height: $line-height-base !default; - -$input-btn-focus-width : .18rem !default; -$input-btn-focus-color-opacity: .25 !default; -$input-btn-focus-color : rgba($component-active-bg, $input-btn-focus-color-opacity) !default; -$input-btn-focus-box-shadow : 0 0 0 $input-btn-focus-width $input-btn-focus-color !default; - -$input-btn-padding-y-sm: .375rem !default; -$input-btn-padding-x-sm: .625rem !default; -$input-btn-font-size-sm: $font-size-sm !default; - -$input-btn-padding-y-lg: .5rem !default; -$input-btn-padding-x-lg: 1rem !default; -$input-btn-font-size-lg: $font-size-lg !default; - -$input-btn-border-width: $border-width !default; - -$shadow-input : $box-shadow !default; -$shadow-input-focus: .1rem .1rem 0 rgba($gray-200, .5) !default; - - -// Buttons -// -// For each of Bootstrap's buttons, define text, background, and border color. - -$btn-padding-y : $input-btn-padding-y !default; -$btn-padding-x : $input-btn-padding-x !default; -$btn-font-family: $input-btn-font-family !default; -$btn-font-size : $input-btn-font-size !default; -$btn-line-height: $input-btn-line-height !default; -$btn-white-space: null !default; // Set to `nowrap` to prevent text wrapping - -$btn-padding-y-sm: $input-btn-padding-y-sm !default; -$btn-padding-x-sm: $input-btn-padding-x-sm !default; -$btn-font-size-sm: $input-btn-font-size-sm !default; - -$btn-padding-y-lg: $input-btn-padding-y-lg !default; -$btn-padding-x-lg: $input-btn-padding-x-lg !default; -$btn-font-size-lg: $input-btn-font-size-lg !default; - -$btn-border-width: $input-btn-border-width !default; - -$btn-font-weight: $font-weight-bold !default; -$btn-box-shadow : inset 0 1px 0 rgba($white, .15), -0 1px 1px rgba($black, .075) !default; -$btn-focus-width : $input-btn-focus-width !default; -$btn-focus-box-shadow : $input-btn-focus-box-shadow !default; -$btn-disabled-opacity : .65 !default; -$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default; - -$btn-link-color : $link-color !default; -$btn-link-hover-color : $link-hover-color !default; -$btn-link-disabled-color: $gray-600 !default; - -$btn-block-spacing-y: .5rem !default; - -// Allows for customizing button radius independently from global border radius -$btn-border-radius : $border-radius !default; -$btn-border-radius-sm: $border-radius !default; -$btn-border-radius-lg: $border-radius !default; - -$btn-transition: color .15s ease-in-out, -background-color .15s ease-in-out, -border-color .15s ease-in-out, -box-shadow .15s ease-in-out !default; - - -$btn-close-width: 1em !default; -$btn-close-height: $btn-close-width !default; -$btn-close-padding-x: .25em !default; -$btn-close-padding-y: $btn-close-padding-x !default; -$btn-close-color: $black !default; -$btn-close-bg: url("data:image/svg+xml,") !default; -$btn-close-color-white: $white !default; -$btn-close-bg-white: url("data:image/svg+xml,") !default; -$btn-close-focus-shadow: $input-btn-focus-box-shadow !default; -$btn-close-opacity: .5 !default; -$btn-close-hover-opacity: .75 !default; -$btn-close-focus-opacity: 1 !default; -$btn-close-disabled-opacity: .25 !default; -$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%) !default; - -// Forms - -$form-text-margin-top : .25rem !default; -$form-text-font-size : $small-font-size !default; -$form-text-font-style : null !default; -$form-text-font-weight: null !default; -$form-text-color : $text-muted !default; - -$form-label-margin-bottom: .5rem !default; -$form-label-font-size : null !default; -$form-label-font-style : null !default; -$form-label-font-weight : null !default; -$form-label-color : null !default; - -$input-padding-y : $input-btn-padding-y !default; -$input-padding-x : $input-btn-padding-x !default; -$inpu-lg-padding-y: 1rem !default; -$input-font-family: $input-btn-font-family !default; -$input-font-size : $input-btn-font-size !default; -$input-font-weight: $font-weight-base !default; -$input-line-height: $input-btn-line-height !default; - -$input-padding-y-sm: $input-btn-padding-y-sm !default; -$input-padding-x-sm: $input-btn-padding-x-sm !default; -$input-font-size-sm: $input-btn-font-size-sm !default; - -$input-padding-y-lg: $input-btn-padding-y-lg !default; -$input-padding-x-lg: $input-btn-padding-x-lg !default; -$input-font-size-lg: $input-btn-font-size-lg !default; - -$input-bg : $white !default; -$input-disabled-bg : $gray-200 !default; -$input-disabled-border-color: null !default; - -$input-color : $gray-500 !default; -$input-border-color: $gray-300 !default; -$input-border-width: $input-btn-border-width !default; -$input-box-shadow : 0 1px 2px 0 rgba(0, 0, 0, 0.07) !default; - -$input-border-radius : $border-radius !default; -$input-border-radius-sm: $border-radius !default; -$input-border-radius-lg: $border-radius !default; - -$input-focus-bg : $input-bg !default; -$input-focus-border-color: lighten($component-active-bg, 25%) !default; -$input-focus-color : $input-color !default; -$input-focus-width : $input-btn-focus-width !default; -$input-focus-box-shadow : $input-btn-focus-box-shadow !default; - -$input-placeholder-color: $gray-600 !default; -$input-plaintext-color : $body-color !default; - -$input-height-border: $input-border-width * 2 !default; - -$input-height-inner : add($input-line-height * 1em, $input-padding-y * 2) !default; -$input-height-inner-half : add($input-line-height * .5em, $input-padding-y) !default; -$input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y * 0.5) !default; - -$input-height : add($input-line-height * 1em, add($input-padding-y * 2, $input-height-border, false)) !default; -$input-height-sm: add($input-line-height * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default; -$input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default; -$input-height-xl: calc(#{$input-line-height * 1.5em} + #{$input-btn-padding-y-lg * 2} + #{$input-height-border}) !default; - -$input-transition: border-color .15s ease-in-out, -box-shadow .15s ease-in-out !default; - -// Custom forms - -$custom-control-gutter : 1.75rem !default; -$custom-control-spacer-x : 1rem !default; -$custom-control-line-height : 1 !default; -$custom-control-indicator-size: 1.25rem !default; - -$custom-control-bg : $gray-400 !default; -$custom-control-indicator-bg: $white !default; -$custom-control-border-width: $border-width !default; -$custom-control-border-color: $input-border-color !default; -$custom-control-box-shadow : none !default; - - - -$custom-control-indicator-hover-color : $component-hover-color !default; -$custom-control-indicator-hover-bg : $primary !default; -$custom-control-indicator-hover-border-color: $component-hover-border-color !default; - -$custom-control-indicator-active-color : $component-active-color !default; -$custom-control-indicator-active-border-color: $component-active-border-color !default; - - -$custom-control-indicator-checked-color : $component-active-color !default; -$custom-control-indicator-checked-bg : $primary !default; -$custom-control-indicator-checked-border-color: $primary !default; -$custom-control-indicator-checked-disabled-bg : rgba($primary, .7) !default; -$custom-control-indicator-border-width : 1px !default; - -$custom-control-indicator-disabled-bg: $gray-200 !default; -$custom-control-label-disabled-color : $gray-800 !default; - -$custom-checkbox-bg : $gray-400 !default; -$custom-checkbox-checked-bg : $primary !default; -$custom-checkbox-disabled-checked-bg : rgba($primary, .7) !default; -$custom-checkbox-indicator-border-radius: $border-radius-xl !default; -$custom-checkbox-indicator-border-width : $border-width-md !default; -$custom-checkbox-indicator-icon-checked : $font-awesome-5 !default; -$square-checkbox-indicator-border-radius: 3px !default; - -$custom-toggle-slider-bg : $gray-400 !default; -$custom-toggle-slider-indicator-bg: $white !default; -$custom-toggle-checked-bg : $primary !default; -$custom-toggle-disabled-bg : $gray-200 !default; -$custom-toggle-disabled-checked-bg: rgba($primary, .7) !default; -$custom-toggle-border-radius : .8rem !default; - -$custom-switch-indicator-size: calc(#{$custom-control-indicator-size} - #{$custom-control-indicator-border-width * 4}) !default; - -$custom-checkbox-disabled-checked-color: $gray-800 !default; - - -$form-check-input-width : 1.125em !default; -$form-check-min-height : $font-size-base * $line-height-base !default; -$form-check-padding-left : $form-check-input-width+.5em !default; -$form-check-margin-bottom: .125rem !default; -$form-check-label-color : null !default; -$form-check-label-cursor : null !default; -$form-check-transition : background-color .2s ease-in-out, -background-position .2s ease-in-out, -border-color .2s ease-in-out, -box-shadow .2s ease-in-out !default; - -$form-check-input-active-filter: brightness(90%) !default; - -$form-check-input-bg : $body-bg !default; -$form-check-input-border : 1px solid $input-border-color !default; -$form-check-input-border-radius : .25em !default; -$form-check-radio-border-radius : 50% !default; -$form-check-input-focus-border : $input-focus-border-color !default; -$form-check-input-focus-box-shadow: $input-btn-focus-box-shadow !default; - -$form-check-input-checked-color : $component-active-color !default; -$form-check-input-checked-bg-color : $component-active-bg !default; -$form-check-input-checked-border-color: $form-check-input-checked-bg-color !default; -$form-check-input-checked-bg-image : url("data:image/svg+xml,") !default; -$form-check-radio-checked-bg-image : url("data:image/svg+xml,") !default; - -$form-check-input-indeterminate-color : $component-active-color !default; -$form-check-input-indeterminate-bg-color : $component-active-bg !default; -$form-check-input-indeterminate-border-color: $form-check-input-indeterminate-bg-color !default; -$form-check-input-indeterminate-bg-image : url("data:image/svg+xml,") !default; - -$form-switch-color : $gray-600 !default; -$form-switch-width : 2.25em !default; -$form-switch-padding-left : $form-switch-width+.5em !default; -$form-switch-bg-image : url("data:image/svg+xml,") !default; -$form-switch-border-radius: $form-switch-width !default; - -$form-switch-focus-color : $input-focus-border-color !default; -$form-switch-focus-bg-image: url("data:image/svg+xml,") !default; - -$form-switch-checked-color : $component-active-color !default; -$form-switch-checked-bg-image : url("data:image/svg+xml,") !default; -$form-switch-checked-bg-position: right center !default; - -$form-check-inline-margin-right: 1rem !default; - -$input-group-addon-color : $input-color !default; -$input-group-addon-border-color: $input-border-color !default; - -// Input groups - -// scss-docs-start input-group-variables -$input-group-addon-padding-y: .5rem !default; -$input-group-addon-padding-x: .625rem !default; -$input-group-addon-font-weight: $input-font-weight !default; -$input-group-addon-color: $gray-400 !default; -$input-group-addon-bg: $white !default; -$input-group-addon-border-color: $input-border-color !default; -// scss-docs-end input-group-variables - -$form-select-padding-y : $input-padding-y !default; -$form-select-padding-x : $input-padding-x !default; -$form-select-font-family : $input-font-family !default; -$form-select-font-size : $input-font-size !default; -$form-select-height : $input-height !default; -$form-select-indicator-padding : 1rem !default; // Extra padding to account for the presence of the background-image based indicator -$form-select-font-weight : $input-font-weight !default; -$form-select-line-height : $input-line-height !default; -$form-select-color : $input-color !default; -$form-select-disabled-color : $gray-600 !default; -$form-select-bg : $input-bg !default; -$form-select-disabled-bg : $gray-200 !default; -$form-select-disabled-border-color: $input-disabled-border-color !default; -$form-select-bg-position : right $form-select-padding-x center !default; -$form-select-bg-size : 16px 12px !default; // In pixels because image dimensions -$form-select-indicator-color : $gray-800 !default; -$form-select-indicator : url("data:image/svg+xml,") !default; - -$form-select-feedback-icon-padding-right: add(1em * .75, (2 * $form-select-padding-y * .75) + $form-select-padding-x + $form-select-indicator-padding) !default; -$form-select-feedback-icon-position : center right ($form-select-padding-x + $form-select-indicator-padding) !default; -$form-select-feedback-icon-size : $input-height-inner-half $input-height-inner-half !default; - -$form-select-border-width : $input-border-width !default; -$form-select-border-color : $input-border-color !default; -$form-select-border-radius: $border-radius !default; -$form-select-box-shadow : $box-shadow-inset !default; - -$form-select-focus-border-color: $input-focus-border-color !default; -$form-select-focus-width : $input-focus-width !default; -$form-select-focus-box-shadow : 0 0 0 $form-select-focus-width $input-btn-focus-color !default; - -$form-select-padding-y-sm: $input-padding-y-sm !default; -$form-select-padding-x-sm: $input-padding-x-sm !default; -$form-select-font-size-sm: $input-font-size-sm !default; -$form-select-height-sm : $input-height-sm !default; - -$form-select-padding-y-lg: $input-padding-y-lg !default; -$form-select-padding-x-lg: $input-padding-x-lg !default; -$form-select-font-size-lg: $input-font-size-lg !default; -$form-select-height-lg : $input-height-lg !default; - -$form-range-track-width : 100% !default; -$form-range-track-height : .5rem !default; -$form-range-track-cursor : pointer !default; -$form-range-track-bg : $gray-300 !default; -$form-range-track-border-radius: 1rem !default; -$form-range-track-box-shadow : $box-shadow-inset !default; - -$form-range-thumb-width : 1rem !default; -$form-range-thumb-height : $form-range-thumb-width !default; -$form-range-thumb-bg : $component-active-bg !default; -$form-range-thumb-border : 0 !default; -$form-range-thumb-border-radius: 1rem !default; -$form-range-thumb-box-shadow : 0 .1rem .25rem rgba($black, .1) !default; -$form-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, -$input-focus-box-shadow !default; -$form-range-thumb-focus-box-shadow-width: $input-focus-width !default; // For focus box shadow issue in Edge -$form-range-thumb-active-bg : lighten($component-active-bg, 35%) !default; -$form-range-thumb-disabled-bg : $gray-500 !default; -$form-range-thumb-transition : background-color .15s ease-in-out, -border-color .15s ease-in-out, -box-shadow .15s ease-in-out !default; - -$form-file-height : $input-height !default; -$form-file-focus-border-color : $input-focus-border-color !default; -$form-file-focus-box-shadow : $input-focus-box-shadow !default; -$form-file-disabled-bg : $input-disabled-bg !default; -$form-file-disabled-border-color: $input-disabled-border-color !default; - -$form-file-padding-y : $input-padding-y !default; -$form-file-padding-x : $input-padding-x !default; -$form-file-line-height : $input-line-height !default; -$form-file-font-family : $input-font-family !default; -$form-file-font-weight : $input-font-weight !default; -$form-file-color : $input-color !default; -$form-file-bg : $input-bg !default; -$form-file-border-width : $input-border-width !default; -$form-file-border-color : $input-border-color !default; -$form-file-border-radius: $input-border-radius !default; -$form-file-box-shadow : $input-box-shadow !default; -$form-file-button-color : $form-file-color !default; -$form-file-button-bg : $input-group-addon-bg !default; - -$form-file-padding-y-sm: $input-padding-y-sm !default; -$form-file-padding-x-sm: $input-padding-x-sm !default; -$form-file-font-size-sm: $input-font-size-sm !default; -$form-file-height-sm : $input-height-sm !default; - -$form-file-padding-y-lg: $input-padding-y-lg !default; -$form-file-padding-x-lg: $input-padding-x-lg !default; -$form-file-font-size-lg: $input-font-size-lg !default; -$form-file-height-lg : $input-height-lg !default; - -$input-muted-bg : $gray-100 !default; -$input-placeholder-color : $gray-800 !default; -$input-focus-placeholder-color: $gray-800 !default; - -// Form validation - -$form-feedback-margin-top : $form-text-margin-top !default; -$form-feedback-font-size : $form-text-font-size !default; -$form-feedback-font-style : $form-text-font-style !default; -$form-feedback-valid-color : $success !default; -$form-feedback-invalid-color: $danger !default; - -$form-feedback-icon-valid-color : $form-feedback-valid-color !default; -$form-feedback-icon-valid : url("data:image/svg+xml,") !default; -$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default; -$form-feedback-icon-invalid : url("data:image/svg+xml,") !default; - -// scss-docs-start form-validation-states -$form-validation-states: ("valid": ("color": $form-feedback-valid-color, - "icon": $form-feedback-icon-valid), - "invalid": ("color": $form-feedback-invalid-color, - "icon": $form-feedback-icon-invalid)) !default; -// scss-docs-end form-validation-states - -// Z-index master list -// -// Warning: Avoid customizing these values. They're used for a bird's eye view -// of components dependent on the z-axis and are designed to all work together. - -// scss-docs-start zindex-stack -$zindex-dropdown : 1000 !default; -$zindex-sticky : 1020 !default; -$zindex-fixed : 1030 !default; -$zindex-modal-backdrop: 1040 !default; -$zindex-modal : 1050 !default; -$zindex-popover : 1060 !default; -$zindex-tooltip : 1070 !default; -// scss-docs-end zindex-stack - -// No UI Slider - -$noui-target-bg : $gray-400 !default; -$noui-target-thickness : 5px !default; -$noui-target-border-radius : 5px !default; -$noui-target-border-color : 0 !default; -$noui-target-box-shadow : inset $box-shadow-sm !default; -$noui-box-shadow : $box-shadow-sm !default; -$noui-slider-connect-bg : $primary !default; -$noui-slider-connect-disabled-bg: $gray-200 !default; -$noui-handle-active-shadow : 0 0 0 0.2rem rgba(69, 77, 103, 0.5) !default; -$noui-handle-width : 15px !default; -$noui-handle-bg : $primary !default; -$noui-handle-border : 0 !default; -$noui-handle-border-radius : $border-radius !default; -$noui-origin-border-radius : $circle-radius !default; - - -// Navs - -$nav-link-padding-y : .5rem !default; -$nav-link-padding-x : 1rem !default; -$nav-link-color : $gray-800 !default; -$nav-link-hover-color : $dark !default; -$nav-link-active-color: $gray-800 !default; -$nav-link-shadow : none !default; -$nav-link-transition : color .15s ease-in-out, -background-color .15s ease-in-out, -border-color .15s ease-in-out !default; -$nav-link-disabled-color: $gray-600 !default; - -$nav-tabs-border-color : $light !default; -$nav-tabs-border-width : $border-width !default; -$nav-tabs-border-radius : $border-radius !default; -$nav-tabs-link-hover-border-color : $gray-200 $gray-200 $nav-tabs-border-color !default; -$nav-tabs-link-active-color : $gray-700 !default; -$nav-tabs-link-active-bg : $light !default; -$nav-tabs-link-active-border-color: $light !default; - -$nav-pills-padding-y: .75rem !default; -$nav-pills-padding-x: .85rem !default; - -$nav-pills-space-x : 1rem !default; -$nav-pills-border-circle: 50% !default; - -$nav-pills-bg : $white !default; -$nav-pills-border-width : 1px !default; -$nav-pills-border-color : $light !default; -$nav-pills-border-radius: $border-radius !default; - -$nav-pills-link-hover-color : $primary !default; -$nav-pills-link-active-color : $primary !default; -$nav-pills-active-border-color: $gray-300 !default; -$nav-pills-link-active-bg : #f8f8f8 !default; - -// Owl navs - -$owl-nav-color : $gray-600 !default; -$owl-nav-color-hover : $gray-900 !default; -$owl-nav-font-size : $font-size-xxl !default; -$owl-nav-rounded : 3px !default; -$owl-nav-margin : 5px !default; -$owl-nav-padding : 4px 7px !default; -$owl-nav-background : $gray-400 !default; -$owl-nav-background-hover: $gray-800 !default; -$owl-nav-disabled-opacity: 0.5 !default; - -// Owl dots - -$owl-dot-width : 10px !default; -$owl-dot-height : 10px !default; -$owl-dot-rounded : $circle-radius !default; -$owl-dot-margin : 5px 5px !default; -$owl-dot-border-width : 2px !default; -$owl-dot-background : $gray-400 !default; -$owl-dot-background-active: $gray-800 !default; - - -// Navbar - -$navbar-padding-y: 1rem !default; -$navbar-padding-x: null !default; - -$navbar-nav-link-padding-x: .8rem !default; - -$navbar-brand-font-size : $font-size-lg !default; -// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link -$nav-link-height : $font-size-base * $line-height-base+$nav-link-padding-y * 4 !default; -$navbar-brand-height : $navbar-brand-font-size * $line-height-base !default; -$navbar-brand-padding-y : 0 !default; -$navbar-brand-margin-right: 1rem !default; - -$navbar-toggler-padding-y : .4rem !default; -$navbar-toggler-padding-x : .6rem !default; -$navbar-toggler-font-size : $font-size-lg !default; -$navbar-toggler-border-radius: $btn-border-radius !default; -$navbar-toggler-focus-width : $btn-focus-width !default; -$navbar-toggler-transition : box-shadow .15s ease-in-out !default; - -$navbar-dark-color : rgba($white, 0.9) !default; -$navbar-dark-hover-color : rgba($white, 1) !default; -$navbar-dark-active-color : $white !default; -$navbar-dark-disabled-color : rgba($white, .9) !default; -$navbar-dark-toggler-icon-bg : url("data:image/svg+xml,") !default; -$navbar-dark-toggler-border-color: rgba($white, .1) !default; - -$navbar-light-color : rgba($black, .9) !default; -$navbar-light-hover-color : rgba($black, 1) !default; -$navbar-light-active-color : rgba($black, 1) !default; -$navbar-light-disabled-color : rgba($black, .9) !default; -$navbar-light-toggler-icon-bg : url("data:image/svg+xml,") !default; -$navbar-light-toggler-border-color: rgba($black, .1) !default; - -$navbar-light-brand-color : $navbar-light-active-color !default; -$navbar-light-brand-hover-color: $navbar-light-active-color !default; -$navbar-dark-brand-color : $navbar-dark-active-color !default; -$navbar-dark-brand-hover-color : $navbar-dark-active-color !default; - - -// Dropdowns -// -// Dropdown menu container and contents. - -$dropdown-min-width : 12rem !default; -$dropdown-padding-y : .5rem !default; -$dropdown-spacer : .125rem !default; -$dropdown-font-size : .875rem !default; -$dropdown-item-font-weight: $font-weight-normal !default; -$dropdown-item-hover-color: $gray-900 !default; - -$dropdown-color : $body-color !default; -$dropdown-bg : $white !default; -$dropdown-border-color : $border-color !default; -$dropdown-border-radius : $border-radius-sm !default; -$dropdown-border-width : $border-width !default; -$dropdown-inner-border-radius: subtract($dropdown-border-radius, $dropdown-border-width) !default; -$dropdown-divider-bg : $gray-200 !default; -$dropdown-divider-margin-y : $spacer * 0.5 !default; -$dropdown-box-shadow : 0 10px 15px -3px rgba(0, 0, 0, 0.1),0 4px 6px -2px rgba(0, 0, 0, 0.05) !default; - -$dropdown-link-color : $gray-900 !default; -$dropdown-link-hover-color: darken($gray-900, 5%) !default; -$dropdown-link-hover-bg : $gray-100 !default; - -$dropdown-link-active-color: $gray-900 !default; -$dropdown-link-active-bg : $gray-200 !default; - -$dropdown-link-disabled-color: $gray-600 !default; - -$dropdown-item-padding-y: $spacer * 0.25 !default; -$dropdown-item-padding-x: $spacer !default; - -$dropdown-header-color : $gray-900 !default; -$dropdown-header-font-weight: $font-weight-bold !default; -$dropdown-header-padding : $dropdown-padding-y $dropdown-item-padding-x !default; - - -// Pagination - -$pagination-padding-y : .375rem !default; -$pagination-padding-x : .75rem !default; -$pagination-padding-y-sm: .25rem !default; -$pagination-padding-x-sm: .5rem !default; -$pagination-padding-y-lg: .75rem !default; -$pagination-padding-x-lg: 1.5rem !default; - -$pagination-color : $link-color !default; -$pagination-bg : $white !default; -$pagination-border-width : $border-width !default; -$pagination-border-radius: $border-radius !default; -$pagination-margin-left : -$pagination-border-width !default; -$pagination-border-color : $light !default; - -$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default; -$pagination-focus-outline : 0 !default; - -$pagination-hover-color : $link-hover-color !default; -$pagination-hover-bg : $gray-200 !default; -$pagination-hover-border-color: $gray-300 !default; - -$pagination-active-color : $component-active-color !default; -$pagination-active-bg : $component-active-bg !default; -$pagination-active-border-color: $pagination-active-bg !default; - -$pagination-disabled-color : $gray-600 !default; -$pagination-disabled-bg : $white !default; -$pagination-disabled-border-color: $gray-300 !default; - - -// Cards - -$card-spacer-y : 1.25rem !default; -$card-spacer-x : 1.5rem !default; -$card-social-padding : .25rem .375rem !default; -$card-title-spacer-y : .875rem !default; -$card-border-width : $border-width !default; -$card-border-radius : $border-radius !default; -$card-border-color : rgba($black, .125) !default; -$card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default; -$card-cap-padding-y : 1.25rem !default; -$card-cap-padding-x : $card-spacer-x !default; -$card-cap-bg : rgba($black, .03) !default; -$card-cap-color : null !default; -$card-height : null !default; -$card-color : null !default; -$card-bg : $white !default; - -$card-img-overlay-padding: $spacer !default; - -$card-group-margin : $grid-gutter-width * 0.5 !default; -$transition-bezier-card: cubic-bezier(0.34, 1.45, 0.7, 1) !default; - -//Timelines -$timeline-font-size : $font-size-xxl !default; -$timeline-font-color : $body-color !default; -$timeline-border-color : $light !default; -$timeline-border-color-dark: $gray-500 !default; -$timeline-background-color : $white !default; -$timeline-line-height : 3 !default; -$timeline-border-width : $border-width !default; -$timeline-circle-radius : 50% !default; -$timeline-spacer-y : 1.25rem !default; -$timeline-spacer-x : 2.75rem !default; - -// Icons & Shapes sizes - -$icon-size-xxs: 1rem !default; -$icon-size-xs: 1.25rem !default; -$icon-size-sm: 1.5rem !default; -$icon-size: 2rem !default; -$icon-size-lg: 3.5rem !default; -$icon-size-xl: 4.5rem !default; -$icon-size-xxl: 6rem !default; - -$icon-shape-xxs: 1.5rem !default; -$icon-shape-xs: 2.5rem !default; -$icon-shape-sm: 3.275rem !default; -$icon-shape: 4rem !default; -$icon-shape-lg: 5rem !default; -$icon-shape-xl: 6rem !default; -$icon-shape-xxl: 7.5rem !default; - - -// Steps -$step-number-size : 12rem !default; -$step-shape-size : 7rem !default; -$step-border-width: $border-width-md !default; -$step-icon-size : $icon-size-xl !default; - -// Tooltips - -$tooltip-font-size : $font-size-sm !default; -$tooltip-max-width : 200px !default; -$tooltip-color : $white !default; -$tooltip-bg : $dark !default; -$tooltip-border-radius: $border-radius !default; -$tooltip-opacity : .99 !default; -$tooltip-padding-y : .5rem !default; -$tooltip-padding-x : .55rem !default; -$tooltip-margin : 2rem !default; - -$tooltip-arrow-width : .8rem !default; -$tooltip-arrow-height: .4rem !default; -$tooltip-arrow-color : $tooltip-bg !default; - -// Form tooltips must come after regular tooltips -$form-feedback-tooltip-padding-y : $tooltip-padding-y !default; -$form-feedback-tooltip-padding-x : $tooltip-padding-x !default; -$form-feedback-tooltip-font-size : $tooltip-font-size !default; -$form-feedback-tooltip-line-height : null !default; -$form-feedback-tooltip-opacity : $tooltip-opacity !default; -$form-feedback-tooltip-border-radius: $tooltip-border-radius !default; - - -// Popovers - -$popover-font-size : $font-size-sm !default; -$popover-bg : $dark !default; -$popover-max-width : 276px !default; -$popover-border-width : $border-width !default; -$popover-border-color : rgba($black, .2) !default; -$popover-border-radius : $border-radius-lg !default; -$popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default; -$popover-box-shadow : $box-shadow !default; - -$popover-header-bg : darken($popover-bg, 3%) !default; -$popover-header-color : $headings-color !default; -$popover-header-padding-y: .5rem !default; -$popover-header-padding-x: $spacer !default; - -$popover-body-color : $white !default; -$popover-body-padding-y: $spacer !default; -$popover-body-padding-x: $spacer !default; - -$popover-arrow-width : 1rem !default; -$popover-arrow-height: .5rem !default; -$popover-arrow-color : $popover-bg !default; - -$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default; - - -// Toasts - -$toast-max-width : 350px !default; -$toast-padding-x : .75rem !default; -$toast-padding-y : .25rem !default; -$toast-font-size : .875rem !default; -$toast-color : null !default; -$toast-background-color: rgba($white, .85) !default; -$toast-border-width : 1px !default; -$toast-border-color : rgba(0, 0, 0, .1) !default; -$toast-border-radius : $border-radius !default; -$toast-box-shadow : $box-shadow !default; - -$toast-header-color : $gray-600 !default; -$toast-header-background-color: rgba($white, .85) !default; -$toast-header-border-color : rgba(0, 0, 0, .05) !default; - - -// Badges - -$badge-font-size : .75em !default; -$badge-font-weight : $font-weight-bolder !default; -$badge-padding-y : .2rem !default; -$badge-padding-x : .4rem !default; -$badge-color : $white !default; -$badge-border-radius: $border-radius !default; - -$badge-pill-padding-x : .875em !default; -$badge-pill-border-radius: 10rem !default; - -$badge-circle-size: 2rem !default; - - -// Modals - -// Padding applied to the modal body -$modal-inner-padding: $spacer !default; - -// Margin between elements in footer, must be lower than or equal to 2 * $modal-inner-padding -$modal-footer-margin-between: .5rem !default; - -$modal-dialog-margin : .5rem !default; -$modal-dialog-margin-y-sm-up: 1.75rem !default; - -$modal-title-line-height: $line-height-base !default; - -$modal-content-color : null !default; -$modal-content-bg : $white !default; -$modal-content-border-color : rgba($black, .2) !default; -$modal-content-border-width : $border-width !default; -$modal-content-border-radius : $border-radius !default; -$modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default; -$modal-content-box-shadow-xs : $box-shadow-sm !default; -$modal-content-box-shadow-sm-up : $box-shadow !default; - -$modal-backdrop-bg : $black !default; -$modal-backdrop-opacity : .5 !default; -$modal-header-border-color: $border-color !default; -$modal-footer-border-color: $modal-header-border-color !default; -$modal-header-border-width: $modal-content-border-width !default; -$modal-footer-border-width: $modal-header-border-width !default; -$modal-header-padding-y : $modal-inner-padding !default; -$modal-header-padding-x : $modal-inner-padding !default; -$modal-header-padding : $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility - -$modal-sm: 300px !default; -$modal-md: 500px !default; -$modal-lg: 800px !default; -$modal-xl: 1140px !default; - -$modal-fade-transform : translate(0, -50px) !default; -$modal-show-transform : none !default; -$modal-transition : transform .3s ease-out !default; -$modal-scale-transform: scale(1.02) !default; - - -// Alerts -// -// Define alert colors, border radius, and padding. - -$alert-padding-y : $spacer !default; -$alert-padding-x : $spacer !default; -$alert-margin-bottom : 1rem !default; -$alert-border-radius : $border-radius !default; -$alert-link-font-weight: $font-weight-bold !default; -$alert-border-width : $border-width !default; -$alert-icon-font-size : 2rem !default; -$alert-link-color : $white !default; - -$alert-bg-level : -10 !default !default; -$alert-border-level: -9 !default !default; -$alert-color-level : 10 !default !default; - - -// Progress bars - -$progress-height : 1rem !default; -$progress-font-size : $font-size-base * .75 !default; -$progress-bg : $gray-200 !default; -$progress-border-radius : $border-radius !default; -$progress-box-shadow : $box-shadow-inset !default; -$progress-bar-color : $white !default; -$progress-bar-bg : $dark !default; -$progress-bar-animation-timing: 1s linear infinite !default; -$progress-bar-transition : width .6s ease !default; - -$progress-xl-size: .8rem !default; -$progress-lg-size: .6rem !default; -$progress-sm-size: .2rem !default; - - -// List group - -$list-group-color : null !default; -$list-group-bg : $white !default; -$list-group-border-color : rgba($black, .125) !default; -$list-group-border-width : $border-width !default; -$list-group-border-radius: $border-radius !default; - -$list-group-sm-item-padding-y: .625rem !default; -$list-group-sm-item-padding-x: .875rem !default; - -$list-group-item-padding-y : $spacer * 0.5 !default; -$list-group-item-padding-x : $spacer !default; -$list-group-item-bg-level : -9 !default; -$list-group-item-color-level : 6 !default; -$list-group-item-border-radius: $border-radius !default; - -$list-group-hover-bg : $gray-100 !default; -$list-group-active-color : $component-active-color !default; -$list-group-active-bg : $component-active-bg !default; -$list-group-active-border-color: $list-group-active-bg !default; - -$list-group-disabled-color: $gray-600 !default; -$list-group-disabled-bg : $list-group-bg !default; - -$list-group-action-color : $gray-700 !default; -$list-group-action-hover-color: $list-group-action-color !default; - -$list-group-action-active-color: $body-color !default; -$list-group-action-active-bg : $gray-200 !default; - -// Image thumbnails - -$thumbnail-padding : .25rem !default; -$thumbnail-bg : $body-bg !default; -$thumbnail-border-width : $border-width !default; -$thumbnail-border-color : $gray-300 !default; -$thumbnail-border-radius: $border-radius !default; -$thumbnail-box-shadow : $box-shadow-sm !default; - - -// Figures - -$figure-caption-font-size: $small-font-size !default; -$figure-caption-color : $gray-600 !default; - - -// Breadcrumbs - -$breadcrumb-font-size : null !default; -$breadcrumb-padding-y : $spacer * 0.5 !default; -$breadcrumb-padding-x : $spacer !default; -$breadcrumb-item-padding-x: .5rem !default; -$breadcrumb-margin-bottom : 1rem !default; -$breadcrumb-bg : $gray-200 !default; -$breadcrumb-divider-color : $gray-600 !default; -$breadcrumb-active-color : $gray-600 !default; -$breadcrumb-divider : quote("/") !default; -$breadcrumb-border-radius : $border-radius !default; - -$breadcrumb-active-color : $white !default; -$breadcrumb-divider-color : $gray-700 !default; -$breadcrumb-item-color : $gray-700 !default; -$breadcrumb-font-weight : $font-weight-normal !default; -$breadcrumb-active-font-weight : $font-weight-normal !default; -$breadcrumb-item-light-color : $white !default; -$breadcrumb-divider-light-color: $white !default; - -// Carousel - -$carousel-control-color : $white !default; -$carousel-control-width : 15% !default; -$carousel-control-opacity : .5 !default; -$carousel-control-hover-opacity: .9 !default; -$carousel-control-transition : opacity .15s ease !default; - -$carousel-indicator-width : 30px !default; -$carousel-indicator-height : 3px !default; -$carousel-indicator-hit-area-height: 10px !default; -$carousel-indicator-spacer : 3px !default; -$carousel-indicator-opacity : .5 !default; -$carousel-indicator-active-bg : $white !default; -$carousel-indicator-active-opacity : 1 !default; -$carousel-indicator-transition : opacity .6s ease !default; - -$carousel-caption-width : 70% !default; -$carousel-caption-color : $white !default; -$carousel-caption-padding-y: 1.25rem !default; -$carousel-caption-spacer : 1.25rem !default; - -$carousel-control-icon-width: 20px !default; - -$carousel-control-prev-icon-bg: url("data:image/svg+xml,") !default; -$carousel-control-next-icon-bg: url("data:image/svg+xml,") !default; - -$carousel-transition-duration: .6s !default; -$carousel-transition : transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`) - - -// Spinners - -$spinner-width : 2rem !default; -$spinner-height : $spinner-width !default; -$spinner-border-width : .25em !default; -$spinner-animation-speed: .75s !default; - -$spinner-width-sm : 1.2rem !default; -$spinner-height-sm : $spinner-width-sm !default; -$spinner-border-width-sm: .2em !default; - -// Datepicker - -$datepicker-border-radius : $border-radius-sm !default; -$datepicker-dropdown-padding: 20px 22px !default; - -$datepicker-cell-transition : $transition-base !default; -$datepicker-cell-hover-background: lighten($gray-400, 55%) !default; -$datepicker-cell-border-radius : 50% !default; -$datepicker-cell-width : 36px !default; -$datepicker-cell-height : 36px !default; - -$datepicker-disabled-cell-color : $gray-300 !default; -$datepicker-disabled-old-new-color: $gray-500 !default; - -$datepicker-header-cell-border-radius: $border-radius-sm !default; - -$datepicker-active-color : $white !default; -$datepicker-active-background: $secondary !default; -$datepicker-active-box-shadow: none !default; - -$datepicker-range-background : $secondary !default; -$datepicker-range-cell-focused-background: darken($datepicker-range-background, 5%) !default; -$datepicker-range-color : $white !default; -$datepicker-range-highlighted-bg : $gray-200 !default; - -$datepicker-dropdown-border: lighten($gray-400, 40%) !default; -$datepicker-dropdown-bg : $white !default; -$datepicker-highlighted-bg : $datepicker-active-background !default; - - -// Close - -$close-bg : transparent !default; -$close-hover-bg : transparent !default; -$close-color : rgba(0, 0, 0, .6) !default; -$close-hover-color: rgba(0, 0, 0, .9) !default; -$close-font-size : $font-size-base * 1.5 !default; -$close-font-weight: $font-weight-bold !default; -$close-color : $black !default; -$close-text-shadow: 0 1px 0 $white !default; - - - -// Code - -$code-font-size: $small-font-size !default; -$code-color : $pink !default; - -$kbd-padding-y: .2rem !default; -$kbd-padding-x: .4rem !default; -$kbd-font-size: $code-font-size !default; -$kbd-color : $white !default; -$kbd-bg : $gray-900 !default; - -$pre-color: null !default; - -// Avatars -$avatar-sm-y: 1.5rem !default; -$avatar-sm-x: 1.5rem !default; - -$avatar-y: 2rem !default; -$avatar-x: 2rem !default; - -$avatar-md-y: 3rem !default; -$avatar-md-x: 3rem !default; - -$avatar-lg-y: 4.5rem !default; -$avatar-lg-x: 4.5rem !default; - -$avatar-xl-y: 8rem !default; -$avatar-xl-x: 8rem !default; - -// Footer - -$footer-link-font-size : .85rem !default; -$footer-bg : theme-color("secondary") !default; -$footer-color : $gray-600 !default; -$footer-link-color : $gray-600 !default; -$footer-link-hover-color : $gray-700 !default; -$footer-heading-color : $gray-600 !default; -$footer-heading-font-size: $font-size-sm !default; -$padding-footer-sm : .125rem !default; -$padding-footer : .375rem !default; -$padding-footer-md : .625rem !default; -$padding-footer-general : .9375rem !default; -$padding-footer-big : 1.5rem !default; diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/_vendor.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/_vendor.scss deleted file mode 100644 index 9d4f390..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/_vendor.scss +++ /dev/null @@ -1,6 +0,0 @@ -// Vendor -@import "vendor/headroom"; -@import "vendor/nouislider"; -@import "vendor/prism"; -@import "vendor/chartist/chartist"; -@import "vendor/datepicker"; diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_accordions.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_accordions.scss deleted file mode 100755 index 5bec9ea..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_accordions.scss +++ /dev/null @@ -1,48 +0,0 @@ -/** - * = Accordions -*/ - - -.accordion-button { - text-align: left; - &:not(.collapsed) { - &::after { - background-image: none; - @include transform(rotateZ(45deg)); - } - } - - // Accordion icon - &::after { - background-image: none; - content: '\f067'; - font-family: $font-awesome-5; - font-size: $font-size-base; - font-weight: 900; - } - - &:hover{ - background-color: $gray-200; - } -} - - -// Flush accordion items -// -// Remove borders and border-radius to keep accordion items edge-to-edge. - -.accordion-flush { - .accordion-button { - background-color: transparent; - &:not(.collapsed) { - color: $tertiary; - } - &:focus { - border-color: $gray-300; - box-shadow: none; - } - } - .accordion-collapse { - border: 0; - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_alerts.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_alerts.scss deleted file mode 100644 index 7873d96..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_alerts.scss +++ /dev/null @@ -1,10 +0,0 @@ -.alert-heading{ - font-weight: $font-weight-bold; -} - -.alert-icon{ - margin-bottom: .5rem; - span{ - font-size: $alert-icon-font-size; - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_animations.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_animations.scss deleted file mode 100644 index 42e11e1..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_animations.scss +++ /dev/null @@ -1,234 +0,0 @@ - -/** - * = Animations - */ - - @for $size from 1 to 10 { - .animate-up-#{$size}, - .animate-right-#{$size}, - .animate-down-#{$size}, - .animate-left-#{$size}, - .scale-up-#{$size}, - .scale-down-#{$size} { - transition: $transition-base; - } - - .scale-up-#{$size} { - &:hover { - transform: scale($size * 0.5555555556); - } - } - - .scale-up-hover-#{$size} { - &:hover { - & .scale { - transform: scale($size * 0.5555555556); - } - } - } - - .scale-down-#{$size} { - &:hover { - transform: scale($size * 0.4); - } - } - - .animate-up-#{$size} { - &:hover, - .animate-hover:hover & { - @include translate(0, -#{$size}px); - } - } - .animate-right-#{$size} { - &:hover, - .animate-hover:hover & { - @include translate(#{$size}px, 0); - } - } - .animate-down-#{$size} { - &:hover, - .animate-hover:hover & { - @include translate(0, #{$size}px); - } - } - .animate-left-#{$size} { - &:hover, - .animate-hover:hover & { - @include translate(-#{$size}px, 0); - } - } -} - -// Keyframes -@keyframes show-navbar-collapse { - 0% { - opacity: 0; - transform: scale(.95); - transform-origin: 100% 0; - } - - 100% { - opacity: 1; - transform: scale(1); - } -} - -@keyframes hide-navbar-collapse { - from { - opacity: 1; - transform: scale(1); - transform-origin: 100% 0; - } - - to { - opacity: 0; - transform: scale(.95); - } -} - -@keyframes show-navbar-dropdown { - 0% { - opacity: 0; - transform: translate(0, 10px) perspective(200px) rotateX(-2deg); - transition: visibility 0.45s, opacity 0.45s, transform 0.45s; - } - - 100% { - transform: translate(0, 0); - opacity: 1; - } -} - -@keyframes hide-navbar-dropdown { - from { - opacity: 1; - } - - to { - opacity: 0; - transform: translate(0, 10px); - } -} - -@keyframes show-dropdown { - 0% { - opacity: 0; - transform-origin: perspective(200px) rotateX(-2deg); - transition: visibility 0.45s, opacity .5s; - } - - 100% { - opacity: 1; - } -} - - -@keyframes hide-dropdown { - from { - opacity: 1; - } - - to { - opacity: 0; - transform: translate(0, 10px); - } -} - -.bell-shake { - &.shaking { - animation: bellshake .5s cubic-bezier(.36,.07,.19,.97) both; - backface-visibility: hidden; - transform-origin: top right; - } -} - -:root { - --animate-duration: 1s; - --animate-delay: 1s; - --animate-repeat: 1; - } - -.animate__animated { - -webkit-animation-duration: 1s; - animation-duration: 1s; - -webkit-animation-duration: var(--animate-duration); - animation-duration: var(--animate-duration); - -webkit-animation-fill-mode: both; - animation-fill-mode: both; - } - -.animate__jackInTheBox { - -webkit-animation-name: jackInTheBox; - animation-name: jackInTheBox; -} - -@keyframes bellshake { - 0% { transform: rotate(0); } - 15% { transform: rotate(5deg); } - 30% { transform: rotate(-5deg); } - 45% { transform: rotate(4deg); } - 60% { transform: rotate(-4deg); } - 75% { transform: rotate(2deg); } - 85% { transform: rotate(-2deg); } - 92% { transform: rotate(1deg); } - 100% { transform: rotate(0); } -} - -@-webkit-keyframes jackInTheBox { - from { - opacity: 0; - -webkit-transform: scale(0.1) rotate(30deg); - transform: scale(0.1) rotate(30deg); - -webkit-transform-origin: center bottom; - transform-origin: center bottom; - } - - 50% { - -webkit-transform: rotate(-10deg); - transform: rotate(-10deg); - } - - 70% { - -webkit-transform: rotate(3deg); - transform: rotate(3deg); - } - - to { - opacity: 1; - -webkit-transform: scale(1); - transform: scale(1); - } - } - @keyframes jackInTheBox { - from { - opacity: 0; - -webkit-transform: scale(0.1) rotate(30deg); - transform: scale(0.1) rotate(30deg); - -webkit-transform-origin: center bottom; - transform-origin: center bottom; - } - - 50% { - -webkit-transform: rotate(-10deg); - transform: rotate(-10deg); - } - - 70% { - -webkit-transform: rotate(3deg); - transform: rotate(3deg); - } - - to { - opacity: 1; - -webkit-transform: scale(1); - transform: scale(1); - } - } - .animate__jackInTheBox { - -webkit-animation-name: jackInTheBox; - animation-name: jackInTheBox; - } - -[class*=shadow] { - transition: all .2s ease; -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_avatars.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_avatars.scss deleted file mode 100755 index ff412b6..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_avatars.scss +++ /dev/null @@ -1,102 +0,0 @@ -/** - * = Avatars - */ - - .avatar + .avatar-content { - display: inline-block; - margin-left: 0.75rem; -} - -.avatar-sm { - width: $avatar-sm-y; - height: $avatar-sm-x; - - img { - width: $avatar-sm-y; - height: $avatar-sm-x; - } -} - -.avatar { - width: $avatar-y; - height: $avatar-x; - - img { - width: $avatar-y; - height: $avatar-x; - } -} - -.avatar-md { - width: $avatar-md-y; - height: $avatar-md-x; - - img { - width: $avatar-md-y; - height: $avatar-md-x; - } -} - -.avatar-lg { - width: $avatar-lg-y; - height: $avatar-lg-x; - - img { - width: $avatar-lg-y; - height: $avatar-lg-x; - } -} - -.avatar-xl { - width: $avatar-xl-y; - height: $avatar-xl-x; - - @include media-breakpoint-down(lg) { - width: $avatar-lg-y; - height: $avatar-lg-x; - } - -} - - -.avatar-offline, -.avatar-online { - &::before { - position: absolute; - border: 2px solid $white; - background-color: $success; - display: block; - top: 2px; - left: 39px; - content: ""; - border-radius: 50%; - height: 10px; - width: 10px; - } -} - -.avatar-offline { - &::before { - background-color: $danger; - } -} - -// Overlapped avatars -.avatar-group { - .avatar { - position: relative; - z-index: 0; - - img { - border: 2px solid $white; - } - - &:hover { - z-index: 3; - } - } - - .avatar + .avatar { - margin-left: -1rem; - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_badge.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_badge.scss deleted file mode 100755 index e2926ba..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_badge.scss +++ /dev/null @@ -1,98 +0,0 @@ -/** - * = Badges - */ - -.badge { - font-size:$badge-font-size; - font-weight: $badge-font-weight; - - a { - color: $white; - } - - &.super-badge{ - vertical-align: super; - } -} - -// Variations -.badge-pill { - padding-right: $badge-pill-padding-x; - padding-left: $badge-pill-padding-x; -} - -// Multiple inline badges -.badge-inline { - margin-right: .625rem; - - & + span { - top: 2px; - position: relative; - - & > a { - text-decoration: underline; - } - } -} - -// Sizes -.badge-sm { - padding: .2rem .6rem; -} - -.badge-lg { - font-size: $font-size-lg; - padding: .35rem .85rem; -} - -//button badges - -.btn{ - .badge-corner{ - position: absolute; - top: -50%; - right: .5rem; - transform: translate(50%,50%); - margin: 0; - border: 3px solid; - padding-left: .5rem; - padding-right: .5rem; - } -} -//Tags -.wi-tags{ - a { - display: inline-block; - padding: 0.125rem 0.875rem; - margin: 0.25rem; - line-height: 2; - font-size: $font-size-sm; - box-shadow: $box-shadow-sm; - background-color: $white; - } -} - -.pixel-pro-badge{ - position: relative; - font-size: $font-size-sm; - text-transform: uppercase; - font-weight: $font-weight-bold; - right: -11px; - padding: 4px 12px; - top: -30px; - background: $white; - @include border-radius($border-radius-sm); - @include box-shadow($box-shadow-sm); - @include media-breakpoint-down(sm){ - font-size: $font-size-base; - right: -13px; - padding: 5px 10px; - top: -23px; - } -} - -.subscription-badge { - top: -19px; - right: -12px; - font-size: .75rem; -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_body.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_body.scss deleted file mode 100644 index 82e262f..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_body.scss +++ /dev/null @@ -1,31 +0,0 @@ -iframe { - border: 0; -} - -figcaption, -figure, -main { - display: block; - margin: 0; -} - -main { - overflow: hidden; -} - -img { - max-width: 100%; -} - -strong{ - font-weight: $font-weight-bold; -} - -button:focus { - outline: 0; -} - -label { - font-weight: $font-weight-bold; - margin-bottom:.5rem; -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_breadcrumb.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_breadcrumb.scss deleted file mode 100755 index 38e72d6..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_breadcrumb.scss +++ /dev/null @@ -1,56 +0,0 @@ -/** - * = Breadcrumbs - */ - -.breadcrumb-item { - font-size: $font-size-xs; - &, a { - color: $breadcrumb-item-color; - font-weight: $breadcrumb-font-weight; - font-size: $font-size-xs; - @include media-breakpoint-up(sm){ - font-size: $font-size-sm; - } - } - - &.active { - font-weight: $breadcrumb-active-font-weight; - } - -} - -.breadcrumb-transparent { - background: transparent; - padding: 0; -} - -@each $color, $value in $theme-colors { - .breadcrumb-#{$color} { - background: $value; - .breadcrumb-item{ - &.active { - color: $white; - } - } - &.breadcrumb-transparent { - background: transparent; - .breadcrumb-item { - &.active { - color: $value; - } - } - } - } -} - -.breadcrumb-text-light { - .breadcrumb-item { - &, a { - color: $breadcrumb-item-light-color; - } - - &:before { - color: $breadcrumb-divider-light-color; - } - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_buttons.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_buttons.scss deleted file mode 100755 index 81fd49d..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_buttons.scss +++ /dev/null @@ -1,86 +0,0 @@ -/* -* = Buttons -*/ - -.btn { - &.btn-circle { - border-radius: $circle-radius; - } - &.btn-md{ - padding: 0.65rem 1.25rem; - } - &.btn-xs{ - padding: .2rem 0.35rem; - font-size: 0.55rem; - box-shadow: none; - } - &.large-form-btn{ - padding: 1.2rem 1rem; - } - &.dashed-outline { - border-style: dashed; - } -} - - -.btn-icon-only { - width: 2.575rem; - height: 2.575rem; - padding: 0; - @include display-flex(); - @include justify-content(center); - @include align-items(center); - - &.btn-xs { - width: 1.7rem; - height: 1.7rem; - } - &.btn-sm { - width: 2rem; - height: 2rem; - } -} - -.btn-upgrade-pro { - position: fixed; - bottom: 15px; - right: 15px; - width: 190px; - - @include media-breakpoint-up(md) { - left: 35px; - } -} - -// Fix for darken background color -@each $color, $value in $theme-colors { - .btn-#{$color} { - &:hover{ - background-color: darken( $value, 5% ); - border-color: darken( $value, 5% ); - } - } -} - -// Brand (social) buttons -@each $color, $value in $brand-colors { - .btn-#{$color} { - @include button-variant($value, $value); - - &.btn-link { - color: $value; - background: transparent; - box-shadow: none; - border:0; - border-style: none; - &:hover, - &:focus, - &.active { - background-color: transparent !important; - box-shadow: none; - border: 0; - color: $value; - } - } - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_card.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_card.scss deleted file mode 100755 index c552f46..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_card.scss +++ /dev/null @@ -1,149 +0,0 @@ -/** - * = Cards - */ - -.card { - position: relative; - .card-header{ - background: transparent; - } - - &.hover-state{ - &:hover { - background-color: $soft; - } - } - - .profile-cover{ - @include background-image(no-repeat, cover); - height: 200px; - } - -} - -.message-wrapper, -.task-wrapper{ - .card{ - border:0; - } -} - -.customer-testimonial { - .content-wrapper{ - &:before { - content: ""; - position: absolute; - top: 25px; - left: -1px; - margin-left: .75rem; - border: 8px solid $black; - border-color: transparent #e0e6ec #e0e6ec transparent; - -webkit-box-sizing: border-box; - box-sizing: border-box; - -webkit-transform-origin: 0 0; - transform-origin: 0 0; - @include transform(rotate(135deg)); - @include box-shadow($box-shadow); - } - } -} - -.card-footer{ - background-color:transparent; -} - -.card-stats{ - padding-left:1.9rem; -} - - -// Card with blockquotes - -.card { - .card-blockquote { - position: relative; - padding: 2rem; - - .svg-bg { - display: block; - position: absolute; - width: 100%; - height: 95px; - top: -94px; - left: 0; - } - } -} - -// Animated cards - - -.page-preview { - - display: block; - position: relative; - - .show-on-hover { - position: absolute; - bottom: -0; - background: rgba($dark, .85); - padding: 10px 0; - width: 100%; - left: 0; - opacity: 0; - @include transition(.2s); - } - - &:hover { - z-index: 1; - - .show-on-hover { - opacity: 1; - } - } -} - -.theme-settings { - z-index: 99; - position: fixed; - right: 15px; - bottom: 0; - - &, .card-body { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - } -} - -.theme-settings-close { - position: absolute; - top: 8px; - right: 8px; - font-size: .65rem; -} - -.btn-close { - - &.theme-settings-close{ - background: transparent escape-svg($btn-close-bg-white) center / $btn-close-width auto no-repeat; // include transparent for button elements - border: 0; // for button elements - @include border-radius(); - opacity: $btn-close-opacity; - } -} - -.theme-settings-expand { - right: 15px; - bottom: 0; - height: 0; - @include transition(.3s height); - - &.show { - height: 40px; - } - - &:hover { - background: $gray-600; - cursor: pointer; - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_carousel.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_carousel.scss deleted file mode 100755 index b73c4f8..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_carousel.scss +++ /dev/null @@ -1,52 +0,0 @@ -/** - * = Bootstrap carousels - */ - -.carousel-caption { - &, h5 { - color: $white; - } -} - -//Indicators - -.carousel-indicators { - li { - height: 10px; - width:10px; - border-radius:$circle-radius; - background:transparent; - border:2px solid $white; - } - .active { - opacity: 1; - background: $white; - } -} - -//Carousel Controls - -.carousel-control-prev-icon, -.carousel-control-next-icon { - width: auto; - height: auto; - font-weight: 900; -} - -.carousel-control-prev-icon { - background-image: none; - &::before{ - content: '\f060'; - font-family: $font-awesome-5; - font-size: $font-size-xxl; - } -} - -.carousel-control-next-icon { - background-image: none; - &:before{ - font-family: $font-awesome-5; - content: "\f061"; - font-size: $font-size-xxl; - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_charts.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_charts.scss deleted file mode 100644 index 21d7cdb..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_charts.scss +++ /dev/null @@ -1,52 +0,0 @@ -.ct-bar { - stroke-linecap: round; - stroke-width: 10px; -} -.ct-label { - fill: $body-color; - color: $body-color; - font-size: 0.75rem; - margin-top: 6px; - font-weight: $font-weight-bold; -} - -.ct-slice-pie { - stroke: $white; - stroke-width: 3px; -} - -.ct-chart-donut .ct-series { - stroke: $white; - stroke-width: 3px; -} - -.ct-chart-pie .ct-label, .ct-chart-donut .ct-label { - font-size: 0.75rem; - font-weight: $font-weight-bold; -} - -.small-chart{ - margin-left:-1rem; -} - -//Label color Fix for pie chart - -.ct-chart-pie .ct-label, .ct-chart-donut .ct-label { - color: #ffffff; - fill: #ffffff; - font-size: $font-size-base; - font-weight: $font-weight-bold; -} - -.ct-series-g{ - .ct-grid { - stroke: #F8BD7A; - stroke-width: 2px; - stroke-dasharray: 2px; - } - .ct-label.ct-horizontal.ct-end { - margin-left:-9px; - margin-top:10px; - color: $primary; - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_close.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_close.scss deleted file mode 100755 index 1e866b7..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_close.scss +++ /dev/null @@ -1,33 +0,0 @@ -/** - * = Close - */ - -.close { - @if $enable-transitions { - transition: $transition-base; - } - &>span:not(.sr-only) { - display: block; - height: 1.25rem; - width: 1.25rem; - background-color: $close-bg; - color: $close-color; - line-height: 17px; - border-radius: 50%; - font-size: 1.25rem; - @if $enable-transitions { - transition: $transition-base; - } - } - - &:hover, - &:focus { - background-color: $close-hover-bg; - color: $close-hover-color; - outline: none; - - span:not(.sr-only) { - background-color: $close-hover-bg; - } - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_custom-forms.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_custom-forms.scss deleted file mode 100755 index ea049ab..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_custom-forms.scss +++ /dev/null @@ -1,102 +0,0 @@ -/** - * = Custom forms - */ - - .custom-control-label { - // Background-color and (when enabled) gradient - &:before { - box-shadow: $custom-control-box-shadow; - @if $enable-transitions { - transition: $input-transition; - } - } - - span { - position: relative; - top: 2px; - } -} - -.custom-control-label { - margin-bottom: 0; -} - -.custom-control-input { - &:active~.custom-control-label::before { - border-color: $custom-control-indicator-active-border-color; - } -} - -// Custom File Input - -.custom-file-label { - background-color: #f3f3f5; - - &::after { - - background-color: #f3f3f5; - } -} - - -//Select -.custom-select{ - font-size: $input-btn-font-size; - box-shadow:none; - - &.custom-select-shadow { - box-shadow: $input-box-shadow; - transition: box-shadow .15s ease; - - &:focus { - box-shadow: $shadow-input-focus; - } - } - - &:hover { - cursor: pointer; - } -} - -// Inbox star -.rating-star { - &.star-lg{ - label{ - margin-bottom: .5rem; - &::before{ - font-size: $font-size-xl; - } - } - } - label { - position: relative; - margin-bottom: 0; - cursor: pointer; - color: $light; - &:before { - content: "\f005"; - font-family: "Font Awesome 5 Free"; - font-weight: 900; - transition: all .2s ease; - font-size: 1.0625rem; - } - } - input { - position: absolute; - z-index: -1; - opacity: 0; - } - - >input:checked~label { - color: $warning; - } - - >label { - &:hover { - color: $warning; - } - &:hover~label { - color: $warning; - } - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_datepicker.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_datepicker.scss deleted file mode 100755 index 4674eb5..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_datepicker.scss +++ /dev/null @@ -1,12 +0,0 @@ -/** - * = Datepickers - */ - - .datepicker { - - .datepicker-cell.selected, - .datepicker-cell.selected:hover { - background: $primary; - } - - } diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_dropdown.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_dropdown.scss deleted file mode 100755 index c607768..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_dropdown.scss +++ /dev/null @@ -1,66 +0,0 @@ -.dropdown-menu { - .dropdown-header, - .dropdown-item { - padding: .5rem 1rem; - font-size: $dropdown-font-size; - .dropdown-icon{ - height: 1.25rem; - width: 1.25rem; - } - } - - .dropdown-header { - color: $dropdown-header-color; - font-weight: $dropdown-header-font-weight; - } - - .dropdown-item { - transition: $transition-base; - font-weight: $dropdown-item-font-weight; - - } - - .show & { - animation: show-dropdown .2s ease forwards; - } - - &.dropdown-menu-xs { - min-width: 120px; - max-width: 120px; - @include box-shadow($box-shadow-sm); - } - -} - -// Dropown sizes -.dropdown-menu-sm { - min-width: 100px; - border: $border-radius-lg; -} - -.dropdown-menu-md { - min-width: 180px; - border: $border-radius-lg; -} - -.dropdown-menu-lg { - min-width: 350px; - border-radius: $border-radius-lg; - @include media-breakpoint-down(sm) { - min-width: 300px; - } -} - - - -// this helps when not only the button should toggle a dropdown -[data-toggle]:hover { - cursor: pointer; -} - -// remove the caret from Bootstrap by default -.dropdown-toggle { - &:after, .dropend &:after, .dropstart &:before, .dropup &:after { - display: none; - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_icons.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_icons.scss deleted file mode 100755 index 30d8ea9..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_icons.scss +++ /dev/null @@ -1,202 +0,0 @@ -/** - * = Icon boxes - */ - - .icon { - height: $icon-size; - - &.icon-xxs { - height: $icon-size-xxs; - } - - &.icon-xs { - height: $icon-size-xs; - } - &.icon-sm { - height: $icon-size-sm; - } - &.icon-lg { - height: $icon-size-lg; - } - &.icon-xl { - height: $icon-size-xl; - } - &.icon-xxl { - height: $icon-size-xxl; - } - - &.active-dot { - svg { - height: 0.7rem; - } - } -} - -// Icons included in shapes -.icon-shape { - width: $icon-shape; - height: $icon-shape; - display: inline-flex; - align-items: center; - justify-content: center; - - svg { - height: $icon-size; - } - - &.icon-xxs { - width: $icon-shape-xxs; - height: $icon-shape-xxs; - svg { - height: $icon-size-xxs; - } - } - - &.icon-xs { - width: $icon-shape-xs; - height: $icon-shape-xs; - svg { - height: $icon-size-xs; - } - } - - &.icon-sm { - width: $icon-shape-sm; - height: $icon-shape-sm; - svg { - height: $icon-size-sm; - } - } - - &.icon-lg { - width: $icon-shape-lg; - height: $icon-shape-lg; - svg { - height: $icon-size-lg; - } - } - - &.icon-xl { - width: $icon-shape-xl; - height: $icon-shape-xl; - svg { - height: $icon-size-xl; - } - } - - &.icon-xxl { - width: $icon-shape-xxl; - height: $icon-shape-xxl; - svg { - height: $icon-size-xxl; - } - } -} - -// Inbox star Icons -.rating-star { - &:hover { - cursor: pointer; - color: $warning; - } -} - -.toggle-icon { - height: 1.875rem; -} - -//Icons inside table fixed width -.w--20 { - width: 20px; -} - -//Calendar Icon - -.calendar { - width: 3.125rem; - line-height: 1; - flex-direction: column; - text-align: center; - border-radius: $border-radius; - .calendar-month { - background-color: $danger; - color: $white; - border-radius: $border-radius $border-radius 0 0; - padding: 0.275rem; - font-weight: $font-weight-bold; - } - .calendar-day { - font-size: $font-size-xl; - padding: 0.25rem; - background-color: $gray-100; - border-top: 0; - border-radius: 0 0 $border-radius $border-radius; - color: $dark; - font-weight: $font-weight-bold; - } -} - -//Legend dot - -.dot { - width: 12px; - height: 12px; -} - -//Bell notification dot -.bell-dot { - display: inline-block; - position: absolute; - top: -11px; - right: 6px; - height: 10px; - width: 10px; - border: 2px solid $gray-100; -} - -.notification-bell.unread { - &::before { - position: absolute; - content: ""; - background-color: $danger; - right: 12px; - top: 7px; - height: 0.75rem; - width: 0.75rem; - border-radius: 50%; - border: 2px solid $gray-100; - } -} - -//Index Big Icon -.bootstrap-big-icon { - position: absolute; - opacity: 0.05; - transform: rotate(17deg); - @include media-breakpoint-up(lg) { - right: -20%; - bottom: 6%; - } - - @include media-breakpoint-up(xl) { - right: -10%; - bottom: 6%; - } -} - -.github-big-icon { - position: absolute; - right: 80px; - svg { - color: $gray-400; - height:800px; - opacity: 0.2; - } -} - -//Colors for icons, shapes and svg's -@each $color, $value in $theme-colors { - .icon-shape-#{$color} { - @include icon-shape-variant($value); - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_images.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_images.scss deleted file mode 100644 index d426c8f..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_images.scss +++ /dev/null @@ -1,66 +0,0 @@ -/** - * = Images - */ - .image-xl { - height: 20rem; - img{ - height: 20rem; - } -} - -.image-lg { - height: 12rem; - img{ - height: 12rem; - } -} - -.image-md{ - height: 5.5rem; - img{ - height: 5.5rem; - } -} - -.image-sm { - height: 3rem; - img{ - height: 3rem; - } -} - -.image-xs { - height: 1.5rem; - img{ - height: 1.5rem; - } -} - -.image-small { - height: 1rem; - img{ - height: 1rem; - } -} - -.full-image{ - height:100%; -} - - -.language-flag{ - width: auto; - height: 1rem; - margin-right: 0.4rem; - position: relative; - top: -2px; -} - -.home-pattern{ - fill: $gray-100; -} - -.form-bg-image { - background-repeat: no-repeat!important; - background-position: top center!important; -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_list-group.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_list-group.scss deleted file mode 100755 index 160e468..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_list-group.scss +++ /dev/null @@ -1,96 +0,0 @@ -/** - * = List groups - */ - -// Space list items -.list-group-space { - .list-group-item { - margin-bottom: 1.5rem; - @include border-radius($list-group-border-radius); - } -} - - -// List group components -.list-group-item{ - border:0; - &.active { - z-index: 2; // Place active items above their siblings for proper border styling - color: $list-group-active-color; - background-color: $list-group-active-bg; - border-color: $list-group-active-border-color; - } - - i{ - width: 1rem; - } -} - -.list-group-img { - width: 3rem; - height: 3rem; - border-radius: 50%; - vertical-align: top; - margin: -.1rem 1.2rem 0 -.2rem; -} -.list-group-content { - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1; - min-width: 0; - - > p { - color: $gray-500; - line-height: 1.5; - margin: .2rem 0 0; - } -} -.list-group-heading { - font-size: $font-size-base; - color: $gray-800; - - > small { - float: right; - color: $gray-500; - font-weight: 500; - } -} - - -.list-group{ - &.simple-list{ - .list-group-item{ - background: transparent; - border: none; - padding: 0.375rem 0.125rem; - i{ - vertical-align: middle; - width: 35px; - display: inline-block; - } - } - } - -} - - -//News list for widgets - -.news-list{ - .row{ - > [class*='col']{ - padding: 0 $spacer/4; - } - } - - > li{ - &:not(:last-child){ - margin-bottom: .75rem; - } - } - - img{ - min-height: 100%; - object-fit: cover; - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_modal.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_modal.scss deleted file mode 100755 index 130d271..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_modal.scss +++ /dev/null @@ -1,35 +0,0 @@ -/** - * = Modals - */ - -.modal{ - &.static-example{ - position: relative; - display: block; - } -} - -.modal-content { - border: 0; - @if $enable-rounded { - border-radius: $modal-content-border-radius; - } @else { - border-radius: 0; - } -} - -.modal-fluid { - .modal-dialog { - margin-top: 0; - margin-bottom: 0; - } - .modal-content { - border-radius: 0; - } -} - -@each $color, $value in $theme-colors { - .modal-#{$color} { - @include modal-variant($value); - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_nav.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_nav.scss deleted file mode 100755 index 6df815f..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_nav.scss +++ /dev/null @@ -1,256 +0,0 @@ -/** - * = Navs - */ - -.nav-link { - color: $nav-link-color; - - &:hover, - &.active { - color: $nav-link-hover-color; - - img { - opacity : inherit; - transition: $transition-base; - } - } - - span { - position: relative; - } -} - -//Tabs - -.nav-tabs { - .nav-item { - margin-bottom: 0; - } - - .nav-link { - border : 0; - padding : 1rem 1rem; - background-color: $white; - - &.active { - color : $white; - background-color: $primary; - } - } - - &.nav-dark { - .nav-link { - &.active { - color : $white; - background-color: #12358a; - } - } - } - - &.nav-light { - .nav-link { - &.active { - color : $black; - background-color: $light; - } - - &:hover { - color: $black; - } - } - } -} - -// Pills - -.nav-pills { - .nav-item:not(:last-child) { - padding-right: $nav-pills-space-x; - } - - .nav-link { - padding : $nav-pills-padding-y $nav-pills-padding-x; - transition: $transition-base; - box-shadow: $nav-link-shadow; - border : $nav-pills-border-width solid $nav-pills-border-color; - - &.avatar-link { - border: 0; - } - - &:hover { - color: $nav-pills-link-hover-color; - } - } - - .nav-link.active, - .show>.nav-link { - color : $nav-pills-link-active-color; - background-color: $nav-pills-link-active-bg; - border-color : $nav-pills-link-active-color; - } - - &.rounded { - .nav-link { - border-radius: 30px; - } - - &.vertical-tab { - .nav-link { - margin-bottom: .625rem; - min-width : 100px; - } - - .nav-item:not(:last-child) { - padding-right: 0; - } - } - } - - &.bordered-pill-md { - .nav-link { - border : $border-width-md solid $gray-200; - font-weight: $font-weight-bold; - } - } - - &.vertical-tab { - .nav-link { - margin-bottom: .625rem; - } - - .nav-item:not(:last-child) { - padding-right: 0; - } - } - - @include media-breakpoint-down(xs) { - .nav-item { - margin-bottom: $spacer; - } - } -} - -@include media-breakpoint-down(sm) { - .nav-pills:not(.nav-pills-circle) { - .nav-item { - padding-right: 0; - } - } -} - - -// Navs circle - -.nav-pill-circle { - .nav-link { - @include display-flex(); - text-align : center; - height : 80px; - width : 80px; - padding : 0; - box-shadow : $nav-link-shadow; - border-radius : $nav-pills-border-circle; - align-items : center; - justify-content: center; - - &.avatar-link { - box-shadow: none; - } - } - - &.vertical-tab { - .nav-link-icon { - - i, - svg { - font-size: 1.5rem; - } - } - - .nav-item:not(:last-child) { - padding-right: 0; - } - } - - .nav-link-icon { - - i, - svg { - font-size: 1.25rem; - margin : 0; - display : block; - } - } -} - -// Navs square - -.nav-pill-square { - .nav-link { - text-align: center; - min-width : 80px; - box-shadow: $nav-link-shadow; - @include display-flex(); - align-items : center; - justify-content: center; - } - - &.vertical-tab { - .nav-link { - margin-bottom: .625rem; - min-width : 100px; - } - - .nav-item:not(:last-child) { - padding-right: 0; - } - } - - .nav-link-icon { - - i, - svg { - font-size : 1.25rem; - margin : 0; - display : block; - line-height: 50px; - } - } -} - -// Nav wrapper -.nav-wrapper { - padding: 1rem 0; - @include border-top-radius($card-border-radius); - - +.card { - @include border-top-radius(0); - @include border-bottom-radius($card-border-radius); - } -} - -// Tabbable tabs -// -// Hide tabbable panes to start, show them when `.active` - -.tab-content { - >.tab-pane { - display: none; - - pre { - padding: 0; - margin : 0; - } - } - - >.active { - display: block; - } -} - -.nav-pills .nav-item { - @include media-breakpoint-up(lg) { - margin-bottom: 0; - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_pagination.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_pagination.scss deleted file mode 100755 index 0ca38c5..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_pagination.scss +++ /dev/null @@ -1,15 +0,0 @@ -/** - * = Paginations - */ - .circle-pagination{ - .page-link, - span{ - @include display-flex(); - align-items: center; - justify-content: center; - width: 34px; - height: 34px; - padding: 0; - @include border-radius($circle-radius); - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_popover.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_popover.scss deleted file mode 100755 index 1a6db59..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_popover.scss +++ /dev/null @@ -1,19 +0,0 @@ -/** - * = Popovers - */ - -.popover { - border: 0; -} - - -.popover-header { - font-weight: $font-weight-bold; -} - -// Alternative colors -@each $color, $value in $theme-colors { - .popover-#{$color} { - @include popover-variant($value); - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_progress.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_progress.scss deleted file mode 100755 index ced7248..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_progress.scss +++ /dev/null @@ -1,116 +0,0 @@ -/** - * = Progress bars - */ - -.progress-wrapper { - position: relative; -} - -.progress-bar { - box-shadow: none; - border-radius: 0; - height: auto; -} - -.progress { - height: 6px; - margin-bottom: $spacer; - overflow: hidden; - background-color: $progress-bg; - font-size: $font-size-xs; - font-weight: $font-weight-bold; - @include box-shadow(inset 0 1px 2px rgba(0, 0, 0, .1)) -} - -.progress-xl { - height: $progress-xl-size; -} -.progress-lg { - height: $progress-lg-size; -} -.progress-sm { - height: $progress-sm-size; -} - -.progress-info{ - @include display-flex(); - @include align-items(center); - @include justify-content(space-between); - margin-bottom: .5rem; - - .progress-label { - span { - display: inline-block; - color: $primary; - font-size: $font-size-sm; - font-weight: $font-weight-bold; - } - } - - .progress-percentage { - text-align: right; - span { - display: inline-block; - color: $gray-500; - font-size: $font-size-xs; - font-weight: $font-weight-bold; - } - } -} - -.info-xl{ - .progress-label, - .progress-percentage { - span { - font-size: $font-size-sm; - } - } - - .progress-percentage { - text-align: right; - } - -} - -.progress-tooltip { - background: $primary; - color: $white; - font-weight: $font-weight-bold; - padding: .25rem .375rem; - line-height: 1; - font-size: $font-size-xs; - position: relative; - border-radius: $border-radius-sm; - - &:after { - content: " "; - position: absolute; - top: 100%; - left: 10px; - border: solid transparent; - height: 0; - width: 0; - pointer-events: none; - border-top-color: $gray; - border-width: 6px; - } -} - -@-webkit-keyframes animate-positive{ - 0% { width: 0%; } -} -@keyframes animate-positive{ - 0% { width: 0%; } -} - -//Tooltip arrow color -@each $color, -$value in $theme-colors { - .progress-info{ - .bg-#{$color} { - &::after{ - border-top-color: $value; - } - } - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_scrollbar.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_scrollbar.scss deleted file mode 100644 index 9b3dca2..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_scrollbar.scss +++ /dev/null @@ -1,227 +0,0 @@ -[data-simplebar] { - position: fixed; - flex-direction: column; - flex-wrap: wrap; - justify-content: flex-start; - align-content: flex-start; - align-items: flex-start; - } - - .simplebar-wrapper { - overflow: hidden; - width: inherit; - height: inherit; - max-width: inherit; - max-height: inherit; - } - - .simplebar-mask { - direction: inherit; - position: absolute; - overflow: hidden; - padding: 0; - margin: 0; - left: 0; - top: 0; - bottom: 0; - right: 0; - width: auto !important; - height: auto !important; - z-index: 0; - } - - .simplebar-offset { - direction: inherit !important; - box-sizing: inherit !important; - resize: none !important; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - padding: 0; - margin: 0; - -webkit-overflow-scrolling: touch; - } - - .simplebar-content-wrapper { - direction: inherit; - box-sizing: border-box !important; - position: relative; - display: block; - height: 100%; /* Required for horizontal native scrollbar to not appear if parent is taller than natural height */ - width: auto; - max-width: 100%; /* Not required for horizontal scroll to trigger */ - max-height: 100%; /* Needed for vertical scroll to trigger */ - scrollbar-width: none; - -ms-overflow-style: none; - } - - .simplebar-content-wrapper::-webkit-scrollbar, - .simplebar-hide-scrollbar::-webkit-scrollbar { - width: 0; - height: 0; - } - - .simplebar-content:before, - .simplebar-content:after { - content: ' '; - display: table; - } - - .simplebar-placeholder { - max-height: 100%; - max-width: 100%; - width: 100%; - pointer-events: none; - } - - .simplebar-height-auto-observer-wrapper { - box-sizing: inherit !important; - height: 100%; - width: 100%; - max-width: 1px; - position: relative; - float: left; - max-height: 1px; - overflow: hidden; - z-index: -1; - padding: 0; - margin: 0; - pointer-events: none; - flex-grow: inherit; - flex-shrink: 0; - flex-basis: 0; - } - - .simplebar-height-auto-observer { - box-sizing: inherit; - display: block; - opacity: 0; - position: absolute; - top: 0; - left: 0; - height: 1000%; - width: 1000%; - min-height: 1px; - min-width: 1px; - overflow: hidden; - pointer-events: none; - z-index: -1; - } - - .simplebar-track { - z-index: 1; - position: absolute; - right: 0; - bottom: 0; - pointer-events: none; - overflow: hidden; - } - - [data-simplebar].simplebar-dragging .simplebar-content { - pointer-events: none; - user-select: none; - -webkit-user-select: none; - } - - [data-simplebar].simplebar-dragging .simplebar-track { - pointer-events: all; - } - - .simplebar-scrollbar { - position: absolute; - left: 0; - right: 0; - min-height: 10px; - } - - .simplebar-scrollbar:before { - position: absolute; - content: ''; - background: black; - border-radius: 7px; - left: 2px; - right: 2px; - opacity: 0; - transition: opacity 0.2s 0.5s linear; - } - - .simplebar-scrolling .simplebar-scrollbar:before, - .simplebar-hover .simplebar-scrollbar:before, - .simplebar-mouse-entered .simplebar-scrollbar:before { - opacity: 0.5; - transition-delay: 0s; - transition-duration: 0s; - } - - .simplebar-scrollbar.simplebar-visible:before { - /* When hovered, remove all transitions from drag handle */ - opacity: 0.5; - transition-delay: 0s; - transition-duration: 0s; - } - - .simplebar-track.simplebar-vertical { - top: 0; - width: 11px; - } - - .simplebar-scrollbar:before { - top: 2px; - bottom: 2px; - left: 2px; - right: 2px; - } - - .simplebar-track.simplebar-horizontal { - left: 0; - height: 11px; - } - - .simplebar-track.simplebar-horizontal .simplebar-scrollbar { - right: auto; - left: 0; - top: 0; - bottom: 0; - min-height: 0; - min-width: 10px; - width: auto; - } - - /* Rtl support */ - [data-simplebar-direction='rtl'] .simplebar-track.simplebar-vertical { - right: auto; - left: 0; - } - - .simplebar-dummy-scrollbar-size { - direction: rtl; - position: fixed; - opacity: 0; - visibility: hidden; - height: 500px; - width: 500px; - overflow-y: hidden; - overflow-x: scroll; - -ms-overflow-style: scrollbar !important; - } - - .simplebar-dummy-scrollbar-size > div { - width: 200%; - height: 200%; - margin: 10px 0; - } - - .simplebar-hide-scrollbar { - position: fixed; - left: 0; - visibility: hidden; - overflow-y: scroll; - scrollbar-width: none; - -ms-overflow-style: none; - } - - .simplebar-scrollbar::before { - background-color: darken($dark, 10%); - } diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_shapes.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_shapes.scss deleted file mode 100755 index 160267f..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_shapes.scss +++ /dev/null @@ -1,18 +0,0 @@ -/** - * = Shapes - */ - -.avatar-sm { - width: $avatar-sm-y; - height: $avatar-sm-x; -} - -.avatar-md { - width: $avatar-md-y; - height: $avatar-md-x; -} - -.avatar-lg { - width: $avatar-lg-y; - height: $avatar-lg-x; -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_steps.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_steps.scss deleted file mode 100755 index 33b71cd..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_steps.scss +++ /dev/null @@ -1,61 +0,0 @@ -/**steps - * = Accordions - */ - -.step{ - position: relative; - margin-bottom: 4rem; - border-radius: 6px; - - .step-shape{ - display: inline-flex; - width: $step-shape-size; - height: $step-shape-size; - text-align: center; - @include align-items(center); - @include justify-content(center); - - i, svg { - font-size: $icon-size; - } - - .step-number{ - position: absolute; - font-weight: $font-weight-bold; - top: -10px; - width: 32px; - height: 32px; - border-width: $step-border-width; - border-style: solid; - line-height: 1.7; - } - - &.bordered { - border-width: $step-border-width; - border-style: solid; - - .step-number { - background-color: $white; - top:-12px; - } - } - - &.rounded-circle{ - .step-number{ - margin-right:1.275rem; - } - } - } - - .icon-lg{ - font-size: $step-icon-size; - } - - .back-layer{ - @include display-flex(); - position: absolute; - font-size: $step-number-size; - z-index: 0; - top: 0; - } -} diff --git a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_tables.scss b/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_tables.scss deleted file mode 100644 index 157036e..0000000 --- a/django/{% if ui %}theme{% endif %}/src/sass/volt/components/_tables.scss +++ /dev/null @@ -1,409 +0,0 @@ -// General styles - -.table { - - > :not(:first-child) { - border-top: 0 solid $table-group-separator-color; - } - - thead th { - padding-top: $table-head-spacer-y; - padding-bottom: $table-head-spacer-y; - font-size: $table-head-font-size; - // text-transform: $table-head-text-transform; - font-weight: $font-weight-bolder; - border-top: 0; - } - - th { - font-weight: $font-weight-bold; - padding:1rem; - } - - td { - .progress { - height: 3px; - width: 120px; - margin: 0; - } - } - - td, - th { - font-size: $table-body-font-size; - white-space: nowrap; - } - - // User Table - - &.user-table{ - thead th{ - border-top:0; - } - } - - // Vetical align table content - - &.align-items-center { - td, - th { - vertical-align: middle; - } - } - - - // Styles for dark table - - .thead-dark { - th { - background-color: $gray-800; - color: $white; - - a { - color: $dark; - } - } - } - - - // Styles for light table - - .thead-light { - th { - background-color: $gray-100; - color: $dark; - - a { - color: $dark; - } - } - } -} - - -// Add transition for hover state - -.table-hover { - tr { - @include transition($transition-base); - } -} - - -// Flush tables - -.table-flush { - td, - th { - border-left: 0; - border-right: 0; - } - - tbody { - tr { - &:first-child { - td, - th { - border-top: 0; - } - } - - &:last-child { - td, - th { - border-bottom: 0; - } - } - } - } -} - - -// Tables inside cards - -.card { - .table { - margin-bottom: 0; - - td, - th { - padding-left: $card-spacer-x; - padding-right: $card-spacer-x; - } - } -} - -.table { - [data-sort] { - cursor: pointer; - } - - .custom-toggle { - display: block; - } - - .thead-dark { - [data-sort] { - &::after { - content: str-replace(url("data:image/svg+xml;utf8,"), "#", "%23"); - margin-left: .25rem; - } - } - } - - .thead-light { - [data-sort] { - &::after { - content: str-replace(url("data:image/svg+xml;utf8,"), "#", "%23"); - margin-left: .25rem; - } - } - } -} - -.dataTables_wrapper { - - .dataTables_info{ - padding-left: 1.5rem; - } - - .dataTables_paginate{ - padding-right: 1.5rem; - } - - .dataTables_length { - label{ - padding-left:1.5rem; - } - } - - .dataTables_filter { - padding-right: 1.5rem; - } -} - -.dataTable-top, -.dataTable-bottom { - display: flex; - width: 100%; - justify-content: space-between; - - @include media-breakpoint-down(md) { - flex-direction: column; - - .dataTable-info { - margin-bottom: 1rem; - } - } -} - -.dataTable-top { - padding: 0 0 1rem 0; -} - -.dataTable-bottom { - padding: 1.5rem 0 0 0; -} - -.dataTable-pagination { - display: flex; - @include list-unstyled(); - - a { - padding: $pagination-padding-y $pagination-padding-x; - @include font-size(null); - } - - li { - @if $pagination-margin-left == (-$pagination-border-width) { - &:first-child { - a { - @include border-start-radius($pagination-border-radius); - } - } - - &:last-child { - a { - @include border-end-radius($pagination-border-radius); - } - } - } @else { - //Add border-radius to all pageLinks in case they have left margin - a { - @include border-radius($pagination-border-radius); - } - } - } - - > li { - &:not(:first-child) a { - margin-left: $pagination-margin-left; - } - - &.active a { - z-index: 3; - color: $pagination-active-color; - @include gradient-bg($pagination-active-bg); - border-color: $pagination-active-border-color; - } - - &.disabled a { - color: $pagination-disabled-color; - pointer-events: none; - background-color: $pagination-disabled-bg; - border-color: $pagination-disabled-border-color; - } - - a { - position: relative; - display: block; - color: $pagination-color; - text-decoration: if($link-decoration == none, null, none); - background-color: $pagination-bg; - border: $pagination-border-width solid $pagination-border-color; - - &:hover { - z-index: 2; - color: $pagination-hover-color; - text-decoration: if($link-hover-decoration == underline, none, null); - background-color: $pagination-hover-bg; - border-color: $pagination-hover-border-color; - } - - &:focus { - z-index: 3; - outline: $pagination-focus-outline; - box-shadow: $pagination-focus-box-shadow; - } - } - } -} - -.dataTable-selector { - display: inline-block; - width: auto; - height: $form-select-height; - padding: $form-select-padding-y ($form-select-padding-x + $form-select-indicator-padding) $form-select-padding-y $form-select-padding-x; - font-family: $form-select-font-family; - @include font-size($form-select-font-size); - font-weight: $form-select-font-weight; - line-height: $form-select-line-height; - color: $form-select-color; - vertical-align: middle; - background-color: $form-select-bg; - background-image: escape-svg($form-select-indicator); - background-repeat: no-repeat; - background-position: $form-select-bg-position; - background-size: $form-select-bg-size; - border: $form-select-border-width solid $form-select-border-color; - @include border-radius($form-select-border-radius, 0); - @include box-shadow($form-select-box-shadow); - appearance: none; - - &:focus { - border-color: $form-select-focus-border-color; - outline: 0; - @if $enable-shadows { - @include box-shadow($form-select-box-shadow, $form-select-focus-box-shadow); - } @else { - // Avoid using mixin so we can pass custom focus shadow properly - box-shadow: $form-select-focus-box-shadow; - } - - &::-ms-value { - // For visual consistency with other platforms/browsers, - // suppress the default white text on blue background highlight given to - // the selected option text when the (still closed) s in some browsers, due to the limited stylability of `