diff --git a/.dockerignore b/.dockerignore index f89c807..71c00b7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,17 @@ # Files to ignore -.gitignore +# Tell docker to ignore .gitkeep .gitkeep +# Tell docker to ignore .gitignore +.gitignore +# Tell docker to ignore node_modules/** +node_modules/** +# Tell docker to ignore .node_modules/** .node_modules/** +# Tell docker to ignore **/.gitkeep +**/.gitkeep +# Tell docker to ignore **/.gitignore +**/.gitignore +# Tell docker to ignore **/node_modules/** +**/node_modules/** +# Tell docker to ignore **/.node_modules/** +**/.node_modules/** diff --git a/.gitignore b/.gitignore index b1b1644..188f4f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# gitignore created on 07/09/22 at 08:43 +# gitignore created on 03/14/23 at 09:12 # Disable reminder in prompt ignoredirmessage @@ -73,9 +73,6 @@ $RECYCLE.BIN/ # Windows shortcuts *.lnk -# Other -**/.installed - # ignore commit message **/.gitcommit @@ -88,3 +85,9 @@ $RECYCLE.BIN/ # ignore .no_push files **/.no_push +# ignore .no_git files +**/.no_git + +# ignore .installed files +**/.installed + diff --git a/Dockerfile b/Dockerfile index b191b1d..64cd7bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,97 +1,194 @@ -FROM casjaysdevdocker/alpine:latest AS build +# Docker image for caddy using the alpine template +ARG LICENSE="MIT" +ARG IMAGE_NAME="caddy" +ARG PHP_SERVER="caddy" +ARG BUILD_DATE="Tue Mar 14 09:11:53 AM EDT 2023" +ARG LANGUAGE="en_US.UTF-8" +ARG TIMEZONE="America/New_York" +ARG WWW_ROOT_DIR="/data/htdocs" +ARG DEFAULT_FILE_DIR="/usr/local/share/template-files" +ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data" +ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config" +ARG DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults" -ARG ALPINE_VERSION="v3.16" +ARG IMAGE_REPO="alpine" +ARG IMAGE_VERSION="latest" +ARG CONTAINER_VERSION="${IMAGE_VERSION}" -ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data" \ - DEFAULT_CONF_DIR="/usr/local/share/template-files/config" \ - DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults" +ARG SERVICE_PORT="80" +ARG EXPOSE_PORTS="80" +ARG PHP_VERSION="" -ARG PACK_LIST="bash" +ARG USER="root" +ARG DISTRO_VERSION="${IMAGE_VERSION}" +ARG BUILD_VERSION="${DISTRO_VERSION}" -ENV LANG=en_US.UTF-8 \ - ENV=ENV=~/.bashrc \ - TZ="America/New_York" \ - SHELL="/bin/sh" \ - TERM="xterm-256color" \ - TIMEZONE="${TZ:-$TIMEZONE}" \ - HOSTNAME="casjaysdev-caddy" +FROM golang:alpine AS caddy +ENV XDG_CONFIG_HOME /config +ENV XDG_DATA_HOME /data +RUN set -ex \ + export XCADDY_SETCAP=1; \ + export version=$(curl -q -LSsf "https://api.github.com/repos/caddyserver/caddy/releases/latest" | jq -r .tag_name | grep '^' || exit 5); \ + echo ">>>>>>>>>>>>>>> ${version} ###############" + +RUN apk -U upgrade && \ + apk add jq --no-cache && \ + go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest || exit 10; \ + xcaddy build ${version} \ + --output /caddy \ + --with github.com/kirsch33/realip \ + --with github.com/caddy-dns/alidns \ + --with github.com/caddy-dns/dnspod \ + --with github.com/caddy-dns/rfc2136 \ + --with github.com/caddy-dns/route53 \ + --with github.com/caddy-dns/cloudflare \ + --with github.com/caddyserver/replace-response \ + --with github.com/caddyserver/transform-encoder \ + --with github.com/porech/caddy-maxmind-geolocation \ + --with github.com/hairyhenderson/caddy-teapot-module + +FROM tianon/gosu:latest AS gosu +FROM ${IMAGE_REPO}:${IMAGE_VERSION} AS build +ARG USER +ARG LICENSE +ARG TIMEZONE +ARG LANGUAGE +ARG IMAGE_NAME +ARG PHP_SERVER +ARG BUILD_DATE +ARG SERVICE_PORT +ARG EXPOSE_PORTS +ARG BUILD_VERSION +ARG WWW_ROOT_DIR +ARG DEFAULT_FILE_DIR +ARG DEFAULT_DATA_DIR +ARG DEFAULT_CONF_DIR +ARG DEFAULT_TEMPLATE_DIR +ARG DISTRO_VERSION +ARG PHP_VERSION + +ARG PACK_LIST="bash bash-completion git curl wget sudo iproute2 ssmtp openssl jq ca-certificates tzdata mailcap ncurses util-linux pciutils usbutils coreutils binutils findutils grep rsync zip certbot tini certbot py3-pip procps net-tools coreutils sed gawk grep attr findutils readline lsof less curl \ + " + +ENV ENV=~/.bashrc +ENV SHELL="/bin/sh" +ENV TZ="${TIMEZONE}" +ENV TIMEZONE="${TZ}" +ENV LANG="${LANGUAGE}" +ENV TERM="xterm-256color" +ENV HOSTNAME="casjaysdev-caddy" + +USER ${USER} +WORKDIR /root + +COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu +COPY --from=caddy /usr/local/bin/caddy /usr/local/bin/caddy COPY ./rootfs/. / RUN set -ex; \ rm -Rf "/etc/apk/repositories"; \ + [ "$DISTRO_VERSION" = "latest" ] && DISTRO_VERSION="edge"; \ + [ "$DISTRO_VERSION" = "edge" ] || DISTRO_VERSION="v${DISTRO_VERSION}" ; \ mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}"; \ - echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE_VERSION}/main" >>"/etc/apk/repositories"; \ - echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE_VERSION}/community" >>"/etc/apk/repositories"; \ - if [ "${ALPINE_VERSION}" = "edge" ]; then echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE_VERSION}/testing" >>"/etc/apk/repositories" ; fi ; \ - apk update --update-cache && apk add --no-cache ${PACK_LIST} && \ + echo "http://dl-cdn.alpinelinux.org/alpine/${DISTRO_VERSION}/main" >>"/etc/apk/repositories"; \ + echo "http://dl-cdn.alpinelinux.org/alpine/${DISTRO_VERSION}/community" >>"/etc/apk/repositories"; \ + if [ "${DISTRO_VERSION}" = "edge" ]; then echo "http://dl-cdn.alpinelinux.org/alpine/${DISTRO_VERSION}/testing" >>"/etc/apk/repositories" ; fi ; \ + apk -U upgrade --no-cache && apk add --no-cache ${PACK_LIST} + +RUN echo "$TIMEZONE" >"/etc/timezone" ; \ + echo 'hosts: files dns' >"/etc/nsswitch.conf" ; \ + [ -f "/usr/share/zoneinfo/${TZ}" ] && ln -sf "/usr/share/zoneinfo/${TZ}" "/etc/localtime" ; \ + PHP_FPM="$(ls /usr/*bin/php*fpm* 2>/dev/null)" ; \ + [ -n "$PHP_FPM" ] && [ -z "$(type -P php-fpm)" ] && ln -sf "$PHP_FPM" "/usr/bin/php-fpm" ; \ + if [ -f "/etc/profile.d/color_prompt.sh.disabled" ]; then mv -f "/etc/profile.d/color_prompt.sh.disabled" "/etc/profile.d/color_prompt.sh"; fi + +RUN touch "/etc/profile" "/root/.profile" ; \ + { [ -f "/etc/bash/bashrc" ] && cp -Rf "/etc/bash/bashrc" "/root/.bashrc" ; } || { [ -f "/etc/bashrc" ] && cp -Rf "/etc/bashrc" "/root/.bashrc" ; } || { [ -f "/etc/bash.bashrc" ] && cp -Rf "/etc/bash.bashrc" "/root/.bashrc" ; }; \ + sed -i 's|root:x:.*|root:x:0:0:root:/root:/bin/bash|g' "/etc/passwd" ; \ + grep -s -q 'alias quit' "/root/.bashrc" || printf '# Profile\n\n%s\n%s\n%s\n' '. /etc/profile' '. /root/.profile' "alias quit='exit 0 2>/dev/null'" >>"/root/.bashrc" ; \ + [ -f "/usr/local/etc/docker/env/default.sample" ] && [ -d "/etc/profile.d" ] && \ + cp -Rf "/usr/local/etc/docker/env/default.sample" "/etc/profile.d/container.env.sh" && chmod 755 "/etc/profile.d/container.env.sh" ; \ + BASH_CMD="$(type -P bash)" ; [ -f "$BASH_CMD" ] && rm -rf "/bin/sh" && ln -sf "$BASH_CMD" "/bin/sh" ; \ + pip install certbot-dns-rfc2136 + +RUN set -ex ; \ echo RUN echo 'Running cleanup' ; \ - rm -Rf /usr/share/doc/* /usr/share/info/* /tmp/* /var/tmp/* ; \ - rm -Rf /usr/local/bin/.gitkeep /usr/local/bin/.gitkeep /config /data /var/cache/apk/* ; \ - rm -rf /lib/systemd/system/multi-user.target.wants/* ; \ + echo "" + +RUN rm -Rf "/config" "/data" ; \ rm -rf /etc/systemd/system/*.wants/* ; \ + rm -rf /lib/systemd/system/systemd-update-utmp* ; \ + rm -rf /lib/systemd/system/anaconda.target.wants/*; \ rm -rf /lib/systemd/system/local-fs.target.wants/* ; \ + rm -rf /lib/systemd/system/multi-user.target.wants/* ; \ rm -rf /lib/systemd/system/sockets.target.wants/*udev* ; \ rm -rf /lib/systemd/system/sockets.target.wants/*initctl* ; \ - rm -rf /lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup* ; \ - rm -rf /lib/systemd/system/systemd-update-utmp* ; \ - if [ -d "/lib/systemd/system/sysinit.target.wants" ]; then cd "/lib/systemd/system/sysinit.target.wants" && rm $(ls | grep -v systemd-tmpfiles-setup) ; fi + rm -Rf /usr/share/doc/* /usr/share/info/* /tmp/* /var/tmp/* /var/cache/*/* ; \ + if [ -d "/lib/systemd/system/sysinit.target.wants" ]; then cd "/lib/systemd/system/sysinit.target.wants" && rm -f $(ls | grep -v systemd-tmpfiles-setup) ; fi + +RUN echo "Init done" FROM scratch +ARG USER +ARG LICENSE +ARG LANGUAGE +ARG TIMEZONE +ARG IMAGE_NAME +ARG PHP_SERVER +ARG BUILD_DATE +ARG SERVICE_PORT +ARG EXPOSE_PORTS +ARG BUILD_VERSION +ARG DEFAULT_DATA_DIR +ARG DEFAULT_CONF_DIR +ARG DEFAULT_TEMPLATE_DIR +ARG DISTRO_VERSION +ARG PHP_VERSION -ARG \ - SERVICE_PORT="80" \ - EXPOSE_PORTS="80" \ - PHP_SERVER="caddy" \ - NODE_VERSION="system" \ - NODE_MANAGER="system" \ - BUILD_VERSION="latest" \ - LICENSE="MIT" \ - IMAGE_NAME="caddy" \ - BUILD_DATE="Sun Nov 13 12:15:57 PM EST 2022" \ - TIMEZONE="America/New_York" +USER ${USER} +WORKDIR /root -LABEL maintainer="CasjaysDev " \ - org.opencontainers.image.vendor="CasjaysDev" \ - org.opencontainers.image.authors="CasjaysDev" \ - org.opencontainers.image.vcs-type="Git" \ - org.opencontainers.image.name="${IMAGE_NAME}" \ - org.opencontainers.image.base.name="${IMAGE_NAME}" \ - org.opencontainers.image.license="${LICENSE}" \ - org.opencontainers.image.vcs-ref="${BUILD_VERSION}" \ - org.opencontainers.image.build-date="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.schema-version="${BUILD_VERSION}" \ - org.opencontainers.image.url="https://hub.docker.com/r/casjaysdevdocker/${IMAGE_NAME}" \ - org.opencontainers.image.vcs-url="https://github.com/casjaysdevdocker/${IMAGE_NAME}" \ - org.opencontainers.image.url.source="https://github.com/casjaysdevdocker/${IMAGE_NAME}" \ - org.opencontainers.image.documentation="https://hub.docker.com/r/casjaysdevdocker/${IMAGE_NAME}" \ - org.opencontainers.image.description="Containerized version of ${IMAGE_NAME}" \ - com.github.containers.toolbox="false" +LABEL maintainer="CasjaysDev " +LABEL org.opencontainers.image.vendor="CasjaysDev" +LABEL org.opencontainers.image.authors="CasjaysDev" +LABEL org.opencontainers.image.vcs-type="Git" +LABEL org.opencontainers.image.name="${IMAGE_NAME}" +LABEL org.opencontainers.image.base.name="${IMAGE_NAME}" +LABEL org.opencontainers.image.license="${LICENSE}" +LABEL org.opencontainers.image.vcs-ref="${BUILD_VERSION}" +LABEL org.opencontainers.image.build-date="${BUILD_DATE}" +LABEL org.opencontainers.image.version="${BUILD_VERSION}" +LABEL org.opencontainers.image.schema-version="${BUILD_VERSION}" +LABEL org.opencontainers.image.url="https://hub.docker.com/r/casjaysdevdocker/${IMAGE_NAME}" +LABEL org.opencontainers.image.vcs-url="https://github.com/casjaysdevdocker/${IMAGE_NAME}" +LABEL org.opencontainers.image.url.source="https://github.com/casjaysdevdocker/${IMAGE_NAME}" +LABEL org.opencontainers.image.documentation="https://hub.docker.com/r/casjaysdevdocker/${IMAGE_NAME}" +LABEL org.opencontainers.image.description="Containerized version of ${IMAGE_NAME}" +LABEL com.github.containers.toolbox="false" -ENV LANG=en_US.UTF-8 \ - ENV=~/.bashrc \ - SHELL="/bin/bash" \ - PORT="${SERVICE_PORT}" \ - TERM="xterm-256color" \ - PHP_SERVER="${PHP_SERVER}" \ - CONTAINER_NAME="${IMAGE_NAME}" \ - TZ="${TZ:-America/New_York}" \ - TIMEZONE="${TZ:-$TIMEZONE}" \ - HOSTNAME="casjaysdev-${IMAGE_NAME}" +ENV ENV=~/.bashrc +ENV SHELL="/bin/bash" +ENV TZ="${TIMEZONE}" +ENV TIMEZONE="${TZ}" +ENV LANG="${LANGUAGE}" +ENV TERM="xterm-256color" +ENV PORT="${SERVICE_PORT}" +ENV ENV_PORTS="${EXPOSE_PORTS}" +ENV PHP_SERVER="${PHP_SERVER}" +ENV PHP_VERSION="${PHP_VERSION}" +ENV CONTAINER_NAME="${IMAGE_NAME}" +ENV HOSTNAME="casjaysdev-${IMAGE_NAME}" +ENV USER="${USER}" COPY --from=build /. / -USER root -WORKDIR /root - VOLUME [ "/config","/data" ] -EXPOSE $EXPOSE_PORTS +EXPOSE ${ENV_PORTS} -#CMD [ "" ] -ENTRYPOINT [ "tini", "-p", "SIGTERM", "--", "/usr/local/bin/entrypoint.sh" ] +CMD [ "" ] +ENTRYPOINT [ "tini", "--", "/usr/local/bin/entrypoint.sh" ] HEALTHCHECK --start-period=1m --interval=2m --timeout=3s CMD [ "/usr/local/bin/entrypoint.sh", "healthcheck" ] - diff --git a/LICENSE.md b/LICENSE.md index 86d4345..cececca 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,7 +1,7 @@ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 - Copyright (C) 2022 Jason Hempstead + Copyright (C) 2023 casjay Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long diff --git a/README.md b/README.md index 9ca7211..7f62f90 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,36 @@ -

-👋 Welcome to caddy 👋 -

-

-StartDocumentationHere -

- -## Author +## 👋 Welcome to caddy 🚀 -👤 **Jason Hempstead** +caddy README + + +## Install my system scripts + +```shell + sudo bash -c "$(curl -q -LSsf "https://github.com/systemmgr/installer/raw/main/install.sh")" + sudo systemmgr --config && sudo systemmgr install scripts +``` + +## Get source files + +```shell +dockermgr download src caddy +``` + +OR + +```shell +git clone "https://github.com/casjaysdevdocker/caddy" "$HOME/Projects/github/casjaysdevdocker/caddy" +``` + +## Build container + +```shell +cd "$HOME/Projects/github/casjaysdevdocker/caddy" +buildx +``` + +## Authors + +📽 dockermgr: [Github](https://github.com/dockermgr) 📽 +🤖 casjay: [Github](https://github.com/casjay) [Docker](https://hub.docker.com/r/casjay) 🤖 +⛵ CasjaysDevDocker: [Github](https://github.com/casjaysdevdocker) [Docker](https://hub.docker.com/r/casjaysdevdocker) ⛵ diff --git a/rootfs/usr/local/bin/entrypoint.sh b/rootfs/usr/local/bin/entrypoint.sh index e50be62..d69d965 100755 --- a/rootfs/usr/local/bin/entrypoint.sh +++ b/rootfs/usr/local/bin/entrypoint.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash # shellcheck shell=bash # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -##@Version : 202210201558-git +##@Version : 202303102006-git # @@Author : Jason Hempstead # @@Contact : jason@casjaysdev.com -# @@License : LICENSE.md +# @@License : WTFPL # @@ReadME : entrypoint.sh --help -# @@Copyright : Copyright: (c) 2022 Jason Hempstead, Casjays Developments -# @@Created : Thursday, Oct 20, 2022 15:58 EDT +# @@Copyright : Copyright: (c) 2023 Jason Hempstead, Casjays Developments +# @@Created : Friday, Mar 10, 2023 20:06 EST # @@File : entrypoint.sh # @@Description : entrypoint point for caddy # @@Changelog : New script @@ -19,266 +19,470 @@ # @@Template : other/docker-entrypoint # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set bash options -[ -n "$DEBUG" ] && set -x +SCRIPT_NAME="$(basename "$0" 2>/dev/null)" +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Set functions -__exec_command() { - local exitCode=0 - local cmd="${*:-bash -l}" - echo "${exec_message:-Executing command: $cmd}" - $cmd || exitCode=1 - [ "$exitCode" = 0 ] || exitCode=10 - return ${exitCode:-$?} -} +# remove whitespaces from beginning argument +while :; do [ "$1" = " " ] && shift 1 || break; done # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__pcheck() { [ -n "$(which pgrep 2>/dev/null)" ] && pgrep -x "$1" || return 1; } -__find() { find "$1" -mindepth 1 -type ${2:-f,d} 2>/dev/null | grep '^' || return 10; } -__curl() { curl -q -LSsf -o /dev/null -s -w "200" "$@" 2>/dev/null || return 10; } -__pgrep() { __pcheck "${1:-$SERVICE_NAME}" || ps aux 2>/dev/null | grep -Fw " ${1:-$SERVICE_NAME}" | grep -qv ' grep' || return 10; } +[ "$1" = "$0" ] && shift 1 +[ "$1" = "$SCRIPT_NAME" ] && shift 1 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__certbot() { - [ -n "$DOMANNAME" ] && [ -n "$CERT_BOT_MAIL" ] || { echo "The variables DOMANNAME and CERT_BOT_MAIL are set" && exit 1; } - [ "$SSL_CERT_BOT" = "true" ] && type -P certbot &>/dev/null || { export SSL_CERT_BOT="" && return 10; } - certbot $1 --agree-tos -m $CERT_BOT_MAIL certonly --webroot -w "${WWW_ROOT_DIR:-/data/htdocs/www}" -d $DOMAINNAME -d $DOMAINNAME \ - --put-all-related-files-into "$SSL_DIR" -key-path "$SSL_KEY" -fullchain-path "$SSL_CERT" -} +# import the functions file +if [ -f "/usr/local/etc/docker/functions/entrypoint.sh" ]; then + . "/usr/local/etc/docker/functions/entrypoint.sh" +else + echo "Can not load functions from /usr/local/etc/docker/functions/entrypoint.sh" + exit 1 +fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__heath_check() { - status=0 health="Good" - __pgrep ${1:-} || status=$((status + 1)) - #__curl "https://1.1.1.1" || status=$((status + 1)) - #__curl "http://localhost:$HTTP_PORT/server-health" || status=$((status + 1)) - [ "$status" -eq 0 ] || health="Errors reported see docker logs --follow $CONTAINER_NAME" - echo "$(uname -s) $(uname -m) is running and the health is: $health" - return ${status:-$?} -} +# Create the default env files +__create_env "/config/env/default.sh" "/root/env.sh" &>/dev/null # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__start_all_services() { - echo "$service_message" - start-fpm & - start-caddy - return $? -} +# import variables from files +for set_env in "/root/env.sh" "/usr/local/etc/docker/env"/*.sh "/config/env"/*.sh; do + [ -f "$set_env" ] && . "$set_env" +done # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Additional functions +# Custom functions # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# export functions -export -f __exec_command __pcheck __pgrep __find __curl __heath_check __certbot __start_all_services +# Define script variables +SERVICE_USER="root" # execute command as another user +SERVICE_GROUP="" # Set user group for permission fix +SERVICE_UID="0" # set the user id for creation of user +SERVICE_PORT="" # specifiy port which service is listening on # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Define default variables - do not change these - redefine with -e or set under Additional -DISPLAY="${DISPLAY:-}" -LANG="${LANG:-C.UTF-8}" -DOMAINNAME="${DOMAINNAME:-}" -TZ="${TZ:-America/New_York}" -HTTP_PORT="${HTTP_PORT:-80}" -HTTPS_PORT="${HTTPS_PORT:-}" -SERVICE_PORT="${SERVICE_PORT:-}" -SERVICE_NAME="${CONTAINER_NAME:-}" -HOSTNAME="${HOSTNAME:-casjaysdev-caddy}" -HOSTADMIN="${HOSTADMIN:-root@${DOMAINNAME:-$HOSTNAME}}" -CERT_BOT_MAIL="${CERT_BOT_MAIL:-certbot-mail@casjay.net}" -SSL_CERT_BOT="${SSL_CERT_BOT:-false}" -SSL_ENABLED="${SSL_ENABLED:-false}" -SSL_DIR="${SSL_DIR:-/config/ssl}" -SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}" -SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}" -SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}" -SSL_CONTAINER_DIR="${SSL_CONTAINER_DIR:-/etc/ssl/CA}" +# Healthcheck variables +HEALTH_ENABLED="yes" # enable healthcheck [yes/no] +SERVICES_LIST="tini" # comma seperated list of processes for the healthcheck +SERVER_PORTS="" # ports : 80,443 +HEALTH_ENDPOINTS="" # url endpoints: [http://localhost/health,http://localhost/test] +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Additional +PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}" +PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}" +HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}" +NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}" +MYSQL_CONFIG_FILE="${MYSQL_CONFIG_FILE:-$(__find_mysql_conf)}" +PGSQL_CONFIG_FILE="${PGSQL_CONFIG_FILE:-$(__find_pgsql_conf)}" +MONGODB_CONFIG_FILE="${MONGODB_CONFIG_FILE:-$(__find_mongodb_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Overwrite variables + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Last thing to run before options +__run_pre() { + if [ "$ENTRYPOINT_FIRST_RUN" = "false" ]; then # Run on initial creation + true + fi + if [ "$CONFIG_DIR_INITIALIZED" = "false" ]; then # Initial config + true + fi + if [ "$DATA_DIR_INITIALIZED" = "false" ]; then + true + fi + # End Initial config + if [ "$START_SERVICES" = "yes" ]; then # only run on start + true + fi # end run on start + # Run everytime container starts + # __certbot + # __create_ssl_cert + # __update_ssl_certs + # end + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__run_message() { + + return +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# rewrite variables +ENV_PORTS="${ENV_PORTS//,/ }" +ENV_PORTS="${ENV_PORTS//\/*/}" +SERVER_PORTS="${SERVER_PORTS//,/ }" +WEB_SERVER_PORTS="${SERVICE_PORT//\/*/}" +HEALTH_ENDPOINTS="${HEALTH_ENDPOINTS//,/ }" +WEB_SERVER_PORTS="${WEB_SERVER_PORTS//\/*/}" +WEB_SERVER_PORTS="${SERVICE_PORT//,/ } ${WEB_SERVER_PORTS//,/ }" +ENV_PORTS="$(echo "$ENV_PORTS" | tr ' ' '\n' | sort -u | grep -v '^$' | tr '\n' ' ' | grep '^' || false)" +WEB_SERVER_PORTS="$(echo "$WEB_SERVER_PORTS" | tr ' ' '\n' | sort -u | grep -v '^$' | tr '\n' ' ' | grep '^' || false)" +ENV_PORTS="$(echo "$SERVER_PORTS" "$WEB_SERVER_PORTS" "$ENV_PORTS" "$SERVER_PORTS" | tr ' ' '\n' | sort -u | grep -v '^$' | tr '\n' ' ' | grep '^' || false)" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# variables based on env/files +[ "$SERVICE_PORT" = "443" ] && SSL_ENABLED="true" +[ -f "/config/.enable_ssh" ] && SSL_ENABLED="true" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# export variables + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Default directories +BACKUP_DIR="${BACKUP_DIR:-/data/backups}" WWW_ROOT_DIR="${WWW_ROOT_DIR:-/data/htdocs}" LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}" DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}" DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}" DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}" -CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | awk '{print $2}' | sed 's|/.*||g')" -[ -n "$HTTP_PORT" ] || [ -n "$HTTPS_PORT" ] || HTTP_PORT="$SERVICE_PORT" -[ "$HTTPS_PORT" = "443" ] && HTTP_PORT="$HTTPS_PORT" && SSL_ENABLED="true" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Additional variables and variable overrides -#SERVICE_NAME="" -export service_message="Starting $CONTAINER_NAME" +# create required directories +mkdir -p "/run" +mkdir -p "/tmp" +mkdir -p "/root" +mkdir -p "/data/logs" +mkdir -p "/run/init.d" +mkdir -p "/config/secure" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# create required files +touch "/data/logs/entrypoint.log" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Check if this is a new container -[ -f "/data/.docker_has_run" ] && DATA_DIR_INITIALIZED="true" || DATA_DIR_INITIALIZED="false" -[ -f "/config/.docker_has_run" ] && CONFIG_DIR_INITIALIZED="true" || CONFIG_DIR_INITIALIZED="false" +# fix permissions +chmod -f 777 "/run" +chmod -f 777 "/tmp" +chmod -f 700 "/root" +chmod -f 777 "/data/logs" +chmod -f 777 "/run/init.d" +chmod -f 777 "/config/secure" +chmod -f 777 "/data/logs/entrypoint.log" +chmod -f 777 "/dev/stderr" "/dev/stdout" +################## END OF CONFIGURATION ##################### # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# export variables -export LANG TZ DOMAINNAME HOSTNAME HOSTADMIN SSL_ENABLED SSL_DIR SSL_CA SSL_KEY SERVICE_NAME -export SSL_DIR HTTP_PORT HTTPS_PORT LOCAL_BIN_DIR DEFAULT_CONF_DIR CONTAINER_IP_ADDRESS -export SSL_CONTAINER_DIR SSL_CERT_BOT DISPLAY CONFIG_DIR_INITIALIZED DATA_DIR_INITIALIZED +# Create the backup dir +[ -n "$BACKUP_DIR" ] && [ -d "$BACKUP_DIR" ] || mkdir -p "$BACKUP_DIR" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# import variables from file -[ -f "/root/env.sh" ] && . "/root/env.sh" -[ -f "/config/env.sh" ] && "/config/env.sh" -[ -f "/config/.env.sh" ] && . "/config/.env.sh" +# Show start message +if [ "$CONFIG_DIR_INITIALIZED" = "false" ] || [ "$DATA_DIR_INITIALIZED" = "false" ]; then + [ "$ENTRYPOINT_MESSAGE" = "yes" ] && echo "Executing entrypoint script for caddy" +fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set timezone -[ -n "$TZ" ] && echo "$TZ" >"/etc/timezone" -[ -f "/usr/share/zoneinfo/$TZ" ] && ln -sf "/usr/share/zoneinfo/$TZ" "/etc/localtime" +[ -n "$TZ" ] && [ -w "/etc/timezone" ] && echo "$TZ" >"/etc/timezone" +[ -f "/usr/share/zoneinfo/$TZ" ] && [ -w "/etc/localtime" ] && ln -sf "/usr/share/zoneinfo/$TZ" "/etc/localtime" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Set hostname -if [ -n "$HOSTNAME" ]; then - echo "$HOSTNAME" >"/etc/hostname" - echo "127.0.0.1 $HOSTNAME localhost $HOSTNAME.local" >"/etc/hosts" +# Make sure localhost exists +if [ -w "/etc/hosts" ] && ! grep -q '127.0.0.1' /etc/hosts; then + echo "127.0.0.1 localhost" >"/etc/hosts" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set containers hostname +[ -n "$HOSTNAME" ] && [ -w "/etc/timezone" ] && echo "$HOSTNAME" >"/etc/hostname" +if [ -w "/etc/hosts" ] && [ -n "$HOSTNAME" ]; then + echo "${CONTAINER_IP4_ADDRESS:-127.0.0.1} $HOSTNAME $HOSTNAME.local" >>"/etc/hosts" fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Add domain to hosts file -if [ -n "$DOMAINNAME" ]; then - echo "$HOSTNAME.${DOMAINNAME:-local}" >"/etc/hostname" - echo "127.0.0.1 $HOSTNAME localhost $HOSTNAME.local" >"/etc/hosts" - echo "${CONTAINER_IP_ADDRESS:-127.0.0.1} $HOSTNAME.$DOMAINNAME" >>"/etc/hosts" +[ -n "$DOMAINNAME" ] && [ -w "/etc/timezone" ] && echo "$HOSTNAME.${DOMAINNAME:-local}" >"/etc/hostname" +if [ -w "/etc/hosts" ] && [ -n "$DOMAINNAME" ]; then + echo "${CONTAINER_IP4_ADDRESS:-127.0.0.1} $HOSTNAME.${DOMAINNAME:-local}" >"/etc/hosts" + echo "${CONTAINER_IP4_ADDRESS:-127.0.0.1} $HOSTNAME.$DOMAINNAME" >>"/etc/hosts" fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Delete any gitkeep files [ -d "/data" ] && rm -Rf "/data/.gitkeep" "/data"/*/*.gitkeep -[ -d "/config" ] && rm -Rf "/config/.gitkeep" "/data"/*/*.gitkeep +[ -d "/config" ] && rm -Rf "/config/.gitkeep" "/config"/*/*.gitkeep [ -f "/usr/local/bin/.gitkeep" ] && rm -Rf "/usr/local/bin/.gitkeep" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Create directories -[ -d "/etc/ssl" ] || mkdir -p "$SSL_CONTAINER_DIR" -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Create files - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Create symlinks - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -if [ "$SSL_ENABLED" = "true" ] || [ "$SSL_ENABLED" = "yes" ]; then - if [ -f "/config/ssl/server.crt" ] && [ -f "/config/ssl/server.key" ]; then - export SSL_ENABLED="true" - if [ -n "$SSL_CA" ] && [ -f "$SSL_CA" ]; then - mkdir -p "$SSL_CONTAINER_DIR/certs" - cat "$SSL_CA" >>"/etc/ssl/certs/ca-certificates.crt" - cp -Rf "/config/ssl/." "$SSL_CONTAINER_DIR/" - fi - else - [ -d "$SSL_DIR" ] || mkdir -p "$SSL_DIR" - create-ssl-cert - fi - type update-ca-certificates &>/dev/null && update-ca-certificates -fi -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[ -f "$SSL_CA" ] && cp -Rfv "$SSL_CA" "$SSL_CONTAINER_DIR/ca.crt" -[ -f "$SSL_KEY" ] && cp -Rfv "$SSL_KEY" "$SSL_CONTAINER_DIR/server.key" -[ -f "$SSL_CERT" ] && cp -Rfv "$SSL_CERT" "$SSL_CONTAINER_DIR/server.crt" +# import hosts file into container +[ -f "/usr/local/etc/hosts" ] && [ -w "/etc/hosts" ] && cat "/usr/local/etc/hosts" >>"/etc/hosts" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Setup bin directory SET_USR_BIN="" [ -d "/data/bin" ] && SET_USR_BIN+="$(__find /data/bin f) " [ -d "/config/bin" ] && SET_USR_BIN+="$(__find /config/bin f) " if [ -n "$SET_USR_BIN" ]; then - echo "Setting up bin" - for create_bin in $SET_USR_BIN; do - create_bin_name="$(basename "$create_bin")" - ln -sf "$create_bin" "$LOCAL_BIN_DIR/$create_bin_name" + echo "Setting up bin $SET_USR_BIN > $LOCAL_BIN_DIR" + for create_bin_template in $SET_USR_BIN; do + if [ -n "$create_bin_template" ]; then + create_bin_name="$(basename "$create_bin_template")" + if [ -e "$create_bin_template" ]; then + ln -sf "$create_bin_template" "$LOCAL_BIN_DIR/$create_bin_name" + fi + fi done + unset create_bin_template create_bin_name SET_USR_BIN fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Create default config -if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -d "/config" ]; then - echo "Copying default config files" - if [ -n "$DEFAULT_TEMPLATE_DIR" ] && [ -d "$DEFAULT_TEMPLATE_DIR" ]; then - for create_template in "$DEFAULT_TEMPLATE_DIR"/*; do - create_template_name="$(basename "$create_template")" - cp -Rf "$create_template" "/config/$create_template_name" 2>/dev/null +# Copy default config +if [ -n "$DEFAULT_TEMPLATE_DIR" ]; then + if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -d "/config" ]; then + echo "Copying default config files $DEFAULT_TEMPLATE_DIR > /config" + for create_config_template in "$DEFAULT_TEMPLATE_DIR"/*; do + if [ -n "$create_config_template" ]; then + create_template_name="$(basename "$create_config_template")" + if [ -d "$create_config_template" ]; then + mkdir -p "/config/$create_template_name/" + __is_dir_empty "/config/$create_template_name" || cp -Rf "$create_config_template/." "/config/$create_template_name/" 2>/dev/null + elif [ -e "$create_config_template" ]; then + [ -e "/config/$create_template_name" ] || cp -Rf "$create_config_template" "/config/$create_template_name" 2>/dev/null + fi + fi done + unset create_config_template create_template_name fi fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Copy custom config files -if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -d "/config" ]; then - echo "Copying custom config files" - for create_config in "$DEFAULT_CONF_DIR"/*; do - create_config_name="$(basename "$create_config")" - cp -Rf "$create_config" "/config/$create_config_name" 2>/dev/null - done +if [ -n "$DEFAULT_CONF_DIR" ]; then + if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -d "/config" ]; then + echo "Copying custom config files: $DEFAULT_CONF_DIR > /config" + for create_config_template in "$DEFAULT_CONF_DIR"/*; do + create_config_name="$(basename "$create_config_template")" + if [ -n "$create_config_template" ]; then + if [ -d "$create_config_template" ]; then + mkdir -p "/config/$create_config_name" + __is_dir_empty "/config/$create_config_name" || cp -Rf "$create_config_template/." "/config/$create_config_name/" 2>/dev/null + elif [ -e "$create_config_template" ]; then + [ -e "/config/$create_config_name" ] || cp -Rf "$create_config_template" "/config/$create_config_name" 2>/dev/null + fi + fi + done + unset create_config_template create_config_name + fi fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Copy custom data files -if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -d "/data" ]; then - echo "Copying data files" - for create_data in "$DEFAULT_DATA_DIR"/*; do - create_data_name="$(basename "$create_data")" - cp -Rf "$create_data" "/data/$create_data_name" 2>/dev/null - done +if [ -d "/data" ]; then + if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -n "$DEFAULT_DATA_DIR" ]; then + echo "Copying data files $DEFAULT_DATA_DIR > /data" + for create_data_template in "$DEFAULT_DATA_DIR"/*; do + create_data_name="$(basename "$create_data_template")" + if [ -n "$create_data_template" ]; then + if [ -d "$create_data_template" ]; then + mkdir -p "/data/$create_data_name" + __is_dir_empty "/data/$create_data_name" || cp -Rf "$create_data_template/." "/data/$create_data_name/" 2>/dev/null + elif [ -e "$create_data_template" ]; then + [ -e "/data/$create_data_name" ] || cp -Rf "$create_data_template" "/data/$create_data_name" 2>/dev/null + fi + fi + done + unset create_template + fi fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Copy /config to /etc if [ -d "/config" ]; then - echo "Copying /config to /etc" - for create_conf in /config/*; do - if [ -n "$create_conf" ]; then - create_conf_name="$(basename "$create_conf")" - if [ -e "/etc/$create_conf_name" ]; then - if [ -d "/etc/$create_conf_name" ]; then - cp -Rf "$create_conf/." "/etc/$create_conf_name/" 2>/dev/null - else - cp -Rf "$create_conf" "/etc/$create_conf_name" 2>/dev/null + if [ "$CONFIG_DIR_INITIALIZED" = "false" ]; then + echo "Copy config files to system: /config > /etc" + for create_config_name in /config/*; do + if [ -n "$create_config_name" ]; then + create_conf_name="$(basename "$create_config_name")" + if [ -d "/etc/$create_conf_name" ] && [ -d "$create_config_name" ]; then + mkdir -p "/etc/$create_conf_name/" + cp -Rf "$create_config_name/." "/etc/$create_conf_name/" 2>/dev/null + elif [ -e "/etc/$create_conf_name" ] && [ -e "$create_config_name" ]; then + cp -Rf "$create_config_name" "/etc/$create_conf_name" 2>/dev/null fi fi - fi - done + done + unset create_config_name create_conf_name + fi fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Unset unneeded variables -unset SET_USR_BIN create_bin create_bin_name create_template create_template_name -unset create_data create_data_name create_config create_config_name create_conf create_conf_name +# Copy html files +if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -n "$WWW_ROOT_DIR" ]; then + if [ -d "$DEFAULT_DATA_DIR/data/htdocs" ]; then + __is_dir_empty "$WWW_ROOT_DIR/" || cp -Rf "$DEFAULT_DATA_DIR/data/htdocs/." "$WWW_ROOT_DIR/" 2>/dev/null + fi +fi +if [ -n "$WWW_ROOT_DIR" ]; then + if [ -d "$DEFAULT_DATA_DIR/htdocs/www" ] && [ ! -d "$WWW_ROOT_DIR" ]; then + mkdir -p "$WWW_ROOT_DIR" + cp -Rf "$DEFAULT_DATA_DIR/htdocs/www/" "$WWW_ROOT_DIR" + [ -f "$WWW_ROOT_DIR/htdocs/www/health/index.txt" ] || echo "OK" >"$WWW_ROOT_DIR/htdocs/www/health/index.txt" + fi +fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[ -f "/data/.docker_has_run" ] || { [ -d "/data" ] && echo "Initialized on: $(date)" >"/data/.docker_has_run"; } -[ -f "/config/.docker_has_run" ] || { [ -d "/config" ] && echo "Initialized on: $(date)" >"/config/.docker_has_run"; } +[ -d "$SSL_DIR" ] || mkdir -p "$SSL_DIR" +if [ "$SSL_ENABLED" = "true" ] || [ "$SSL_ENABLED" = "yes" ]; then + if [ -f "$SSL_CERT" ] && [ -f "$SSL_KEY" ]; then + SSL_ENABLED="true" + if [ -n "$SSL_CA" ] && [ -f "$SSL_CA" ]; then + mkdir -p "$SSL_DIR/certs" + cat "$SSL_CA" >>"/etc/ssl/certs/ca-certificates.crt" + cp -Rf "/." "$SSL_DIR/" + fi + else + [ -d "$SSL_DIR" ] || mkdir -p "$SSL_DIR" + __create_ssl_cert + fi + type update-ca-certificates &>/dev/null && update-ca-certificates +fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Additional commands - +# setup the smtp server +__setup_mta +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__run_pre +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +if [ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ]; then + ENTRYPOINT_FIRST_RUN="no" +elif [ -d "/config" ]; then + echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_CONFIG_INIT_FILE" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Check if this is a new container +if [ -f "$ENTRYPOINT_DATA_INIT_FILE" ]; then + DATA_DIR_INITIALIZED="true" +elif [ -d "/data" ]; then + echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_DATA_INIT_FILE" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +if [ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ]; then + CONFIG_DIR_INITIALIZED="true" +elif [ -d "/config" ]; then + echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_CONFIG_INIT_FILE" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +if [ -f "$ENTRYPOINT_PID_FILE" ]; then + START_SERVICES="no" + ENTRYPOINT_MESSAGE="no" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +[ "$ENTRYPOINT_MESSAGE" = "yes" ] && echo "Container ip address is: $CONTAINER_IP4_ADDRESS" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Show configured listing processes +if [ -n "$ENV_PORTS" ]; then + show_port="" + for port in $ENV_PORTS; do [ -n "$port" ] && show_port+="$(printf '%s ' "$port") "; done + printf '%s\n' "The following ports are open: $show_port" + unset port show_port +fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Show message -echo "Container ip address is: $CONTAINER_IP_ADDRESS" +__run_message # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Just start services +START_SERVICES="${START_SERVICES:-SYSTEM_INIT}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Begin options case "$1" in --help) # Help message echo 'Docker container for '$APPNAME'' - echo "Usage: $APPNAME [healthcheck, bash, command]" - echo "Failed command will have exit code 10" + echo "Usage: $APPNAME [cron exec start init shell certbot ssl procs ports healthcheck backup command]" echo "" - exit ${exitCode:-$?} + exit 0 + ;; + +cron) + shift 1 + __cron "$@" & + ;; + +backup) # backup data and config dirs + shift 1 + save="${1:-$BACKUP_DIR}" + backupExit=0 + date="$(date '+%Y%m%d-%H%M')" + file="$save/$date.tar.gz" + echo "Backing up /data /config to $file" + sleep 1 + tar cfvz "$file" --exclude="$save" "/data" "/config" || backupExit=1 + backupExit=$? + [ $backupExit -eq 0 ] && echo "Backed up /data /config has finished" || echo "Backup of /data /config has failed" + exit $backupExit ;; healthcheck) # Docker healthcheck - __heath_check "${1:-$SERVICE_NAME}" || exitCode=10 - exit ${exitCode:-$?} + healthStatus=0 + services="${SERVICES_LIST:-$@}" + healthEnabled="${HEALTH_ENABLED:-}" + healthPorts="${WEB_SERVER_PORTS:-}" + healthEndPoints="${HEALTH_ENDPOINTS:-}" + healthMessage="Everything seems to be running" + services="${services//,/ }" + [ "$healthEnabled" = "yes" ] || exit 0 + for proc in $services; do + if [ -n "$proc" ]; then + if ! __pgrep "$proc"; then + echo "$proc is not running" >&2 + status=$((status + 1)) + fi + fi + done + for port in $ports; do + if [ -n "$(type -P netstat)" ] && [ -n "$port" ]; then + netstat -taupln | grep -q ":$port " || healthStatus=$((healthStatus + 1)) + fi + done + for endpoint in $healthEndPoints; do + if [ -n "$endpoint" ]; then + __curl "$endpoint" || healthStatus=$((healthStatus + 1)) + fi + done + [ "$healthStatus" -eq 0 ] || healthMessage="Errors reported see: docker logs --follow $CONTAINER_NAME" + [ -n "$healthMessage" ] && echo "$healthMessage" + exit $healthStatus ;; -*/bin/sh | */bin/bash | bash | shell | sh) # Launch shell +ports) # show open ports shift 1 - __exec_command "${@:-/bin/bash}" - exit ${exitCode:-$?} + ports="$(__netstat -taupln | awk -F ' ' '{print $4}' | awk -F ':' '{print $2}' | sort --unique --version-sort | grep -v '^$' | grep '^' || echo '')" + [ -n "$ports" ] && printf '%s\n%s\n' "The following are servers:" "$ports" | tr '\n' ' ' + exit $? ;; -certbot) +procs) # show running processes + shift 1 + ps="$(__ps axco command | grep -vE 'COMMAND|grep|ps' | sort -u || grep '^' || echo '')" + [ -n "$ps" ] && printf '%s\n%s\n' "Found the following processes" "$ps" | tr '\n' ' ' + exit $? + ;; + +ssl) # setup ssl + shift 1 + __create_ssl_cert + exit $? + ;; + +certbot) # manage ssl certificate shift 1 SSL_CERT_BOT="true" if [ "$1" = "create" ]; then shift 1 - __certbot + __certbot "create" elif [ "$1" = "renew" ]; then shift 1 __certbot "renew certonly --force-renew" else __exec_command "certbot" "$@" fi + exit $? + ;; + +*/bin/sh | */bin/bash | bash | sh | shell) # Launch shell + shift 1 + __exec_command "${@:-/bin/bash}" + exit $? + ;; + +start) # show/start an init script + shift 1 + PATH="/usr/local/etc/docker/init.d:$PATH" + if [ $# -eq 0 ]; then + scripts="$(ls -A "/usr/local/etc/docker/init.d")" + [ -n "$scripts" ] && echo "$scripts" || echo "No scripts found in: /usr/local/etc/docker/init.d" + elif [ -f "/usr/local/etc/docker/init.d/$1" ]; then + eval "/usr/local/etc/docker/init.d/$1" + elif [ "$1" = "all" ]; then + shift $# + echo "$$" >"/run/init.d/entrypoint.pid" + __start_init_scripts "/usr/local/etc/docker/init.d" + fi + __no_exit ;; *) # Execute primary command - if [ $# -eq 0 ]; then - __start_all_services - exit ${exitCode:-$?} + if [ "$START_SERVICES" = "yes" ] || [ ! -f "/run/init.d/entrypoint.pid" ]; then + echo "$$" >"/run/init.d/entrypoint.pid" + __start_init_scripts "/usr/local/etc/docker/init.d" + __no_exit else __exec_command "$@" - exitCode=$? fi ;; esac # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # end of entrypoint -exit ${exitCode:-$?} # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# ex: ts=2 sw=2 et filetype=sh diff --git a/rootfs/usr/local/bin/start-caddy.sh b/rootfs/usr/local/bin/start-caddy.sh deleted file mode 100755 index e89a2b2..0000000 --- a/rootfs/usr/local/bin/start-caddy.sh +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash -# shellcheck shell=bash -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -##@Version : 202210201558-git -# @@Author : Jason Hempstead -# @@Contact : jason@casjaysdev.com -# @@License : LICENSE.md -# @@ReadME : start-caddy.sh --help -# @@Copyright : Copyright: (c) 2022 Jason Hempstead, Casjays Developments -# @@Created : Thursday, Oct 20, 2022 15:58 EDT -# @@File : start-caddy.sh -# @@Description : script to start caddy -# @@Changelog : New script -# @@TODO : Better documentation -# @@Other : -# @@Resource : -# @@Terminal App : no -# @@sudo/root : no -# @@Template : other/start-service -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Set functions -__pcheck() { [ -n "$(which pgrep 2>/dev/null)" ] && pgrep -x "$1" || return 1; } -__find() { find "$1" -mindepth 1 -type ${2:-f,d} 2>/dev/null | grep '^' || return 10; } -__curl() { curl -q -LSsf -o /dev/null -s -w "200" "$@" 2>/dev/null || return 10; } -__pgrep() { __pcheck "$1" || ps aux 2>/dev/null | grep -Fw " $1" | grep -qv ' grep' || return 10; } -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__certbot() { - [ -n "$DOMANNAME" ] && [ -n "$CERT_BOT_MAIL" ] || { echo "The variables DOMANNAME and CERT_BOT_MAIL are set" && exit 1; } - [ "$SSL_CERT_BOT" = "true" ] && type -P certbot &>/dev/null || { export SSL_CERT_BOT="" && return 10; } - certbot $1 --agree-tos -m $CERT_BOT_MAIL certonly --webroot -w "${WWW_ROOT_DIR:-/data/htdocs/www}" -d $DOMAINNAME -d $DOMAINNAME \ - --put-all-related-files-into "$SSL_DIR" -key-path "$SSL_KEY" -fullchain-path "$SSL_CERT" -} -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__heath_check() { - status=0 health="Good" - __pgrep ${1:-} || status=$((status + 1)) - #__curl "http://localhost:$HTTP_PORT/server-health" || status=$((status + 1)) - [ "$status" -eq 0 ] || health="Errors reported see docker logs --follow $CONTAINER_NAME" - echo "$(uname -s) $(uname -m) is running and the health is: $health" - return ${status:-$?} -} -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Set variables -DISPLAY="${DISPLAY:-}" -LANG="${LANG:-C.UTF-8}" -DOMAINNAME="${DOMAINNAME:-}" -TZ="${TZ:-America/New_York}" -HTTP_PORT="${HTTP_PORT:-80}" -HTTPS_PORT="${HTTPS_PORT:-}" -SERVICE_PORT="${SERVICE_PORT:-$HTTP_PORT}" -SERVICE_NAME="${CONTAINER_NAME:-}" -HOSTNAME="${HOSTNAME:-casjaysdev-caddy}" -HOSTADMIN="${HOSTADMIN:-root@${DOMAINNAME:-$HOSTNAME}}" -SSL_CERT_BOT="${SSL_CERT_BOT:-false}" -SSL_ENABLED="${SSL_ENABLED:-false}" -SSL_DIR="${SSL_DIR:-/config/ssl}" -SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}" -SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}" -SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}" -SSL_CONTAINER_DIR="${SSL_CONTAINER_DIR:-/etc/ssl/CA}" -WWW_ROOT_DIR="${WWW_ROOT_DIR:-/data/htdocs}" -LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}" -DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-}" -CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-}" -DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}" -DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}" -DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}" -CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | awk '{print $2}' | sed 's|/.*||g')" -[ -n "$HTTP_PORT" ] || [ -n "$HTTPS_PORT" ] || HTTP_PORT="$SERVICE_PORT" -[ "$HTTPS_PORT" = "443" ] && HTTP_PORT="$HTTPS_PORT" && SSL_ENABLED="true" -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Overwrite variables -#SERVICE_PORT="" -SERVICE_NAME="caddy" -SERVICE_COMMAND="$SERVICE_NAME run --config /config/caddy/Caddyfile" -export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS:$SERVICE_PORT" -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Pre copy commands - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Check if this is a new container -[ -z "$DATA_DIR_INITIALIZED" ] && [ -f "/data/.docker_has_run" ] && DATA_DIR_INITIALIZED="true" -[ -z "$CONFIG_DIR_INITIALIZED" ] && [ -f "/config/.docker_has_run" ] && CONFIG_DIR_INITIALIZED="true" -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Create default config -if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -n "$DEFAULT_TEMPLATE_DIR" ]; then - [ -d "/config" ] && cp -Rf "$DEFAULT_TEMPLATE_DIR/." "/config/" 2>/dev/null -fi -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Copy custom config files -if [ "$CONFIG_DIR_INITIALIZED" = "false" ] && [ -n "$DEFAULT_CONF_DIR" ]; then - [ -d "/config" ] && cp -Rf "$DEFAULT_CONF_DIR/." "/config/" 2>/dev/null -fi -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Copy custom data files -if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -n "$DEFAULT_DATA_DIR" ]; then - [ -d "/data" ] && cp -Rf "$DEFAULT_DATA_DIR/." "/data/" 2>/dev/null -fi -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Copy html files -if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -d "$DEFAULT_DATA_DIR/data/htdocs" ]; then - [ -d "/data" ] && cp -Rf "$DEFAULT_DATA_DIR/data/htdocs/." "$WWW_ROOT_DIR/" 2>/dev/null -fi -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Post copy commands - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Initialized -[ -d "/data" ] && touch "/data/.docker_has_run" -[ -d "/config" ] && touch "/config/.docker_has_run" -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# APP Variables overrides -[ -f "/root/env.sh" ] && . "/root/env.sh" -[ -f "/config/env.sh" ] && "/config/env.sh" -[ -f "/config/.env.sh" ] && . "/config/.env.sh" -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Actions based on env - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# begin main app -case "$1" in -healthcheck) - shift 1 - __heath_check "${SERVICE_NAME:-bash}" - exit $? - ;; - -certbot) - shift 1 - SSL_CERT_BOT="true" - if [ "$1" = "create" ]; then - shift 1 - __certbot - elif [ "$1" = "renew" ]; then - shift 1 - __certbot "renew certonly --force-renew" - else - __exec_command "certbot" "$@" - fi - ;; - -*) - if __pgrep "$SERVICE_NAME" && [ ! -f "/tmp/$SERVICE_NAME.pid" ]; then - echo "$SERVICE_NAME is running" - else - touch "/tmp/$SERVICE_NAME.pid" - __exec_command "$SERVICE_COMMAND" || rm -Rf "/tmp/$SERVICE_NAME.pid" - fi - ;; -esac -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Set exit code -exitCode="${exitCode:-$?}" -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# End application -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# lets exit with code -exit ${exitCode:-$?} -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# end diff --git a/rootfs/usr/local/etc/docker/env/00-directory.sh b/rootfs/usr/local/etc/docker/env/00-directory.sh new file mode 100644 index 0000000..4721f84 --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/00-directory.sh @@ -0,0 +1,10 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# directory settings +BACKUP_DIR="${BACKUP_DIR:-/data/backups}" +WWW_ROOT_DIR="${WWW_ROOT_DIR:-/data/htdocs}" +LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}" +DATABASE_BASE_DIR="${DATABASE_BASE_DIR:-/data/db}" +DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}" +DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}" +DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/addresses.sh b/rootfs/usr/local/etc/docker/env/addresses.sh new file mode 100644 index 0000000..695428c --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/addresses.sh @@ -0,0 +1,5 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# get ip addresses +CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$(__get_ip4)}" +CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/certbot.sh b/rootfs/usr/local/etc/docker/env/certbot.sh new file mode 100644 index 0000000..8618592 --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/certbot.sh @@ -0,0 +1,6 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# cerbot +SSL_CERT_BOT="${SSL_CERT_BOT:-false}" +CERT_BOT_MAIL="${CERT_BOT_MAIL:-}" +CERTBOT_DOMAINS="${CERTBOT_DOMAINS:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/couchdb.sh b/rootfs/usr/local/etc/docker/env/couchdb.sh new file mode 100644 index 0000000..3fa12c4 --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/couchdb.sh @@ -0,0 +1,7 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# couchdb env +NODENAME="${NODENAME:-}" +COUCHDB_USER="${DATABASE_USER_ROOT:-$COUCHDB_USER}" +COUCHDB_PASSWORD="${DATABASE_PASS_ROOT:-$COUCHDB_PASSWORD}" +DATABASE_DIR_COUCHDB="${DATABASE_DIR_COUCHDB:-/data/db/couchdb}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/default.sample b/rootfs/usr/local/etc/docker/env/default.sample new file mode 100644 index 0000000..fdf191e --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/default.sample @@ -0,0 +1,129 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import the functions file +if [ -f "/usr/local/etc/docker/functions/entrypoint.sh" ]; then + . "/usr/local/etc/docker/functions/entrypoint.sh" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# GLOBAL enviroment variables +USER="${USER:-root}" +LANG="${LANG:-C.UTF-8}" +TZ="${TZ:-America/New_York}" +SERVICE_USER="${SERVICE_USER:-root}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# directory settings +BACKUP_DIR="${BACKUP_DIR:-/data/backups}" +WWW_ROOT_DIR="${WWW_ROOT_DIR:-/data/htdocs}" +LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}" +DATABASE_BASE_DIR="${DATABASE_BASE_DIR:-/data/db}" +DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}" +DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}" +DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# healthcheck +HEALTH_ENABLED="${HEALTH_ENABLED:-}" +HEALTH_URL="${HEALTH_URL:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# php settings +PHP_VERSION="${PHP_VERSION//php/}" +PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}" +PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# services/ports +ENV_PORTS="${ENV_PORTS:-}" +SERVICE_PORT="${SERVICE_PORT:-$PORT}" +WEB_SERVER_PORTS="${WEB_SERVER_PORTS:-}" +SERVICES_LIST="${PROCS_LIST:-$SERVICES_LIST} " +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# networing info +HOSTNAME="${HOSTNAME:-casjaysdev-GEN_SCRIPT_REPLACE_APPNAME}" +DOMAINNAME="${DOMAINNAME:-}" +FULL_DOMAIN_NAME="${FULL_DOMAIN_NAME:-${DOMAINNAME:-$HOSTNAME}}" +SERVER_ADMIN="${SERVER_ADMIN:-root@${EMAIL_DOMAIN:-$DOMAINNAME}}" +EMAIL_RELAY="${EMAIL_RELAY:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# get ip addresses +CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$(__get_ip4)}" +CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# cerbot +SSL_CERT_BOT="${SSL_CERT_BOT:-false}" +CERT_BOT_MAIL="${CERT_BOT_MAIL:-}" +CERTBOT_DOMAINS="${CERTBOT_DOMAINS:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# ssl server settings +SSL_ENABLED="${SSL_ENABLED:-false}" +SSL_DIR="${SSL_DIR:-/config/ssl}" +SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}" +SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}" +SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}" +SSL_CONTAINER_DIR="${SSL_CONTAINER_DIR:-/etc/ssl/CA}" +COUNTRY="${COUNTRY:-US}" +STATE="${STATE:-NY}" +CITY="${CITY:-Albany}" +UNIT="${UNIT:-CasjaysDev}" +ORG="${ORG:-"Casjays Developments"}" +DAYS_VALID="${DAYS_VALID:-3650}" +RSA="${RSA:-4096}" +CN="${CN:-$FULL_DOMAIN_NAME}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# web server configs +HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}" +NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}" +LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# redis env + DATABASE_DIR_REDIS="${DATABASE_DIR_REDIS:-$DATABASE_BASE_DIR/redis}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# postgresql env +DATABASE_DIR_PGSQL="${DATABASE_DIR_PGSQL:-$PGDATA}" +PGDATA="${DATABASE_DIR_PGSQL:-$DATABASE_BASE_DIR/pgsql}" +POSTGRES_USER="${DATABASE_USER_ROOT:-$POSTGRES_USER}" +POSTGRES_PASSWORD="${DATABASE_PASS_ROOT:-$POSTGRES_PASSWORD}" +POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# mariadb env +MARIADB_ROOT_HOST="${MARIADB_ROOT_HOST:-%}" +MARIADB_AUTO_UPGRADE="${MARIADB_AUTO_UPGRADE:-yes}" +MARIADB_DATABASE="${DATABASE_CREATE:-$MARIADB_DATABASE}" +MARIADB_USER="${DATABASE_USER_NORMAL:-$MARIADB_USER}" +MARIADB_PASSWORD="${DATABASE_PASS_NORMAL:-$MARIADB_PASSWORD}" +DATABASE_DIR_MARIADB="${DATABASE_DIR_MARIADB:-$DATABASE_BASE_DIR/mysql}" +MARIADB_ROOT_PASSWORD="${DATABASE_PASS_ROOT:-$MARIADB_ROOT_PASSWORD}" +MARIADB_ALLOW_EMPTY_ROOT_PASSWORD="${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:-}" +MARIADB_INITDB_SKIP_TZINFO="${MARIADB_INITDB_SKIP_TZINFO}:-" +MARIADB_RANDOM_ROOT_PASSWORD="${MARIADB_RANDOM_ROOT_PASSWORD:-}" +MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# mongodb env +NITDB_ROOT_USERNAME="${DATABASE_USER_ROOT:-$NITDB_ROOT_USERNAME}" +DATABASE_DIR_MONGODB="${DATABASE_DIR_MONGODB:-$DATABASE_BASE_DIR/mongodb}" +MONGO_INITDB_ROOT_PASSWORD="${DATABASE_PASS_ROOT:-$MONGO_INITDB_ROOT_PASSWORD}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# couchdb env +NODENAME="${NODENAME:-}" +COUCHDB_USER="${DATABASE_USER_ROOT:-$COUCHDB_USER}" +COUCHDB_PASSWORD="${DATABASE_PASS_ROOT:-$COUCHDB_PASSWORD}" +DATABASE_DIR_COUCHDB="${DATABASE_DIR_COUCHDB:-$DATABASE_BASE_DIR/couchdb}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Supabase +DATABASE_DIR_SUPABASE="${DATABASE_DIR_SUPABASE:-$DATABASE_BASE_DIR/supabase}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# File locations +ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}" +ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}" +ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}" +ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Startup variables +INIT_DATE="${INIT_DATE:-$(date)}" +START_SERVICES="${START_SERVICES:-yes}" +ENTRYPOINT_MESSAGE="${ENTRYPOINT_MESSAGE:-yes}" +ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}" +DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-false}" +CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-false}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/rootfs/usr/local/etc/docker/env/global.sh b/rootfs/usr/local/etc/docker/env/global.sh new file mode 100644 index 0000000..da547a3 --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/global.sh @@ -0,0 +1,8 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# GLOBAL enviroment variables +USER="${USER:-root}" +LANG="${LANG:-C.UTF-8}" +TZ="${TZ:-America/New_York}" +SERVICE_USER="${SERVICE_USER:-root}" +ENV_PORTS="${ENV_PORTS//\/*/}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/healthcheck.sh b/rootfs/usr/local/etc/docker/env/healthcheck.sh new file mode 100644 index 0000000..0dd7d39 --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/healthcheck.sh @@ -0,0 +1,5 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# healthcheck +HEALTH_ENABLED="${HEALTH_ENABLED:-}" +HEALTH_URL="${HEALTH_URL:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/mariadb.sh b/rootfs/usr/local/etc/docker/env/mariadb.sh new file mode 100644 index 0000000..ca4ab41 --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/mariadb.sh @@ -0,0 +1,14 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# mariadb env +MARIADB_ROOT_HOST="${MARIADB_ROOT_HOST:-%}" +MARIADB_AUTO_UPGRADE="${MARIADB_AUTO_UPGRADE:-yes}" +MARIADB_DATABASE="${DATABASE_CREATE:-$MARIADB_DATABASE}" +MARIADB_USER="${DATABASE_USER_NORMAL:-$MARIADB_USER}" +MARIADB_PASSWORD="${DATABASE_PASS_NORMAL:-$MARIADB_PASSWORD}" +DATABASE_DIR_MARIADB="${DATABASE_DIR_MARIADB:-/data/db/mysql}" +MARIADB_ROOT_PASSWORD="${DATABASE_PASS_ROOT:-$MARIADB_ROOT_PASSWORD}" +MARIADB_ALLOW_EMPTY_ROOT_PASSWORD="${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:-}" +MARIADB_INITDB_SKIP_TZINFO="${MARIADB_INITDB_SKIP_TZINFO}:-" +MARIADB_RANDOM_ROOT_PASSWORD="${MARIADB_RANDOM_ROOT_PASSWORD:-}" +MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/mongodb.sh b/rootfs/usr/local/etc/docker/env/mongodb.sh new file mode 100644 index 0000000..8e014de --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/mongodb.sh @@ -0,0 +1,20 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# mongodb env +DATABASE_DIR_MONGODB="${DATABASE_DIR_MONGODB:-/data/db/mongodb}" +INITDB_ROOT_USERNAME="${DATABASE_USER_ROOT:-$INITDB_ROOT_USERNAME}" +MONGO_INITDB_ROOT_PASSWORD="${DATABASE_PASS_ROOT:-$MONGO_INITDB_ROOT_PASSWORD}" +ME_CONFIG_EDITORTHEME="${ME_CONFIG_EDITORTHEME:-dracula}" +ME_CONFIG_MONGODB_URL="${ME_CONFIG_MONGODB_URL:-mongodb://127.0.0.1:27017}" +ME_CONFIG_MONGODB_ENABLE_ADMIN="${ME_CONFIG_MONGODB_ENABLE_ADMIN:-true}" +ME_CONFIG_BASICAUTH_USERNAME="${ME_CONFIG_BASICAUTH_USERNAME:-}" +ME_CONFIG_BASICAUTH_PASSWORD="${ME_CONFIG_BASICAUTH_PASSWORD:-}" +ME_CONFIG_BASICAUTH_USERNAME_FILE="${ME_CONFIG_BASICAUTH_USERNAME_FILE:-}" +ME_CONFIG_BASICAUTH_PASSWORD_FILE="${ME_CONFIG_BASICAUTH_PASSWORD_FILE:-}" +ME_CONFIG_MONGODB_ADMINUSERNAME_FILE="${ME_CONFIG_MONGODB_ADMINUSERNAME_FILE:-}" +ME_CONFIG_MONGODB_ADMINPASSWORD_FILE="${ME_CONFIG_MONGODB_ADMINPASSWORD_FILE:-}" +ME_CONFIG_MONGODB_AUTH_USERNAME_FILE="${ME_CONFIG_MONGODB_AUTH_USERNAME_FILE:-}" +ME_CONFIG_MONGODB_AUTH_PASSWORD_FILE="${ME_CONFIG_MONGODB_AUTH_PASSWORD_FILE:-}" +ME_CONFIG_MONGODB_CA_FILE="${ME_CONFIG_MONGODB_CA_FILE:-}" +VCAP_APP_HOST="${VCAP_APP_HOST:-0.0.0.0}" +VCAP_APP_PORT="${VCAP_APP_PORT:-19054}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/networking.sh b/rootfs/usr/local/etc/docker/env/networking.sh new file mode 100644 index 0000000..4b5fdba --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/networking.sh @@ -0,0 +1,9 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# networing info +DOMAINNAME="${DOMAINNAME:-}" +EMAIL_RELAY="${EMAIL_RELAY:-}" +HOSTNAME="${HOSTNAME:-casjaysdev-GEN_SCRIPT_REPLACE_APPNAME}" +EMAIL_DOMAIN="${EMAIL_DOMAIN:-${DOMAINNAME:-$HOSTNAME}}" +FULL_DOMAIN_NAME="${FULL_DOMAIN_NAME:-${DOMAINNAME:-$HOSTNAME}}" +SERVER_ADMIN="${SERVER_ADMIN:-root@${EMAIL_DOMAIN:-$DOMAINNAME}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/other.sh b/rootfs/usr/local/etc/docker/env/other.sh new file mode 100644 index 0000000..1a59689 --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/other.sh @@ -0,0 +1,4 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# other + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/php.sh b/rootfs/usr/local/etc/docker/env/php.sh new file mode 100644 index 0000000..a005543 --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/php.sh @@ -0,0 +1,6 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# php settings +PHP_VERSION="${PHP_VERSION//php/}" +PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}" +PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/postgres.sh b/rootfs/usr/local/etc/docker/env/postgres.sh new file mode 100644 index 0000000..114a37e --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/postgres.sh @@ -0,0 +1,8 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# postgresql env +PGDATA="${DATABASE_DIR_PGSQL:-/dat/db/pgsql}" +DATABASE_DIR_PGSQL="${DATABASE_DIR_PGSQL:-$PGDATA}" +POSTGRES_USER="${DATABASE_USER_ROOT:-$POSTGRES_USER}" +POSTGRES_PASSWORD="${DATABASE_PASS_ROOT:-$POSTGRES_PASSWORD}" +POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/redis.sh b/rootfs/usr/local/etc/docker/env/redis.sh new file mode 100644 index 0000000..805a14d --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/redis.sh @@ -0,0 +1,4 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# redis env +DATABASE_DIR_REDIS="${DATABASE_DIR_REDIS:-/data/db/redis}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/services.sh b/rootfs/usr/local/etc/docker/env/services.sh new file mode 100644 index 0000000..e330031 --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/services.sh @@ -0,0 +1,7 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# services/ports +ENV_PORTS="${ENV_PORTS:-}" +SERVICE_PORT="${SERVICE_PORT:-$PORT}" +WEB_SERVER_PORTS="${WEB_SERVER_PORTS:-}" +SERVICES_LIST="${PROCS_LIST:-$SERVICES_LIST} " +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/ssl.sh b/rootfs/usr/local/etc/docker/env/ssl.sh new file mode 100644 index 0000000..78b1686 --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/ssl.sh @@ -0,0 +1,19 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# ssl server settings +SSL_ENABLED="${SSL_ENABLED:-false}" +SSL_DIR="${SSL_CONTAINER_DIR:-/config/ssl}" +SSL_DIR="${SSL_DIR:-$SSL_DIR}" +SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}" +SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}" +SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# certificate settings +RSA="${RSA:-4096}" +STATE="${STATE:-NY}" +CITY="${CITY:-Albany}" +COUNTRY="${COUNTRY:-US}" +UNIT="${UNIT:-CasjaysDev}" +ORG="${ORG:-"Casjays Developments"}" +DAYS_VALID="${DAYS_VALID:-3650}" +CN="${CN:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/supabase.sh b/rootfs/usr/local/etc/docker/env/supabase.sh new file mode 100644 index 0000000..f25a9ca --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/supabase.sh @@ -0,0 +1,4 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Supabase +DATABASE_DIR_SUPABASE="${DATABASE_DIR_SUPABASE:-/data/db/supabase}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/webservers.sh b/rootfs/usr/local/etc/docker/env/webservers.sh new file mode 100644 index 0000000..15ba1af --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/webservers.sh @@ -0,0 +1,8 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# web server configs +HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}" +NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}" +CADDY_CONFIG_FILE="${CHEROKEE_CONFIG_FILE:-$(__find_caddy_conf)}" +LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}" +CHEROKEE_CONFIG_FILE="${CHEROKEE_CONFIG_FILE:-$(__find_cherokee_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/env/zz-entrypoint.sh b/rootfs/usr/local/etc/docker/env/zz-entrypoint.sh new file mode 100644 index 0000000..cc9505b --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/zz-entrypoint.sh @@ -0,0 +1,21 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# File locations +ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}" +ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}" +ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}" +ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Startup variables +INIT_DATE="${INIT_DATE:-$(date)}" +START_SERVICES="${START_SERVICES:-yes}" +ENTRYPOINT_MESSAGE="${ENTRYPOINT_MESSAGE:-yes}" +ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}" +DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-false}" +CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-false}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Check if this is a new container +[ -f "$ENTRYPOINT_PID_FILE" ] && START_SERVICES="no" +[ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && ENTRYPOINT_FIRST_RUN="no" +[ -f "$ENTRYPOINT_DATA_INIT_FILE" ] && DATA_DIR_INITIALIZED="true" +[ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ] && CONFIG_DIR_INITIALIZED="true" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/functions/entrypoint.sh b/rootfs/usr/local/etc/docker/functions/entrypoint.sh new file mode 100644 index 0000000..66d833a --- /dev/null +++ b/rootfs/usr/local/etc/docker/functions/entrypoint.sh @@ -0,0 +1,402 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__rm() { [ -f "$1" ] && rm -Rf "${1:?}"; } +__cd() { [ -d "$1" ] && builtin cd "$1" || return 1; } +__netstat() { [ -f "$(type -P netstat)" ] && netstat "$@" || return 10; } +__is_dir_empty() { [ "$(ls -A "$1" 2>/dev/null | wc -l)" -ne 0 ] || return 1; } +__curl() { curl -q -sfI --max-time 3 -k -o /dev/null "$@" &>/dev/null || return 10; } +__find() { find "$1" -mindepth 1 -type ${2:-f,d} 2>/dev/null | grep '^' || return 10; } +__no_exit() { exec /bin/sh -c "trap : TERM INT; (while true; do tail -qf /data/logs/entrypoint.log /data/logs/*/*log 2>/dev/null||sleep 20; done) & wait"; } +__pcheck() { [ -n "$(which pgrep 2>/dev/null)" ] && pgrep -o "$1" &>/dev/null || return 10; } +__ps() { [ -f "$(type -P ps)" ] && ps "$@" 2>/dev/null | grep -Fw " ${1:-$GEN_SCRIPT_REPLACE_APPNAME}" || return 10; } +__pgrep() { __pcheck "${1:-GEN_SCRIPT_REPLACE_APPNAME}" || __ps "${1:-$GEN_SCRIPT_REPLACE_APPNAME}" | grep -qv ' grep' || return 10; } +__get_ip6() { ip a 2>/dev/null | grep -w 'inet6' | awk '{print $2}' | grep -vE '^::1|^fe' | sed 's|/.*||g' | head -n1 | grep '^' || echo ''; } +__get_ip4() { ip a 2>/dev/null | grep -w 'inet' | awk '{print $2}' | grep -vE '^127.0.0' | sed 's|/.*||g' | head -n1 | grep '^' || echo '127.0.0.1'; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__find_php_bin() { find -L '/usr'/*bin -maxdepth 4 -name 'php-fpm*' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_php_ini() { find -L '/etc' -maxdepth 4 -name 'php.ini' 2>/dev/null | head -n1 | sed 's|/php.ini||g' | grep '^' || echo ''; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__find_nginx_conf() { find -L '/etc' -maxdepth 4 -name 'nginx.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_lighttpd_conf() { find -L '/etc' -maxdepth 4 -type f -iname 'lighttpd.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_cherokee_conf() { find -L '/etc' -maxdepth 4 -type f -iname 'cherokee.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_caddy_conf() { find -L '/etc' -maxdepth 4 -type f -iname 'caddy.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_httpd_conf() { find -L '/etc' -maxdepth 4 -type f -iname 'httpd.conf' -o -iname 'apache2.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__find_mysql_conf() { find -L '/etc' -maxdepth 4 -type f -name 'my.cnf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_pgsql_conf() { find -L '/var/lib' '/etc' -maxdepth 8 -type f -name 'postgresql.conf' 2>/dev/null | head -n1 | grep '^' || echo ''; } +__find_mongodb_conf() { return; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__random_password() { cat "/dev/urandom" | tr -dc '[0-9][a-z][A-Z]@$' | head -c${1:-14} && echo ""; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__update_ssl_certs() { + [ -f "/config/env/ssl.sh" ] && . "/config/env/ssl.sh" + if [ -f "$SSL_CERT" ] && [ -f "$SSL_KEY" ]; then + mkdir -p /etc/ssl + [ -f "$SSL_CA" ] && cp -Rf "$SSL_CA" "/etc/ssl/$SSL_CA" + [ -f "$SSL_KEY" ] && cp -Rf "$SSL_KEY" "/etc/ssl/$SSL_KEY" + [ -f "$SSL_CERT" ] && cp -Rf "$SSL_CERT" "/etc/ssl/$SSL_CERT" + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__certbot() { + local statusCode=0 + [ -n "$(type -P 'certbot')" ] || return 1 + if [ -f "/config/certbot/env.sh" ]; then + . "/config/certbot/env.sh" + fi + if [ -f "/config/certbot/setup.sh" ]; then + eval "/config/certbot/setup.sh" + statusCode=$? + elif [ -f "/etc/named/certbot.sh" ]; then + eval "/etc/named/certbot.sh" + statusCode=$? + elif [ -f "/config/named/certbot-update.conf" ]; then + if certbot renew -n --dry-run --agree-tos --expand --dns-rfc2136 --dns-rfc2136-credentials /config/named/certbot-update.conf; then + certbot renew -n --agree-tos --expand --dns-rfc2136 --dns-rfc2136-credentials /config/named/certbot-update.conf + fi + statusCode=$? + else + local options="${1:-create}" && shift 1 + domain_list="$DOMAINNAME www.$DOMAINNAME mail.$DOMAINNAME $CERTBOT_DOMAINS" + [ -f "/config/env/ssl.sh" ] && . "/config/env/ssl.sh" + [ "$SSL_CERT_BOT" = "true" ] || { export SSL_CERT_BOT="" && return 10; } + [ -n "$CERT_BOT_MAIL" ] || echo "The variable CERT_BOT_MAIL is not set" && return 1 + [ -n "$DOMAINNAME" ] || echo "The variable DOMAINNAME is not set" && return 1 + for domain in $$CERTBOT_DOMAINS; do + [ -n "$domain" ] && ADD_CERTBOT_DOMAINS="-d $domain " + done + certbot $options --agree-tos -m $CERT_BOT_MAIL certonly --webroot \ + -w "${WWW_ROOT_DIR:-/data/htdocs/www}" $ADD_CERTBOT_DOMAINS \ + --key-path "$SSL_KEY" --fullchain-path "$SSL_CERT" + statusCode=$? + fi + [ $statusCode -eq 0 ] && __update_ssl_certs + return $statusCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__create_ssl_cert() { + if ! __certbot create; then + [ -f "/config/env/ssl.sh" ] && . "/config/env/ssl.sh" + [ -n "$SSL_DIR" ] || { echo "SSL_DIR is unset" && return 1; } + [ -d "$SSL_DIR" ] || mkdir -p "$SSL_DIR" + if [ -n "$FORCE_SSL" ] || [ ! -f "$SSL_CERT" ] || [ ! -f "$SSL_KEY" ]; then + echo "Setting Country to $COUNTRY and Setting State/Province to $STATE and Setting City to $CITY" + echo "Setting OU to $UNIT and Setting ORG to $ORG and Setting server to $CN" + echo "All variables can be overwritten by creating a /config/.ssl.env and setting the variables there" + echo "Creating ssl key and certificate in $SSL_DIR and will be valid for $((VALID_FOR / 365)) year[s]" + # + openssl req \ + -new \ + -newkey rsa:$RSA \ + -days $VALID_FOR \ + -nodes \ + -x509 \ + -subj "/C=${COUNTRY// /\\ }/ST=${STATE// /\\ }/L=${CITY// /\\ }/O=${ORG// /\\ }/OU=${UNIT// /\\ }/CN=${CN// /\\ }" \ + -keyout "$SSL_KEY" \ + -out "$SSL_CERT" + fi + fi + if [ -f "$SSL_CERT" ] && [ -f "$SSL_KEY" ]; then + __update_ssl_certs + return 0 + else + return 2 + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_apache() { + local etc_dir="" conf_dir="" conf_dir="" www_dir="" apache_bin="" + etc_dir="/etc/${1:-apache2}" + conf_dir="/config/${1:-apache2}" + www_dir="${WWW_ROOT_DIR:-/data/htdocs}" + apache_bin="$(type -P 'httpd' || type -P 'apache2')" + # + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_nginx() { + local etc_dir="" conf_dir="" www_dir="" nginx_bin="" + etc_dir="/etc/${1:-nginx}" + conf_dir="/config/${1:-nginx}" + www_dir="${WWW_ROOT_DIR:-/data/htdocs}" + nginx_bin="$(type -P 'nginx')" + # + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_php() { + local etc_dir="/etc/${1:-php}" + local conf_dir="/config/${1:-php}" + local php_bin="${PHP_BIN_DIR:-$(__find_php_bin)}" + # + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_mysql() { + local db_dir="" etc_dir="" db_user="" conf_dir="" user_pass="" user_db="" root_pass="" mysqld_bin="" + db_dir="/data/db/mysql" + etc_dir="${home:-/etc/${1:-mysql}}" + db_user="${SERVICE_USER:-mysql}" + conf_dir="/config/${1:-mysql}" + user_pass="${MARIADB_PASSWORD:-$MARIADB_ROOT_PASSWORD}" + user_db="${MARIADB_DATABASE}" user_name="${MARIADB_USER:-root}" + root_pass="$MARIADB_ROOT_PASSWORD" + mysqld_bin="$(type -P 'mysqld')" + # + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_mongodb() { + local home="${MONGODB_CONFIG_FILE:-$(__find_mongodb_conf)}" + local user_pass="${MONGO_INITDB_ROOT_PASSWORD:-$_ROOT_PASSWORD}" + local user_name="${INITDB_ROOT_USERNAME:-root}" + # + return +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_postgres() { + local home="${PGSQL_CONFIG_FILE:-$(__find_pgsql_conf)}" + local user_pass="${POSTGRES_PASSWORD:-$POSTGRES_ROOT_PASSWORD}" + local user_name="${POSTGRES_USER:-root}" + # + return +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__init_couchdb() { + local home="${PGSQL_CONFIG_FILE:-$(__find_pgsql_conf)}" + local user_pass="${COUCHDB_PASSWORD:-$SET_RANDOM_PASS}" + local user_name="${COUCHDB_USER:-root}" + # + return +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Show available init functions +__init_help() { + echo ' +__certbot +__update_ssl_certs +__create_ssl_cert +' + return +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__run_once() { + if [ "$CONFIG_DIR_INITIALIZED" = "false" ] || [ "$DATA_DIR_INITIALIZED" = "false" ] || [ ! -f "/config/.docker_has_run" ]; then + return 0 + else + return 1 + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# run program ever n minutes +__cron() { + trap '[ -f "/run/cron/$cmd" ] && rm -Rf "/run/cron/$cmd";exit 0' SIGINT ERR EXIT + test -n "$1" && test -z "${1//[0-9]/}" && interval=$(($1 * 60)) && shift 1 || interval="5" + [ $# -eq 0 ] && echo "Usage: cron [interval] [command]" && exit 1 + command="$*" + cmd="$(echo "$command" | awk -F' ' '{print $1}')" + [ -d "/run/cron" ] || mkdir -p "/run/cron" + echo "$command" >"/run/cron/$cmd" + while :; do + eval "$command" + sleep $interval + [ -f "/run/cron/$cmd" ] || break + done |& tee /data/logs/entrypoint.log +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__replace() { + [ -f "$3" ] || return + grep -s -q "$1" "$3" &>/dev/null || return + sed -i 's|'$1'|'$2'|g' "$3" &>/dev/null + grep -s -q "$2" "$3" && printf '%s\n' "Changed $1 to $2 in $3" && return 0 || { + printf '%s\n' "Failed to change $1 in $3" && return 10 + } +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__file_copy() { + [ -e "$1" ] || return + [ -n "$1" ] && [ -n "$2" ] && [ -e "$1" ] && cp -Rf "$1" "$2" &>/dev/null + [ -e "$1" ] && [ -e "$2" ] && printf '%s\n' "Copied: $1 > $2" && return 0 || { + printf '%s\n' "Copy failed: $1 < $2" + return 1 + } +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__create_service_user() { + local create_user="$1" create_gid="$1" + local create_home_dir="/opt/$create_user" set_home_dir="" + [ "$ENTRYPOINT_FIRST_RUN" = "no" ] || return 0 + [ -n "$SERVICE_USER" ] || [ "$SERVICE_USER" != "root" ] || return 0 + if ! grep -q "$create_user" "/etc/passwd"; then + echo "creating system user $create_user" + addgroup -g ${create_gid} -S $create_user &>/dev/null + adduser -u ${create_gid} -D -h "$create_home_dir" -g $create_user $create_user &>/dev/null + grep -q "$create_user" "/etc/passwd" "/etc/groups" && set_home_dir="$home_dir" && exitStatus=0 || exitStatus=0 + fi + WORKDIR="${set_home_dir:-}" +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__create_env() { + local dir="" + local envStatus=0 + local envFile=("${@:-}") + local sample_file="/usr/local/etc/docker/env/default.sample" + [ -f "$sample_file" ] || return 0 + for create_env in "/usr/local/etc/docker/env/default.sh" "${envFile[@]}"; do + dir="$(dirname "$create_env")" + [ -d "$dir" ] || mkdir -p "$dir" + if [ -n "$create_env" ] && [ ! -f "$create_env" ]; then + cat </dev/null +$(<"$sample_file") +EOF + fi + [ -f "$create_env" ] || envStatus=$((1 + envStatus)) + done + rm -f "$sample_file" + return $envStatus +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__exec_command() { + local exitCode=0 prog="" + local cmdExec="${*:-bash -l}" + prog="$(type -P "${1:-bash}" 2>/dev/null)" + if [ -f "$prog" ]; then + echo "${exec_message:-Executing command: $cmdExec}" + eval $cmdExec || exitCode=1 + [ "$exitCode" = 0 ] || exitCode=10 + elif [ -f "$prog" ] && [ ! -x "$prog" ]; then + echo "$prog is not executable" + exitCode=4 + else + echo "$prog does not exist" + exitCode=5 + fi + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Setup the server init scripts +__start_init_scripts() { + { [ "$1" = "" ] && shift 1; } || { [ "$1" = " " ] && shift 1; } + [ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail + local basename="" + local init_pids="" + local init_dir="${1:-/usr/local/etc/docker/init.d}" + mkdir -p "/tmp" "/run" "/run/init.d" + chmod -R 777 "/tmp" "/run" "/run/init.d" + if [ -d "$init_dir" ]; then + chmod -Rf 755 "$init_dir/" + [ -f "$init_dir/service.sample" ] && rm -Rf "$init_dir/service.sample" + for init in "$init_dir"/*.sh; do + if [ -f "$init" ]; then + name="$(basename "$init")" + (eval "$init" &) + initStatus=$(($? + initStatus)) + sleep 10 + echo "" + fi + done + fi +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +__setup_mta() { + local exitCode=0 + local relay_port="${EMAIL_RELAY//*:/}" + local relay_server="${EMAIL_RELAY//:*/}" + local local_hostname="${FULL_DOMAIN_NAME:-}" + local account_user="${SERVER_ADMIN//@*/}" + local account_domain="${EMAIL_DOMAIN//*@/}" + echo "$EMAIL_RELAY" | grep '[0-9][0-9]' || relay_port="465" + + ################# sSMTP relay setup + if [ -n "$(type -P 'ssmtp')" ] || [ -d "/etc/ssmtp" ] || [ -d "/config/ssmtp" ]; then + [ -d "/config/ssmtp" ] || mkdir -p "/config/ssmtp" + [ -f "/etc/ssmtp/ssmtp.conf" ] && rm -Rf "/etc/ssmtp/ssmtp.conf" + if [ ! -f "/config/ssmtp/ssmtp.conf" ]; then + cat </dev/null +# ssmtp configuration. +root=${account_user:-root}@${account_domain:-$HOSTNAME} +mailhub=${relay_server:-172.17.0.1}:$relay_port +rewriteDomain=$local_hostname +hostname=$local_hostname +TLS_CA_FILE=/etc/ssl/certs/ca-certificates.crt +UseTLS=Yes +UseSTARTTLS=No +AuthMethod=LOGIN +FromLineOverride=yes +#AuthUser=username +#AuthPass=password + +EOF + fi + if [ -f "/config/ssmtp/ssmtp.conf" ]; then + cp -Rf "/config/ssmtp/." "/etc/ssmtp/" + fi + + ################# postfix relay setup + elif [ -n "$(type -P 'postfix')" ] || [ -d "/config/postfix" ] || [ -d "/etc/postfix" ]; then + [ -d "/etc/postfix" ] || mkdir -p "/etc/postfix" + [ -f "/etc/postfix/main.cf" ] && rm -Rf "/etc/postfix/main.cf" + if [ ! -f "/config/postfix/main.cf" ]; then + cat </dev/null +# postfix configuration. +smtpd_banner = \$myhostname ESMTP email server +compatibility_level = 2 +alias_maps = hash:/etc/postfix/aliases +alias_database = hash:/etc/postfix/aliases +mynetworks = /etc/postfix/mynetworks +transport_maps = hash:/etc/postfix/transport +virtual_alias_maps = hash:/etc/postfix/virtual +relay_domains = hash:/etc/postfix/mydomains, regexp:/etc/postfix/mydomains.pcre +tls_random_source = dev:/dev/urandom +smtp_use_tls = yes +smtpd_use_tls = yes +smtpd_tls_session_cache_database = btree:/etc/postfix/smtpd_scache +smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA, KRB5-DES, CBC3-SHA +smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination +mydestination = +inet_interfaces = all +append_dot_mydomain = yes +myorigin = $local_hostname +myhostname = $local_hostname +local_transport=error: local delivery disabled +relayhost = [$relay_server]:$relay_port +inet_protocols = ipv4 + +EOF + fi + touch "/config/postfix/aliases" "/config/postfix/mynetworks" "/config/postfix/transport" + touch "/config/postfix/mydomains.pcre" "/config/postfix/mydomains" "/config/postfix/virtual" + if [ -f "/config/postfix/main.cf" ] && [ ! -f "/run/init.d/postfix.pid" ]; then + SERVICES_LIST+="postfix " + cp -Rf "/config/postfix/." "/etc/postfix/" + postmap "/etc/postfix/aliases" "/etc/postfix/mynetworks" "/etc/postfix/transport" &>/dev/null + postmap "/etc/postfix/mydomains.pcre" "/etc/postfix/mydomains" "/etc/postfix/virtual" &>/dev/null + __exec_command postfix "/etc/postfix/main.cf" & + [ $? -eq 0 ] && touch "/run/init.d/postfix.pid" || exitCode=1 + fi + fi + [ -f "/root/dead.letter" ] && rm -Rf "/root/dead.letter" + return $exitCode +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# set variables from function calls +SET_RANDOM_PASS="${SET_RANDOM_PASS:-$(__random_password 14)}" +CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$(__get_ip4)}" +CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}" +PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}" +PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}" +HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}" +NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}" +LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}" +MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}" +POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# export variables + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# export the functions + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# end of functions diff --git a/rootfs/usr/local/etc/docker/init.d/zz-caddy.sh b/rootfs/usr/local/etc/docker/init.d/zz-caddy.sh new file mode 100755 index 0000000..5a21dc5 --- /dev/null +++ b/rootfs/usr/local/etc/docker/init.d/zz-caddy.sh @@ -0,0 +1,178 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html +SCRIPT_NAME="$(basename "$0" 2>/dev/null)" +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# run trap command on exit +trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "true" ] && [ -f "/run/init.d/$EXEC_CMD_BIN.pid" ] && rm -Rf "/run/init.d/$EXEC_CMD_BIN.pid";exit $retVal' SIGINT SIGTERM EXIT +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import the functions file +if [ -f "/usr/local/etc/docker/functions/entrypoint.sh" ]; then + . "/usr/local/etc/docker/functions/entrypoint.sh" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import variables +for set_env in "/root/env.sh" "/usr/local/etc/docker/env"/*.sh "/config/env"/*.sh; do + [ -f "$set_env" ] && . "$set_env" +done +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Custom functions + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# execute command variables +WORKDIR="" # set working directory +SERVICE_UID="0" # set the user id +SERVICE_USER="root" # execute command as another user +SERVICE_PORT="" # port which service is listening on +EXEC_CMD_BIN="caddy" # command to execute +EXEC_CMD_ARGS="run --config /etc/caddy/Caddyfile" # command arguments +PRE_EXEC_MESSAGE="" # Show message before execute +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Other variables that are needed +etc_dir="/etc/caddy" +conf_dir="/config/caddy" +www_dir="${WWW_ROOT_DIR:-/data/htdocs}" +caddy_bin="$(type -P 'caddy' || type -P 'Caddy')" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# use this function to update config files - IE: change port +__update_conf_files() { + echo "Initializing caddy web server in $conf_dir" + [ -d "$etc_dir" ] || mkdir -p "$etc_dir" + [ -d "$conf_dir" ] && cp -Rf "$conf_dir/." "$etc_dir/" + [ -f "$etc_dir/Caddyfile" ] && rm -Rf "$etc_dir/Caddyfile" + # + [ -d "/data/logs/caddy" ] || mkdir -p "/data/logs/caddy" + chmod -Rf 777 "/data/logs/caddy" + # + [ -d "$www_dir" ] || mkdir -p "$www_dir" + [ -d "$www_dir/www/health" ] || mkdir -p "$www_dir/www/health" + [ -f "$www_dir/www/health/index.txt" ] || echo 'ok' >"$www_dir/www/health/index.txt" + [ -f "$www_dir/www/health/index.json" ] || echo '{ "status": "ok" }' >"$www_dir/www/health/index.json" + # + __replace "REPLACE_SERVER_PORT" "${SERVICE_PORT:-80}" "$etc_dir/Caddyfile" + __replace "REPLACE_SERVER_NAME" "${SERVER_NAME:-$HOSTNAME}" "$etc_dir/Caddyfile" + __replace "REPLACE_SERVER_ADMIN" "${SERVER_ADMIN:-root@$SERVER_NAME}" "$etc_dir/Caddyfile" + [ -f "$www_dir/www/index.php" ] && __replace "REPLACE_SERVER_SOFTWARE" "caddy" "$www_dir/www/index.php" + [ -f "$www_dir/www/index.html" ] && __replace "REPLACE_SERVER_SOFTWARE" "caddy" "$www_dir/www/index.html" + if [ -z "$PHP_BIN_DIR" ]; then + [ -f "$www_dir/www/info.php" ] && echo "PHP support is not enabled" >"$www_dir/www/info.php" + [ -f "$etc_dir/conf.d/php-fpm.conf" ] && echo "# PHP support is not enabled" >"$etc_dir/conf.d/php-fpm.conf" + fi + + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# use this function to setup ssl support +__update_ssl_conf() { + + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# function to run before executing +__pre_execute() { + + return 0 +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# script to start server +__run_start_script() { + local workdir="${WORKDIR:-$HOME}" + local cmd="$EXEC_CMD_BIN $EXEC_CMD_ARGS" + local user="${SERVICE_USER:-root}" + local lc_type="${LC_ALL:-${LC_CTYPE:-$LANG}}" + local home="${workdir//\/root/\/home\/docker}" + local path="/usr/local/bin:/usr/bin:/bin:/usr/sbin" + case "$1" in + check) shift 1 && __pgrep $EXEC_CMD_BIN || return 5 ;; + *) su_cmd env -i PWD="$home" HOME="$home" LC_CTYPE="$lc_type" PATH="$path" USER="$user" sh -c "$cmd" || return 10 ;; + esac +} +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# process check functions +__pcheck() { [ -n "$(type -P pgrep 2>/dev/null)" ] && pgrep -x "$1" &>/dev/null && return 0 || return 10; } +__pgrep() { __pcheck "${1:-EXEC_CMD_BIN}" || __ps aux 2>/dev/null | grep -Fw " ${1:-$EXEC_CMD_BIN}" | grep -qv ' grep' | grep '^' && return 0 || return 10; } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Allow ENV_ variable +[ -f "/config/env/$EXEC_CMD_BIN.sh" ] && "/config/env/$EXEC_CMD_BIN.sh" # Import env file +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +WORKDIR="${ENV_WORKDIR:-$WORKDIR}" # change to directory +SERVICE_USER="${ENV_SERVICE_USER:-$SERVICE_USER}" # execute command as another user +SERVICE_UID="${ENV_SERVICE_UID:-$SERVICE_UID}" # set the user id +SERVICE_PORT="${ENV_SERVICE_PORT:-$SERVICE_PORT}" # port which service is listening on +EXEC_CMD_BIN="${ENV_EXEC_CMD_BIN:-$EXEC_CMD_BIN}" # command to execute +EXEC_CMD_ARGS="${ENV_EXEC_CMD_ARGS:-$EXEC_CMD_ARGS}" # command arguments +PRE_EXEC_MESSAGE="${ENV_PRE_EXEC_MESSAGE:-$PRE_EXEC_MESSAGE}" # Show message before execute +SERVICE_EXIT_CODE=0 # default exit code +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +printf '%s\n' "# - - - Attempting to start $EXEC_CMD_BIN - - - #" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# ensure the command exists +if [ ! -f "$(type -P "$EXEC_CMD_BIN")" ] && [ -z "$EXEC_CMD_BIN" ]; then + echo "$EXEC_CMD_BIN is not a valid command" + exit 2 +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# check if process is already running +if __pgrep "$EXEC_CMD_BIN"; then + SERVICE_IS_RUNNING="true" + echo "$EXEC_CMD_BIN is running" + exit 0 +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# show message if env exists +if [ -n "$EXEC_CMD_BIN" ]; then + [ -n "$SERVICE_USER" ] && echo "Setting up service to run as $SERVICE_USER" + [ -n "$SERVICE_PORT" ] && echo "$EXEC_CMD_BIN will be running on $SERVICE_PORT" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Change to working directory +[ -n "$WORKDIR" ] && mkdir -p "$WORKDIR" && __cd "$WORKDIR" && echo "Changed to $PWD" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Initialize ssl +__update_ssl_conf +__update_ssl_certs +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Updating config files +__update_conf_files +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# run the pre execute commands +[ -n "$PRE_EXEC_MESSAGE" ] && echo "$PRE_EXEC_MESSAGE" +__pre_execute +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +WORKDIR="${WORKDIR:-}" +if [ "$SERVICE_USER" = "root" ] || [ -z "$SERVICE_USER" ]; then + su_cmd() { eval "$@" || return 1; } +elif [ "$(builtin type -P gosu)" ]; then + su_cmd() { gosu $SERVICE_USER "$@" || return 1; } +elif [ "$(builtin type -P runuser)" ]; then + su_cmd() { runuser -u $SERVICE_USER "$@" || return 1; } +elif [ "$(builtin type -P sudo)" ]; then + su_cmd() { sudo -u $SERVICE_USER "$@" || return 1; } +elif [ "$(builtin type -P su)" ]; then + su_cmd() { su -s /bin/sh - $SERVICE_USER -c "$@" || return 1; } +else + echo "Can not switch to $SERVICE_USER: attempting to run as root" + su_cmd() { eval "$@" || return 1; } +fi +if [ -n "$WORKDIR" ] && [ "${SERVICE_USER:-$USER}" != "root" ]; then + echo "Fixing file permissions" + su_cmd chown -Rf $SERVICE_USER $WORKDIR $etc_dir $var_dir $log_dir +fi +if __pgrep $EXEC_CMD_BIN && [ -f "/run/init.d/$EXEC_CMD_BIN.pid" ]; then + SERVICE_EXIT_CODE=1 + echo "$EXEC_CMD_BIN" is already running +else + echo "Starting service: $EXEC_CMD_BIN $EXEC_CMD_ARGS" + su_cmd touch /run/init.d/$EXEC_CMD_BIN.pid + __run_start_script "$@" |& tee -a "/tmp/entrypoint.log" + if [ "$?" -ne 0 ]; then + echo "Failed to execute: $EXEC_CMD_BIN $EXEC_CMD_ARGS" + SERVICE_EXIT_CODE=10 SERVICE_IS_RUNNING="false" + su_cmd rm -Rf "/run/init.d/$EXEC_CMD_BIN.pid" + fi +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +exit $SERVICE_EXIT_CODE diff --git a/rootfs/usr/local/share/template-files/config/.gitkeep b/rootfs/usr/local/share/template-files/config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/usr/local/share/template-files/config/caddy/Caddyfile b/rootfs/usr/local/share/template-files/config/caddy/Caddyfile index 3c66061..b53efd6 100644 --- a/rootfs/usr/local/share/template-files/config/caddy/Caddyfile +++ b/rootfs/usr/local/share/template-files/config/caddy/Caddyfile @@ -1,7 +1,7 @@ -:80 { +:REPLACE_SERVER_PORT { root * /data/htdocs/www file_server #reverse_proxy localhost:8080 - php_fastcgi localhost:9000 + #php_fastcgi localhost:9000 } diff --git a/rootfs/usr/local/share/template-files/config/env/default.sample b/rootfs/usr/local/share/template-files/config/env/default.sample new file mode 100644 index 0000000..fdf191e --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/env/default.sample @@ -0,0 +1,129 @@ +#!/usr/bin/env bash +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Set bash options +[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS || set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# import the functions file +if [ -f "/usr/local/etc/docker/functions/entrypoint.sh" ]; then + . "/usr/local/etc/docker/functions/entrypoint.sh" +fi +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# GLOBAL enviroment variables +USER="${USER:-root}" +LANG="${LANG:-C.UTF-8}" +TZ="${TZ:-America/New_York}" +SERVICE_USER="${SERVICE_USER:-root}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# directory settings +BACKUP_DIR="${BACKUP_DIR:-/data/backups}" +WWW_ROOT_DIR="${WWW_ROOT_DIR:-/data/htdocs}" +LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}" +DATABASE_BASE_DIR="${DATABASE_BASE_DIR:-/data/db}" +DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}" +DEFAULT_CONF_DIR="${DEFAULT_CONF_DIR:-/usr/local/share/template-files/config}" +DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/defaults}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# healthcheck +HEALTH_ENABLED="${HEALTH_ENABLED:-}" +HEALTH_URL="${HEALTH_URL:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# php settings +PHP_VERSION="${PHP_VERSION//php/}" +PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}" +PHP_BIN_DIR="${PHP_BIN_DIR:-$(__find_php_bin)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# services/ports +ENV_PORTS="${ENV_PORTS:-}" +SERVICE_PORT="${SERVICE_PORT:-$PORT}" +WEB_SERVER_PORTS="${WEB_SERVER_PORTS:-}" +SERVICES_LIST="${PROCS_LIST:-$SERVICES_LIST} " +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# networing info +HOSTNAME="${HOSTNAME:-casjaysdev-GEN_SCRIPT_REPLACE_APPNAME}" +DOMAINNAME="${DOMAINNAME:-}" +FULL_DOMAIN_NAME="${FULL_DOMAIN_NAME:-${DOMAINNAME:-$HOSTNAME}}" +SERVER_ADMIN="${SERVER_ADMIN:-root@${EMAIL_DOMAIN:-$DOMAINNAME}}" +EMAIL_RELAY="${EMAIL_RELAY:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# get ip addresses +CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS:-$(__get_ip4)}" +CONTAINER_IP6_ADDRESS="${CONTAINER_IP6_ADDRESS:-$(__get_ip6)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# cerbot +SSL_CERT_BOT="${SSL_CERT_BOT:-false}" +CERT_BOT_MAIL="${CERT_BOT_MAIL:-}" +CERTBOT_DOMAINS="${CERTBOT_DOMAINS:-}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# ssl server settings +SSL_ENABLED="${SSL_ENABLED:-false}" +SSL_DIR="${SSL_DIR:-/config/ssl}" +SSL_CA="${SSL_CA:-$SSL_DIR/ca.crt}" +SSL_KEY="${SSL_KEY:-$SSL_DIR/server.key}" +SSL_CERT="${SSL_CERT:-$SSL_DIR/server.crt}" +SSL_CONTAINER_DIR="${SSL_CONTAINER_DIR:-/etc/ssl/CA}" +COUNTRY="${COUNTRY:-US}" +STATE="${STATE:-NY}" +CITY="${CITY:-Albany}" +UNIT="${UNIT:-CasjaysDev}" +ORG="${ORG:-"Casjays Developments"}" +DAYS_VALID="${DAYS_VALID:-3650}" +RSA="${RSA:-4096}" +CN="${CN:-$FULL_DOMAIN_NAME}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# web server configs +HTTPD_CONFIG_FILE="${HTTPD_CONFIG_FILE:-$(__find_httpd_conf)}" +NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}" +LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# redis env + DATABASE_DIR_REDIS="${DATABASE_DIR_REDIS:-$DATABASE_BASE_DIR/redis}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# postgresql env +DATABASE_DIR_PGSQL="${DATABASE_DIR_PGSQL:-$PGDATA}" +PGDATA="${DATABASE_DIR_PGSQL:-$DATABASE_BASE_DIR/pgsql}" +POSTGRES_USER="${DATABASE_USER_ROOT:-$POSTGRES_USER}" +POSTGRES_PASSWORD="${DATABASE_PASS_ROOT:-$POSTGRES_PASSWORD}" +POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# mariadb env +MARIADB_ROOT_HOST="${MARIADB_ROOT_HOST:-%}" +MARIADB_AUTO_UPGRADE="${MARIADB_AUTO_UPGRADE:-yes}" +MARIADB_DATABASE="${DATABASE_CREATE:-$MARIADB_DATABASE}" +MARIADB_USER="${DATABASE_USER_NORMAL:-$MARIADB_USER}" +MARIADB_PASSWORD="${DATABASE_PASS_NORMAL:-$MARIADB_PASSWORD}" +DATABASE_DIR_MARIADB="${DATABASE_DIR_MARIADB:-$DATABASE_BASE_DIR/mysql}" +MARIADB_ROOT_PASSWORD="${DATABASE_PASS_ROOT:-$MARIADB_ROOT_PASSWORD}" +MARIADB_ALLOW_EMPTY_ROOT_PASSWORD="${MARIADB_ALLOW_EMPTY_ROOT_PASSWORD:-}" +MARIADB_INITDB_SKIP_TZINFO="${MARIADB_INITDB_SKIP_TZINFO}:-" +MARIADB_RANDOM_ROOT_PASSWORD="${MARIADB_RANDOM_ROOT_PASSWORD:-}" +MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# mongodb env +NITDB_ROOT_USERNAME="${DATABASE_USER_ROOT:-$NITDB_ROOT_USERNAME}" +DATABASE_DIR_MONGODB="${DATABASE_DIR_MONGODB:-$DATABASE_BASE_DIR/mongodb}" +MONGO_INITDB_ROOT_PASSWORD="${DATABASE_PASS_ROOT:-$MONGO_INITDB_ROOT_PASSWORD}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# couchdb env +NODENAME="${NODENAME:-}" +COUCHDB_USER="${DATABASE_USER_ROOT:-$COUCHDB_USER}" +COUCHDB_PASSWORD="${DATABASE_PASS_ROOT:-$COUCHDB_PASSWORD}" +DATABASE_DIR_COUCHDB="${DATABASE_DIR_COUCHDB:-$DATABASE_BASE_DIR/couchdb}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Supabase +DATABASE_DIR_SUPABASE="${DATABASE_DIR_SUPABASE:-$DATABASE_BASE_DIR/supabase}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# File locations +ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}" +ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}" +ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}" +ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Startup variables +INIT_DATE="${INIT_DATE:-$(date)}" +START_SERVICES="${START_SERVICES:-yes}" +ENTRYPOINT_MESSAGE="${ENTRYPOINT_MESSAGE:-yes}" +ENTRYPOINT_FIRST_RUN="${ENTRYPOINT_FIRST_RUN:-yes}" +DATA_DIR_INITIALIZED="${DATA_DIR_INITIALIZED:-false}" +CONFIG_DIR_INITIALIZED="${CONFIG_DIR_INITIALIZED:-false}" +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/rootfs/usr/local/share/template-files/data/.gitkeep b/rootfs/usr/local/share/template-files/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/usr/local/share/template-files/data/htdocs/www/404.html b/rootfs/usr/local/share/template-files/data/htdocs/www/404.html index c816d6f..3f7b186 100644 --- a/rootfs/usr/local/share/template-files/data/htdocs/www/404.html +++ b/rootfs/usr/local/share/template-files/data/htdocs/www/404.html @@ -20,12 +20,12 @@ - - + - + + @@ -40,17 +40,15 @@ -
+
-

- - 404 Not Found -

-

+ + 404 Not Found +

We apologize but we can't seem to be able to find what you're looking for!

@@ -58,8 +56,8 @@ error
diff --git a/rootfs/usr/local/share/template-files/data/htdocs/www/css/bootstrap.min.css b/rootfs/usr/local/share/template-files/data/htdocs/www/css/bootstrap.css similarity index 67% rename from rootfs/usr/local/share/template-files/data/htdocs/www/css/bootstrap.min.css rename to rootfs/usr/local/share/template-files/data/htdocs/www/css/bootstrap.css index f7f8545..727c7db 100644 --- a/rootfs/usr/local/share/template-files/data/htdocs/www/css/bootstrap.min.css +++ b/rootfs/usr/local/share/template-files/data/htdocs/www/css/bootstrap.css @@ -1,13 +1,13 @@ -/*! - * Bootswatch v5.1.3 - * Homepage: https://bootswatch.com - * Copyright 2012-2021 Thomas Park +@charset "UTF-8"; /*! + * Bootswatch v5.2.3 (https://bootswatch.com) + * Theme: darkly + * Copyright 2012-2022 Thomas Park * Licensed under MIT * Based on Bootstrap */ /*! - * Bootstrap v5.1.3 (https://getbootstrap.com/) - * Copyright 2011-2021 The Bootstrap Authors - * Copyright 2011-2021 Twitter, Inc. + * Bootstrap v5.2.3 (https://getbootstrap.com/) + * Copyright 2011-2022 The Bootstrap Authors + * Copyright 2011-2022 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ @import url(https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap); @@ -22,6 +22,7 @@ --bs-green: #00bc8c; --bs-teal: #20c997; --bs-cyan: #3498db; + --bs-black: #000; --bs-white: #fff; --bs-gray: #888; --bs-gray-dark: #303030; @@ -70,6 +71,20 @@ --bs-body-line-height: 1.5; --bs-body-color: #fff; --bs-body-bg: #222; + --bs-border-width: 1px; + --bs-border-style: solid; + --bs-border-color: #dee2e6; + --bs-border-color-translucent: rgba(0, 0, 0, 0.175); + --bs-border-radius: 0.375rem; + --bs-border-radius-sm: 0.25rem; + --bs-border-radius-lg: 0.5rem; + --bs-border-radius-xl: 1rem; + --bs-border-radius-2xl: 2rem; + --bs-border-radius-pill: 50rem; + --bs-link-color: #00bc8c; + --bs-link-hover-color: #009670; + --bs-code-color: #e83e8c; + --bs-highlight-bg: #fdebd0; } *, ::after, @@ -96,13 +111,10 @@ body { hr { margin: 1rem 0; color: inherit; - background-color: currentColor; border: 0; + border-top: 1px solid; opacity: 0.25; } -hr:not([size]) { - height: 1px; -} .h1, .h2, .h3, @@ -172,7 +184,6 @@ p { margin-top: 0; margin-bottom: 1rem; } -abbr[data-bs-original-title], abbr[title] { -webkit-text-decoration: underline dotted; text-decoration: underline dotted; @@ -221,8 +232,8 @@ small { } .mark, mark { - padding: 0.2em; - background-color: #fcf8e3; + padding: 0.1875em; + background-color: var(--bs-highlight-bg); } sub, sup { @@ -238,11 +249,11 @@ sup { top: -0.5em; } a { - color: #00bc8c; + color: var(--bs-link-color); text-decoration: underline; } a:hover { - color: #009670; + color: var(--bs-link-hover-color); } a:not([href]):not([class]), a:not([href]):not([class]):hover { @@ -255,8 +266,6 @@ pre, samp { font-family: var(--bs-font-monospace); font-size: 1em; - direction: ltr; - unicode-bidi: bidi-override; } pre { display: block; @@ -273,23 +282,22 @@ pre code { } code { font-size: 0.875em; - color: #e83e8c; + color: var(--bs-code-color); word-wrap: break-word; } a > code { color: inherit; } kbd { - padding: 0.2rem 0.4rem; + padding: 0.1875rem 0.375rem; font-size: 0.875em; - color: #fff; - background-color: #222; - border-radius: 0.2rem; + color: var(--bs-body-bg); + background-color: var(--bs-body-color); + border-radius: 0.25rem; } kbd kbd { padding: 0; font-size: 1em; - font-weight: 700; } figure { margin: 0 0 1rem; @@ -354,8 +362,10 @@ select { select:disabled { opacity: 1; } -[list]::-webkit-calendar-picker-indicator { - display: none; +[list]:not([type='date']):not([type='datetime-local']):not([type='month']):not( + [type='week'] + ):not([type='time'])::-webkit-calendar-picker-indicator { + display: none !important; } [type='button'], [type='reset'], @@ -420,13 +430,14 @@ legend + * { ::-webkit-color-swatch-wrapper { padding: 0; } -::file-selector-button { - font: inherit; -} ::-webkit-file-upload-button { font: inherit; -webkit-appearance: button; } +::file-selector-button { + font: inherit; + -webkit-appearance: button; +} output { display: inline-block; } @@ -539,7 +550,7 @@ progress { color: #888; } .blockquote-footer::before { - content: '\2014\00A0'; + content: '— '; } .img-fluid { max-width: 100%; @@ -548,8 +559,8 @@ progress { .img-thumbnail { padding: 0.25rem; background-color: #222; - border: 1px solid #dee2e6; - border-radius: 0.25rem; + border: 1px solid var(--bs-border-color); + border-radius: 0.375rem; max-width: 100%; height: auto; } @@ -571,9 +582,11 @@ progress { .container-sm, .container-xl, .container-xxl { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; width: 100%; - padding-right: var(--bs-gutter-x, 0.75rem); - padding-left: var(--bs-gutter-x, 0.75rem); + padding-right: calc(var(--bs-gutter-x) * 0.5); + padding-left: calc(var(--bs-gutter-x) * 0.5); margin-right: auto; margin-left: auto; } @@ -620,16 +633,13 @@ progress { .row { --bs-gutter-x: 1.5rem; --bs-gutter-y: 0; - display: -ms-flexbox; display: flex; - -ms-flex-wrap: wrap; flex-wrap: wrap; margin-top: calc(-1 * var(--bs-gutter-y)); margin-right: calc(-0.5 * var(--bs-gutter-x)); margin-left: calc(-0.5 * var(--bs-gutter-x)); } .row > * { - -ms-flex-negative: 0; flex-shrink: 0; width: 100%; max-width: 100%; @@ -638,141 +648,120 @@ progress { margin-top: var(--bs-gutter-y); } .col { - -ms-flex: 1 0 0%; flex: 1 0 0%; } .row-cols-auto > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .row-cols-1 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } .row-cols-2 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .row-cols-3 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.3333333333%; } .row-cols-4 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .row-cols-5 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 20%; } .row-cols-6 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.6666666667%; } .col-auto { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .col-1 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 8.333333%; + width: 8.33333333%; } .col-2 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.66666667%; } .col-3 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .col-4 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.33333333%; } .col-5 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 41.666667%; + width: 41.66666667%; } .col-6 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .col-7 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 58.333333%; + width: 58.33333333%; } .col-8 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 66.666667%; + width: 66.66666667%; } .col-9 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 75%; } .col-10 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 83.333333%; + width: 83.33333333%; } .col-11 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 91.666667%; + width: 91.66666667%; } .col-12 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } .offset-1 { - margin-left: 8.333333%; + margin-left: 8.33333333%; } .offset-2 { - margin-left: 16.666667%; + margin-left: 16.66666667%; } .offset-3 { margin-left: 25%; } .offset-4 { - margin-left: 33.333333%; + margin-left: 33.33333333%; } .offset-5 { - margin-left: 41.666667%; + margin-left: 41.66666667%; } .offset-6 { margin-left: 50%; } .offset-7 { - margin-left: 58.333333%; + margin-left: 58.33333333%; } .offset-8 { - margin-left: 66.666667%; + margin-left: 66.66666667%; } .offset-9 { margin-left: 75%; } .offset-10 { - margin-left: 83.333333%; + margin-left: 83.33333333%; } .offset-11 { - margin-left: 91.666667%; + margin-left: 91.66666667%; } .g-0, .gx-0 { @@ -824,106 +813,85 @@ progress { } @media (min-width: 576px) { .col-sm { - -ms-flex: 1 0 0%; flex: 1 0 0%; } .row-cols-sm-auto > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .row-cols-sm-1 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } .row-cols-sm-2 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .row-cols-sm-3 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.3333333333%; } .row-cols-sm-4 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .row-cols-sm-5 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 20%; } .row-cols-sm-6 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.6666666667%; } .col-sm-auto { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .col-sm-1 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 8.333333%; + width: 8.33333333%; } .col-sm-2 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.66666667%; } .col-sm-3 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .col-sm-4 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.33333333%; } .col-sm-5 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 41.666667%; + width: 41.66666667%; } .col-sm-6 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .col-sm-7 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 58.333333%; + width: 58.33333333%; } .col-sm-8 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 66.666667%; + width: 66.66666667%; } .col-sm-9 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 75%; } .col-sm-10 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 83.333333%; + width: 83.33333333%; } .col-sm-11 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 91.666667%; + width: 91.66666667%; } .col-sm-12 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } @@ -931,37 +899,37 @@ progress { margin-left: 0; } .offset-sm-1 { - margin-left: 8.333333%; + margin-left: 8.33333333%; } .offset-sm-2 { - margin-left: 16.666667%; + margin-left: 16.66666667%; } .offset-sm-3 { margin-left: 25%; } .offset-sm-4 { - margin-left: 33.333333%; + margin-left: 33.33333333%; } .offset-sm-5 { - margin-left: 41.666667%; + margin-left: 41.66666667%; } .offset-sm-6 { margin-left: 50%; } .offset-sm-7 { - margin-left: 58.333333%; + margin-left: 58.33333333%; } .offset-sm-8 { - margin-left: 66.666667%; + margin-left: 66.66666667%; } .offset-sm-9 { margin-left: 75%; } .offset-sm-10 { - margin-left: 83.333333%; + margin-left: 83.33333333%; } .offset-sm-11 { - margin-left: 91.666667%; + margin-left: 91.66666667%; } .g-sm-0, .gx-sm-0 { @@ -1014,106 +982,85 @@ progress { } @media (min-width: 768px) { .col-md { - -ms-flex: 1 0 0%; flex: 1 0 0%; } .row-cols-md-auto > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .row-cols-md-1 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } .row-cols-md-2 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .row-cols-md-3 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.3333333333%; } .row-cols-md-4 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .row-cols-md-5 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 20%; } .row-cols-md-6 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.6666666667%; } .col-md-auto { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .col-md-1 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 8.333333%; + width: 8.33333333%; } .col-md-2 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.66666667%; } .col-md-3 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .col-md-4 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.33333333%; } .col-md-5 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 41.666667%; + width: 41.66666667%; } .col-md-6 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .col-md-7 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 58.333333%; + width: 58.33333333%; } .col-md-8 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 66.666667%; + width: 66.66666667%; } .col-md-9 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 75%; } .col-md-10 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 83.333333%; + width: 83.33333333%; } .col-md-11 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 91.666667%; + width: 91.66666667%; } .col-md-12 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } @@ -1121,37 +1068,37 @@ progress { margin-left: 0; } .offset-md-1 { - margin-left: 8.333333%; + margin-left: 8.33333333%; } .offset-md-2 { - margin-left: 16.666667%; + margin-left: 16.66666667%; } .offset-md-3 { margin-left: 25%; } .offset-md-4 { - margin-left: 33.333333%; + margin-left: 33.33333333%; } .offset-md-5 { - margin-left: 41.666667%; + margin-left: 41.66666667%; } .offset-md-6 { margin-left: 50%; } .offset-md-7 { - margin-left: 58.333333%; + margin-left: 58.33333333%; } .offset-md-8 { - margin-left: 66.666667%; + margin-left: 66.66666667%; } .offset-md-9 { margin-left: 75%; } .offset-md-10 { - margin-left: 83.333333%; + margin-left: 83.33333333%; } .offset-md-11 { - margin-left: 91.666667%; + margin-left: 91.66666667%; } .g-md-0, .gx-md-0 { @@ -1204,106 +1151,85 @@ progress { } @media (min-width: 992px) { .col-lg { - -ms-flex: 1 0 0%; flex: 1 0 0%; } .row-cols-lg-auto > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .row-cols-lg-1 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } .row-cols-lg-2 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .row-cols-lg-3 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.3333333333%; } .row-cols-lg-4 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .row-cols-lg-5 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 20%; } .row-cols-lg-6 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.6666666667%; } .col-lg-auto { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .col-lg-1 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 8.333333%; + width: 8.33333333%; } .col-lg-2 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.66666667%; } .col-lg-3 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .col-lg-4 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.33333333%; } .col-lg-5 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 41.666667%; + width: 41.66666667%; } .col-lg-6 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .col-lg-7 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 58.333333%; + width: 58.33333333%; } .col-lg-8 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 66.666667%; + width: 66.66666667%; } .col-lg-9 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 75%; } .col-lg-10 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 83.333333%; + width: 83.33333333%; } .col-lg-11 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 91.666667%; + width: 91.66666667%; } .col-lg-12 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } @@ -1311,37 +1237,37 @@ progress { margin-left: 0; } .offset-lg-1 { - margin-left: 8.333333%; + margin-left: 8.33333333%; } .offset-lg-2 { - margin-left: 16.666667%; + margin-left: 16.66666667%; } .offset-lg-3 { margin-left: 25%; } .offset-lg-4 { - margin-left: 33.333333%; + margin-left: 33.33333333%; } .offset-lg-5 { - margin-left: 41.666667%; + margin-left: 41.66666667%; } .offset-lg-6 { margin-left: 50%; } .offset-lg-7 { - margin-left: 58.333333%; + margin-left: 58.33333333%; } .offset-lg-8 { - margin-left: 66.666667%; + margin-left: 66.66666667%; } .offset-lg-9 { margin-left: 75%; } .offset-lg-10 { - margin-left: 83.333333%; + margin-left: 83.33333333%; } .offset-lg-11 { - margin-left: 91.666667%; + margin-left: 91.66666667%; } .g-lg-0, .gx-lg-0 { @@ -1394,106 +1320,85 @@ progress { } @media (min-width: 1200px) { .col-xl { - -ms-flex: 1 0 0%; flex: 1 0 0%; } .row-cols-xl-auto > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .row-cols-xl-1 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } .row-cols-xl-2 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .row-cols-xl-3 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.3333333333%; } .row-cols-xl-4 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .row-cols-xl-5 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 20%; } .row-cols-xl-6 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.6666666667%; } .col-xl-auto { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .col-xl-1 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 8.333333%; + width: 8.33333333%; } .col-xl-2 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.66666667%; } .col-xl-3 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .col-xl-4 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.33333333%; } .col-xl-5 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 41.666667%; + width: 41.66666667%; } .col-xl-6 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .col-xl-7 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 58.333333%; + width: 58.33333333%; } .col-xl-8 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 66.666667%; + width: 66.66666667%; } .col-xl-9 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 75%; } .col-xl-10 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 83.333333%; + width: 83.33333333%; } .col-xl-11 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 91.666667%; + width: 91.66666667%; } .col-xl-12 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } @@ -1501,37 +1406,37 @@ progress { margin-left: 0; } .offset-xl-1 { - margin-left: 8.333333%; + margin-left: 8.33333333%; } .offset-xl-2 { - margin-left: 16.666667%; + margin-left: 16.66666667%; } .offset-xl-3 { margin-left: 25%; } .offset-xl-4 { - margin-left: 33.333333%; + margin-left: 33.33333333%; } .offset-xl-5 { - margin-left: 41.666667%; + margin-left: 41.66666667%; } .offset-xl-6 { margin-left: 50%; } .offset-xl-7 { - margin-left: 58.333333%; + margin-left: 58.33333333%; } .offset-xl-8 { - margin-left: 66.666667%; + margin-left: 66.66666667%; } .offset-xl-9 { margin-left: 75%; } .offset-xl-10 { - margin-left: 83.333333%; + margin-left: 83.33333333%; } .offset-xl-11 { - margin-left: 91.666667%; + margin-left: 91.66666667%; } .g-xl-0, .gx-xl-0 { @@ -1584,106 +1489,85 @@ progress { } @media (min-width: 1400px) { .col-xxl { - -ms-flex: 1 0 0%; flex: 1 0 0%; } .row-cols-xxl-auto > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .row-cols-xxl-1 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } .row-cols-xxl-2 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .row-cols-xxl-3 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.3333333333%; } .row-cols-xxl-4 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .row-cols-xxl-5 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 20%; } .row-cols-xxl-6 > * { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.6666666667%; } .col-xxl-auto { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; } .col-xxl-1 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 8.333333%; + width: 8.33333333%; } .col-xxl-2 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 16.666667%; + width: 16.66666667%; } .col-xxl-3 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 25%; } .col-xxl-4 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 33.333333%; + width: 33.33333333%; } .col-xxl-5 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 41.666667%; + width: 41.66666667%; } .col-xxl-6 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 50%; } .col-xxl-7 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 58.333333%; + width: 58.33333333%; } .col-xxl-8 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 66.666667%; + width: 66.66666667%; } .col-xxl-9 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 75%; } .col-xxl-10 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 83.333333%; + width: 83.33333333%; } .col-xxl-11 { - -ms-flex: 0 0 auto; flex: 0 0 auto; - width: 91.666667%; + width: 91.66666667%; } .col-xxl-12 { - -ms-flex: 0 0 auto; flex: 0 0 auto; width: 100%; } @@ -1691,37 +1575,37 @@ progress { margin-left: 0; } .offset-xxl-1 { - margin-left: 8.333333%; + margin-left: 8.33333333%; } .offset-xxl-2 { - margin-left: 16.666667%; + margin-left: 16.66666667%; } .offset-xxl-3 { margin-left: 25%; } .offset-xxl-4 { - margin-left: 33.333333%; + margin-left: 33.33333333%; } .offset-xxl-5 { - margin-left: 41.666667%; + margin-left: 41.66666667%; } .offset-xxl-6 { margin-left: 50%; } .offset-xxl-7 { - margin-left: 58.333333%; + margin-left: 58.33333333%; } .offset-xxl-8 { - margin-left: 66.666667%; + margin-left: 66.66666667%; } .offset-xxl-9 { margin-left: 75%; } .offset-xxl-10 { - margin-left: 83.333333%; + margin-left: 83.33333333%; } .offset-xxl-11 { - margin-left: 91.666667%; + margin-left: 91.66666667%; } .g-xxl-0, .gx-xxl-0 { @@ -1773,19 +1657,21 @@ progress { } } .table { + --bs-table-color: var(--bs-body-color); --bs-table-bg: transparent; + --bs-table-border-color: #444; --bs-table-accent-bg: transparent; - --bs-table-striped-color: #fff; + --bs-table-striped-color: var(--bs-body-color); --bs-table-striped-bg: rgba(0, 0, 0, 0.05); - --bs-table-active-color: #fff; + --bs-table-active-color: var(--bs-body-color); --bs-table-active-bg: rgba(0, 0, 0, 0.1); - --bs-table-hover-color: #fff; + --bs-table-hover-color: var(--bs-body-color); --bs-table-hover-bg: rgba(0, 0, 0, 0.075); width: 100%; margin-bottom: 1rem; - color: #fff; + color: var(--bs-table-color); vertical-align: top; - border-color: #444; + border-color: var(--bs-table-border-color); } .table > :not(caption) > * > * { padding: 0.5rem 0.5rem; @@ -1799,8 +1685,8 @@ progress { .table > thead { vertical-align: bottom; } -.table > :not(:first-child) { - border-top: 2px solid currentColor; +.table-group-divider { + border-top: 2px solid currentcolor; } .caption-top { caption-side: top; @@ -1824,6 +1710,10 @@ progress { --bs-table-accent-bg: var(--bs-table-striped-bg); color: var(--bs-table-striped-color); } +.table-striped-columns > :not(caption) > tr > :nth-child(even) { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} .table-active { --bs-table-accent-bg: var(--bs-table-active-bg); color: var(--bs-table-active-color); @@ -1833,92 +1723,108 @@ progress { color: var(--bs-table-hover-color); } .table-primary { + --bs-table-color: #fff; --bs-table-bg: #375a7f; + --bs-table-border-color: #4b6b8c; --bs-table-striped-bg: #416285; --bs-table-striped-color: #fff; --bs-table-active-bg: #4b6b8c; --bs-table-active-color: #fff; --bs-table-hover-bg: #466689; --bs-table-hover-color: #fff; - color: #fff; - border-color: #4b6b8c; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); } .table-secondary { + --bs-table-color: #fff; --bs-table-bg: #444444; + --bs-table-border-color: #575757; --bs-table-striped-bg: #4d4d4d; --bs-table-striped-color: #fff; --bs-table-active-bg: #575757; --bs-table-active-color: #fff; --bs-table-hover-bg: #525252; --bs-table-hover-color: #fff; - color: #fff; - border-color: #575757; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); } .table-success { + --bs-table-color: #fff; --bs-table-bg: #00bc8c; + --bs-table-border-color: #1ac398; --bs-table-striped-bg: #0dbf92; --bs-table-striped-color: #fff; --bs-table-active-bg: #1ac398; --bs-table-active-color: #fff; --bs-table-hover-bg: #13c195; --bs-table-hover-color: #fff; - color: #fff; - border-color: #1ac398; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); } .table-info { + --bs-table-color: #fff; --bs-table-bg: #3498db; + --bs-table-border-color: #48a2df; --bs-table-striped-bg: #3e9ddd; --bs-table-striped-color: #fff; --bs-table-active-bg: #48a2df; --bs-table-active-color: #fff; --bs-table-hover-bg: #43a0de; --bs-table-hover-color: #fff; - color: #fff; - border-color: #48a2df; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); } .table-warning { + --bs-table-color: #fff; --bs-table-bg: #f39c12; + --bs-table-border-color: #f4a62a; --bs-table-striped-bg: #f4a11e; --bs-table-striped-color: #fff; --bs-table-active-bg: #f4a62a; --bs-table-active-color: #fff; --bs-table-hover-bg: #f4a324; --bs-table-hover-color: #fff; - color: #fff; - border-color: #f4a62a; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); } .table-danger { + --bs-table-color: #fff; --bs-table-bg: #e74c3c; + --bs-table-border-color: #e95e50; --bs-table-striped-bg: #e85546; --bs-table-striped-color: #fff; --bs-table-active-bg: #e95e50; --bs-table-active-color: #fff; --bs-table-hover-bg: #e9594b; --bs-table-hover-color: #fff; - color: #fff; - border-color: #e95e50; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); } .table-light { + --bs-table-color: #fff; --bs-table-bg: #adb5bd; + --bs-table-border-color: #b5bcc4; --bs-table-striped-bg: #b1b9c0; --bs-table-striped-color: #fff; --bs-table-active-bg: #b5bcc4; --bs-table-active-color: #fff; --bs-table-hover-bg: #b3bbc2; --bs-table-hover-color: #fff; - color: #fff; - border-color: #b5bcc4; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); } .table-dark { + --bs-table-color: #fff; --bs-table-bg: #303030; + --bs-table-border-color: #454545; --bs-table-striped-bg: #3a3a3a; --bs-table-striped-color: #fff; --bs-table-active-bg: #454545; --bs-table-active-color: #fff; --bs-table-hover-bg: #404040; --bs-table-hover-color: #fff; - color: #fff; - border-color: #454545; + color: var(--bs-table-color); + border-color: var(--bs-table-border-color); } .table-responsive { overflow-x: auto; @@ -1993,7 +1899,7 @@ progress { -webkit-appearance: none; -moz-appearance: none; appearance: none; - border-radius: 0.25rem; + border-radius: 0.375rem; transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } @media (prefers-reduced-motion: reduce) { @@ -2017,56 +1923,18 @@ progress { .form-control::-webkit-date-and-time-value { height: 1.5em; } -.form-control::-webkit-input-placeholder { - color: #888; - opacity: 1; -} .form-control::-moz-placeholder { color: #888; opacity: 1; } -.form-control:-ms-input-placeholder { - color: #888; - opacity: 1; -} -.form-control::-ms-input-placeholder { - color: #888; - opacity: 1; -} .form-control::placeholder { color: #888; opacity: 1; } -.form-control:disabled, -.form-control[readonly] { +.form-control:disabled { background-color: #ebebeb; opacity: 1; } -.form-control::file-selector-button { - padding: 0.375rem 0.75rem; - margin: -0.375rem -0.75rem; - -webkit-margin-end: 0.75rem; - -moz-margin-end: 0.75rem; - margin-inline-end: 0.75rem; - color: #fff; - background-color: #444; - pointer-events: none; - border-color: inherit; - border-style: solid; - border-width: 0; - border-inline-end-width: 1px; - border-radius: 0; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, - border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .form-control::file-selector-button { - transition: none; - } -} -.form-control:hover:not(:disabled):not([readonly])::file-selector-button { - background-color: #414141; -} .form-control::-webkit-file-upload-button { padding: 0.375rem 0.75rem; margin: -0.375rem -0.75rem; @@ -2086,15 +1954,37 @@ progress { transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } +.form-control::file-selector-button { + padding: 0.375rem 0.75rem; + margin: -0.375rem -0.75rem; + -webkit-margin-end: 0.75rem; + margin-inline-end: 0.75rem; + color: #fff; + background-color: #444; + pointer-events: none; + border-color: inherit; + border-style: solid; + border-width: 0; + border-inline-end-width: 1px; + border-radius: 0; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, + border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} @media (prefers-reduced-motion: reduce) { .form-control::-webkit-file-upload-button { -webkit-transition: none; transition: none; } + .form-control::file-selector-button { + transition: none; + } } .form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button { background-color: #414141; } +.form-control:hover:not(:disabled):not([readonly])::file-selector-button { + background-color: #414141; +} .form-control-plaintext { display: block; width: 100%; @@ -2106,6 +1996,9 @@ progress { border: solid transparent; border-width: 1px 0; } +.form-control-plaintext:focus { + outline: 0; +} .form-control-plaintext.form-control-lg, .form-control-plaintext.form-control-sm { padding-right: 0; @@ -2115,16 +2008,15 @@ progress { min-height: calc(1.5em + 0.5rem + 2px); padding: 0.25rem 0.5rem; font-size: 0.875rem; - border-radius: 0.2rem; + border-radius: 0.25rem; } -.form-control-sm::file-selector-button { +.form-control-sm::-webkit-file-upload-button { padding: 0.25rem 0.5rem; margin: -0.25rem -0.5rem; -webkit-margin-end: 0.5rem; - -moz-margin-end: 0.5rem; margin-inline-end: 0.5rem; } -.form-control-sm::-webkit-file-upload-button { +.form-control-sm::file-selector-button { padding: 0.25rem 0.5rem; margin: -0.25rem -0.5rem; -webkit-margin-end: 0.5rem; @@ -2134,16 +2026,15 @@ progress { min-height: calc(1.5em + 1rem + 2px); padding: 0.5rem 1rem; font-size: 1.25rem; - border-radius: 0.3rem; + border-radius: 0.5rem; } -.form-control-lg::file-selector-button { +.form-control-lg::-webkit-file-upload-button { padding: 0.5rem 1rem; margin: -0.5rem -1rem; -webkit-margin-end: 1rem; - -moz-margin-end: 1rem; margin-inline-end: 1rem; } -.form-control-lg::-webkit-file-upload-button { +.form-control-lg::file-selector-button { padding: 0.5rem 1rem; margin: -0.5rem -1rem; -webkit-margin-end: 1rem; @@ -2160,19 +2051,24 @@ textarea.form-control-lg { } .form-control-color { width: 3rem; - height: auto; + height: calc(1.5em + 0.75rem + 2px); padding: 0.375rem; } .form-control-color:not(:disabled):not([readonly]) { cursor: pointer; } .form-control-color::-moz-color-swatch { - height: 1.5em; - border-radius: 0.25rem; + border: 0 !important; + border-radius: 0.375rem; } .form-control-color::-webkit-color-swatch { - height: 1.5em; - border-radius: 0.25rem; + border-radius: 0.375rem; +} +.form-control-color.form-control-sm { + height: calc(1.5em + 0.5rem + 2px); +} +.form-control-color.form-control-lg { + height: calc(1.5em + 1rem + 2px); } .form-select { display: block; @@ -2184,12 +2080,12 @@ textarea.form-control-lg { line-height: 1.5; color: #303030; background-color: #fff; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 16px 12px; border: 1px solid #222; - border-radius: 0.25rem; + border-radius: 0.375rem; transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; -webkit-appearance: none; -moz-appearance: none; @@ -2222,14 +2118,14 @@ textarea.form-control-lg { padding-bottom: 0.25rem; padding-left: 0.5rem; font-size: 0.875rem; - border-radius: 0.2rem; + border-radius: 0.25rem; } .form-select-lg { padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 1rem; font-size: 1.25rem; - border-radius: 0.3rem; + border-radius: 0.5rem; } .form-check { display: block; @@ -2241,6 +2137,16 @@ textarea.form-control-lg { float: left; margin-left: -1.5em; } +.form-check-reverse { + padding-right: 1.5em; + padding-left: 0; + text-align: right; +} +.form-check-reverse .form-check-input { + float: right; + margin-right: -1.5em; + margin-left: 0; +} .form-check-input { width: 1em; height: 1em; @@ -2256,6 +2162,7 @@ textarea.form-control-lg { appearance: none; -webkit-print-color-adjust: exact; color-adjust: exact; + print-color-adjust: exact; } .form-check-input[type='checkbox'] { border-radius: 0.25em; @@ -2264,7 +2171,6 @@ textarea.form-control-lg { border-radius: 50%; } .form-check-input:active { - -webkit-filter: brightness(90%); filter: brightness(90%); } .form-check-input:focus { @@ -2277,7 +2183,7 @@ textarea.form-control-lg { border-color: #375a7f; } .form-check-input:checked[type='checkbox'] { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); } .form-check-input:checked[type='radio'] { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e"); @@ -2289,12 +2195,12 @@ textarea.form-control-lg { } .form-check-input:disabled { pointer-events: none; - -webkit-filter: none; filter: none; opacity: 0.5; } .form-check-input:disabled ~ .form-check-label, .form-check-input[disabled] ~ .form-check-label { + cursor: default; opacity: 0.5; } .form-switch { @@ -2320,6 +2226,14 @@ textarea.form-control-lg { background-position: right center; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); } +.form-switch.form-check-reverse { + padding-right: 2.5em; + padding-left: 0; +} +.form-switch.form-check-reverse .form-check-input { + margin-right: -2.5em; + margin-left: 0; +} .form-check-inline { display: inline-block; margin-right: 1rem; @@ -2332,7 +2246,6 @@ textarea.form-control-lg { .btn-check:disabled + .btn, .btn-check[disabled] + .btn { pointer-events: none; - -webkit-filter: none; filter: none; opacity: 0.65; } @@ -2433,6 +2346,7 @@ textarea.form-control-lg { position: relative; } .form-floating > .form-control, +.form-floating > .form-control-plaintext, .form-floating > .form-select { height: calc(3.5rem + 2px); line-height: 1.25; @@ -2441,53 +2355,48 @@ textarea.form-control-lg { position: absolute; top: 0; left: 0; + width: 100%; height: 100%; padding: 1rem 0.75rem; + overflow: hidden; + text-align: start; + text-overflow: ellipsis; + white-space: nowrap; pointer-events: none; border: 1px solid transparent; - -webkit-transform-origin: 0 0; transform-origin: 0 0; - transition: opacity 0.1s ease-in-out, -webkit-transform 0.1s ease-in-out; transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out; - transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out, - -webkit-transform 0.1s ease-in-out; } @media (prefers-reduced-motion: reduce) { .form-floating > label { transition: none; } } -.form-floating > .form-control { +.form-floating > .form-control, +.form-floating > .form-control-plaintext { padding: 1rem 0.75rem; } -.form-floating > .form-control::-webkit-input-placeholder { - color: transparent; -} +.form-floating > .form-control-plaintext::-moz-placeholder, .form-floating > .form-control::-moz-placeholder { color: transparent; } -.form-floating > .form-control:-ms-input-placeholder { - color: transparent; -} -.form-floating > .form-control::-ms-input-placeholder { - color: transparent; -} +.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder { color: transparent; } +.form-floating > .form-control-plaintext:not(:-moz-placeholder-shown), .form-floating > .form-control:not(:-moz-placeholder-shown) { padding-top: 1.625rem; padding-bottom: 0.625rem; } -.form-floating > .form-control:not(:-ms-input-placeholder) { - padding-top: 1.625rem; - padding-bottom: 0.625rem; -} +.form-floating > .form-control-plaintext:focus, +.form-floating > .form-control-plaintext:not(:placeholder-shown), .form-floating > .form-control:focus, .form-floating > .form-control:not(:placeholder-shown) { padding-top: 1.625rem; padding-bottom: 0.625rem; } +.form-floating > .form-control-plaintext:-webkit-autofill, .form-floating > .form-control:-webkit-autofill { padding-top: 1.625rem; padding-bottom: 0.625rem; @@ -2500,55 +2409,49 @@ textarea.form-control-lg { opacity: 0.65; transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); } -.form-floating > .form-control:not(:-ms-input-placeholder) ~ label { - opacity: 0.65; - transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); -} +.form-floating > .form-control-plaintext ~ label, .form-floating > .form-control:focus ~ label, .form-floating > .form-control:not(:placeholder-shown) ~ label, .form-floating > .form-select ~ label { opacity: 0.65; - -webkit-transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); } .form-floating > .form-control:-webkit-autofill ~ label { opacity: 0.65; - -webkit-transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); } +.form-floating > .form-control-plaintext ~ label { + border-width: 1px 0; +} .input-group { position: relative; - display: -ms-flexbox; display: flex; - -ms-flex-wrap: wrap; flex-wrap: wrap; - -ms-flex-align: stretch; align-items: stretch; width: 100%; } .input-group > .form-control, +.input-group > .form-floating, .input-group > .form-select { position: relative; - -ms-flex: 1 1 auto; flex: 1 1 auto; width: 1%; min-width: 0; } .input-group > .form-control:focus, +.input-group > .form-floating:focus-within, .input-group > .form-select:focus { - z-index: 3; + z-index: 5; } .input-group .btn { position: relative; z-index: 2; } .input-group .btn:focus { - z-index: 3; + z-index: 5; } .input-group-text { - display: -ms-flexbox; display: flex; - -ms-flex-align: center; align-items: center; padding: 0.375rem 0.75rem; font-size: 1rem; @@ -2559,7 +2462,7 @@ textarea.form-control-lg { white-space: nowrap; background-color: #444; border: 1px solid #222; - border-radius: 0.25rem; + border-radius: 0.375rem; } .input-group-lg > .btn, .input-group-lg > .form-control, @@ -2567,7 +2470,7 @@ textarea.form-control-lg { .input-group-lg > .input-group-text { padding: 0.5rem 1rem; font-size: 1.25rem; - border-radius: 0.3rem; + border-radius: 0.5rem; } .input-group-sm > .btn, .input-group-sm > .form-control, @@ -2575,7 +2478,7 @@ textarea.form-control-lg { .input-group-sm > .input-group-text { padding: 0.25rem 0.5rem; font-size: 0.875rem; - border-radius: 0.2rem; + border-radius: 0.25rem; } .input-group-lg > .form-select, .input-group-sm > .form-select { @@ -2583,22 +2486,45 @@ textarea.form-control-lg { } .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n + 3), .input-group:not(.has-validation) - > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) { + > .form-floating:not(:last-child) + > .form-control, +.input-group:not(.has-validation) + > .form-floating:not(:last-child) + > .form-select, +.input-group:not(.has-validation) + > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not( + .form-floating + ) { border-top-right-radius: 0; border-bottom-right-radius: 0; } .input-group.has-validation > .dropdown-toggle:nth-last-child(n + 4), .input-group.has-validation - > :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu) { + > .form-floating:nth-last-child(n + 3) + > .form-control, +.input-group.has-validation + > .form-floating:nth-last-child(n + 3) + > .form-select, +.input-group.has-validation + > :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu):not( + .form-floating + ) { border-top-right-radius: 0; border-bottom-right-radius: 0; } .input-group - > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { + > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not( + .valid-feedback + ):not(.invalid-tooltip):not(.invalid-feedback) { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; } +.input-group > .form-floating:not(:first-child) > .form-control, +.input-group > .form-floating:not(:first-child) > .form-select { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} .valid-feedback { display: none; width: 100%; @@ -2617,7 +2543,7 @@ textarea.form-control-lg { font-size: 0.875rem; color: #fff; background-color: rgba(0, 188, 140, 0.9); - border-radius: 0.25rem; + border-radius: 0.375rem; } .is-valid ~ .valid-feedback, .is-valid ~ .valid-tooltip, @@ -2629,7 +2555,7 @@ textarea.form-control-lg { .was-validated .form-control:valid { border-color: #00bc8c; padding-right: calc(1.5em + 0.75rem); - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300bc8c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300bc8c' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right calc(0.375em + 0.1875rem) center; background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); @@ -2654,8 +2580,8 @@ textarea.form-control.is-valid { .was-validated .form-select:valid:not([multiple]):not([size]), .was-validated .form-select:valid:not([multiple])[size='1'] { padding-right: 4.125rem; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), - url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300bc8c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), + url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300bc8c' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); background-position: right 0.75rem center, center right 2.25rem; background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } @@ -2664,6 +2590,10 @@ textarea.form-control.is-valid { border-color: #00bc8c; box-shadow: 0 0 0 0.25rem rgba(0, 188, 140, 0.25); } +.form-control-color.is-valid, +.was-validated .form-control-color:valid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} .form-check-input.is-valid, .was-validated .form-check-input:valid { border-color: #00bc8c; @@ -2683,16 +2613,12 @@ textarea.form-control.is-valid { .form-check-inline .form-check-input ~ .valid-feedback { margin-left: 0.5em; } -.input-group .form-control.is-valid, -.input-group .form-select.is-valid, -.was-validated .input-group .form-control:valid, -.was-validated .input-group .form-select:valid { - z-index: 1; -} -.input-group .form-control.is-valid:focus, -.input-group .form-select.is-valid:focus, -.was-validated .input-group .form-control:valid:focus, -.was-validated .input-group .form-select:valid:focus { +.input-group > .form-control:not(:focus).is-valid, +.input-group > .form-floating:not(:focus-within).is-valid, +.input-group > .form-select:not(:focus).is-valid, +.was-validated .input-group > .form-control:not(:focus):valid, +.was-validated .input-group > .form-floating:not(:focus-within):valid, +.was-validated .input-group > .form-select:not(:focus):valid { z-index: 3; } .invalid-feedback { @@ -2713,7 +2639,7 @@ textarea.form-control.is-valid { font-size: 0.875rem; color: #fff; background-color: rgba(231, 76, 60, 0.9); - border-radius: 0.25rem; + border-radius: 0.375rem; } .is-invalid ~ .invalid-feedback, .is-invalid ~ .invalid-tooltip, @@ -2750,7 +2676,7 @@ textarea.form-control.is-invalid { .was-validated .form-select:invalid:not([multiple]):not([size]), .was-validated .form-select:invalid:not([multiple])[size='1'] { padding-right: 4.125rem; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e74c3c' stroke='none'/%3e%3c/svg%3e"); background-position: right 0.75rem center, center right 2.25rem; background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); @@ -2760,6 +2686,10 @@ textarea.form-control.is-invalid { border-color: #e74c3c; box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25); } +.form-control-color.is-invalid, +.was-validated .form-control-color:invalid { + width: calc(3rem + calc(1.5em + 0.75rem)); +} .form-check-input.is-invalid, .was-validated .form-check-input:invalid { border-color: #e74c3c; @@ -2779,36 +2709,49 @@ textarea.form-control.is-invalid { .form-check-inline .form-check-input ~ .invalid-feedback { margin-left: 0.5em; } -.input-group .form-control.is-invalid, -.input-group .form-select.is-invalid, -.was-validated .input-group .form-control:invalid, -.was-validated .input-group .form-select:invalid { - z-index: 2; -} -.input-group .form-control.is-invalid:focus, -.input-group .form-select.is-invalid:focus, -.was-validated .input-group .form-control:invalid:focus, -.was-validated .input-group .form-select:invalid:focus { - z-index: 3; +.input-group > .form-control:not(:focus).is-invalid, +.input-group > .form-floating:not(:focus-within).is-invalid, +.input-group > .form-select:not(:focus).is-invalid, +.was-validated .input-group > .form-control:not(:focus):invalid, +.was-validated .input-group > .form-floating:not(:focus-within):invalid, +.was-validated .input-group > .form-select:not(:focus):invalid { + z-index: 4; } .btn { + --bs-btn-padding-x: 0.75rem; + --bs-btn-padding-y: 0.375rem; + --bs-btn-font-family: ; + --bs-btn-font-size: 1rem; + --bs-btn-font-weight: 400; + --bs-btn-line-height: 1.5; + --bs-btn-color: #fff; + --bs-btn-bg: transparent; + --bs-btn-border-width: 1px; + --bs-btn-border-color: transparent; + --bs-btn-border-radius: 0.375rem; + --bs-btn-hover-border-color: transparent; + --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), + 0 1px 1px rgba(0, 0, 0, 0.075); + --bs-btn-disabled-opacity: 0.65; + --bs-btn-focus-box-shadow: 0 0 0 0.25rem + rgba(var(--bs-btn-focus-shadow-rgb), 0.5); display: inline-block; - font-weight: 400; - line-height: 1.5; - color: #fff; + padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x); + font-family: var(--bs-btn-font-family); + font-size: var(--bs-btn-font-size); + font-weight: var(--bs-btn-font-weight); + line-height: var(--bs-btn-line-height); + color: var(--bs-btn-color); text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; - -ms-user-select: none; user-select: none; - background-color: transparent; - border: 1px solid transparent; - padding: 0.375rem 0.75rem; - font-size: 1rem; - border-radius: 0.25rem; + border: var(--bs-btn-border-width) solid var(--bs-btn-border-color); + border-radius: var(--bs-btn-border-radius); + background-color: var(--bs-btn-bg); transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } @@ -2818,626 +2761,342 @@ textarea.form-control.is-invalid { } } .btn:hover { - color: #fff; + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); } -.btn-check:focus + .btn, -.btn:focus { +.btn-check + .btn:hover { + color: var(--bs-btn-color); + background-color: var(--bs-btn-bg); + border-color: var(--bs-btn-border-color); +} +.btn:focus-visible { + color: var(--bs-btn-hover-color); + background-color: var(--bs-btn-hover-bg); + border-color: var(--bs-btn-hover-border-color); outline: 0; - box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25); + box-shadow: var(--bs-btn-focus-box-shadow); +} +.btn-check:focus-visible + .btn { + border-color: var(--bs-btn-hover-border-color); + outline: 0; + box-shadow: var(--bs-btn-focus-box-shadow); +} +.btn-check:checked + .btn, +.btn.active, +.btn.show, +.btn:first-child:active, +:not(.btn-check) + .btn:active { + color: var(--bs-btn-active-color); + background-color: var(--bs-btn-active-bg); + border-color: var(--bs-btn-active-border-color); +} +.btn-check:checked + .btn:focus-visible, +.btn.active:focus-visible, +.btn.show:focus-visible, +.btn:first-child:active:focus-visible, +:not(.btn-check) + .btn:active:focus-visible { + box-shadow: var(--bs-btn-focus-box-shadow); } .btn.disabled, .btn:disabled, fieldset:disabled .btn { + color: var(--bs-btn-disabled-color); pointer-events: none; - opacity: 0.65; + background-color: var(--bs-btn-disabled-bg); + border-color: var(--bs-btn-disabled-border-color); + opacity: var(--bs-btn-disabled-opacity); } .btn-primary { - color: #fff; - background-color: #375a7f; - border-color: #375a7f; -} -.btn-primary:hover { - color: #fff; - background-color: #2f4d6c; - border-color: #2c4866; -} -.btn-check:focus + .btn-primary, -.btn-primary:focus { - color: #fff; - background-color: #2f4d6c; - border-color: #2c4866; - box-shadow: 0 0 0 0.25rem rgba(85, 115, 146, 0.5); -} -.btn-check:active + .btn-primary, -.btn-check:checked + .btn-primary, -.btn-primary.active, -.btn-primary:active, -.show > .btn-primary.dropdown-toggle { - color: #fff; - background-color: #2c4866; - border-color: #29445f; -} -.btn-check:active + .btn-primary:focus, -.btn-check:checked + .btn-primary:focus, -.btn-primary.active:focus, -.btn-primary:active:focus, -.show > .btn-primary.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(85, 115, 146, 0.5); -} -.btn-primary.disabled, -.btn-primary:disabled { - color: #fff; - background-color: #375a7f; - border-color: #375a7f; + --bs-btn-color: #fff; + --bs-btn-bg: #375a7f; + --bs-btn-border-color: #375a7f; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #2f4d6c; + --bs-btn-hover-border-color: #2c4866; + --bs-btn-focus-shadow-rgb: 85, 115, 146; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #2c4866; + --bs-btn-active-border-color: #29445f; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #375a7f; + --bs-btn-disabled-border-color: #375a7f; } .btn-secondary { - color: #fff; - background-color: #444; - border-color: #444; -} -.btn-secondary:hover { - color: #fff; - background-color: #3a3a3a; - border-color: #363636; -} -.btn-check:focus + .btn-secondary, -.btn-secondary:focus { - color: #fff; - background-color: #3a3a3a; - border-color: #363636; - box-shadow: 0 0 0 0.25rem rgba(96, 96, 96, 0.5); -} -.btn-check:active + .btn-secondary, -.btn-check:checked + .btn-secondary, -.btn-secondary.active, -.btn-secondary:active, -.show > .btn-secondary.dropdown-toggle { - color: #fff; - background-color: #363636; - border-color: #333; -} -.btn-check:active + .btn-secondary:focus, -.btn-check:checked + .btn-secondary:focus, -.btn-secondary.active:focus, -.btn-secondary:active:focus, -.show > .btn-secondary.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(96, 96, 96, 0.5); -} -.btn-secondary.disabled, -.btn-secondary:disabled { - color: #fff; - background-color: #444; - border-color: #444; + --bs-btn-color: #fff; + --bs-btn-bg: #444; + --bs-btn-border-color: #444; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #3a3a3a; + --bs-btn-hover-border-color: #363636; + --bs-btn-focus-shadow-rgb: 96, 96, 96; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #363636; + --bs-btn-active-border-color: #333333; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #444; + --bs-btn-disabled-border-color: #444; } .btn-success { - color: #fff; - background-color: #00bc8c; - border-color: #00bc8c; -} -.btn-success:hover { - color: #fff; - background-color: #00a077; - border-color: #009670; -} -.btn-check:focus + .btn-success, -.btn-success:focus { - color: #fff; - background-color: #00a077; - border-color: #009670; - box-shadow: 0 0 0 0.25rem rgba(38, 198, 157, 0.5); -} -.btn-check:active + .btn-success, -.btn-check:checked + .btn-success, -.btn-success.active, -.btn-success:active, -.show > .btn-success.dropdown-toggle { - color: #fff; - background-color: #009670; - border-color: #008d69; -} -.btn-check:active + .btn-success:focus, -.btn-check:checked + .btn-success:focus, -.btn-success.active:focus, -.btn-success:active:focus, -.show > .btn-success.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(38, 198, 157, 0.5); -} -.btn-success.disabled, -.btn-success:disabled { - color: #fff; - background-color: #00bc8c; - border-color: #00bc8c; + --bs-btn-color: #fff; + --bs-btn-bg: #00bc8c; + --bs-btn-border-color: #00bc8c; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #00a077; + --bs-btn-hover-border-color: #009670; + --bs-btn-focus-shadow-rgb: 38, 198, 157; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #009670; + --bs-btn-active-border-color: #008d69; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #00bc8c; + --bs-btn-disabled-border-color: #00bc8c; } .btn-info { - color: #fff; - background-color: #3498db; - border-color: #3498db; -} -.btn-info:hover { - color: #fff; - background-color: #2c81ba; - border-color: #2a7aaf; -} -.btn-check:focus + .btn-info, -.btn-info:focus { - color: #fff; - background-color: #2c81ba; - border-color: #2a7aaf; - box-shadow: 0 0 0 0.25rem rgba(82, 167, 224, 0.5); -} -.btn-check:active + .btn-info, -.btn-check:checked + .btn-info, -.btn-info.active, -.btn-info:active, -.show > .btn-info.dropdown-toggle { - color: #fff; - background-color: #2a7aaf; - border-color: #2772a4; -} -.btn-check:active + .btn-info:focus, -.btn-check:checked + .btn-info:focus, -.btn-info.active:focus, -.btn-info:active:focus, -.show > .btn-info.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(82, 167, 224, 0.5); -} -.btn-info.disabled, -.btn-info:disabled { - color: #fff; - background-color: #3498db; - border-color: #3498db; + --bs-btn-color: #fff; + --bs-btn-bg: #3498db; + --bs-btn-border-color: #3498db; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #2c81ba; + --bs-btn-hover-border-color: #2a7aaf; + --bs-btn-focus-shadow-rgb: 82, 167, 224; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #2a7aaf; + --bs-btn-active-border-color: #2772a4; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #3498db; + --bs-btn-disabled-border-color: #3498db; } .btn-warning { - color: #fff; - background-color: #f39c12; - border-color: #f39c12; -} -.btn-warning:hover { - color: #fff; - background-color: #cf850f; - border-color: #c27d0e; -} -.btn-check:focus + .btn-warning, -.btn-warning:focus { - color: #fff; - background-color: #cf850f; - border-color: #c27d0e; - box-shadow: 0 0 0 0.25rem rgba(245, 171, 54, 0.5); -} -.btn-check:active + .btn-warning, -.btn-check:checked + .btn-warning, -.btn-warning.active, -.btn-warning:active, -.show > .btn-warning.dropdown-toggle { - color: #fff; - background-color: #c27d0e; - border-color: #b6750e; -} -.btn-check:active + .btn-warning:focus, -.btn-check:checked + .btn-warning:focus, -.btn-warning.active:focus, -.btn-warning:active:focus, -.show > .btn-warning.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(245, 171, 54, 0.5); -} -.btn-warning.disabled, -.btn-warning:disabled { - color: #fff; - background-color: #f39c12; - border-color: #f39c12; + --bs-btn-color: #fff; + --bs-btn-bg: #f39c12; + --bs-btn-border-color: #f39c12; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #cf850f; + --bs-btn-hover-border-color: #c27d0e; + --bs-btn-focus-shadow-rgb: 245, 171, 54; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #c27d0e; + --bs-btn-active-border-color: #b6750e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #f39c12; + --bs-btn-disabled-border-color: #f39c12; } .btn-danger { - color: #fff; - background-color: #e74c3c; - border-color: #e74c3c; -} -.btn-danger:hover { - color: #fff; - background-color: #c44133; - border-color: #b93d30; -} -.btn-check:focus + .btn-danger, -.btn-danger:focus { - color: #fff; - background-color: #c44133; - border-color: #b93d30; - box-shadow: 0 0 0 0.25rem rgba(235, 103, 89, 0.5); -} -.btn-check:active + .btn-danger, -.btn-check:checked + .btn-danger, -.btn-danger.active, -.btn-danger:active, -.show > .btn-danger.dropdown-toggle { - color: #fff; - background-color: #b93d30; - border-color: #ad392d; -} -.btn-check:active + .btn-danger:focus, -.btn-check:checked + .btn-danger:focus, -.btn-danger.active:focus, -.btn-danger:active:focus, -.show > .btn-danger.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(235, 103, 89, 0.5); -} -.btn-danger.disabled, -.btn-danger:disabled { - color: #fff; - background-color: #e74c3c; - border-color: #e74c3c; + --bs-btn-color: #fff; + --bs-btn-bg: #e74c3c; + --bs-btn-border-color: #e74c3c; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #c44133; + --bs-btn-hover-border-color: #b93d30; + --bs-btn-focus-shadow-rgb: 235, 103, 89; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #b93d30; + --bs-btn-active-border-color: #ad392d; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #e74c3c; + --bs-btn-disabled-border-color: #e74c3c; } .btn-light { - color: #fff; - background-color: #adb5bd; - border-color: #adb5bd; -} -.btn-light:hover { - color: #fff; - background-color: #939aa1; - border-color: #8a9197; -} -.btn-check:focus + .btn-light, -.btn-light:focus { - color: #fff; - background-color: #939aa1; - border-color: #8a9197; - box-shadow: 0 0 0 0.25rem rgba(185, 192, 199, 0.5); -} -.btn-check:active + .btn-light, -.btn-check:checked + .btn-light, -.btn-light.active, -.btn-light:active, -.show > .btn-light.dropdown-toggle { - color: #fff; - background-color: #8a9197; - border-color: #82888e; -} -.btn-check:active + .btn-light:focus, -.btn-check:checked + .btn-light:focus, -.btn-light.active:focus, -.btn-light:active:focus, -.show > .btn-light.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(185, 192, 199, 0.5); -} -.btn-light.disabled, -.btn-light:disabled { - color: #fff; - background-color: #adb5bd; - border-color: #adb5bd; + --bs-btn-color: #fff; + --bs-btn-bg: #adb5bd; + --bs-btn-border-color: #adb5bd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #939aa1; + --bs-btn-hover-border-color: #8a9197; + --bs-btn-focus-shadow-rgb: 185, 192, 199; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #8a9197; + --bs-btn-active-border-color: #82888e; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #adb5bd; + --bs-btn-disabled-border-color: #adb5bd; } .btn-dark { - color: #fff; - background-color: #303030; - border-color: #303030; -} -.btn-dark:hover { - color: #fff; - background-color: #292929; - border-color: #262626; -} -.btn-check:focus + .btn-dark, -.btn-dark:focus { - color: #fff; - background-color: #292929; - border-color: #262626; - box-shadow: 0 0 0 0.25rem rgba(79, 79, 79, 0.5); -} -.btn-check:active + .btn-dark, -.btn-check:checked + .btn-dark, -.btn-dark.active, -.btn-dark:active, -.show > .btn-dark.dropdown-toggle { - color: #fff; - background-color: #262626; - border-color: #242424; -} -.btn-check:active + .btn-dark:focus, -.btn-check:checked + .btn-dark:focus, -.btn-dark.active:focus, -.btn-dark:active:focus, -.show > .btn-dark.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(79, 79, 79, 0.5); -} -.btn-dark.disabled, -.btn-dark:disabled { - color: #fff; - background-color: #303030; - border-color: #303030; + --bs-btn-color: #fff; + --bs-btn-bg: #303030; + --bs-btn-border-color: #303030; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #4f4f4f; + --bs-btn-hover-border-color: #454545; + --bs-btn-focus-shadow-rgb: 79, 79, 79; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #595959; + --bs-btn-active-border-color: #454545; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #fff; + --bs-btn-disabled-bg: #303030; + --bs-btn-disabled-border-color: #303030; } .btn-outline-primary { - color: #375a7f; - border-color: #375a7f; -} -.btn-outline-primary:hover { - color: #fff; - background-color: #375a7f; - border-color: #375a7f; -} -.btn-check:focus + .btn-outline-primary, -.btn-outline-primary:focus { - box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.5); -} -.btn-check:active + .btn-outline-primary, -.btn-check:checked + .btn-outline-primary, -.btn-outline-primary.active, -.btn-outline-primary.dropdown-toggle.show, -.btn-outline-primary:active { - color: #fff; - background-color: #375a7f; - border-color: #375a7f; -} -.btn-check:active + .btn-outline-primary:focus, -.btn-check:checked + .btn-outline-primary:focus, -.btn-outline-primary.active:focus, -.btn-outline-primary.dropdown-toggle.show:focus, -.btn-outline-primary:active:focus { - box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.5); -} -.btn-outline-primary.disabled, -.btn-outline-primary:disabled { - color: #375a7f; - background-color: transparent; + --bs-btn-color: #375a7f; + --bs-btn-border-color: #375a7f; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #375a7f; + --bs-btn-hover-border-color: #375a7f; + --bs-btn-focus-shadow-rgb: 55, 90, 127; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #375a7f; + --bs-btn-active-border-color: #375a7f; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #375a7f; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #375a7f; + --bs-gradient: none; } .btn-outline-secondary { - color: #444; - border-color: #444; -} -.btn-outline-secondary:hover { - color: #fff; - background-color: #444; - border-color: #444; -} -.btn-check:focus + .btn-outline-secondary, -.btn-outline-secondary:focus { - box-shadow: 0 0 0 0.25rem rgba(68, 68, 68, 0.5); -} -.btn-check:active + .btn-outline-secondary, -.btn-check:checked + .btn-outline-secondary, -.btn-outline-secondary.active, -.btn-outline-secondary.dropdown-toggle.show, -.btn-outline-secondary:active { - color: #fff; - background-color: #444; - border-color: #444; -} -.btn-check:active + .btn-outline-secondary:focus, -.btn-check:checked + .btn-outline-secondary:focus, -.btn-outline-secondary.active:focus, -.btn-outline-secondary.dropdown-toggle.show:focus, -.btn-outline-secondary:active:focus { - box-shadow: 0 0 0 0.25rem rgba(68, 68, 68, 0.5); -} -.btn-outline-secondary.disabled, -.btn-outline-secondary:disabled { - color: #444; - background-color: transparent; + --bs-btn-color: #444; + --bs-btn-border-color: #444; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #444; + --bs-btn-hover-border-color: #444; + --bs-btn-focus-shadow-rgb: 68, 68, 68; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #444; + --bs-btn-active-border-color: #444; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #444; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #444; + --bs-gradient: none; } .btn-outline-success { - color: #00bc8c; - border-color: #00bc8c; -} -.btn-outline-success:hover { - color: #fff; - background-color: #00bc8c; - border-color: #00bc8c; -} -.btn-check:focus + .btn-outline-success, -.btn-outline-success:focus { - box-shadow: 0 0 0 0.25rem rgba(0, 188, 140, 0.5); -} -.btn-check:active + .btn-outline-success, -.btn-check:checked + .btn-outline-success, -.btn-outline-success.active, -.btn-outline-success.dropdown-toggle.show, -.btn-outline-success:active { - color: #fff; - background-color: #00bc8c; - border-color: #00bc8c; -} -.btn-check:active + .btn-outline-success:focus, -.btn-check:checked + .btn-outline-success:focus, -.btn-outline-success.active:focus, -.btn-outline-success.dropdown-toggle.show:focus, -.btn-outline-success:active:focus { - box-shadow: 0 0 0 0.25rem rgba(0, 188, 140, 0.5); -} -.btn-outline-success.disabled, -.btn-outline-success:disabled { - color: #00bc8c; - background-color: transparent; + --bs-btn-color: #00bc8c; + --bs-btn-border-color: #00bc8c; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #00bc8c; + --bs-btn-hover-border-color: #00bc8c; + --bs-btn-focus-shadow-rgb: 0, 188, 140; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #00bc8c; + --bs-btn-active-border-color: #00bc8c; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #00bc8c; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #00bc8c; + --bs-gradient: none; } .btn-outline-info { - color: #3498db; - border-color: #3498db; -} -.btn-outline-info:hover { - color: #fff; - background-color: #3498db; - border-color: #3498db; -} -.btn-check:focus + .btn-outline-info, -.btn-outline-info:focus { - box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.5); -} -.btn-check:active + .btn-outline-info, -.btn-check:checked + .btn-outline-info, -.btn-outline-info.active, -.btn-outline-info.dropdown-toggle.show, -.btn-outline-info:active { - color: #fff; - background-color: #3498db; - border-color: #3498db; -} -.btn-check:active + .btn-outline-info:focus, -.btn-check:checked + .btn-outline-info:focus, -.btn-outline-info.active:focus, -.btn-outline-info.dropdown-toggle.show:focus, -.btn-outline-info:active:focus { - box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.5); -} -.btn-outline-info.disabled, -.btn-outline-info:disabled { - color: #3498db; - background-color: transparent; + --bs-btn-color: #3498db; + --bs-btn-border-color: #3498db; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #3498db; + --bs-btn-hover-border-color: #3498db; + --bs-btn-focus-shadow-rgb: 52, 152, 219; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #3498db; + --bs-btn-active-border-color: #3498db; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #3498db; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #3498db; + --bs-gradient: none; } .btn-outline-warning { - color: #f39c12; - border-color: #f39c12; -} -.btn-outline-warning:hover { - color: #fff; - background-color: #f39c12; - border-color: #f39c12; -} -.btn-check:focus + .btn-outline-warning, -.btn-outline-warning:focus { - box-shadow: 0 0 0 0.25rem rgba(243, 156, 18, 0.5); -} -.btn-check:active + .btn-outline-warning, -.btn-check:checked + .btn-outline-warning, -.btn-outline-warning.active, -.btn-outline-warning.dropdown-toggle.show, -.btn-outline-warning:active { - color: #fff; - background-color: #f39c12; - border-color: #f39c12; -} -.btn-check:active + .btn-outline-warning:focus, -.btn-check:checked + .btn-outline-warning:focus, -.btn-outline-warning.active:focus, -.btn-outline-warning.dropdown-toggle.show:focus, -.btn-outline-warning:active:focus { - box-shadow: 0 0 0 0.25rem rgba(243, 156, 18, 0.5); -} -.btn-outline-warning.disabled, -.btn-outline-warning:disabled { - color: #f39c12; - background-color: transparent; + --bs-btn-color: #f39c12; + --bs-btn-border-color: #f39c12; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #f39c12; + --bs-btn-hover-border-color: #f39c12; + --bs-btn-focus-shadow-rgb: 243, 156, 18; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #f39c12; + --bs-btn-active-border-color: #f39c12; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #f39c12; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #f39c12; + --bs-gradient: none; } .btn-outline-danger { - color: #e74c3c; - border-color: #e74c3c; -} -.btn-outline-danger:hover { - color: #fff; - background-color: #e74c3c; - border-color: #e74c3c; -} -.btn-check:focus + .btn-outline-danger, -.btn-outline-danger:focus { - box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.5); -} -.btn-check:active + .btn-outline-danger, -.btn-check:checked + .btn-outline-danger, -.btn-outline-danger.active, -.btn-outline-danger.dropdown-toggle.show, -.btn-outline-danger:active { - color: #fff; - background-color: #e74c3c; - border-color: #e74c3c; -} -.btn-check:active + .btn-outline-danger:focus, -.btn-check:checked + .btn-outline-danger:focus, -.btn-outline-danger.active:focus, -.btn-outline-danger.dropdown-toggle.show:focus, -.btn-outline-danger:active:focus { - box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.5); -} -.btn-outline-danger.disabled, -.btn-outline-danger:disabled { - color: #e74c3c; - background-color: transparent; + --bs-btn-color: #e74c3c; + --bs-btn-border-color: #e74c3c; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #e74c3c; + --bs-btn-hover-border-color: #e74c3c; + --bs-btn-focus-shadow-rgb: 231, 76, 60; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #e74c3c; + --bs-btn-active-border-color: #e74c3c; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #e74c3c; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #e74c3c; + --bs-gradient: none; } .btn-outline-light { - color: #adb5bd; - border-color: #adb5bd; -} -.btn-outline-light:hover { - color: #fff; - background-color: #adb5bd; - border-color: #adb5bd; -} -.btn-check:focus + .btn-outline-light, -.btn-outline-light:focus { - box-shadow: 0 0 0 0.25rem rgba(173, 181, 189, 0.5); -} -.btn-check:active + .btn-outline-light, -.btn-check:checked + .btn-outline-light, -.btn-outline-light.active, -.btn-outline-light.dropdown-toggle.show, -.btn-outline-light:active { - color: #fff; - background-color: #adb5bd; - border-color: #adb5bd; -} -.btn-check:active + .btn-outline-light:focus, -.btn-check:checked + .btn-outline-light:focus, -.btn-outline-light.active:focus, -.btn-outline-light.dropdown-toggle.show:focus, -.btn-outline-light:active:focus { - box-shadow: 0 0 0 0.25rem rgba(173, 181, 189, 0.5); -} -.btn-outline-light.disabled, -.btn-outline-light:disabled { - color: #adb5bd; - background-color: transparent; + --bs-btn-color: #adb5bd; + --bs-btn-border-color: #adb5bd; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #adb5bd; + --bs-btn-hover-border-color: #adb5bd; + --bs-btn-focus-shadow-rgb: 173, 181, 189; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #adb5bd; + --bs-btn-active-border-color: #adb5bd; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #adb5bd; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #adb5bd; + --bs-gradient: none; } .btn-outline-dark { - color: #303030; - border-color: #303030; -} -.btn-outline-dark:hover { - color: #fff; - background-color: #303030; - border-color: #303030; -} -.btn-check:focus + .btn-outline-dark, -.btn-outline-dark:focus { - box-shadow: 0 0 0 0.25rem rgba(48, 48, 48, 0.5); -} -.btn-check:active + .btn-outline-dark, -.btn-check:checked + .btn-outline-dark, -.btn-outline-dark.active, -.btn-outline-dark.dropdown-toggle.show, -.btn-outline-dark:active { - color: #fff; - background-color: #303030; - border-color: #303030; -} -.btn-check:active + .btn-outline-dark:focus, -.btn-check:checked + .btn-outline-dark:focus, -.btn-outline-dark.active:focus, -.btn-outline-dark.dropdown-toggle.show:focus, -.btn-outline-dark:active:focus { - box-shadow: 0 0 0 0.25rem rgba(48, 48, 48, 0.5); -} -.btn-outline-dark.disabled, -.btn-outline-dark:disabled { - color: #303030; - background-color: transparent; + --bs-btn-color: #303030; + --bs-btn-border-color: #303030; + --bs-btn-hover-color: #fff; + --bs-btn-hover-bg: #303030; + --bs-btn-hover-border-color: #303030; + --bs-btn-focus-shadow-rgb: 48, 48, 48; + --bs-btn-active-color: #fff; + --bs-btn-active-bg: #303030; + --bs-btn-active-border-color: #303030; + --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + --bs-btn-disabled-color: #303030; + --bs-btn-disabled-bg: transparent; + --bs-btn-disabled-border-color: #303030; + --bs-gradient: none; } .btn-link { - font-weight: 400; - color: #00bc8c; + --bs-btn-font-weight: 400; + --bs-btn-color: var(--bs-link-color); + --bs-btn-bg: transparent; + --bs-btn-border-color: transparent; + --bs-btn-hover-color: var(--bs-link-hover-color); + --bs-btn-hover-border-color: transparent; + --bs-btn-active-color: var(--bs-link-hover-color); + --bs-btn-active-border-color: transparent; + --bs-btn-disabled-color: #888; + --bs-btn-disabled-border-color: transparent; + --bs-btn-box-shadow: none; + --bs-btn-focus-shadow-rgb: 85, 115, 146; text-decoration: underline; } -.btn-link:hover { - color: #009670; +.btn-link:focus-visible { + color: var(--bs-btn-color); } -.btn-link.disabled, -.btn-link:disabled { - color: #888; +.btn-link:hover { + color: var(--bs-btn-hover-color); } .btn-group-lg > .btn, .btn-lg { - padding: 0.5rem 1rem; - font-size: 1.25rem; - border-radius: 0.3rem; + --bs-btn-padding-y: 0.5rem; + --bs-btn-padding-x: 1rem; + --bs-btn-font-size: 1.25rem; + --bs-btn-border-radius: 0.5rem; } .btn-group-sm > .btn, .btn-sm { - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - border-radius: 0.2rem; + --bs-btn-padding-y: 0.25rem; + --bs-btn-padding-x: 0.5rem; + --bs-btn-font-size: 0.875rem; + --bs-btn-border-radius: 0.25rem; } .fade { transition: opacity 0.15s linear; @@ -3474,9 +3133,11 @@ fieldset:disabled .btn { } } .dropdown, +.dropdown-center, .dropend, .dropstart, -.dropup { +.dropup, +.dropup-center { position: relative; } .dropdown-toggle { @@ -3496,25 +3157,51 @@ fieldset:disabled .btn { margin-left: 0; } .dropdown-menu { + --bs-dropdown-zindex: 1000; + --bs-dropdown-min-width: 10rem; + --bs-dropdown-padding-x: 0; + --bs-dropdown-padding-y: 0.5rem; + --bs-dropdown-spacer: 0.125rem; + --bs-dropdown-font-size: 1rem; + --bs-dropdown-color: #fff; + --bs-dropdown-bg: #222; + --bs-dropdown-border-color: #444; + --bs-dropdown-border-radius: 0.375rem; + --bs-dropdown-border-width: 1px; + --bs-dropdown-inner-border-radius: calc(0.375rem - 1px); + --bs-dropdown-divider-bg: #444; + --bs-dropdown-divider-margin-y: 0.5rem; + --bs-dropdown-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-dropdown-link-color: #fff; + --bs-dropdown-link-hover-color: #fff; + --bs-dropdown-link-hover-bg: #375a7f; + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #375a7f; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-item-padding-x: 1rem; + --bs-dropdown-item-padding-y: 0.25rem; + --bs-dropdown-header-color: #888; + --bs-dropdown-header-padding-x: 1rem; + --bs-dropdown-header-padding-y: 0.5rem; position: absolute; - z-index: 1000; + z-index: var(--bs-dropdown-zindex); display: none; - min-width: 10rem; - padding: 0.5rem 0; + min-width: var(--bs-dropdown-min-width); + padding: var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x); margin: 0; - font-size: 1rem; - color: #fff; + font-size: var(--bs-dropdown-font-size); + color: var(--bs-dropdown-color); text-align: left; list-style: none; - background-color: #222; + background-color: var(--bs-dropdown-bg); background-clip: padding-box; - border: 1px solid #444; - border-radius: 0.25rem; + border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color); + border-radius: var(--bs-dropdown-border-radius); } .dropdown-menu[data-bs-popper] { top: 100%; left: 0; - margin-top: 0.125rem; + margin-top: var(--bs-dropdown-spacer); } .dropdown-menu-start { --bs-position: start; @@ -3614,7 +3301,7 @@ fieldset:disabled .btn { top: auto; bottom: 100%; margin-top: 0; - margin-bottom: 0.125rem; + margin-bottom: var(--bs-dropdown-spacer); } .dropup .dropdown-toggle::after { display: inline-block; @@ -3634,7 +3321,7 @@ fieldset:disabled .btn { right: auto; left: 100%; margin-top: 0; - margin-left: 0.125rem; + margin-left: var(--bs-dropdown-spacer); } .dropend .dropdown-toggle::after { display: inline-block; @@ -3657,7 +3344,7 @@ fieldset:disabled .btn { right: 100%; left: auto; margin-top: 0; - margin-right: 0.125rem; + margin-right: var(--bs-dropdown-spacer); } .dropstart .dropdown-toggle::after { display: inline-block; @@ -3685,17 +3372,18 @@ fieldset:disabled .btn { } .dropdown-divider { height: 0; - margin: 0.5rem 0; + margin: var(--bs-dropdown-divider-margin-y) 0; overflow: hidden; - border-top: 1px solid #444; + border-top: 1px solid var(--bs-dropdown-divider-bg); + opacity: 1; } .dropdown-item { display: block; width: 100%; - padding: 0.25rem 1rem; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); clear: both; font-weight: 400; - color: #fff; + color: var(--bs-dropdown-link-color); text-align: inherit; text-decoration: none; white-space: nowrap; @@ -3704,18 +3392,18 @@ fieldset:disabled .btn { } .dropdown-item:focus, .dropdown-item:hover { - color: #fff; - background-color: #375a7f; + color: var(--bs-dropdown-link-hover-color); + background-color: var(--bs-dropdown-link-hover-bg); } .dropdown-item.active, .dropdown-item:active { - color: #fff; + color: var(--bs-dropdown-link-active-color); text-decoration: none; - background-color: #375a7f; + background-color: var(--bs-dropdown-link-active-bg); } .dropdown-item.disabled, .dropdown-item:disabled { - color: #adb5bd; + color: var(--bs-dropdown-link-disabled-color); pointer-events: none; background-color: transparent; } @@ -3724,59 +3412,41 @@ fieldset:disabled .btn { } .dropdown-header { display: block; - padding: 0.5rem 1rem; + padding: var(--bs-dropdown-header-padding-y) + var(--bs-dropdown-header-padding-x); margin-bottom: 0; font-size: 0.875rem; - color: #888; + color: var(--bs-dropdown-header-color); white-space: nowrap; } .dropdown-item-text { display: block; - padding: 0.25rem 1rem; - color: #fff; + padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x); + color: var(--bs-dropdown-link-color); } .dropdown-menu-dark { - color: #dee2e6; - background-color: #303030; - border-color: #444; -} -.dropdown-menu-dark .dropdown-item { - color: #dee2e6; -} -.dropdown-menu-dark .dropdown-item:focus, -.dropdown-menu-dark .dropdown-item:hover { - color: #fff; - background-color: rgba(255, 255, 255, 0.15); -} -.dropdown-menu-dark .dropdown-item.active, -.dropdown-menu-dark .dropdown-item:active { - color: #fff; - background-color: #375a7f; -} -.dropdown-menu-dark .dropdown-item.disabled, -.dropdown-menu-dark .dropdown-item:disabled { - color: #adb5bd; -} -.dropdown-menu-dark .dropdown-divider { - border-color: #444; -} -.dropdown-menu-dark .dropdown-item-text { - color: #dee2e6; -} -.dropdown-menu-dark .dropdown-header { - color: #adb5bd; + --bs-dropdown-color: #dee2e6; + --bs-dropdown-bg: #303030; + --bs-dropdown-border-color: #444; + --bs-dropdown-box-shadow: ; + --bs-dropdown-link-color: #dee2e6; + --bs-dropdown-link-hover-color: #fff; + --bs-dropdown-divider-bg: #444; + --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.15); + --bs-dropdown-link-active-color: #fff; + --bs-dropdown-link-active-bg: #375a7f; + --bs-dropdown-link-disabled-color: #adb5bd; + --bs-dropdown-header-color: #adb5bd; } .btn-group, .btn-group-vertical { position: relative; - display: -ms-inline-flexbox; display: inline-flex; vertical-align: middle; } .btn-group-vertical > .btn, .btn-group > .btn { position: relative; - -ms-flex: 1 1 auto; flex: 1 1 auto; } .btn-group-vertical > .btn-check:checked + .btn, @@ -3794,21 +3464,22 @@ fieldset:disabled .btn { z-index: 1; } .btn-toolbar { - display: -ms-flexbox; display: flex; - -ms-flex-wrap: wrap; flex-wrap: wrap; - -ms-flex-pack: start; justify-content: flex-start; } .btn-toolbar .input-group { width: auto; } +.btn-group { + border-radius: 0.375rem; +} .btn-group > .btn-group:not(:first-child), -.btn-group > .btn:not(:first-child) { +.btn-group > :not(.btn-check:first-child) + .btn { margin-left: -1px; } .btn-group > .btn-group:not(:last-child) > .btn, +.btn-group > .btn.dropdown-toggle-split:first-child, .btn-group > .btn:not(:last-child):not(.dropdown-toggle) { border-top-right-radius: 0; border-bottom-right-radius: 0; @@ -3842,11 +3513,8 @@ fieldset:disabled .btn { padding-left: 0.75rem; } .btn-group-vertical { - -ms-flex-direction: column; flex-direction: column; - -ms-flex-align: start; align-items: flex-start; - -ms-flex-pack: center; justify-content: center; } .btn-group-vertical > .btn, @@ -3868,9 +3536,13 @@ fieldset:disabled .btn { border-top-right-radius: 0; } .nav { - display: -ms-flexbox; + --bs-nav-link-padding-x: 2rem; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-font-weight: ; + --bs-nav-link-color: var(--bs-link-color); + --bs-nav-link-hover-color: var(--bs-link-hover-color); + --bs-nav-link-disabled-color: #adb5bd; display: flex; - -ms-flex-wrap: wrap; flex-wrap: wrap; padding-left: 0; margin-bottom: 0; @@ -3878,8 +3550,10 @@ fieldset:disabled .btn { } .nav-link { display: block; - padding: 0.5rem 2rem; - color: #00bc8c; + padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x); + font-size: var(--bs-nav-link-font-size); + font-weight: var(--bs-nav-link-font-weight); + color: var(--bs-nav-link-color); text-decoration: none; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; @@ -3891,65 +3565,81 @@ fieldset:disabled .btn { } .nav-link:focus, .nav-link:hover { - color: #009670; + color: var(--bs-nav-link-hover-color); } .nav-link.disabled { - color: #adb5bd; + color: var(--bs-nav-link-disabled-color); pointer-events: none; cursor: default; } .nav-tabs { - border-bottom: 1px solid #444; + --bs-nav-tabs-border-width: 1px; + --bs-nav-tabs-border-color: #444; + --bs-nav-tabs-border-radius: 0.375rem; + --bs-nav-tabs-link-hover-border-color: #444 #444 transparent; + --bs-nav-tabs-link-active-color: #fff; + --bs-nav-tabs-link-active-bg: #222; + --bs-nav-tabs-link-active-border-color: #444 #444 transparent; + border-bottom: var(--bs-nav-tabs-border-width) solid + var(--bs-nav-tabs-border-color); } .nav-tabs .nav-link { - margin-bottom: -1px; + margin-bottom: calc(-1 * var(--bs-nav-tabs-border-width)); background: 0 0; - border: 1px solid transparent; - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; + border: var(--bs-nav-tabs-border-width) solid transparent; + border-top-left-radius: var(--bs-nav-tabs-border-radius); + border-top-right-radius: var(--bs-nav-tabs-border-radius); } .nav-tabs .nav-link:focus, .nav-tabs .nav-link:hover { - border-color: #444 #444 transparent; isolation: isolate; + border-color: var(--bs-nav-tabs-link-hover-border-color); } -.nav-tabs .nav-link.disabled { - color: #adb5bd; +.nav-tabs .nav-link.disabled, +.nav-tabs .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); background-color: transparent; border-color: transparent; } .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active { - color: #fff; - background-color: #222; - border-color: #444 #444 transparent; + color: var(--bs-nav-tabs-link-active-color); + background-color: var(--bs-nav-tabs-link-active-bg); + border-color: var(--bs-nav-tabs-link-active-border-color); } .nav-tabs .dropdown-menu { - margin-top: -1px; + margin-top: calc(-1 * var(--bs-nav-tabs-border-width)); border-top-left-radius: 0; border-top-right-radius: 0; } +.nav-pills { + --bs-nav-pills-border-radius: 0.375rem; + --bs-nav-pills-link-active-color: #fff; + --bs-nav-pills-link-active-bg: #375a7f; +} .nav-pills .nav-link { background: 0 0; border: 0; - border-radius: 0.25rem; + border-radius: var(--bs-nav-pills-border-radius); +} +.nav-pills .nav-link:disabled { + color: var(--bs-nav-link-disabled-color); + background-color: transparent; + border-color: transparent; } .nav-pills .nav-link.active, .nav-pills .show > .nav-link { - color: #fff; - background-color: #375a7f; + color: var(--bs-nav-pills-link-active-color); + background-color: var(--bs-nav-pills-link-active-bg); } .nav-fill .nav-item, .nav-fill > .nav-link { - -ms-flex: 1 1 auto; flex: 1 1 auto; text-align: center; } .nav-justified .nav-item, .nav-justified > .nav-link { - -ms-flex-preferred-size: 0; flex-basis: 0; - -ms-flex-positive: 1; flex-grow: 1; text-align: center; } @@ -3964,17 +3654,32 @@ fieldset:disabled .btn { display: block; } .navbar { + --bs-navbar-padding-x: 0; + --bs-navbar-padding-y: 1rem; + --bs-navbar-color: rgba(34, 34, 34, 0.7); + --bs-navbar-hover-color: #222; + --bs-navbar-disabled-color: rgba(0, 0, 0, 0.3); + --bs-navbar-active-color: #222; + --bs-navbar-brand-padding-y: 0.3125rem; + --bs-navbar-brand-margin-end: 1rem; + --bs-navbar-brand-font-size: 1.25rem; + --bs-navbar-brand-color: #222; + --bs-navbar-brand-hover-color: #222; + --bs-navbar-nav-link-padding-x: 0.5rem; + --bs-navbar-toggler-padding-y: 0.25rem; + --bs-navbar-toggler-padding-x: 0.75rem; + --bs-navbar-toggler-font-size: 1.25rem; + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2834, 34, 34, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); + --bs-navbar-toggler-border-color: rgba(34, 34, 34, 0.1); + --bs-navbar-toggler-border-radius: 0.375rem; + --bs-navbar-toggler-focus-width: 0.25rem; + --bs-navbar-toggler-transition: box-shadow 0.15s ease-in-out; position: relative; - display: -ms-flexbox; display: flex; - -ms-flex-wrap: wrap; flex-wrap: wrap; - -ms-flex-align: center; align-items: center; - -ms-flex-pack: justify; justify-content: space-between; - padding-top: 1rem; - padding-bottom: 1rem; + padding: var(--bs-navbar-padding-y) var(--bs-navbar-padding-x); } .navbar > .container, .navbar > .container-fluid, @@ -3983,35 +3688,40 @@ fieldset:disabled .btn { .navbar > .container-sm, .navbar > .container-xl, .navbar > .container-xxl { - display: -ms-flexbox; display: flex; - -ms-flex-wrap: inherit; flex-wrap: inherit; - -ms-flex-align: center; align-items: center; - -ms-flex-pack: justify; justify-content: space-between; } .navbar-brand { - padding-top: 0.3125rem; - padding-bottom: 0.3125rem; - margin-right: 1rem; - font-size: 1.25rem; + padding-top: var(--bs-navbar-brand-padding-y); + padding-bottom: var(--bs-navbar-brand-padding-y); + margin-right: var(--bs-navbar-brand-margin-end); + font-size: var(--bs-navbar-brand-font-size); + color: var(--bs-navbar-brand-color); text-decoration: none; white-space: nowrap; } +.navbar-brand:focus, +.navbar-brand:hover { + color: var(--bs-navbar-brand-hover-color); +} .navbar-nav { - display: -ms-flexbox; + --bs-nav-link-padding-x: 0; + --bs-nav-link-padding-y: 0.5rem; + --bs-nav-link-font-weight: ; + --bs-nav-link-color: var(--bs-navbar-color); + --bs-nav-link-hover-color: var(--bs-navbar-hover-color); + --bs-nav-link-disabled-color: var(--bs-navbar-disabled-color); display: flex; - -ms-flex-direction: column; flex-direction: column; padding-left: 0; margin-bottom: 0; list-style: none; } -.navbar-nav .nav-link { - padding-right: 0; - padding-left: 0; +.navbar-nav .nav-link.active, +.navbar-nav .show > .nav-link { + color: var(--bs-navbar-active-color); } .navbar-nav .dropdown-menu { position: static; @@ -4019,23 +3729,27 @@ fieldset:disabled .btn { .navbar-text { padding-top: 0.5rem; padding-bottom: 0.5rem; + color: var(--bs-navbar-color); +} +.navbar-text a, +.navbar-text a:focus, +.navbar-text a:hover { + color: var(--bs-navbar-active-color); } .navbar-collapse { - -ms-flex-preferred-size: 100%; flex-basis: 100%; - -ms-flex-positive: 1; flex-grow: 1; - -ms-flex-align: center; align-items: center; } .navbar-toggler { - padding: 0.25rem 0.75rem; - font-size: 1.25rem; + padding: var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x); + font-size: var(--bs-navbar-toggler-font-size); line-height: 1; + color: var(--bs-navbar-color); background-color: transparent; - border: 1px solid transparent; - border-radius: 0.25rem; - transition: box-shadow 0.15s ease-in-out; + border: var(--bs-border-width) solid var(--bs-navbar-toggler-border-color); + border-radius: var(--bs-navbar-toggler-border-radius); + transition: var(--bs-navbar-toggler-transition); } @media (prefers-reduced-motion: reduce) { .navbar-toggler { @@ -4048,13 +3762,14 @@ fieldset:disabled .btn { .navbar-toggler:focus { text-decoration: none; outline: 0; - box-shadow: 0 0 0 0.25rem; + box-shadow: 0 0 0 var(--bs-navbar-toggler-focus-width); } .navbar-toggler-icon { display: inline-block; width: 1.5em; height: 1.5em; vertical-align: middle; + background-image: var(--bs-navbar-toggler-icon-bg); background-repeat: no-repeat; background-position: center; background-size: 100%; @@ -4065,61 +3780,46 @@ fieldset:disabled .btn { } @media (min-width: 576px) { .navbar-expand-sm { - -ms-flex-wrap: nowrap; flex-wrap: nowrap; - -ms-flex-pack: start; justify-content: flex-start; } .navbar-expand-sm .navbar-nav { - -ms-flex-direction: row; flex-direction: row; } .navbar-expand-sm .navbar-nav .dropdown-menu { position: absolute; } .navbar-expand-sm .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); } .navbar-expand-sm .navbar-nav-scroll { overflow: visible; } .navbar-expand-sm .navbar-collapse { - display: -ms-flexbox !important; display: flex !important; - -ms-flex-preferred-size: auto; flex-basis: auto; } .navbar-expand-sm .navbar-toggler { display: none; } - .navbar-expand-sm .offcanvas-header { + .navbar-expand-sm .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-sm .offcanvas .offcanvas-header { display: none; } - .navbar-expand-sm .offcanvas { - position: inherit; - bottom: 0; - z-index: 1000; - -ms-flex-positive: 1; - flex-grow: 1; - visibility: visible !important; - background-color: transparent; - border-right: 0; - border-left: 0; - transition: none; - -webkit-transform: none; - transform: none; - } - .navbar-expand-sm .offcanvas-bottom, - .navbar-expand-sm .offcanvas-top { - height: auto; - border-top: 0; - border-bottom: 0; - } - .navbar-expand-sm .offcanvas-body { - display: -ms-flexbox; + .navbar-expand-sm .offcanvas .offcanvas-body { display: flex; - -ms-flex-positive: 0; flex-grow: 0; padding: 0; overflow-y: visible; @@ -4127,61 +3827,46 @@ fieldset:disabled .btn { } @media (min-width: 768px) { .navbar-expand-md { - -ms-flex-wrap: nowrap; flex-wrap: nowrap; - -ms-flex-pack: start; justify-content: flex-start; } .navbar-expand-md .navbar-nav { - -ms-flex-direction: row; flex-direction: row; } .navbar-expand-md .navbar-nav .dropdown-menu { position: absolute; } .navbar-expand-md .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); } .navbar-expand-md .navbar-nav-scroll { overflow: visible; } .navbar-expand-md .navbar-collapse { - display: -ms-flexbox !important; display: flex !important; - -ms-flex-preferred-size: auto; flex-basis: auto; } .navbar-expand-md .navbar-toggler { display: none; } - .navbar-expand-md .offcanvas-header { + .navbar-expand-md .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-md .offcanvas .offcanvas-header { display: none; } - .navbar-expand-md .offcanvas { - position: inherit; - bottom: 0; - z-index: 1000; - -ms-flex-positive: 1; - flex-grow: 1; - visibility: visible !important; - background-color: transparent; - border-right: 0; - border-left: 0; - transition: none; - -webkit-transform: none; - transform: none; - } - .navbar-expand-md .offcanvas-bottom, - .navbar-expand-md .offcanvas-top { - height: auto; - border-top: 0; - border-bottom: 0; - } - .navbar-expand-md .offcanvas-body { - display: -ms-flexbox; + .navbar-expand-md .offcanvas .offcanvas-body { display: flex; - -ms-flex-positive: 0; flex-grow: 0; padding: 0; overflow-y: visible; @@ -4189,61 +3874,46 @@ fieldset:disabled .btn { } @media (min-width: 992px) { .navbar-expand-lg { - -ms-flex-wrap: nowrap; flex-wrap: nowrap; - -ms-flex-pack: start; justify-content: flex-start; } .navbar-expand-lg .navbar-nav { - -ms-flex-direction: row; flex-direction: row; } .navbar-expand-lg .navbar-nav .dropdown-menu { position: absolute; } .navbar-expand-lg .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); } .navbar-expand-lg .navbar-nav-scroll { overflow: visible; } .navbar-expand-lg .navbar-collapse { - display: -ms-flexbox !important; display: flex !important; - -ms-flex-preferred-size: auto; flex-basis: auto; } .navbar-expand-lg .navbar-toggler { display: none; } - .navbar-expand-lg .offcanvas-header { + .navbar-expand-lg .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-lg .offcanvas .offcanvas-header { display: none; } - .navbar-expand-lg .offcanvas { - position: inherit; - bottom: 0; - z-index: 1000; - -ms-flex-positive: 1; - flex-grow: 1; - visibility: visible !important; - background-color: transparent; - border-right: 0; - border-left: 0; - transition: none; - -webkit-transform: none; - transform: none; - } - .navbar-expand-lg .offcanvas-bottom, - .navbar-expand-lg .offcanvas-top { - height: auto; - border-top: 0; - border-bottom: 0; - } - .navbar-expand-lg .offcanvas-body { - display: -ms-flexbox; + .navbar-expand-lg .offcanvas .offcanvas-body { display: flex; - -ms-flex-positive: 0; flex-grow: 0; padding: 0; overflow-y: visible; @@ -4251,61 +3921,46 @@ fieldset:disabled .btn { } @media (min-width: 1200px) { .navbar-expand-xl { - -ms-flex-wrap: nowrap; flex-wrap: nowrap; - -ms-flex-pack: start; justify-content: flex-start; } .navbar-expand-xl .navbar-nav { - -ms-flex-direction: row; flex-direction: row; } .navbar-expand-xl .navbar-nav .dropdown-menu { position: absolute; } .navbar-expand-xl .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); } .navbar-expand-xl .navbar-nav-scroll { overflow: visible; } .navbar-expand-xl .navbar-collapse { - display: -ms-flexbox !important; display: flex !important; - -ms-flex-preferred-size: auto; flex-basis: auto; } .navbar-expand-xl .navbar-toggler { display: none; } - .navbar-expand-xl .offcanvas-header { + .navbar-expand-xl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-xl .offcanvas .offcanvas-header { display: none; } - .navbar-expand-xl .offcanvas { - position: inherit; - bottom: 0; - z-index: 1000; - -ms-flex-positive: 1; - flex-grow: 1; - visibility: visible !important; - background-color: transparent; - border-right: 0; - border-left: 0; - transition: none; - -webkit-transform: none; - transform: none; - } - .navbar-expand-xl .offcanvas-bottom, - .navbar-expand-xl .offcanvas-top { - height: auto; - border-top: 0; - border-bottom: 0; - } - .navbar-expand-xl .offcanvas-body { - display: -ms-flexbox; + .navbar-expand-xl .offcanvas .offcanvas-body { display: flex; - -ms-flex-positive: 0; flex-grow: 0; padding: 0; overflow-y: visible; @@ -4313,210 +3968,134 @@ fieldset:disabled .btn { } @media (min-width: 1400px) { .navbar-expand-xxl { - -ms-flex-wrap: nowrap; flex-wrap: nowrap; - -ms-flex-pack: start; justify-content: flex-start; } .navbar-expand-xxl .navbar-nav { - -ms-flex-direction: row; flex-direction: row; } .navbar-expand-xxl .navbar-nav .dropdown-menu { position: absolute; } .navbar-expand-xxl .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); } .navbar-expand-xxl .navbar-nav-scroll { overflow: visible; } .navbar-expand-xxl .navbar-collapse { - display: -ms-flexbox !important; display: flex !important; - -ms-flex-preferred-size: auto; flex-basis: auto; } .navbar-expand-xxl .navbar-toggler { display: none; } - .navbar-expand-xxl .offcanvas-header { + .navbar-expand-xxl .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; + } + .navbar-expand-xxl .offcanvas .offcanvas-header { display: none; } - .navbar-expand-xxl .offcanvas { - position: inherit; - bottom: 0; - z-index: 1000; - -ms-flex-positive: 1; - flex-grow: 1; - visibility: visible !important; - background-color: transparent; - border-right: 0; - border-left: 0; - transition: none; - -webkit-transform: none; - transform: none; - } - .navbar-expand-xxl .offcanvas-bottom, - .navbar-expand-xxl .offcanvas-top { - height: auto; - border-top: 0; - border-bottom: 0; - } - .navbar-expand-xxl .offcanvas-body { - display: -ms-flexbox; + .navbar-expand-xxl .offcanvas .offcanvas-body { display: flex; - -ms-flex-positive: 0; flex-grow: 0; padding: 0; overflow-y: visible; } } .navbar-expand { - -ms-flex-wrap: nowrap; flex-wrap: nowrap; - -ms-flex-pack: start; justify-content: flex-start; } .navbar-expand .navbar-nav { - -ms-flex-direction: row; flex-direction: row; } .navbar-expand .navbar-nav .dropdown-menu { position: absolute; } .navbar-expand .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; + padding-right: var(--bs-navbar-nav-link-padding-x); + padding-left: var(--bs-navbar-nav-link-padding-x); } .navbar-expand .navbar-nav-scroll { overflow: visible; } .navbar-expand .navbar-collapse { - display: -ms-flexbox !important; display: flex !important; - -ms-flex-preferred-size: auto; flex-basis: auto; } .navbar-expand .navbar-toggler { display: none; } -.navbar-expand .offcanvas-header { +.navbar-expand .offcanvas { + position: static; + z-index: auto; + flex-grow: 1; + width: auto !important; + height: auto !important; + visibility: visible !important; + background-color: transparent !important; + border: 0 !important; + transform: none !important; + transition: none; +} +.navbar-expand .offcanvas .offcanvas-header { display: none; } -.navbar-expand .offcanvas { - position: inherit; - bottom: 0; - z-index: 1000; - -ms-flex-positive: 1; - flex-grow: 1; - visibility: visible !important; - background-color: transparent; - border-right: 0; - border-left: 0; - transition: none; - -webkit-transform: none; - transform: none; -} -.navbar-expand .offcanvas-bottom, -.navbar-expand .offcanvas-top { - height: auto; - border-top: 0; - border-bottom: 0; -} -.navbar-expand .offcanvas-body { - display: -ms-flexbox; +.navbar-expand .offcanvas .offcanvas-body { display: flex; - -ms-flex-positive: 0; flex-grow: 0; padding: 0; overflow-y: visible; } -.navbar-light .navbar-brand { - color: #222; -} -.navbar-light .navbar-brand:focus, -.navbar-light .navbar-brand:hover { - color: #222; -} -.navbar-light .navbar-nav .nav-link { - color: rgba(34, 34, 34, 0.7); -} -.navbar-light .navbar-nav .nav-link:focus, -.navbar-light .navbar-nav .nav-link:hover { - color: #222; -} -.navbar-light .navbar-nav .nav-link.disabled { - color: rgba(0, 0, 0, 0.3); -} -.navbar-light .navbar-nav .nav-link.active, -.navbar-light .navbar-nav .show > .nav-link { - color: #222; -} -.navbar-light .navbar-toggler { - color: rgba(34, 34, 34, 0.7); - border-color: rgba(34, 34, 34, 0.1); -} -.navbar-light .navbar-toggler-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2834, 34, 34, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); -} -.navbar-light .navbar-text { - color: rgba(34, 34, 34, 0.7); -} -.navbar-light .navbar-text a, -.navbar-light .navbar-text a:focus, -.navbar-light .navbar-text a:hover { - color: #222; -} -.navbar-dark .navbar-brand { - color: #fff; -} -.navbar-dark .navbar-brand:focus, -.navbar-dark .navbar-brand:hover { - color: #fff; -} -.navbar-dark .navbar-nav .nav-link { - color: rgba(255, 255, 255, 0.6); -} -.navbar-dark .navbar-nav .nav-link:focus, -.navbar-dark .navbar-nav .nav-link:hover { - color: #fff; -} -.navbar-dark .navbar-nav .nav-link.disabled { - color: rgba(255, 255, 255, 0.25); -} -.navbar-dark .navbar-nav .nav-link.active, -.navbar-dark .navbar-nav .show > .nav-link { - color: #fff; -} -.navbar-dark .navbar-toggler { - color: rgba(255, 255, 255, 0.6); - border-color: rgba(255, 255, 255, 0.1); -} -.navbar-dark .navbar-toggler-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.6%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); -} -.navbar-dark .navbar-text { - color: rgba(255, 255, 255, 0.6); -} -.navbar-dark .navbar-text a, -.navbar-dark .navbar-text a:focus, -.navbar-dark .navbar-text a:hover { - color: #fff; +.navbar-dark { + --bs-navbar-color: rgba(255, 255, 255, 0.6); + --bs-navbar-hover-color: #fff; + --bs-navbar-disabled-color: rgba(255, 255, 255, 0.25); + --bs-navbar-active-color: #fff; + --bs-navbar-brand-color: #fff; + --bs-navbar-brand-hover-color: #fff; + --bs-navbar-toggler-border-color: rgba(255, 255, 255, 0.1); + --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.6%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); } .card { + --bs-card-spacer-y: 1rem; + --bs-card-spacer-x: 1rem; + --bs-card-title-spacer-y: 0.5rem; + --bs-card-border-width: 1px; + --bs-card-border-color: var(--bs-border-color-translucent); + --bs-card-border-radius: 0.375rem; + --bs-card-box-shadow: ; + --bs-card-inner-border-radius: calc(0.375rem - 1px); + --bs-card-cap-padding-y: 0.5rem; + --bs-card-cap-padding-x: 1rem; + --bs-card-cap-bg: #444; + --bs-card-cap-color: ; + --bs-card-height: ; + --bs-card-color: ; + --bs-card-bg: #303030; + --bs-card-img-overlay-padding: 1rem; + --bs-card-group-margin: 0.75rem; position: relative; - display: -ms-flexbox; display: flex; - -ms-flex-direction: column; flex-direction: column; min-width: 0; + height: var(--bs-card-height); word-wrap: break-word; - background-color: #303030; + background-color: var(--bs-card-bg); background-clip: border-box; - border: 1px solid rgba(0, 0, 0, 0.125); - border-radius: 0.25rem; + border: var(--bs-card-border-width) solid var(--bs-card-border-color); + border-radius: var(--bs-card-border-radius); } .card > hr { margin-right: 0; @@ -4528,66 +4107,70 @@ fieldset:disabled .btn { } .card > .list-group:first-child { border-top-width: 0; - border-top-left-radius: calc(0.25rem - 1px); - border-top-right-radius: calc(0.25rem - 1px); + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); } .card > .list-group:last-child { border-bottom-width: 0; - border-bottom-right-radius: calc(0.25rem - 1px); - border-bottom-left-radius: calc(0.25rem - 1px); + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); } .card > .card-header + .list-group, .card > .list-group + .card-footer { border-top: 0; } .card-body { - -ms-flex: 1 1 auto; flex: 1 1 auto; - padding: 1rem 1rem; + padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x); + color: var(--bs-card-color); } .card-title { - margin-bottom: 0.5rem; + margin-bottom: var(--bs-card-title-spacer-y); } .card-subtitle { - margin-top: -0.25rem; + margin-top: calc(-0.5 * var(--bs-card-title-spacer-y)); margin-bottom: 0; } .card-text:last-child { margin-bottom: 0; } .card-link + .card-link { - margin-left: 1rem; + margin-left: var(--bs-card-spacer-x); } .card-header { - padding: 0.5rem 1rem; + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); margin-bottom: 0; - background-color: #444; - border-bottom: 1px solid rgba(0, 0, 0, 0.125); + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color); } .card-header:first-child { - border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0; + border-radius: var(--bs-card-inner-border-radius) + var(--bs-card-inner-border-radius) 0 0; } .card-footer { - padding: 0.5rem 1rem; - background-color: #444; - border-top: 1px solid rgba(0, 0, 0, 0.125); + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x); + color: var(--bs-card-cap-color); + background-color: var(--bs-card-cap-bg); + border-top: var(--bs-card-border-width) solid var(--bs-card-border-color); } .card-footer:last-child { - border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px); + border-radius: 0 0 var(--bs-card-inner-border-radius) + var(--bs-card-inner-border-radius); } .card-header-tabs { - margin-right: -0.5rem; - margin-bottom: -0.5rem; - margin-left: -0.5rem; + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-bottom: calc(-1 * var(--bs-card-cap-padding-y)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); border-bottom: 0; } .card-header-tabs .nav-link.active { - background-color: #303030; - border-bottom-color: #303030; + background-color: var(--bs-card-bg); + border-bottom-color: var(--bs-card-bg); } .card-header-pills { - margin-right: -0.5rem; - margin-left: -0.5rem; + margin-right: calc(-0.5 * var(--bs-card-cap-padding-x)); + margin-left: calc(-0.5 * var(--bs-card-cap-padding-x)); } .card-img-overlay { position: absolute; @@ -4595,8 +4178,8 @@ fieldset:disabled .btn { right: 0; bottom: 0; left: 0; - padding: 1rem; - border-radius: calc(0.25rem - 1px); + padding: var(--bs-card-img-overlay-padding); + border-radius: var(--bs-card-inner-border-radius); } .card-img, .card-img-bottom, @@ -4605,26 +4188,23 @@ fieldset:disabled .btn { } .card-img, .card-img-top { - border-top-left-radius: calc(0.25rem - 1px); - border-top-right-radius: calc(0.25rem - 1px); + border-top-left-radius: var(--bs-card-inner-border-radius); + border-top-right-radius: var(--bs-card-inner-border-radius); } .card-img, .card-img-bottom { - border-bottom-right-radius: calc(0.25rem - 1px); - border-bottom-left-radius: calc(0.25rem - 1px); + border-bottom-right-radius: var(--bs-card-inner-border-radius); + border-bottom-left-radius: var(--bs-card-inner-border-radius); } .card-group > .card { - margin-bottom: 0.75rem; + margin-bottom: var(--bs-card-group-margin); } @media (min-width: 576px) { .card-group { - display: -ms-flexbox; display: flex; - -ms-flex-flow: row wrap; flex-flow: row wrap; } .card-group > .card { - -ms-flex: 1 0 0%; flex: 1 0 0%; margin-bottom: 0; } @@ -4657,24 +4237,46 @@ fieldset:disabled .btn { border-bottom-left-radius: 0; } } +.accordion { + --bs-accordion-color: #fff; + --bs-accordion-bg: #222; + --bs-accordion-transition: color 0.15s ease-in-out, + background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out, border-radius 0.15s ease; + --bs-accordion-border-color: var(--bs-border-color); + --bs-accordion-border-width: 1px; + --bs-accordion-border-radius: 0.375rem; + --bs-accordion-inner-border-radius: calc(0.375rem - 1px); + --bs-accordion-btn-padding-x: 1.25rem; + --bs-accordion-btn-padding-y: 1rem; + --bs-accordion-btn-color: #fff; + --bs-accordion-btn-bg: var(--bs-accordion-bg); + --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-icon-width: 1.25rem; + --bs-accordion-btn-icon-transform: rotate(-180deg); + --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out; + --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23325172'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-focus-border-color: #9badbf; + --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25); + --bs-accordion-body-padding-x: 1.25rem; + --bs-accordion-body-padding-y: 1rem; + --bs-accordion-active-color: #325172; + --bs-accordion-active-bg: #ebeff2; +} .accordion-button { position: relative; - display: -ms-flexbox; display: flex; - -ms-flex-align: center; align-items: center; width: 100%; - padding: 1rem 1.25rem; + padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x); font-size: 1rem; - color: #fff; + color: var(--bs-accordion-btn-color); text-align: left; - background-color: #222; + background-color: var(--bs-accordion-btn-bg); border: 0; border-radius: 0; overflow-anchor: none; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, - border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, - border-radius 0.15s ease; + transition: var(--bs-accordion-transition); } @media (prefers-reduced-motion: reduce) { .accordion-button { @@ -4682,28 +4284,25 @@ fieldset:disabled .btn { } } .accordion-button:not(.collapsed) { - color: #325172; - background-color: #ebeff2; - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125); + color: var(--bs-accordion-active-color); + background-color: var(--bs-accordion-active-bg); + box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 + var(--bs-accordion-border-color); } .accordion-button:not(.collapsed)::after { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23325172'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); - -webkit-transform: rotate(-180deg); - transform: rotate(-180deg); + background-image: var(--bs-accordion-btn-active-icon); + transform: var(--bs-accordion-btn-icon-transform); } .accordion-button::after { - -ms-flex-negative: 0; flex-shrink: 0; - width: 1.25rem; - height: 1.25rem; + width: var(--bs-accordion-btn-icon-width); + height: var(--bs-accordion-btn-icon-width); margin-left: auto; content: ''; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + background-image: var(--bs-accordion-btn-icon); background-repeat: no-repeat; - background-size: 1.25rem; - transition: -webkit-transform 0.2s ease-in-out; - transition: transform 0.2s ease-in-out; - transition: transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out; + background-size: var(--bs-accordion-btn-icon-width); + transition: var(--bs-accordion-btn-icon-transition); } @media (prefers-reduced-motion: reduce) { .accordion-button::after { @@ -4715,42 +4314,44 @@ fieldset:disabled .btn { } .accordion-button:focus { z-index: 3; - border-color: #9badbf; + border-color: var(--bs-accordion-btn-focus-border-color); outline: 0; - box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25); + box-shadow: var(--bs-accordion-btn-focus-box-shadow); } .accordion-header { margin-bottom: 0; } .accordion-item { - background-color: #222; - border: 1px solid rgba(0, 0, 0, 0.125); + color: var(--bs-accordion-color); + background-color: var(--bs-accordion-bg); + border: var(--bs-accordion-border-width) solid + var(--bs-accordion-border-color); } .accordion-item:first-of-type { - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; + border-top-left-radius: var(--bs-accordion-border-radius); + border-top-right-radius: var(--bs-accordion-border-radius); } .accordion-item:first-of-type .accordion-button { - border-top-left-radius: calc(0.25rem - 1px); - border-top-right-radius: calc(0.25rem - 1px); + border-top-left-radius: var(--bs-accordion-inner-border-radius); + border-top-right-radius: var(--bs-accordion-inner-border-radius); } .accordion-item:not(:first-of-type) { border-top: 0; } .accordion-item:last-of-type { - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); } .accordion-item:last-of-type .accordion-button.collapsed { - border-bottom-right-radius: calc(0.25rem - 1px); - border-bottom-left-radius: calc(0.25rem - 1px); + border-bottom-right-radius: var(--bs-accordion-inner-border-radius); + border-bottom-left-radius: var(--bs-accordion-inner-border-radius); } .accordion-item:last-of-type .accordion-collapse { - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; + border-bottom-right-radius: var(--bs-accordion-border-radius); + border-bottom-left-radius: var(--bs-accordion-border-radius); } .accordion-body { - padding: 1rem 1.25rem; + padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x); } .accordion-flush .accordion-collapse { border-width: 0; @@ -4766,34 +4367,61 @@ fieldset:disabled .btn { .accordion-flush .accordion-item:last-child { border-bottom: 0; } -.accordion-flush .accordion-item .accordion-button { +.accordion-flush .accordion-item .accordion-button, +.accordion-flush .accordion-item .accordion-button.collapsed { border-radius: 0; } .breadcrumb { - display: -ms-flexbox; + --bs-breadcrumb-padding-x: 0.75rem; + --bs-breadcrumb-padding-y: 0.375rem; + --bs-breadcrumb-margin-bottom: 1rem; + --bs-breadcrumb-bg: #444; + --bs-breadcrumb-border-radius: 0.25rem; + --bs-breadcrumb-divider-color: #888; + --bs-breadcrumb-item-padding-x: 0.5rem; + --bs-breadcrumb-item-active-color: #888; display: flex; - -ms-flex-wrap: wrap; flex-wrap: wrap; - padding: 0.375rem 0.75rem; - margin-bottom: 1rem; + padding: var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x); + margin-bottom: var(--bs-breadcrumb-margin-bottom); + font-size: var(--bs-breadcrumb-font-size); list-style: none; - background-color: #444; - border-radius: 0.25rem; + background-color: var(--bs-breadcrumb-bg); + border-radius: var(--bs-breadcrumb-border-radius); } .breadcrumb-item + .breadcrumb-item { - padding-left: 0.5rem; + padding-left: var(--bs-breadcrumb-item-padding-x); } .breadcrumb-item + .breadcrumb-item::before { float: left; - padding-right: 0.5rem; - color: #888; + padding-right: var(--bs-breadcrumb-item-padding-x); + color: var(--bs-breadcrumb-divider-color); content: var(--bs-breadcrumb-divider, '/'); } .breadcrumb-item.active { - color: #888; + color: var(--bs-breadcrumb-item-active-color); } .pagination { - display: -ms-flexbox; + --bs-pagination-padding-x: 0.75rem; + --bs-pagination-padding-y: 0.375rem; + --bs-pagination-font-size: 1rem; + --bs-pagination-color: #fff; + --bs-pagination-bg: #00bc8c; + --bs-pagination-border-width: 0; + --bs-pagination-border-color: transparent; + --bs-pagination-border-radius: 0.375rem; + --bs-pagination-hover-color: #fff; + --bs-pagination-hover-bg: #00efb2; + --bs-pagination-hover-border-color: transparent; + --bs-pagination-focus-color: var(--bs-link-hover-color); + --bs-pagination-focus-bg: #ebebeb; + --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25); + --bs-pagination-active-color: #fff; + --bs-pagination-active-bg: #00efb2; + --bs-pagination-active-border-color: transparent; + --bs-pagination-disabled-color: #fff; + --bs-pagination-disabled-bg: #007053; + --bs-pagination-disabled-border-color: transparent; display: flex; padding-left: 0; list-style: none; @@ -4801,10 +4429,13 @@ fieldset:disabled .btn { .page-link { position: relative; display: block; - color: #fff; + padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x); + font-size: var(--bs-pagination-font-size); + color: var(--bs-pagination-color); text-decoration: none; - background-color: #00bc8c; - border: 0 solid transparent; + background-color: var(--bs-pagination-bg); + border: var(--bs-pagination-border-width) solid + var(--bs-pagination-border-color); transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } @@ -4815,78 +4446,71 @@ fieldset:disabled .btn { } .page-link:hover { z-index: 2; - color: #fff; - background-color: #00efb2; - border-color: transparent; + color: var(--bs-pagination-hover-color); + background-color: var(--bs-pagination-hover-bg); + border-color: var(--bs-pagination-hover-border-color); } .page-link:focus { z-index: 3; - color: #009670; - background-color: #ebebeb; + color: var(--bs-pagination-focus-color); + background-color: var(--bs-pagination-focus-bg); outline: 0; - box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25); + box-shadow: var(--bs-pagination-focus-box-shadow); +} +.active > .page-link, +.page-link.active { + z-index: 3; + color: var(--bs-pagination-active-color); + background-color: var(--bs-pagination-active-bg); + border-color: var(--bs-pagination-active-border-color); +} +.disabled > .page-link, +.page-link.disabled { + color: var(--bs-pagination-disabled-color); + pointer-events: none; + background-color: var(--bs-pagination-disabled-bg); + border-color: var(--bs-pagination-disabled-border-color); } .page-item:not(:first-child) .page-link { margin-left: 0; } -.page-item.active .page-link { - z-index: 3; - color: #fff; - background-color: #00efb2; - border-color: transparent; -} -.page-item.disabled .page-link { - color: #fff; - pointer-events: none; - background-color: #007053; - border-color: transparent; -} -.page-link { - padding: 0.375rem 0.75rem; -} .page-item:first-child .page-link { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; + border-top-left-radius: var(--bs-pagination-border-radius); + border-bottom-left-radius: var(--bs-pagination-border-radius); } .page-item:last-child .page-link { - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; + border-top-right-radius: var(--bs-pagination-border-radius); + border-bottom-right-radius: var(--bs-pagination-border-radius); } -.pagination-lg .page-link { - padding: 0.75rem 1.5rem; - font-size: 1.25rem; +.pagination-lg { + --bs-pagination-padding-x: 1.5rem; + --bs-pagination-padding-y: 0.75rem; + --bs-pagination-font-size: 1.25rem; + --bs-pagination-border-radius: 0.5rem; } -.pagination-lg .page-item:first-child .page-link { - border-top-left-radius: 0.3rem; - border-bottom-left-radius: 0.3rem; -} -.pagination-lg .page-item:last-child .page-link { - border-top-right-radius: 0.3rem; - border-bottom-right-radius: 0.3rem; -} -.pagination-sm .page-link { - padding: 0.25rem 0.5rem; - font-size: 0.875rem; -} -.pagination-sm .page-item:first-child .page-link { - border-top-left-radius: 0.2rem; - border-bottom-left-radius: 0.2rem; -} -.pagination-sm .page-item:last-child .page-link { - border-top-right-radius: 0.2rem; - border-bottom-right-radius: 0.2rem; +.pagination-sm { + --bs-pagination-padding-x: 0.5rem; + --bs-pagination-padding-y: 0.25rem; + --bs-pagination-font-size: 0.875rem; + --bs-pagination-border-radius: 0.25rem; } .badge { + --bs-badge-padding-x: 0.65em; + --bs-badge-padding-y: 0.35em; + --bs-badge-font-size: 0.75em; + --bs-badge-font-weight: 700; + --bs-badge-color: #fff; + --bs-badge-border-radius: 0.375rem; display: inline-block; - padding: 0.35em 0.65em; - font-size: 0.75em; - font-weight: 700; + padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x); + font-size: var(--bs-badge-font-size); + font-weight: var(--bs-badge-font-weight); line-height: 1; - color: #fff; + color: var(--bs-badge-color); text-align: center; white-space: nowrap; vertical-align: baseline; - border-radius: 0.25rem; + border-radius: var(--bs-badge-border-radius); } .badge:empty { display: none; @@ -4896,11 +4520,21 @@ fieldset:disabled .btn { top: -1px; } .alert { + --bs-alert-bg: transparent; + --bs-alert-padding-x: 1rem; + --bs-alert-padding-y: 1rem; + --bs-alert-margin-bottom: 1rem; + --bs-alert-color: inherit; + --bs-alert-border-color: transparent; + --bs-alert-border: 1px solid var(--bs-alert-border-color); + --bs-alert-border-radius: 0.375rem; position: relative; - padding: 1rem 1rem; - margin-bottom: 1rem; - border: 1px solid transparent; - border-radius: 0.25rem; + padding: var(--bs-alert-padding-y) var(--bs-alert-padding-x); + margin-bottom: var(--bs-alert-margin-bottom); + color: var(--bs-alert-color); + background-color: var(--bs-alert-bg); + border: var(--bs-alert-border); + border-radius: var(--bs-alert-border-radius); } .alert-heading { color: inherit; @@ -4919,101 +4553,100 @@ fieldset:disabled .btn { padding: 1.25rem 1rem; } .alert-primary { - color: #21364c; - background-color: #d7dee5; - border-color: #c3ced9; + --bs-alert-color: #21364c; + --bs-alert-bg: #d7dee5; + --bs-alert-border-color: #c3ced9; } .alert-primary .alert-link { color: #1a2b3d; } .alert-secondary { - color: #292929; - background-color: #dadada; - border-color: #c7c7c7; + --bs-alert-color: #292929; + --bs-alert-bg: #dadada; + --bs-alert-border-color: #c7c7c7; } .alert-secondary .alert-link { color: #212121; } .alert-success { - color: #007154; - background-color: #ccf2e8; - border-color: #b3ebdd; + --bs-alert-color: #007154; + --bs-alert-bg: #ccf2e8; + --bs-alert-border-color: #b3ebdd; } .alert-success .alert-link { color: #005a43; } .alert-info { - color: #1f5b83; - background-color: #d6eaf8; - border-color: #c2e0f4; + --bs-alert-color: #1f5b83; + --bs-alert-bg: #d6eaf8; + --bs-alert-border-color: #c2e0f4; } .alert-info .alert-link { color: #194969; } .alert-warning { - color: #925e0b; - background-color: #fdebd0; - border-color: #fbe1b8; + --bs-alert-color: #925e0b; + --bs-alert-bg: #fdebd0; + --bs-alert-border-color: #fbe1b8; } .alert-warning .alert-link { color: #754b09; } .alert-danger { - color: #8b2e24; - background-color: #fadbd8; - border-color: #f8c9c5; + --bs-alert-color: #8b2e24; + --bs-alert-bg: #fadbd8; + --bs-alert-border-color: #f8c9c5; } .alert-danger .alert-link { color: #6f251d; } .alert-light { - color: #686d71; - background-color: #eff0f2; - border-color: #e6e9eb; + --bs-alert-color: #686d71; + --bs-alert-bg: #eff0f2; + --bs-alert-border-color: #e6e9eb; } .alert-light .alert-link { color: #53575a; } .alert-dark { - color: #1d1d1d; - background-color: #d6d6d6; - border-color: #c1c1c1; + --bs-alert-color: #1d1d1d; + --bs-alert-bg: #d6d6d6; + --bs-alert-border-color: #c1c1c1; } .alert-dark .alert-link { color: #171717; } -@-webkit-keyframes progress-bar-stripes { - 0% { - background-position-x: 1rem; - } -} @keyframes progress-bar-stripes { 0% { background-position-x: 1rem; } } .progress { - display: -ms-flexbox; + --bs-progress-height: 1rem; + --bs-progress-font-size: 0.75rem; + --bs-progress-bg: #444; + --bs-progress-border-radius: 0.375rem; + --bs-progress-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); + --bs-progress-bar-color: #fff; + --bs-progress-bar-bg: #375a7f; + --bs-progress-bar-transition: width 0.6s ease; display: flex; - height: 1rem; + height: var(--bs-progress-height); overflow: hidden; - font-size: 0.75rem; - background-color: #444; - border-radius: 0.25rem; + font-size: var(--bs-progress-font-size); + background-color: var(--bs-progress-bg); + border-radius: var(--bs-progress-border-radius); } .progress-bar { - display: -ms-flexbox; display: flex; - -ms-flex-direction: column; flex-direction: column; - -ms-flex-pack: center; justify-content: center; overflow: hidden; - color: #fff; + color: var(--bs-progress-bar-color); text-align: center; white-space: nowrap; - background-color: #375a7f; - transition: width 0.6s ease; + background-color: var(--bs-progress-bar-bg); + transition: var(--bs-progress-bar-transition); } @media (prefers-reduced-motion: reduce) { .progress-bar { @@ -5031,59 +4664,74 @@ fieldset:disabled .btn { transparent 75%, transparent ); - background-size: 1rem 1rem; + background-size: var(--bs-progress-height) var(--bs-progress-height); } .progress-bar-animated { - -webkit-animation: 1s linear infinite progress-bar-stripes; animation: 1s linear infinite progress-bar-stripes; } @media (prefers-reduced-motion: reduce) { .progress-bar-animated { - -webkit-animation: none; animation: none; } } .list-group { - display: -ms-flexbox; + --bs-list-group-color: #fff; + --bs-list-group-bg: #303030; + --bs-list-group-border-color: #444; + --bs-list-group-border-width: 1px; + --bs-list-group-border-radius: 0.375rem; + --bs-list-group-item-padding-x: 1rem; + --bs-list-group-item-padding-y: 0.5rem; + --bs-list-group-action-color: #444; + --bs-list-group-action-hover-color: #fff; + --bs-list-group-action-hover-bg: #444; + --bs-list-group-action-active-color: #fff; + --bs-list-group-action-active-bg: #222; + --bs-list-group-disabled-color: #888; + --bs-list-group-disabled-bg: #303030; + --bs-list-group-active-color: #fff; + --bs-list-group-active-bg: #375a7f; + --bs-list-group-active-border-color: #375a7f; display: flex; - -ms-flex-direction: column; flex-direction: column; padding-left: 0; margin-bottom: 0; - border-radius: 0.25rem; + border-radius: var(--bs-list-group-border-radius); } .list-group-numbered { list-style-type: none; counter-reset: section; } -.list-group-numbered > li::before { +.list-group-numbered > .list-group-item::before { content: counters(section, '.') '. '; counter-increment: section; } .list-group-item-action { width: 100%; - color: #444; + color: var(--bs-list-group-action-color); text-align: inherit; } .list-group-item-action:focus, .list-group-item-action:hover { z-index: 1; - color: #fff; + color: var(--bs-list-group-action-hover-color); text-decoration: none; - background-color: #444; + background-color: var(--bs-list-group-action-hover-bg); } .list-group-item-action:active { - color: #fff; - background-color: #222; + color: var(--bs-list-group-action-active-color); + background-color: var(--bs-list-group-action-active-bg); } .list-group-item { position: relative; display: block; - padding: 0.5rem 1rem; - color: #fff; + padding: var(--bs-list-group-item-padding-y) + var(--bs-list-group-item-padding-x); + color: var(--bs-list-group-color); text-decoration: none; - background-color: #303030; - border: 1px solid #444; + background-color: var(--bs-list-group-bg); + border: var(--bs-list-group-border-width) solid + var(--bs-list-group-border-color); } .list-group-item:first-child { border-top-left-radius: inherit; @@ -5095,176 +4743,170 @@ fieldset:disabled .btn { } .list-group-item.disabled, .list-group-item:disabled { - color: #888; + color: var(--bs-list-group-disabled-color); pointer-events: none; - background-color: #303030; + background-color: var(--bs-list-group-disabled-bg); } .list-group-item.active { z-index: 2; - color: #fff; - background-color: #375a7f; - border-color: #375a7f; + color: var(--bs-list-group-active-color); + background-color: var(--bs-list-group-active-bg); + border-color: var(--bs-list-group-active-border-color); } .list-group-item + .list-group-item { border-top-width: 0; } .list-group-item + .list-group-item.active { - margin-top: -1px; - border-top-width: 1px; + margin-top: calc(-1 * var(--bs-list-group-border-width)); + border-top-width: var(--bs-list-group-border-width); } .list-group-horizontal { - -ms-flex-direction: row; flex-direction: row; } -.list-group-horizontal > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; +.list-group-horizontal > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); border-top-right-radius: 0; } -.list-group-horizontal > .list-group-item:last-child { - border-top-right-radius: 0.25rem; +.list-group-horizontal > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); border-bottom-left-radius: 0; } .list-group-horizontal > .list-group-item.active { margin-top: 0; } .list-group-horizontal > .list-group-item + .list-group-item { - border-top-width: 1px; + border-top-width: var(--bs-list-group-border-width); border-left-width: 0; } .list-group-horizontal > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); } @media (min-width: 576px) { .list-group-horizontal-sm { - -ms-flex-direction: row; flex-direction: row; } - .list-group-horizontal-sm > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; + .list-group-horizontal-sm > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); border-top-right-radius: 0; } - .list-group-horizontal-sm > .list-group-item:last-child { - border-top-right-radius: 0.25rem; + .list-group-horizontal-sm > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); border-bottom-left-radius: 0; } .list-group-horizontal-sm > .list-group-item.active { margin-top: 0; } .list-group-horizontal-sm > .list-group-item + .list-group-item { - border-top-width: 1px; + border-top-width: var(--bs-list-group-border-width); border-left-width: 0; } .list-group-horizontal-sm > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); } } @media (min-width: 768px) { .list-group-horizontal-md { - -ms-flex-direction: row; flex-direction: row; } - .list-group-horizontal-md > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; + .list-group-horizontal-md > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); border-top-right-radius: 0; } - .list-group-horizontal-md > .list-group-item:last-child { - border-top-right-radius: 0.25rem; + .list-group-horizontal-md > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); border-bottom-left-radius: 0; } .list-group-horizontal-md > .list-group-item.active { margin-top: 0; } .list-group-horizontal-md > .list-group-item + .list-group-item { - border-top-width: 1px; + border-top-width: var(--bs-list-group-border-width); border-left-width: 0; } .list-group-horizontal-md > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); } } @media (min-width: 992px) { .list-group-horizontal-lg { - -ms-flex-direction: row; flex-direction: row; } - .list-group-horizontal-lg > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; + .list-group-horizontal-lg > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); border-top-right-radius: 0; } - .list-group-horizontal-lg > .list-group-item:last-child { - border-top-right-radius: 0.25rem; + .list-group-horizontal-lg > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); border-bottom-left-radius: 0; } .list-group-horizontal-lg > .list-group-item.active { margin-top: 0; } .list-group-horizontal-lg > .list-group-item + .list-group-item { - border-top-width: 1px; + border-top-width: var(--bs-list-group-border-width); border-left-width: 0; } .list-group-horizontal-lg > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); } } @media (min-width: 1200px) { .list-group-horizontal-xl { - -ms-flex-direction: row; flex-direction: row; } - .list-group-horizontal-xl > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; + .list-group-horizontal-xl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); border-top-right-radius: 0; } - .list-group-horizontal-xl > .list-group-item:last-child { - border-top-right-radius: 0.25rem; + .list-group-horizontal-xl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); border-bottom-left-radius: 0; } .list-group-horizontal-xl > .list-group-item.active { margin-top: 0; } .list-group-horizontal-xl > .list-group-item + .list-group-item { - border-top-width: 1px; + border-top-width: var(--bs-list-group-border-width); border-left-width: 0; } .list-group-horizontal-xl > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); } } @media (min-width: 1400px) { .list-group-horizontal-xxl { - -ms-flex-direction: row; flex-direction: row; } - .list-group-horizontal-xxl > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; + .list-group-horizontal-xxl > .list-group-item:first-child:not(:last-child) { + border-bottom-left-radius: var(--bs-list-group-border-radius); border-top-right-radius: 0; } - .list-group-horizontal-xxl > .list-group-item:last-child { - border-top-right-radius: 0.25rem; + .list-group-horizontal-xxl > .list-group-item:last-child:not(:first-child) { + border-top-right-radius: var(--bs-list-group-border-radius); border-bottom-left-radius: 0; } .list-group-horizontal-xxl > .list-group-item.active { margin-top: 0; } .list-group-horizontal-xxl > .list-group-item + .list-group-item { - border-top-width: 1px; + border-top-width: var(--bs-list-group-border-width); border-left-width: 0; } .list-group-horizontal-xxl > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; + margin-left: calc(-1 * var(--bs-list-group-border-width)); + border-left-width: var(--bs-list-group-border-width); } } .list-group-flush { border-radius: 0; } .list-group-flush > .list-group-item { - border-width: 0 0 1px; + border-width: 0 0 var(--bs-list-group-border-width); } .list-group-flush > .list-group-item:last-child { border-bottom-width: 0; @@ -5388,10 +5030,10 @@ fieldset:disabled .btn { padding: 0.25em 0.25em; color: #fff; background: transparent - url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") + url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat; border: 0; - border-radius: 0.25rem; + border-radius: 0.375rem; opacity: 0.4; } .btn-close:hover { @@ -5409,24 +5051,38 @@ fieldset:disabled .btn { pointer-events: none; -webkit-user-select: none; -moz-user-select: none; - -ms-user-select: none; user-select: none; opacity: 0.25; } .btn-close-white { - -webkit-filter: invert(1) grayscale(100%) brightness(200%); filter: invert(1) grayscale(100%) brightness(200%); } .toast { - width: 350px; + --bs-toast-zindex: 1090; + --bs-toast-padding-x: 0.75rem; + --bs-toast-padding-y: 0.5rem; + --bs-toast-spacing: 1.5rem; + --bs-toast-max-width: 350px; + --bs-toast-font-size: 0.875rem; + --bs-toast-color: ; + --bs-toast-bg: #444; + --bs-toast-border-width: 1px; + --bs-toast-border-color: var(--bs-border-color-translucent); + --bs-toast-border-radius: 0.375rem; + --bs-toast-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-toast-header-color: #888; + --bs-toast-header-bg: #303030; + --bs-toast-header-border-color: rgba(0, 0, 0, 0.05); + width: var(--bs-toast-max-width); max-width: 100%; - font-size: 0.875rem; + font-size: var(--bs-toast-font-size); + color: var(--bs-toast-color); pointer-events: auto; - background-color: #444; + background-color: var(--bs-toast-bg); background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, 0.1); - box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); - border-radius: 0.25rem; + border: var(--bs-toast-border-width) solid var(--bs-toast-border-color); + box-shadow: var(--bs-toast-box-shadow); + border-radius: var(--bs-toast-border-radius); } .toast.showing { opacity: 0; @@ -5435,6 +5091,9 @@ fieldset:disabled .btn { display: none; } .toast-container { + --bs-toast-zindex: 1090; + position: absolute; + z-index: var(--bs-toast-zindex); width: -webkit-max-content; width: -moz-max-content; width: max-content; @@ -5442,34 +5101,58 @@ fieldset:disabled .btn { pointer-events: none; } .toast-container > :not(:last-child) { - margin-bottom: 0.75rem; + margin-bottom: var(--bs-toast-spacing); } .toast-header { - display: -ms-flexbox; display: flex; - -ms-flex-align: center; align-items: center; - padding: 0.5rem 0.75rem; - color: #888; - background-color: #303030; + padding: var(--bs-toast-padding-y) var(--bs-toast-padding-x); + color: var(--bs-toast-header-color); + background-color: var(--bs-toast-header-bg); background-clip: padding-box; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); - border-top-left-radius: calc(0.25rem - 1px); - border-top-right-radius: calc(0.25rem - 1px); + border-bottom: var(--bs-toast-border-width) solid + var(--bs-toast-header-border-color); + border-top-left-radius: calc( + var(--bs-toast-border-radius) - var(--bs-toast-border-width) + ); + border-top-right-radius: calc( + var(--bs-toast-border-radius) - var(--bs-toast-border-width) + ); } .toast-header .btn-close { - margin-right: -0.375rem; - margin-left: 0.75rem; + margin-right: calc(-0.5 * var(--bs-toast-padding-x)); + margin-left: var(--bs-toast-padding-x); } .toast-body { - padding: 0.75rem; + padding: var(--bs-toast-padding-x); word-wrap: break-word; } .modal { + --bs-modal-zindex: 1055; + --bs-modal-width: 500px; + --bs-modal-padding: 1rem; + --bs-modal-margin: 0.5rem; + --bs-modal-color: ; + --bs-modal-bg: #303030; + --bs-modal-border-color: #444; + --bs-modal-border-width: 1px; + --bs-modal-border-radius: 0.5rem; + --bs-modal-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + --bs-modal-inner-border-radius: calc(0.5rem - 1px); + --bs-modal-header-padding-x: 1rem; + --bs-modal-header-padding-y: 1rem; + --bs-modal-header-padding: 1rem 1rem; + --bs-modal-header-border-color: #444; + --bs-modal-header-border-width: 1px; + --bs-modal-title-line-height: 1.5; + --bs-modal-footer-gap: 0.5rem; + --bs-modal-footer-bg: ; + --bs-modal-footer-border-color: #444; + --bs-modal-footer-border-width: 1px; position: fixed; top: 0; left: 0; - z-index: 1055; + z-index: var(--bs-modal-zindex); display: none; width: 100%; height: 100%; @@ -5480,14 +5163,11 @@ fieldset:disabled .btn { .modal-dialog { position: relative; width: auto; - margin: 0.5rem; + margin: var(--bs-modal-margin); pointer-events: none; } .modal.fade .modal-dialog { - transition: -webkit-transform 0.3s ease-out; transition: transform 0.3s ease-out; - transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out; - -webkit-transform: translate(0, -50px); transform: translate(0, -50px); } @media (prefers-reduced-motion: reduce) { @@ -5496,15 +5176,13 @@ fieldset:disabled .btn { } } .modal.show .modal-dialog { - -webkit-transform: none; transform: none; } .modal.modal-static .modal-dialog { - -webkit-transform: scale(1.02); transform: scale(1.02); } .modal-dialog-scrollable { - height: calc(100% - 1rem); + height: calc(100% - var(--bs-modal-margin) * 2); } .modal-dialog-scrollable .modal-content { max-height: 100%; @@ -5514,112 +5192,107 @@ fieldset:disabled .btn { overflow-y: auto; } .modal-dialog-centered { - display: -ms-flexbox; display: flex; - -ms-flex-align: center; align-items: center; - min-height: calc(100% - 1rem); + min-height: calc(100% - var(--bs-modal-margin) * 2); } .modal-content { position: relative; - display: -ms-flexbox; display: flex; - -ms-flex-direction: column; flex-direction: column; width: 100%; + color: var(--bs-modal-color); pointer-events: auto; - background-color: #303030; + background-color: var(--bs-modal-bg); background-clip: padding-box; - border: 1px solid #444; - border-radius: 0.3rem; + border: var(--bs-modal-border-width) solid var(--bs-modal-border-color); + border-radius: var(--bs-modal-border-radius); outline: 0; } .modal-backdrop { + --bs-backdrop-zindex: 1050; + --bs-backdrop-bg: #000; + --bs-backdrop-opacity: 0.5; position: fixed; top: 0; left: 0; - z-index: 1050; + z-index: var(--bs-backdrop-zindex); width: 100vw; height: 100vh; - background-color: #000; + background-color: var(--bs-backdrop-bg); } .modal-backdrop.fade { opacity: 0; } .modal-backdrop.show { - opacity: 0.5; + opacity: var(--bs-backdrop-opacity); } .modal-header { - display: -ms-flexbox; display: flex; - -ms-flex-negative: 0; flex-shrink: 0; - -ms-flex-align: center; align-items: center; - -ms-flex-pack: justify; justify-content: space-between; - padding: 1rem 1rem; - border-bottom: 1px solid #444; - border-top-left-radius: calc(0.3rem - 1px); - border-top-right-radius: calc(0.3rem - 1px); + padding: var(--bs-modal-header-padding); + border-bottom: var(--bs-modal-header-border-width) solid + var(--bs-modal-header-border-color); + border-top-left-radius: var(--bs-modal-inner-border-radius); + border-top-right-radius: var(--bs-modal-inner-border-radius); } .modal-header .btn-close { - padding: 0.5rem 0.5rem; - margin: -0.5rem -0.5rem -0.5rem auto; + padding: calc(var(--bs-modal-header-padding-y) * 0.5) + calc(var(--bs-modal-header-padding-x) * 0.5); + margin: calc(-0.5 * var(--bs-modal-header-padding-y)) + calc(-0.5 * var(--bs-modal-header-padding-x)) + calc(-0.5 * var(--bs-modal-header-padding-y)) auto; } .modal-title { margin-bottom: 0; - line-height: 1.5; + line-height: var(--bs-modal-title-line-height); } .modal-body { position: relative; - -ms-flex: 1 1 auto; flex: 1 1 auto; - padding: 1rem; + padding: var(--bs-modal-padding); } .modal-footer { - display: -ms-flexbox; display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -ms-flex-negative: 0; flex-shrink: 0; - -ms-flex-align: center; + flex-wrap: wrap; align-items: center; - -ms-flex-pack: end; justify-content: flex-end; - padding: 0.75rem; - border-top: 1px solid #444; - border-bottom-right-radius: calc(0.3rem - 1px); - border-bottom-left-radius: calc(0.3rem - 1px); + padding: calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * 0.5); + background-color: var(--bs-modal-footer-bg); + border-top: var(--bs-modal-footer-border-width) solid + var(--bs-modal-footer-border-color); + border-bottom-right-radius: var(--bs-modal-inner-border-radius); + border-bottom-left-radius: var(--bs-modal-inner-border-radius); } .modal-footer > * { - margin: 0.25rem; + margin: calc(var(--bs-modal-footer-gap) * 0.5); } @media (min-width: 576px) { + .modal { + --bs-modal-margin: 1.75rem; + --bs-modal-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + } .modal-dialog { - max-width: 500px; - margin: 1.75rem auto; - } - .modal-dialog-scrollable { - height: calc(100% - 3.5rem); - } - .modal-dialog-centered { - min-height: calc(100% - 3.5rem); + max-width: var(--bs-modal-width); + margin-right: auto; + margin-left: auto; } .modal-sm { - max-width: 300px; + --bs-modal-width: 300px; } } @media (min-width: 992px) { .modal-lg, .modal-xl { - max-width: 800px; + --bs-modal-width: 800px; } } @media (min-width: 1200px) { .modal-xl { - max-width: 1140px; + --bs-modal-width: 1140px; } } .modal-fullscreen { @@ -5633,15 +5306,13 @@ fieldset:disabled .btn { border: 0; border-radius: 0; } +.modal-fullscreen .modal-footer, .modal-fullscreen .modal-header { border-radius: 0; } .modal-fullscreen .modal-body { overflow-y: auto; } -.modal-fullscreen .modal-footer { - border-radius: 0; -} @media (max-width: 575.98px) { .modal-fullscreen-sm-down { width: 100vw; @@ -5654,15 +5325,13 @@ fieldset:disabled .btn { border: 0; border-radius: 0; } + .modal-fullscreen-sm-down .modal-footer, .modal-fullscreen-sm-down .modal-header { border-radius: 0; } .modal-fullscreen-sm-down .modal-body { overflow-y: auto; } - .modal-fullscreen-sm-down .modal-footer { - border-radius: 0; - } } @media (max-width: 767.98px) { .modal-fullscreen-md-down { @@ -5676,15 +5345,13 @@ fieldset:disabled .btn { border: 0; border-radius: 0; } + .modal-fullscreen-md-down .modal-footer, .modal-fullscreen-md-down .modal-header { border-radius: 0; } .modal-fullscreen-md-down .modal-body { overflow-y: auto; } - .modal-fullscreen-md-down .modal-footer { - border-radius: 0; - } } @media (max-width: 991.98px) { .modal-fullscreen-lg-down { @@ -5698,15 +5365,13 @@ fieldset:disabled .btn { border: 0; border-radius: 0; } + .modal-fullscreen-lg-down .modal-footer, .modal-fullscreen-lg-down .modal-header { border-radius: 0; } .modal-fullscreen-lg-down .modal-body { overflow-y: auto; } - .modal-fullscreen-lg-down .modal-footer { - border-radius: 0; - } } @media (max-width: 1199.98px) { .modal-fullscreen-xl-down { @@ -5720,15 +5385,13 @@ fieldset:disabled .btn { border: 0; border-radius: 0; } + .modal-fullscreen-xl-down .modal-footer, .modal-fullscreen-xl-down .modal-header { border-radius: 0; } .modal-fullscreen-xl-down .modal-body { overflow-y: auto; } - .modal-fullscreen-xl-down .modal-footer { - border-radius: 0; - } } @media (max-width: 1399.98px) { .modal-fullscreen-xxl-down { @@ -5742,21 +5405,31 @@ fieldset:disabled .btn { border: 0; border-radius: 0; } + .modal-fullscreen-xxl-down .modal-footer, .modal-fullscreen-xxl-down .modal-header { border-radius: 0; } .modal-fullscreen-xxl-down .modal-body { overflow-y: auto; } - .modal-fullscreen-xxl-down .modal-footer { - border-radius: 0; - } } .tooltip { - position: absolute; - z-index: 1080; + --bs-tooltip-zindex: 1080; + --bs-tooltip-max-width: 200px; + --bs-tooltip-padding-x: 0.5rem; + --bs-tooltip-padding-y: 0.25rem; + --bs-tooltip-margin: ; + --bs-tooltip-font-size: 0.875rem; + --bs-tooltip-color: #fff; + --bs-tooltip-bg: #000; + --bs-tooltip-border-radius: 0.375rem; + --bs-tooltip-opacity: 0.9; + --bs-tooltip-arrow-width: 0.8rem; + --bs-tooltip-arrow-height: 0.4rem; + z-index: var(--bs-tooltip-zindex); display: block; - margin: 0; + padding: var(--bs-tooltip-arrow-height); + margin: var(--bs-tooltip-margin); font-family: var(--bs-font-sans-serif); font-style: normal; font-weight: 400; @@ -5768,21 +5441,20 @@ fieldset:disabled .btn { text-transform: none; letter-spacing: normal; word-break: normal; - word-spacing: normal; white-space: normal; + word-spacing: normal; line-break: auto; - font-size: 0.875rem; + font-size: var(--bs-tooltip-font-size); word-wrap: break-word; opacity: 0; } .tooltip.show { - opacity: 0.9; + opacity: var(--bs-tooltip-opacity); } .tooltip .tooltip-arrow { - position: absolute; display: block; - width: 0.8rem; - height: 0.4rem; + width: var(--bs-tooltip-arrow-width); + height: var(--bs-tooltip-arrow-height); } .tooltip .tooltip-arrow::before { position: absolute; @@ -5790,10 +5462,6 @@ fieldset:disabled .btn { border-color: transparent; border-style: solid; } -.bs-tooltip-auto[data-popper-placement^='top'], -.bs-tooltip-top { - padding: 0.4rem 0; -} .bs-tooltip-auto[data-popper-placement^='top'] .tooltip-arrow, .bs-tooltip-top .tooltip-arrow { bottom: 0; @@ -5801,28 +5469,22 @@ fieldset:disabled .btn { .bs-tooltip-auto[data-popper-placement^='top'] .tooltip-arrow::before, .bs-tooltip-top .tooltip-arrow::before { top: -1px; - border-width: 0.4rem 0.4rem 0; - border-top-color: #000; -} -.bs-tooltip-auto[data-popper-placement^='right'], -.bs-tooltip-end { - padding: 0 0.4rem; + border-width: var(--bs-tooltip-arrow-height) + calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-top-color: var(--bs-tooltip-bg); } .bs-tooltip-auto[data-popper-placement^='right'] .tooltip-arrow, .bs-tooltip-end .tooltip-arrow { left: 0; - width: 0.4rem; - height: 0.8rem; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); } .bs-tooltip-auto[data-popper-placement^='right'] .tooltip-arrow::before, .bs-tooltip-end .tooltip-arrow::before { right: -1px; - border-width: 0.4rem 0.4rem 0.4rem 0; - border-right-color: #000; -} -.bs-tooltip-auto[data-popper-placement^='bottom'], -.bs-tooltip-bottom { - padding: 0.4rem 0; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) + var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * 0.5) 0; + border-right-color: var(--bs-tooltip-bg); } .bs-tooltip-auto[data-popper-placement^='bottom'] .tooltip-arrow, .bs-tooltip-bottom .tooltip-arrow { @@ -5831,40 +5493,55 @@ fieldset:disabled .btn { .bs-tooltip-auto[data-popper-placement^='bottom'] .tooltip-arrow::before, .bs-tooltip-bottom .tooltip-arrow::before { bottom: -1px; - border-width: 0 0.4rem 0.4rem; - border-bottom-color: #000; -} -.bs-tooltip-auto[data-popper-placement^='left'], -.bs-tooltip-start { - padding: 0 0.4rem; + border-width: 0 calc(var(--bs-tooltip-arrow-width) * 0.5) + var(--bs-tooltip-arrow-height); + border-bottom-color: var(--bs-tooltip-bg); } .bs-tooltip-auto[data-popper-placement^='left'] .tooltip-arrow, .bs-tooltip-start .tooltip-arrow { right: 0; - width: 0.4rem; - height: 0.8rem; + width: var(--bs-tooltip-arrow-height); + height: var(--bs-tooltip-arrow-width); } .bs-tooltip-auto[data-popper-placement^='left'] .tooltip-arrow::before, .bs-tooltip-start .tooltip-arrow::before { left: -1px; - border-width: 0.4rem 0 0.4rem 0.4rem; - border-left-color: #000; + border-width: calc(var(--bs-tooltip-arrow-width) * 0.5) 0 + calc(var(--bs-tooltip-arrow-width) * 0.5) var(--bs-tooltip-arrow-height); + border-left-color: var(--bs-tooltip-bg); } .tooltip-inner { - max-width: 200px; - padding: 0.25rem 0.5rem; - color: #fff; + max-width: var(--bs-tooltip-max-width); + padding: var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x); + color: var(--bs-tooltip-color); text-align: center; - background-color: #000; - border-radius: 0.25rem; + background-color: var(--bs-tooltip-bg); + border-radius: var(--bs-tooltip-border-radius); } .popover { - position: absolute; - top: 0; - left: 0; - z-index: 1070; + --bs-popover-zindex: 1070; + --bs-popover-max-width: 276px; + --bs-popover-font-size: 0.875rem; + --bs-popover-bg: #303030; + --bs-popover-border-width: 1px; + --bs-popover-border-color: var(--bs-border-color-translucent); + --bs-popover-border-radius: 0.5rem; + --bs-popover-inner-border-radius: calc(0.5rem - 1px); + --bs-popover-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + --bs-popover-header-padding-x: 1rem; + --bs-popover-header-padding-y: 0.5rem; + --bs-popover-header-font-size: 1rem; + --bs-popover-header-color: ; + --bs-popover-header-bg: #444; + --bs-popover-body-padding-x: 1rem; + --bs-popover-body-padding-y: 1rem; + --bs-popover-body-color: #fff; + --bs-popover-arrow-width: 1rem; + --bs-popover-arrow-height: 0.5rem; + --bs-popover-arrow-border: var(--bs-popover-border-color); + z-index: var(--bs-popover-zindex); display: block; - max-width: 276px; + max-width: var(--bs-popover-max-width); font-family: var(--bs-font-sans-serif); font-style: normal; font-weight: 400; @@ -5876,21 +5553,20 @@ fieldset:disabled .btn { text-transform: none; letter-spacing: normal; word-break: normal; - word-spacing: normal; white-space: normal; + word-spacing: normal; line-break: auto; - font-size: 0.875rem; + font-size: var(--bs-popover-font-size); word-wrap: break-word; - background-color: #303030; + background-color: var(--bs-popover-bg); background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 0.3rem; + border: var(--bs-popover-border-width) solid var(--bs-popover-border-color); + border-radius: var(--bs-popover-border-radius); } .popover .popover-arrow { - position: absolute; display: block; - width: 1rem; - height: 0.5rem; + width: var(--bs-popover-arrow-width); + height: var(--bs-popover-arrow-height); } .popover .popover-arrow::after, .popover .popover-arrow::before { @@ -5899,56 +5575,78 @@ fieldset:disabled .btn { content: ''; border-color: transparent; border-style: solid; + border-width: 0; } .bs-popover-auto[data-popper-placement^='top'] > .popover-arrow, .bs-popover-top > .popover-arrow { - bottom: calc(-0.5rem - 1px); + bottom: calc( + -1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width) + ); +} +.bs-popover-auto[data-popper-placement^='top'] > .popover-arrow::after, +.bs-popover-auto[data-popper-placement^='top'] > .popover-arrow::before, +.bs-popover-top > .popover-arrow::after, +.bs-popover-top > .popover-arrow::before { + border-width: var(--bs-popover-arrow-height) + calc(var(--bs-popover-arrow-width) * 0.5) 0; } .bs-popover-auto[data-popper-placement^='top'] > .popover-arrow::before, .bs-popover-top > .popover-arrow::before { bottom: 0; - border-width: 0.5rem 0.5rem 0; - border-top-color: rgba(0, 0, 0, 0.25); + border-top-color: var(--bs-popover-arrow-border); } .bs-popover-auto[data-popper-placement^='top'] > .popover-arrow::after, .bs-popover-top > .popover-arrow::after { - bottom: 1px; - border-width: 0.5rem 0.5rem 0; - border-top-color: #303030; + bottom: var(--bs-popover-border-width); + border-top-color: var(--bs-popover-bg); } .bs-popover-auto[data-popper-placement^='right'] > .popover-arrow, .bs-popover-end > .popover-arrow { - left: calc(-0.5rem - 1px); - width: 0.5rem; - height: 1rem; + left: calc( + -1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width) + ); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} +.bs-popover-auto[data-popper-placement^='right'] > .popover-arrow::after, +.bs-popover-auto[data-popper-placement^='right'] > .popover-arrow::before, +.bs-popover-end > .popover-arrow::after, +.bs-popover-end > .popover-arrow::before { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) + var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * 0.5) 0; } .bs-popover-auto[data-popper-placement^='right'] > .popover-arrow::before, .bs-popover-end > .popover-arrow::before { left: 0; - border-width: 0.5rem 0.5rem 0.5rem 0; - border-right-color: rgba(0, 0, 0, 0.25); + border-right-color: var(--bs-popover-arrow-border); } .bs-popover-auto[data-popper-placement^='right'] > .popover-arrow::after, .bs-popover-end > .popover-arrow::after { - left: 1px; - border-width: 0.5rem 0.5rem 0.5rem 0; - border-right-color: #303030; + left: var(--bs-popover-border-width); + border-right-color: var(--bs-popover-bg); } .bs-popover-auto[data-popper-placement^='bottom'] > .popover-arrow, .bs-popover-bottom > .popover-arrow { - top: calc(-0.5rem - 1px); + top: calc( + -1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width) + ); +} +.bs-popover-auto[data-popper-placement^='bottom'] > .popover-arrow::after, +.bs-popover-auto[data-popper-placement^='bottom'] > .popover-arrow::before, +.bs-popover-bottom > .popover-arrow::after, +.bs-popover-bottom > .popover-arrow::before { + border-width: 0 calc(var(--bs-popover-arrow-width) * 0.5) + var(--bs-popover-arrow-height); } .bs-popover-auto[data-popper-placement^='bottom'] > .popover-arrow::before, .bs-popover-bottom > .popover-arrow::before { top: 0; - border-width: 0 0.5rem 0.5rem 0.5rem; - border-bottom-color: rgba(0, 0, 0, 0.25); + border-bottom-color: var(--bs-popover-arrow-border); } .bs-popover-auto[data-popper-placement^='bottom'] > .popover-arrow::after, .bs-popover-bottom > .popover-arrow::after { - top: 1px; - border-width: 0 0.5rem 0.5rem 0.5rem; - border-bottom-color: #303030; + top: var(--bs-popover-border-width); + border-bottom-color: var(--bs-popover-bg); } .bs-popover-auto[data-popper-placement^='bottom'] .popover-header::before, .bs-popover-bottom .popover-header::before { @@ -5956,50 +5654,59 @@ fieldset:disabled .btn { top: 0; left: 50%; display: block; - width: 1rem; - margin-left: -0.5rem; + width: var(--bs-popover-arrow-width); + margin-left: calc(-0.5 * var(--bs-popover-arrow-width)); content: ''; - border-bottom: 1px solid #444; + border-bottom: var(--bs-popover-border-width) solid + var(--bs-popover-header-bg); } .bs-popover-auto[data-popper-placement^='left'] > .popover-arrow, .bs-popover-start > .popover-arrow { - right: calc(-0.5rem - 1px); - width: 0.5rem; - height: 1rem; + right: calc( + -1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width) + ); + width: var(--bs-popover-arrow-height); + height: var(--bs-popover-arrow-width); +} +.bs-popover-auto[data-popper-placement^='left'] > .popover-arrow::after, +.bs-popover-auto[data-popper-placement^='left'] > .popover-arrow::before, +.bs-popover-start > .popover-arrow::after, +.bs-popover-start > .popover-arrow::before { + border-width: calc(var(--bs-popover-arrow-width) * 0.5) 0 + calc(var(--bs-popover-arrow-width) * 0.5) var(--bs-popover-arrow-height); } .bs-popover-auto[data-popper-placement^='left'] > .popover-arrow::before, .bs-popover-start > .popover-arrow::before { right: 0; - border-width: 0.5rem 0 0.5rem 0.5rem; - border-left-color: rgba(0, 0, 0, 0.25); + border-left-color: var(--bs-popover-arrow-border); } .bs-popover-auto[data-popper-placement^='left'] > .popover-arrow::after, .bs-popover-start > .popover-arrow::after { - right: 1px; - border-width: 0.5rem 0 0.5rem 0.5rem; - border-left-color: #303030; + right: var(--bs-popover-border-width); + border-left-color: var(--bs-popover-bg); } .popover-header { - padding: 0.5rem 1rem; + padding: var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x); margin-bottom: 0; - font-size: 1rem; - background-color: #444; - border-bottom: 1px solid rgba(0, 0, 0, 0.2); - border-top-left-radius: calc(0.3rem - 1px); - border-top-right-radius: calc(0.3rem - 1px); + font-size: var(--bs-popover-header-font-size); + color: var(--bs-popover-header-color); + background-color: var(--bs-popover-header-bg); + border-bottom: var(--bs-popover-border-width) solid + var(--bs-popover-border-color); + border-top-left-radius: var(--bs-popover-inner-border-radius); + border-top-right-radius: var(--bs-popover-inner-border-radius); } .popover-header:empty { display: none; } .popover-body { - padding: 1rem 1rem; - color: #fff; + padding: var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x); + color: var(--bs-popover-body-color); } .carousel { position: relative; } .carousel.pointer-event { - -ms-touch-action: pan-y; touch-action: pan-y; } .carousel-inner { @@ -6020,9 +5727,7 @@ fieldset:disabled .btn { margin-right: -100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; - transition: -webkit-transform 0.6s ease-in-out; transition: transform 0.6s ease-in-out; - transition: transform 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out; } @media (prefers-reduced-motion: reduce) { .carousel-item { @@ -6036,18 +5741,15 @@ fieldset:disabled .btn { } .active.carousel-item-end, .carousel-item-next:not(.carousel-item-start) { - -webkit-transform: translateX(100%); transform: translateX(100%); } .active.carousel-item-start, .carousel-item-prev:not(.carousel-item-end) { - -webkit-transform: translateX(-100%); transform: translateX(-100%); } .carousel-fade .carousel-item { opacity: 0; transition-property: opacity; - -webkit-transform: none; transform: none; } .carousel-fade .carousel-item-next.carousel-item-start, @@ -6074,11 +5776,8 @@ fieldset:disabled .btn { top: 0; bottom: 0; z-index: 1; - display: -ms-flexbox; display: flex; - -ms-flex-align: center; align-items: center; - -ms-flex-pack: center; justify-content: center; width: 15%; padding: 0; @@ -6131,9 +5830,7 @@ fieldset:disabled .btn { bottom: 0; left: 0; z-index: 2; - display: -ms-flexbox; display: flex; - -ms-flex-pack: center; justify-content: center; padding: 0; margin-right: 15%; @@ -6143,7 +5840,6 @@ fieldset:disabled .btn { } .carousel-indicators [data-bs-target] { box-sizing: content-box; - -ms-flex: 0 1 auto; flex: 0 1 auto; width: 30px; height: 3px; @@ -6180,7 +5876,6 @@ fieldset:disabled .btn { } .carousel-dark .carousel-control-next-icon, .carousel-dark .carousel-control-prev-icon { - -webkit-filter: invert(1) grayscale(100); filter: invert(1) grayscale(100); } .carousel-dark .carousel-indicators [data-bs-target] { @@ -6189,100 +5884,614 @@ fieldset:disabled .btn { .carousel-dark .carousel-caption { color: #000; } -@-webkit-keyframes spinner-border { - to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } +.spinner-border, +.spinner-grow { + display: inline-block; + width: var(--bs-spinner-width); + height: var(--bs-spinner-height); + vertical-align: var(--bs-spinner-vertical-align); + border-radius: 50%; + animation: var(--bs-spinner-animation-speed) linear infinite + var(--bs-spinner-animation-name); } @keyframes spinner-border { to { - -webkit-transform: rotate(360deg); transform: rotate(360deg); } } .spinner-border { - display: inline-block; - width: 2rem; - height: 2rem; - vertical-align: -0.125em; - border: 0.25em solid currentColor; + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-border-width: 0.25em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-border; + border: var(--bs-spinner-border-width) solid currentcolor; border-right-color: transparent; - border-radius: 50%; - -webkit-animation: 0.75s linear infinite spinner-border; - animation: 0.75s linear infinite spinner-border; } .spinner-border-sm { - width: 1rem; - height: 1rem; - border-width: 0.2em; -} -@-webkit-keyframes spinner-grow { - 0% { - -webkit-transform: scale(0); - transform: scale(0); - } - 50% { - opacity: 1; - -webkit-transform: none; - transform: none; - } + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; + --bs-spinner-border-width: 0.2em; } @keyframes spinner-grow { 0% { - -webkit-transform: scale(0); transform: scale(0); } 50% { opacity: 1; - -webkit-transform: none; transform: none; } } .spinner-grow { - display: inline-block; - width: 2rem; - height: 2rem; - vertical-align: -0.125em; - background-color: currentColor; - border-radius: 50%; + --bs-spinner-width: 2rem; + --bs-spinner-height: 2rem; + --bs-spinner-vertical-align: -0.125em; + --bs-spinner-animation-speed: 0.75s; + --bs-spinner-animation-name: spinner-grow; + background-color: currentcolor; opacity: 0; - -webkit-animation: 0.75s linear infinite spinner-grow; - animation: 0.75s linear infinite spinner-grow; } .spinner-grow-sm { - width: 1rem; - height: 1rem; + --bs-spinner-width: 1rem; + --bs-spinner-height: 1rem; } @media (prefers-reduced-motion: reduce) { .spinner-border, .spinner-grow { - -webkit-animation-duration: 1.5s; - animation-duration: 1.5s; + --bs-spinner-animation-speed: 1.5s; + } +} +.offcanvas, +.offcanvas-lg, +.offcanvas-md, +.offcanvas-sm, +.offcanvas-xl, +.offcanvas-xxl { + --bs-offcanvas-zindex: 1045; + --bs-offcanvas-width: 400px; + --bs-offcanvas-height: 30vh; + --bs-offcanvas-padding-x: 1rem; + --bs-offcanvas-padding-y: 1rem; + --bs-offcanvas-color: ; + --bs-offcanvas-bg: #303030; + --bs-offcanvas-border-width: 1px; + --bs-offcanvas-border-color: #444; + --bs-offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); +} +@media (max-width: 575.98px) { + .offcanvas-sm { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 575.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-sm { + transition: none; + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.show:not(.hiding), + .offcanvas-sm.showing { + transform: none; + } +} +@media (max-width: 575.98px) { + .offcanvas-sm.hiding, + .offcanvas-sm.show, + .offcanvas-sm.showing { + visibility: visible; + } +} +@media (min-width: 576px) { + .offcanvas-sm { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-sm .offcanvas-header { + display: none; + } + .offcanvas-sm .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} +@media (max-width: 767.98px) { + .offcanvas-md { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-md { + transition: none; + } +} +@media (max-width: 767.98px) { + .offcanvas-md.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} +@media (max-width: 767.98px) { + .offcanvas-md.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} +@media (max-width: 767.98px) { + .offcanvas-md.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} +@media (max-width: 767.98px) { + .offcanvas-md.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} +@media (max-width: 767.98px) { + .offcanvas-md.show:not(.hiding), + .offcanvas-md.showing { + transform: none; + } +} +@media (max-width: 767.98px) { + .offcanvas-md.hiding, + .offcanvas-md.show, + .offcanvas-md.showing { + visibility: visible; + } +} +@media (min-width: 768px) { + .offcanvas-md { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-md .offcanvas-header { + display: none; + } + .offcanvas-md .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} +@media (max-width: 991.98px) { + .offcanvas-lg { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-lg { + transition: none; + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.show:not(.hiding), + .offcanvas-lg.showing { + transform: none; + } +} +@media (max-width: 991.98px) { + .offcanvas-lg.hiding, + .offcanvas-lg.show, + .offcanvas-lg.showing { + visibility: visible; + } +} +@media (min-width: 992px) { + .offcanvas-lg { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-lg .offcanvas-header { + display: none; + } + .offcanvas-lg .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 1199.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-xl { + transition: none; + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.show:not(.hiding), + .offcanvas-xl.showing { + transform: none; + } +} +@media (max-width: 1199.98px) { + .offcanvas-xl.hiding, + .offcanvas-xl.show, + .offcanvas-xl.showing { + visibility: visible; + } +} +@media (min-width: 1200px) { + .offcanvas-xl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-xl .offcanvas-header { + display: none; + } + .offcanvas-xl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl { + position: fixed; + bottom: 0; + z-index: var(--bs-offcanvas-zindex); + display: flex; + flex-direction: column; + max-width: 100%; + color: var(--bs-offcanvas-color); + visibility: hidden; + background-color: var(--bs-offcanvas-bg); + background-clip: padding-box; + outline: 0; + transition: transform 0.3s ease-in-out; + } +} +@media (max-width: 1399.98px) and (prefers-reduced-motion: reduce) { + .offcanvas-xxl { + transition: none; + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.show:not(.hiding), + .offcanvas-xxl.showing { + transform: none; + } +} +@media (max-width: 1399.98px) { + .offcanvas-xxl.hiding, + .offcanvas-xxl.show, + .offcanvas-xxl.showing { + visibility: visible; + } +} +@media (min-width: 1400px) { + .offcanvas-xxl { + --bs-offcanvas-height: auto; + --bs-offcanvas-border-width: 0; + background-color: transparent !important; + } + .offcanvas-xxl .offcanvas-header { + display: none; + } + .offcanvas-xxl .offcanvas-body { + display: flex; + flex-grow: 0; + padding: 0; + overflow-y: visible; + background-color: transparent !important; } } .offcanvas { position: fixed; bottom: 0; - z-index: 1045; - display: -ms-flexbox; + z-index: var(--bs-offcanvas-zindex); display: flex; - -ms-flex-direction: column; flex-direction: column; max-width: 100%; + color: var(--bs-offcanvas-color); visibility: hidden; - background-color: #303030; + background-color: var(--bs-offcanvas-bg); background-clip: padding-box; outline: 0; - transition: -webkit-transform 0.3s ease-in-out; transition: transform 0.3s ease-in-out; - transition: transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out; } @media (prefers-reduced-motion: reduce) { .offcanvas { transition: none; } } +.offcanvas.offcanvas-start { + top: 0; + left: 0; + width: var(--bs-offcanvas-width); + border-right: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(-100%); +} +.offcanvas.offcanvas-end { + top: 0; + right: 0; + width: var(--bs-offcanvas-width); + border-left: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateX(100%); +} +.offcanvas.offcanvas-top { + top: 0; + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-bottom: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(-100%); +} +.offcanvas.offcanvas-bottom { + right: 0; + left: 0; + height: var(--bs-offcanvas-height); + max-height: 100%; + border-top: var(--bs-offcanvas-border-width) solid + var(--bs-offcanvas-border-color); + transform: translateY(100%); +} +.offcanvas.show:not(.hiding), +.offcanvas.showing { + transform: none; +} +.offcanvas.hiding, +.offcanvas.show, +.offcanvas.showing { + visibility: visible; +} .offcanvas-backdrop { position: fixed; top: 0; @@ -6299,75 +6508,33 @@ fieldset:disabled .btn { opacity: 0.5; } .offcanvas-header { - display: -ms-flexbox; display: flex; - -ms-flex-align: center; align-items: center; - -ms-flex-pack: justify; justify-content: space-between; - padding: 1rem 1rem; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); } .offcanvas-header .btn-close { - padding: 0.5rem 0.5rem; - margin-top: -0.5rem; - margin-right: -0.5rem; - margin-bottom: -0.5rem; + padding: calc(var(--bs-offcanvas-padding-y) * 0.5) + calc(var(--bs-offcanvas-padding-x) * 0.5); + margin-top: calc(-0.5 * var(--bs-offcanvas-padding-y)); + margin-right: calc(-0.5 * var(--bs-offcanvas-padding-x)); + margin-bottom: calc(-0.5 * var(--bs-offcanvas-padding-y)); } .offcanvas-title { margin-bottom: 0; line-height: 1.5; } .offcanvas-body { - -ms-flex-positive: 1; flex-grow: 1; - padding: 1rem 1rem; + padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x); overflow-y: auto; } -.offcanvas-start { - top: 0; - left: 0; - width: 400px; - border-right: 1px solid #444; - -webkit-transform: translateX(-100%); - transform: translateX(-100%); -} -.offcanvas-end { - top: 0; - right: 0; - width: 400px; - border-left: 1px solid #444; - -webkit-transform: translateX(100%); - transform: translateX(100%); -} -.offcanvas-top { - top: 0; - right: 0; - left: 0; - height: 30vh; - max-height: 100%; - border-bottom: 1px solid #444; - -webkit-transform: translateY(-100%); - transform: translateY(-100%); -} -.offcanvas-bottom { - right: 0; - left: 0; - height: 30vh; - max-height: 100%; - border-top: 1px solid #444; - -webkit-transform: translateY(100%); - transform: translateY(100%); -} -.offcanvas.show { - -webkit-transform: none; - transform: none; -} .placeholder { display: inline-block; min-height: 1em; vertical-align: middle; cursor: wait; - background-color: currentColor; + background-color: currentcolor; opacity: 0.5; } .placeholder.btn::before { @@ -6384,14 +6551,8 @@ fieldset:disabled .btn { min-height: 1.2em; } .placeholder-glow .placeholder { - -webkit-animation: placeholder-glow 2s ease-in-out infinite; animation: placeholder-glow 2s ease-in-out infinite; } -@-webkit-keyframes placeholder-glow { - 50% { - opacity: 0.2; - } -} @keyframes placeholder-glow { 50% { opacity: 0.2; @@ -6412,19 +6573,12 @@ fieldset:disabled .btn { ); -webkit-mask-size: 200% 100%; mask-size: 200% 100%; - -webkit-animation: placeholder-wave 2s linear infinite; animation: placeholder-wave 2s linear infinite; } -@-webkit-keyframes placeholder-wave { - 100% { - -webkit-mask-position: -200% 0; - mask-position: -200% 0; - } -} @keyframes placeholder-wave { 100% { - -webkit-mask-position: -200% 0; - mask-position: -200% 0; + -webkit-mask-position: -200% 0%; + mask-position: -200% 0%; } } .clearfix::after { @@ -6432,61 +6586,93 @@ fieldset:disabled .btn { clear: both; content: ''; } +.text-bg-primary { + color: #fff !important; + background-color: RGBA(55, 90, 127, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-secondary { + color: #fff !important; + background-color: RGBA(68, 68, 68, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-success { + color: #fff !important; + background-color: RGBA(0, 188, 140, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-info { + color: #fff !important; + background-color: RGBA(52, 152, 219, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-warning { + color: #fff !important; + background-color: RGBA(243, 156, 18, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-danger { + color: #fff !important; + background-color: RGBA(231, 76, 60, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-light { + color: #fff !important; + background-color: RGBA(173, 181, 189, var(--bs-bg-opacity, 1)) !important; +} +.text-bg-dark { + color: #fff !important; + background-color: RGBA(48, 48, 48, var(--bs-bg-opacity, 1)) !important; +} .link-primary { - color: #375a7f; + color: #375a7f !important; } .link-primary:focus, .link-primary:hover { - color: #2c4866; + color: #2c4866 !important; } .link-secondary { - color: #444; + color: #444 !important; } .link-secondary:focus, .link-secondary:hover { - color: #363636; + color: #363636 !important; } .link-success { - color: #00bc8c; + color: #00bc8c !important; } .link-success:focus, .link-success:hover { - color: #009670; + color: #009670 !important; } .link-info { - color: #3498db; + color: #3498db !important; } .link-info:focus, .link-info:hover { - color: #2a7aaf; + color: #2a7aaf !important; } .link-warning { - color: #f39c12; + color: #f39c12 !important; } .link-warning:focus, .link-warning:hover { - color: #c27d0e; + color: #c27d0e !important; } .link-danger { - color: #e74c3c; + color: #e74c3c !important; } .link-danger:focus, .link-danger:hover { - color: #b93d30; + color: #b93d30 !important; } .link-light { - color: #adb5bd; + color: #adb5bd !important; } .link-light:focus, .link-light:hover { - color: #8a9197; + color: #8a9197 !important; } .link-dark { - color: #303030; + color: #303030 !important; } .link-dark:focus, .link-dark:hover { - color: #262626; + color: #262626 !important; } .ratio { position: relative; @@ -6508,13 +6694,13 @@ fieldset:disabled .btn { --bs-aspect-ratio: 100%; } .ratio-4x3 { - --bs-aspect-ratio: calc(3 / 4 * 100%); + --bs-aspect-ratio: 75%; } .ratio-16x9 { - --bs-aspect-ratio: calc(9 / 16 * 100%); + --bs-aspect-ratio: 56.25%; } .ratio-21x9 { - --bs-aspect-ratio: calc(9 / 21 * 100%); + --bs-aspect-ratio: 42.8571428571%; } .fixed-top { position: fixed; @@ -6536,6 +6722,12 @@ fieldset:disabled .btn { top: 0; z-index: 1020; } +.sticky-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; +} @media (min-width: 576px) { .sticky-sm-top { position: -webkit-sticky; @@ -6543,6 +6735,12 @@ fieldset:disabled .btn { top: 0; z-index: 1020; } + .sticky-sm-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } } @media (min-width: 768px) { .sticky-md-top { @@ -6551,6 +6749,12 @@ fieldset:disabled .btn { top: 0; z-index: 1020; } + .sticky-md-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } } @media (min-width: 992px) { .sticky-lg-top { @@ -6559,6 +6763,12 @@ fieldset:disabled .btn { top: 0; z-index: 1020; } + .sticky-lg-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } } @media (min-width: 1200px) { .sticky-xl-top { @@ -6567,6 +6777,12 @@ fieldset:disabled .btn { top: 0; z-index: 1020; } + .sticky-xl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } } @media (min-width: 1400px) { .sticky-xxl-top { @@ -6575,25 +6791,23 @@ fieldset:disabled .btn { top: 0; z-index: 1020; } + .sticky-xxl-bottom { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1020; + } } .hstack { - display: -ms-flexbox; display: flex; - -ms-flex-direction: row; flex-direction: row; - -ms-flex-align: center; align-items: center; - -ms-flex-item-align: stretch; align-self: stretch; } .vstack { - display: -ms-flexbox; display: flex; - -ms-flex: 1 1 auto; flex: 1 1 auto; - -ms-flex-direction: column; flex-direction: column; - -ms-flex-item-align: stretch; align-self: stretch; } .visually-hidden, @@ -6624,11 +6838,10 @@ fieldset:disabled .btn { } .vr { display: inline-block; - -ms-flex-item-align: stretch; align-self: stretch; width: 1px; min-height: 1em; - background-color: currentColor; + background-color: currentcolor; opacity: 0.25; } .align-baseline { @@ -6707,11 +6920,9 @@ fieldset:disabled .btn { display: table-cell !important; } .d-flex { - display: -ms-flexbox !important; display: flex !important; } .d-inline-flex { - display: -ms-inline-flexbox !important; display: inline-flex !important; } .d-none { @@ -6782,88 +6993,125 @@ fieldset:disabled .btn { right: 100% !important; } .translate-middle { - -webkit-transform: translate(-50%, -50%) !important; transform: translate(-50%, -50%) !important; } .translate-middle-x { - -webkit-transform: translateX(-50%) !important; transform: translateX(-50%) !important; } .translate-middle-y { - -webkit-transform: translateY(-50%) !important; transform: translateY(-50%) !important; } .border { - border: 1px solid #dee2e6 !important; + border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important; } .border-0 { border: 0 !important; } .border-top { - border-top: 1px solid #dee2e6 !important; + border-top: var(--bs-border-width) var(--bs-border-style) + var(--bs-border-color) !important; } .border-top-0 { border-top: 0 !important; } .border-end { - border-right: 1px solid #dee2e6 !important; + border-right: var(--bs-border-width) var(--bs-border-style) + var(--bs-border-color) !important; } .border-end-0 { border-right: 0 !important; } .border-bottom { - border-bottom: 1px solid #dee2e6 !important; + border-bottom: var(--bs-border-width) var(--bs-border-style) + var(--bs-border-color) !important; } .border-bottom-0 { border-bottom: 0 !important; } .border-start { - border-left: 1px solid #dee2e6 !important; + border-left: var(--bs-border-width) var(--bs-border-style) + var(--bs-border-color) !important; } .border-start-0 { border-left: 0 !important; } .border-primary { - border-color: #375a7f !important; + --bs-border-opacity: 1; + border-color: rgba( + var(--bs-primary-rgb), + var(--bs-border-opacity) + ) !important; } .border-secondary { - border-color: #444 !important; + --bs-border-opacity: 1; + border-color: rgba( + var(--bs-secondary-rgb), + var(--bs-border-opacity) + ) !important; } .border-success { - border-color: #00bc8c !important; + --bs-border-opacity: 1; + border-color: rgba( + var(--bs-success-rgb), + var(--bs-border-opacity) + ) !important; } .border-info { - border-color: #3498db !important; + --bs-border-opacity: 1; + border-color: rgba(var(--bs-info-rgb), var(--bs-border-opacity)) !important; } .border-warning { - border-color: #f39c12 !important; + --bs-border-opacity: 1; + border-color: rgba( + var(--bs-warning-rgb), + var(--bs-border-opacity) + ) !important; } .border-danger { - border-color: #e74c3c !important; + --bs-border-opacity: 1; + border-color: rgba(var(--bs-danger-rgb), var(--bs-border-opacity)) !important; } .border-light { - border-color: #adb5bd !important; + --bs-border-opacity: 1; + border-color: rgba(var(--bs-light-rgb), var(--bs-border-opacity)) !important; } .border-dark { - border-color: #303030 !important; + --bs-border-opacity: 1; + border-color: rgba(var(--bs-dark-rgb), var(--bs-border-opacity)) !important; } .border-white { - border-color: #fff !important; + --bs-border-opacity: 1; + border-color: rgba(var(--bs-white-rgb), var(--bs-border-opacity)) !important; } .border-1 { - border-width: 1px !important; + --bs-border-width: 1px; } .border-2 { - border-width: 2px !important; + --bs-border-width: 2px; } .border-3 { - border-width: 3px !important; + --bs-border-width: 3px; } .border-4 { - border-width: 4px !important; + --bs-border-width: 4px; } .border-5 { - border-width: 5px !important; + --bs-border-width: 5px; +} +.border-opacity-10 { + --bs-border-opacity: 0.1; +} +.border-opacity-25 { + --bs-border-opacity: 0.25; +} +.border-opacity-50 { + --bs-border-opacity: 0.5; +} +.border-opacity-75 { + --bs-border-opacity: 0.75; +} +.border-opacity-100 { + --bs-border-opacity: 1; } .w-25 { width: 25% !important; @@ -6914,193 +7162,132 @@ fieldset:disabled .btn { min-height: 100vh !important; } .flex-fill { - -ms-flex: 1 1 auto !important; flex: 1 1 auto !important; } .flex-row { - -ms-flex-direction: row !important; flex-direction: row !important; } .flex-column { - -ms-flex-direction: column !important; flex-direction: column !important; } .flex-row-reverse { - -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; } .flex-column-reverse { - -ms-flex-direction: column-reverse !important; flex-direction: column-reverse !important; } .flex-grow-0 { - -ms-flex-positive: 0 !important; flex-grow: 0 !important; } .flex-grow-1 { - -ms-flex-positive: 1 !important; flex-grow: 1 !important; } .flex-shrink-0 { - -ms-flex-negative: 0 !important; flex-shrink: 0 !important; } .flex-shrink-1 { - -ms-flex-negative: 1 !important; flex-shrink: 1 !important; } .flex-wrap { - -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; } .flex-nowrap { - -ms-flex-wrap: nowrap !important; flex-wrap: nowrap !important; } .flex-wrap-reverse { - -ms-flex-wrap: wrap-reverse !important; flex-wrap: wrap-reverse !important; } -.gap-0 { - gap: 0 !important; -} -.gap-1 { - gap: 0.25rem !important; -} -.gap-2 { - gap: 0.5rem !important; -} -.gap-3 { - gap: 1rem !important; -} -.gap-4 { - gap: 1.5rem !important; -} -.gap-5 { - gap: 3rem !important; -} .justify-content-start { - -ms-flex-pack: start !important; justify-content: flex-start !important; } .justify-content-end { - -ms-flex-pack: end !important; justify-content: flex-end !important; } .justify-content-center { - -ms-flex-pack: center !important; justify-content: center !important; } .justify-content-between { - -ms-flex-pack: justify !important; justify-content: space-between !important; } .justify-content-around { - -ms-flex-pack: distribute !important; justify-content: space-around !important; } .justify-content-evenly { - -ms-flex-pack: space-evenly !important; justify-content: space-evenly !important; } .align-items-start { - -ms-flex-align: start !important; align-items: flex-start !important; } .align-items-end { - -ms-flex-align: end !important; align-items: flex-end !important; } .align-items-center { - -ms-flex-align: center !important; align-items: center !important; } .align-items-baseline { - -ms-flex-align: baseline !important; align-items: baseline !important; } .align-items-stretch { - -ms-flex-align: stretch !important; align-items: stretch !important; } .align-content-start { - -ms-flex-line-pack: start !important; align-content: flex-start !important; } .align-content-end { - -ms-flex-line-pack: end !important; align-content: flex-end !important; } .align-content-center { - -ms-flex-line-pack: center !important; align-content: center !important; } .align-content-between { - -ms-flex-line-pack: justify !important; align-content: space-between !important; } .align-content-around { - -ms-flex-line-pack: distribute !important; align-content: space-around !important; } .align-content-stretch { - -ms-flex-line-pack: stretch !important; align-content: stretch !important; } .align-self-auto { - -ms-flex-item-align: auto !important; align-self: auto !important; } .align-self-start { - -ms-flex-item-align: start !important; align-self: flex-start !important; } .align-self-end { - -ms-flex-item-align: end !important; align-self: flex-end !important; } .align-self-center { - -ms-flex-item-align: center !important; align-self: center !important; } .align-self-baseline { - -ms-flex-item-align: baseline !important; align-self: baseline !important; } .align-self-stretch { - -ms-flex-item-align: stretch !important; align-self: stretch !important; } .order-first { - -ms-flex-order: -1 !important; order: -1 !important; } .order-0 { - -ms-flex-order: 0 !important; order: 0 !important; } .order-1 { - -ms-flex-order: 1 !important; order: 1 !important; } .order-2 { - -ms-flex-order: 2 !important; order: 2 !important; } .order-3 { - -ms-flex-order: 3 !important; order: 3 !important; } .order-4 { - -ms-flex-order: 4 !important; order: 4 !important; } .order-5 { - -ms-flex-order: 5 !important; order: 5 !important; } .order-last { - -ms-flex-order: 6 !important; order: 6 !important; } .m-0 { @@ -7402,6 +7589,24 @@ fieldset:disabled .btn { .ps-5 { padding-left: 3rem !important; } +.gap-0 { + gap: 0 !important; +} +.gap-1 { + gap: 0.25rem !important; +} +.gap-2 { + gap: 0.5rem !important; +} +.gap-3 { + gap: 1rem !important; +} +.gap-4 { + gap: 1.5rem !important; +} +.gap-5 { + gap: 3rem !important; +} .font-monospace { font-family: var(--bs-font-monospace) !important; } @@ -7441,6 +7646,9 @@ fieldset:disabled .btn { .fw-bold { font-weight: 700 !important; } +.fw-semibold { + font-weight: 600 !important; +} .fw-bolder { font-weight: bolder !important; } @@ -7654,13 +7862,11 @@ fieldset:disabled .btn { .user-select-auto { -webkit-user-select: auto !important; -moz-user-select: auto !important; - -ms-user-select: auto !important; user-select: auto !important; } .user-select-none { -webkit-user-select: none !important; -moz-user-select: none !important; - -ms-user-select: none !important; user-select: none !important; } .pe-none { @@ -7670,41 +7876,47 @@ fieldset:disabled .btn { pointer-events: auto !important; } .rounded { - border-radius: 0.25rem !important; + border-radius: var(--bs-border-radius) !important; } .rounded-0 { border-radius: 0 !important; } .rounded-1 { - border-radius: 0.2rem !important; + border-radius: var(--bs-border-radius-sm) !important; } .rounded-2 { - border-radius: 0.25rem !important; + border-radius: var(--bs-border-radius) !important; } .rounded-3 { - border-radius: 0.3rem !important; + border-radius: var(--bs-border-radius-lg) !important; +} +.rounded-4 { + border-radius: var(--bs-border-radius-xl) !important; +} +.rounded-5 { + border-radius: var(--bs-border-radius-2xl) !important; } .rounded-circle { border-radius: 50% !important; } .rounded-pill { - border-radius: 50rem !important; + border-radius: var(--bs-border-radius-pill) !important; } .rounded-top { - border-top-left-radius: 0.25rem !important; - border-top-right-radius: 0.25rem !important; + border-top-left-radius: var(--bs-border-radius) !important; + border-top-right-radius: var(--bs-border-radius) !important; } .rounded-end { - border-top-right-radius: 0.25rem !important; - border-bottom-right-radius: 0.25rem !important; + border-top-right-radius: var(--bs-border-radius) !important; + border-bottom-right-radius: var(--bs-border-radius) !important; } .rounded-bottom { - border-bottom-right-radius: 0.25rem !important; - border-bottom-left-radius: 0.25rem !important; + border-bottom-right-radius: var(--bs-border-radius) !important; + border-bottom-left-radius: var(--bs-border-radius) !important; } .rounded-start { - border-bottom-left-radius: 0.25rem !important; - border-top-left-radius: 0.25rem !important; + border-bottom-left-radius: var(--bs-border-radius) !important; + border-top-left-radius: var(--bs-border-radius) !important; } .visible { visibility: visible !important; @@ -7744,204 +7956,141 @@ fieldset:disabled .btn { display: table-cell !important; } .d-sm-flex { - display: -ms-flexbox !important; display: flex !important; } .d-sm-inline-flex { - display: -ms-inline-flexbox !important; display: inline-flex !important; } .d-sm-none { display: none !important; } .flex-sm-fill { - -ms-flex: 1 1 auto !important; flex: 1 1 auto !important; } .flex-sm-row { - -ms-flex-direction: row !important; flex-direction: row !important; } .flex-sm-column { - -ms-flex-direction: column !important; flex-direction: column !important; } .flex-sm-row-reverse { - -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; } .flex-sm-column-reverse { - -ms-flex-direction: column-reverse !important; flex-direction: column-reverse !important; } .flex-sm-grow-0 { - -ms-flex-positive: 0 !important; flex-grow: 0 !important; } .flex-sm-grow-1 { - -ms-flex-positive: 1 !important; flex-grow: 1 !important; } .flex-sm-shrink-0 { - -ms-flex-negative: 0 !important; flex-shrink: 0 !important; } .flex-sm-shrink-1 { - -ms-flex-negative: 1 !important; flex-shrink: 1 !important; } .flex-sm-wrap { - -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; } .flex-sm-nowrap { - -ms-flex-wrap: nowrap !important; flex-wrap: nowrap !important; } .flex-sm-wrap-reverse { - -ms-flex-wrap: wrap-reverse !important; flex-wrap: wrap-reverse !important; } - .gap-sm-0 { - gap: 0 !important; - } - .gap-sm-1 { - gap: 0.25rem !important; - } - .gap-sm-2 { - gap: 0.5rem !important; - } - .gap-sm-3 { - gap: 1rem !important; - } - .gap-sm-4 { - gap: 1.5rem !important; - } - .gap-sm-5 { - gap: 3rem !important; - } .justify-content-sm-start { - -ms-flex-pack: start !important; justify-content: flex-start !important; } .justify-content-sm-end { - -ms-flex-pack: end !important; justify-content: flex-end !important; } .justify-content-sm-center { - -ms-flex-pack: center !important; justify-content: center !important; } .justify-content-sm-between { - -ms-flex-pack: justify !important; justify-content: space-between !important; } .justify-content-sm-around { - -ms-flex-pack: distribute !important; justify-content: space-around !important; } .justify-content-sm-evenly { - -ms-flex-pack: space-evenly !important; justify-content: space-evenly !important; } .align-items-sm-start { - -ms-flex-align: start !important; align-items: flex-start !important; } .align-items-sm-end { - -ms-flex-align: end !important; align-items: flex-end !important; } .align-items-sm-center { - -ms-flex-align: center !important; align-items: center !important; } .align-items-sm-baseline { - -ms-flex-align: baseline !important; align-items: baseline !important; } .align-items-sm-stretch { - -ms-flex-align: stretch !important; align-items: stretch !important; } .align-content-sm-start { - -ms-flex-line-pack: start !important; align-content: flex-start !important; } .align-content-sm-end { - -ms-flex-line-pack: end !important; align-content: flex-end !important; } .align-content-sm-center { - -ms-flex-line-pack: center !important; align-content: center !important; } .align-content-sm-between { - -ms-flex-line-pack: justify !important; align-content: space-between !important; } .align-content-sm-around { - -ms-flex-line-pack: distribute !important; align-content: space-around !important; } .align-content-sm-stretch { - -ms-flex-line-pack: stretch !important; align-content: stretch !important; } .align-self-sm-auto { - -ms-flex-item-align: auto !important; align-self: auto !important; } .align-self-sm-start { - -ms-flex-item-align: start !important; align-self: flex-start !important; } .align-self-sm-end { - -ms-flex-item-align: end !important; align-self: flex-end !important; } .align-self-sm-center { - -ms-flex-item-align: center !important; align-self: center !important; } .align-self-sm-baseline { - -ms-flex-item-align: baseline !important; align-self: baseline !important; } .align-self-sm-stretch { - -ms-flex-item-align: stretch !important; align-self: stretch !important; } .order-sm-first { - -ms-flex-order: -1 !important; order: -1 !important; } .order-sm-0 { - -ms-flex-order: 0 !important; order: 0 !important; } .order-sm-1 { - -ms-flex-order: 1 !important; order: 1 !important; } .order-sm-2 { - -ms-flex-order: 2 !important; order: 2 !important; } .order-sm-3 { - -ms-flex-order: 3 !important; order: 3 !important; } .order-sm-4 { - -ms-flex-order: 4 !important; order: 4 !important; } .order-sm-5 { - -ms-flex-order: 5 !important; order: 5 !important; } .order-sm-last { - -ms-flex-order: 6 !important; order: 6 !important; } .m-sm-0 { @@ -8243,6 +8392,24 @@ fieldset:disabled .btn { .ps-sm-5 { padding-left: 3rem !important; } + .gap-sm-0 { + gap: 0 !important; + } + .gap-sm-1 { + gap: 0.25rem !important; + } + .gap-sm-2 { + gap: 0.5rem !important; + } + .gap-sm-3 { + gap: 1rem !important; + } + .gap-sm-4 { + gap: 1.5rem !important; + } + .gap-sm-5 { + gap: 3rem !important; + } .text-sm-start { text-align: left !important; } @@ -8285,204 +8452,141 @@ fieldset:disabled .btn { display: table-cell !important; } .d-md-flex { - display: -ms-flexbox !important; display: flex !important; } .d-md-inline-flex { - display: -ms-inline-flexbox !important; display: inline-flex !important; } .d-md-none { display: none !important; } .flex-md-fill { - -ms-flex: 1 1 auto !important; flex: 1 1 auto !important; } .flex-md-row { - -ms-flex-direction: row !important; flex-direction: row !important; } .flex-md-column { - -ms-flex-direction: column !important; flex-direction: column !important; } .flex-md-row-reverse { - -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; } .flex-md-column-reverse { - -ms-flex-direction: column-reverse !important; flex-direction: column-reverse !important; } .flex-md-grow-0 { - -ms-flex-positive: 0 !important; flex-grow: 0 !important; } .flex-md-grow-1 { - -ms-flex-positive: 1 !important; flex-grow: 1 !important; } .flex-md-shrink-0 { - -ms-flex-negative: 0 !important; flex-shrink: 0 !important; } .flex-md-shrink-1 { - -ms-flex-negative: 1 !important; flex-shrink: 1 !important; } .flex-md-wrap { - -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; } .flex-md-nowrap { - -ms-flex-wrap: nowrap !important; flex-wrap: nowrap !important; } .flex-md-wrap-reverse { - -ms-flex-wrap: wrap-reverse !important; flex-wrap: wrap-reverse !important; } - .gap-md-0 { - gap: 0 !important; - } - .gap-md-1 { - gap: 0.25rem !important; - } - .gap-md-2 { - gap: 0.5rem !important; - } - .gap-md-3 { - gap: 1rem !important; - } - .gap-md-4 { - gap: 1.5rem !important; - } - .gap-md-5 { - gap: 3rem !important; - } .justify-content-md-start { - -ms-flex-pack: start !important; justify-content: flex-start !important; } .justify-content-md-end { - -ms-flex-pack: end !important; justify-content: flex-end !important; } .justify-content-md-center { - -ms-flex-pack: center !important; justify-content: center !important; } .justify-content-md-between { - -ms-flex-pack: justify !important; justify-content: space-between !important; } .justify-content-md-around { - -ms-flex-pack: distribute !important; justify-content: space-around !important; } .justify-content-md-evenly { - -ms-flex-pack: space-evenly !important; justify-content: space-evenly !important; } .align-items-md-start { - -ms-flex-align: start !important; align-items: flex-start !important; } .align-items-md-end { - -ms-flex-align: end !important; align-items: flex-end !important; } .align-items-md-center { - -ms-flex-align: center !important; align-items: center !important; } .align-items-md-baseline { - -ms-flex-align: baseline !important; align-items: baseline !important; } .align-items-md-stretch { - -ms-flex-align: stretch !important; align-items: stretch !important; } .align-content-md-start { - -ms-flex-line-pack: start !important; align-content: flex-start !important; } .align-content-md-end { - -ms-flex-line-pack: end !important; align-content: flex-end !important; } .align-content-md-center { - -ms-flex-line-pack: center !important; align-content: center !important; } .align-content-md-between { - -ms-flex-line-pack: justify !important; align-content: space-between !important; } .align-content-md-around { - -ms-flex-line-pack: distribute !important; align-content: space-around !important; } .align-content-md-stretch { - -ms-flex-line-pack: stretch !important; align-content: stretch !important; } .align-self-md-auto { - -ms-flex-item-align: auto !important; align-self: auto !important; } .align-self-md-start { - -ms-flex-item-align: start !important; align-self: flex-start !important; } .align-self-md-end { - -ms-flex-item-align: end !important; align-self: flex-end !important; } .align-self-md-center { - -ms-flex-item-align: center !important; align-self: center !important; } .align-self-md-baseline { - -ms-flex-item-align: baseline !important; align-self: baseline !important; } .align-self-md-stretch { - -ms-flex-item-align: stretch !important; align-self: stretch !important; } .order-md-first { - -ms-flex-order: -1 !important; order: -1 !important; } .order-md-0 { - -ms-flex-order: 0 !important; order: 0 !important; } .order-md-1 { - -ms-flex-order: 1 !important; order: 1 !important; } .order-md-2 { - -ms-flex-order: 2 !important; order: 2 !important; } .order-md-3 { - -ms-flex-order: 3 !important; order: 3 !important; } .order-md-4 { - -ms-flex-order: 4 !important; order: 4 !important; } .order-md-5 { - -ms-flex-order: 5 !important; order: 5 !important; } .order-md-last { - -ms-flex-order: 6 !important; order: 6 !important; } .m-md-0 { @@ -8784,6 +8888,24 @@ fieldset:disabled .btn { .ps-md-5 { padding-left: 3rem !important; } + .gap-md-0 { + gap: 0 !important; + } + .gap-md-1 { + gap: 0.25rem !important; + } + .gap-md-2 { + gap: 0.5rem !important; + } + .gap-md-3 { + gap: 1rem !important; + } + .gap-md-4 { + gap: 1.5rem !important; + } + .gap-md-5 { + gap: 3rem !important; + } .text-md-start { text-align: left !important; } @@ -8826,204 +8948,141 @@ fieldset:disabled .btn { display: table-cell !important; } .d-lg-flex { - display: -ms-flexbox !important; display: flex !important; } .d-lg-inline-flex { - display: -ms-inline-flexbox !important; display: inline-flex !important; } .d-lg-none { display: none !important; } .flex-lg-fill { - -ms-flex: 1 1 auto !important; flex: 1 1 auto !important; } .flex-lg-row { - -ms-flex-direction: row !important; flex-direction: row !important; } .flex-lg-column { - -ms-flex-direction: column !important; flex-direction: column !important; } .flex-lg-row-reverse { - -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; } .flex-lg-column-reverse { - -ms-flex-direction: column-reverse !important; flex-direction: column-reverse !important; } .flex-lg-grow-0 { - -ms-flex-positive: 0 !important; flex-grow: 0 !important; } .flex-lg-grow-1 { - -ms-flex-positive: 1 !important; flex-grow: 1 !important; } .flex-lg-shrink-0 { - -ms-flex-negative: 0 !important; flex-shrink: 0 !important; } .flex-lg-shrink-1 { - -ms-flex-negative: 1 !important; flex-shrink: 1 !important; } .flex-lg-wrap { - -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; } .flex-lg-nowrap { - -ms-flex-wrap: nowrap !important; flex-wrap: nowrap !important; } .flex-lg-wrap-reverse { - -ms-flex-wrap: wrap-reverse !important; flex-wrap: wrap-reverse !important; } - .gap-lg-0 { - gap: 0 !important; - } - .gap-lg-1 { - gap: 0.25rem !important; - } - .gap-lg-2 { - gap: 0.5rem !important; - } - .gap-lg-3 { - gap: 1rem !important; - } - .gap-lg-4 { - gap: 1.5rem !important; - } - .gap-lg-5 { - gap: 3rem !important; - } .justify-content-lg-start { - -ms-flex-pack: start !important; justify-content: flex-start !important; } .justify-content-lg-end { - -ms-flex-pack: end !important; justify-content: flex-end !important; } .justify-content-lg-center { - -ms-flex-pack: center !important; justify-content: center !important; } .justify-content-lg-between { - -ms-flex-pack: justify !important; justify-content: space-between !important; } .justify-content-lg-around { - -ms-flex-pack: distribute !important; justify-content: space-around !important; } .justify-content-lg-evenly { - -ms-flex-pack: space-evenly !important; justify-content: space-evenly !important; } .align-items-lg-start { - -ms-flex-align: start !important; align-items: flex-start !important; } .align-items-lg-end { - -ms-flex-align: end !important; align-items: flex-end !important; } .align-items-lg-center { - -ms-flex-align: center !important; align-items: center !important; } .align-items-lg-baseline { - -ms-flex-align: baseline !important; align-items: baseline !important; } .align-items-lg-stretch { - -ms-flex-align: stretch !important; align-items: stretch !important; } .align-content-lg-start { - -ms-flex-line-pack: start !important; align-content: flex-start !important; } .align-content-lg-end { - -ms-flex-line-pack: end !important; align-content: flex-end !important; } .align-content-lg-center { - -ms-flex-line-pack: center !important; align-content: center !important; } .align-content-lg-between { - -ms-flex-line-pack: justify !important; align-content: space-between !important; } .align-content-lg-around { - -ms-flex-line-pack: distribute !important; align-content: space-around !important; } .align-content-lg-stretch { - -ms-flex-line-pack: stretch !important; align-content: stretch !important; } .align-self-lg-auto { - -ms-flex-item-align: auto !important; align-self: auto !important; } .align-self-lg-start { - -ms-flex-item-align: start !important; align-self: flex-start !important; } .align-self-lg-end { - -ms-flex-item-align: end !important; align-self: flex-end !important; } .align-self-lg-center { - -ms-flex-item-align: center !important; align-self: center !important; } .align-self-lg-baseline { - -ms-flex-item-align: baseline !important; align-self: baseline !important; } .align-self-lg-stretch { - -ms-flex-item-align: stretch !important; align-self: stretch !important; } .order-lg-first { - -ms-flex-order: -1 !important; order: -1 !important; } .order-lg-0 { - -ms-flex-order: 0 !important; order: 0 !important; } .order-lg-1 { - -ms-flex-order: 1 !important; order: 1 !important; } .order-lg-2 { - -ms-flex-order: 2 !important; order: 2 !important; } .order-lg-3 { - -ms-flex-order: 3 !important; order: 3 !important; } .order-lg-4 { - -ms-flex-order: 4 !important; order: 4 !important; } .order-lg-5 { - -ms-flex-order: 5 !important; order: 5 !important; } .order-lg-last { - -ms-flex-order: 6 !important; order: 6 !important; } .m-lg-0 { @@ -9325,6 +9384,24 @@ fieldset:disabled .btn { .ps-lg-5 { padding-left: 3rem !important; } + .gap-lg-0 { + gap: 0 !important; + } + .gap-lg-1 { + gap: 0.25rem !important; + } + .gap-lg-2 { + gap: 0.5rem !important; + } + .gap-lg-3 { + gap: 1rem !important; + } + .gap-lg-4 { + gap: 1.5rem !important; + } + .gap-lg-5 { + gap: 3rem !important; + } .text-lg-start { text-align: left !important; } @@ -9367,204 +9444,141 @@ fieldset:disabled .btn { display: table-cell !important; } .d-xl-flex { - display: -ms-flexbox !important; display: flex !important; } .d-xl-inline-flex { - display: -ms-inline-flexbox !important; display: inline-flex !important; } .d-xl-none { display: none !important; } .flex-xl-fill { - -ms-flex: 1 1 auto !important; flex: 1 1 auto !important; } .flex-xl-row { - -ms-flex-direction: row !important; flex-direction: row !important; } .flex-xl-column { - -ms-flex-direction: column !important; flex-direction: column !important; } .flex-xl-row-reverse { - -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; } .flex-xl-column-reverse { - -ms-flex-direction: column-reverse !important; flex-direction: column-reverse !important; } .flex-xl-grow-0 { - -ms-flex-positive: 0 !important; flex-grow: 0 !important; } .flex-xl-grow-1 { - -ms-flex-positive: 1 !important; flex-grow: 1 !important; } .flex-xl-shrink-0 { - -ms-flex-negative: 0 !important; flex-shrink: 0 !important; } .flex-xl-shrink-1 { - -ms-flex-negative: 1 !important; flex-shrink: 1 !important; } .flex-xl-wrap { - -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; } .flex-xl-nowrap { - -ms-flex-wrap: nowrap !important; flex-wrap: nowrap !important; } .flex-xl-wrap-reverse { - -ms-flex-wrap: wrap-reverse !important; flex-wrap: wrap-reverse !important; } - .gap-xl-0 { - gap: 0 !important; - } - .gap-xl-1 { - gap: 0.25rem !important; - } - .gap-xl-2 { - gap: 0.5rem !important; - } - .gap-xl-3 { - gap: 1rem !important; - } - .gap-xl-4 { - gap: 1.5rem !important; - } - .gap-xl-5 { - gap: 3rem !important; - } .justify-content-xl-start { - -ms-flex-pack: start !important; justify-content: flex-start !important; } .justify-content-xl-end { - -ms-flex-pack: end !important; justify-content: flex-end !important; } .justify-content-xl-center { - -ms-flex-pack: center !important; justify-content: center !important; } .justify-content-xl-between { - -ms-flex-pack: justify !important; justify-content: space-between !important; } .justify-content-xl-around { - -ms-flex-pack: distribute !important; justify-content: space-around !important; } .justify-content-xl-evenly { - -ms-flex-pack: space-evenly !important; justify-content: space-evenly !important; } .align-items-xl-start { - -ms-flex-align: start !important; align-items: flex-start !important; } .align-items-xl-end { - -ms-flex-align: end !important; align-items: flex-end !important; } .align-items-xl-center { - -ms-flex-align: center !important; align-items: center !important; } .align-items-xl-baseline { - -ms-flex-align: baseline !important; align-items: baseline !important; } .align-items-xl-stretch { - -ms-flex-align: stretch !important; align-items: stretch !important; } .align-content-xl-start { - -ms-flex-line-pack: start !important; align-content: flex-start !important; } .align-content-xl-end { - -ms-flex-line-pack: end !important; align-content: flex-end !important; } .align-content-xl-center { - -ms-flex-line-pack: center !important; align-content: center !important; } .align-content-xl-between { - -ms-flex-line-pack: justify !important; align-content: space-between !important; } .align-content-xl-around { - -ms-flex-line-pack: distribute !important; align-content: space-around !important; } .align-content-xl-stretch { - -ms-flex-line-pack: stretch !important; align-content: stretch !important; } .align-self-xl-auto { - -ms-flex-item-align: auto !important; align-self: auto !important; } .align-self-xl-start { - -ms-flex-item-align: start !important; align-self: flex-start !important; } .align-self-xl-end { - -ms-flex-item-align: end !important; align-self: flex-end !important; } .align-self-xl-center { - -ms-flex-item-align: center !important; align-self: center !important; } .align-self-xl-baseline { - -ms-flex-item-align: baseline !important; align-self: baseline !important; } .align-self-xl-stretch { - -ms-flex-item-align: stretch !important; align-self: stretch !important; } .order-xl-first { - -ms-flex-order: -1 !important; order: -1 !important; } .order-xl-0 { - -ms-flex-order: 0 !important; order: 0 !important; } .order-xl-1 { - -ms-flex-order: 1 !important; order: 1 !important; } .order-xl-2 { - -ms-flex-order: 2 !important; order: 2 !important; } .order-xl-3 { - -ms-flex-order: 3 !important; order: 3 !important; } .order-xl-4 { - -ms-flex-order: 4 !important; order: 4 !important; } .order-xl-5 { - -ms-flex-order: 5 !important; order: 5 !important; } .order-xl-last { - -ms-flex-order: 6 !important; order: 6 !important; } .m-xl-0 { @@ -9866,6 +9880,24 @@ fieldset:disabled .btn { .ps-xl-5 { padding-left: 3rem !important; } + .gap-xl-0 { + gap: 0 !important; + } + .gap-xl-1 { + gap: 0.25rem !important; + } + .gap-xl-2 { + gap: 0.5rem !important; + } + .gap-xl-3 { + gap: 1rem !important; + } + .gap-xl-4 { + gap: 1.5rem !important; + } + .gap-xl-5 { + gap: 3rem !important; + } .text-xl-start { text-align: left !important; } @@ -9908,204 +9940,141 @@ fieldset:disabled .btn { display: table-cell !important; } .d-xxl-flex { - display: -ms-flexbox !important; display: flex !important; } .d-xxl-inline-flex { - display: -ms-inline-flexbox !important; display: inline-flex !important; } .d-xxl-none { display: none !important; } .flex-xxl-fill { - -ms-flex: 1 1 auto !important; flex: 1 1 auto !important; } .flex-xxl-row { - -ms-flex-direction: row !important; flex-direction: row !important; } .flex-xxl-column { - -ms-flex-direction: column !important; flex-direction: column !important; } .flex-xxl-row-reverse { - -ms-flex-direction: row-reverse !important; flex-direction: row-reverse !important; } .flex-xxl-column-reverse { - -ms-flex-direction: column-reverse !important; flex-direction: column-reverse !important; } .flex-xxl-grow-0 { - -ms-flex-positive: 0 !important; flex-grow: 0 !important; } .flex-xxl-grow-1 { - -ms-flex-positive: 1 !important; flex-grow: 1 !important; } .flex-xxl-shrink-0 { - -ms-flex-negative: 0 !important; flex-shrink: 0 !important; } .flex-xxl-shrink-1 { - -ms-flex-negative: 1 !important; flex-shrink: 1 !important; } .flex-xxl-wrap { - -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; } .flex-xxl-nowrap { - -ms-flex-wrap: nowrap !important; flex-wrap: nowrap !important; } .flex-xxl-wrap-reverse { - -ms-flex-wrap: wrap-reverse !important; flex-wrap: wrap-reverse !important; } - .gap-xxl-0 { - gap: 0 !important; - } - .gap-xxl-1 { - gap: 0.25rem !important; - } - .gap-xxl-2 { - gap: 0.5rem !important; - } - .gap-xxl-3 { - gap: 1rem !important; - } - .gap-xxl-4 { - gap: 1.5rem !important; - } - .gap-xxl-5 { - gap: 3rem !important; - } .justify-content-xxl-start { - -ms-flex-pack: start !important; justify-content: flex-start !important; } .justify-content-xxl-end { - -ms-flex-pack: end !important; justify-content: flex-end !important; } .justify-content-xxl-center { - -ms-flex-pack: center !important; justify-content: center !important; } .justify-content-xxl-between { - -ms-flex-pack: justify !important; justify-content: space-between !important; } .justify-content-xxl-around { - -ms-flex-pack: distribute !important; justify-content: space-around !important; } .justify-content-xxl-evenly { - -ms-flex-pack: space-evenly !important; justify-content: space-evenly !important; } .align-items-xxl-start { - -ms-flex-align: start !important; align-items: flex-start !important; } .align-items-xxl-end { - -ms-flex-align: end !important; align-items: flex-end !important; } .align-items-xxl-center { - -ms-flex-align: center !important; align-items: center !important; } .align-items-xxl-baseline { - -ms-flex-align: baseline !important; align-items: baseline !important; } .align-items-xxl-stretch { - -ms-flex-align: stretch !important; align-items: stretch !important; } .align-content-xxl-start { - -ms-flex-line-pack: start !important; align-content: flex-start !important; } .align-content-xxl-end { - -ms-flex-line-pack: end !important; align-content: flex-end !important; } .align-content-xxl-center { - -ms-flex-line-pack: center !important; align-content: center !important; } .align-content-xxl-between { - -ms-flex-line-pack: justify !important; align-content: space-between !important; } .align-content-xxl-around { - -ms-flex-line-pack: distribute !important; align-content: space-around !important; } .align-content-xxl-stretch { - -ms-flex-line-pack: stretch !important; align-content: stretch !important; } .align-self-xxl-auto { - -ms-flex-item-align: auto !important; align-self: auto !important; } .align-self-xxl-start { - -ms-flex-item-align: start !important; align-self: flex-start !important; } .align-self-xxl-end { - -ms-flex-item-align: end !important; align-self: flex-end !important; } .align-self-xxl-center { - -ms-flex-item-align: center !important; align-self: center !important; } .align-self-xxl-baseline { - -ms-flex-item-align: baseline !important; align-self: baseline !important; } .align-self-xxl-stretch { - -ms-flex-item-align: stretch !important; align-self: stretch !important; } .order-xxl-first { - -ms-flex-order: -1 !important; order: -1 !important; } .order-xxl-0 { - -ms-flex-order: 0 !important; order: 0 !important; } .order-xxl-1 { - -ms-flex-order: 1 !important; order: 1 !important; } .order-xxl-2 { - -ms-flex-order: 2 !important; order: 2 !important; } .order-xxl-3 { - -ms-flex-order: 3 !important; order: 3 !important; } .order-xxl-4 { - -ms-flex-order: 4 !important; order: 4 !important; } .order-xxl-5 { - -ms-flex-order: 5 !important; order: 5 !important; } .order-xxl-last { - -ms-flex-order: 6 !important; order: 6 !important; } .m-xxl-0 { @@ -10407,6 +10376,24 @@ fieldset:disabled .btn { .ps-xxl-5 { padding-left: 3rem !important; } + .gap-xxl-0 { + gap: 0 !important; + } + .gap-xxl-1 { + gap: 0.25rem !important; + } + .gap-xxl-2 { + gap: 0.5rem !important; + } + .gap-xxl-3 { + gap: 1rem !important; + } + .gap-xxl-4 { + gap: 1.5rem !important; + } + .gap-xxl-5 { + gap: 3rem !important; + } .text-xxl-start { text-align: left !important; } @@ -10454,20 +10441,24 @@ fieldset:disabled .btn { display: table-cell !important; } .d-print-flex { - display: -ms-flexbox !important; display: flex !important; } .d-print-inline-flex { - display: -ms-inline-flexbox !important; display: inline-flex !important; } .d-print-none { display: none !important; } } +:root { + color-scheme: dark; +} .blockquote-footer { color: #888; } +.form-control { + color-scheme: light; +} .input-group-addon { color: #fff; } @@ -10497,8 +10488,8 @@ fieldset:disabled .btn { text-decoration: none; } .alert { - border: none; color: #fff; + border: none; } .alert .alert-link, .alert a { diff --git a/rootfs/usr/local/share/template-files/data/htdocs/www/css/cookieconsent.css b/rootfs/usr/local/share/template-files/data/htdocs/www/css/cookieconsent.css new file mode 100644 index 0000000..51666cf --- /dev/null +++ b/rootfs/usr/local/share/template-files/data/htdocs/www/css/cookieconsent.css @@ -0,0 +1,275 @@ +.cc-window { + opacity: 1; + transition: opacity 1s ease; +} +.cc-window.cc-invisible { + opacity: 0; +} +.cc-animate.cc-revoke { + transition: transform 1s ease; +} +.cc-animate.cc-revoke.cc-top { + transform: translateY(-2em); +} +.cc-animate.cc-revoke.cc-bottom { + transform: translateY(2em); +} +.cc-animate.cc-revoke.cc-active.cc-bottom, +.cc-animate.cc-revoke.cc-active.cc-top, +.cc-revoke:hover { + transform: translateY(0); +} +.cc-grower { + max-height: 0; + overflow: hidden; + transition: max-height 1s; +} +.cc-link, +.cc-revoke:hover { + text-decoration: underline; +} +.cc-revoke, +.cc-window { + position: fixed; + overflow: hidden; + box-sizing: border-box; + font-family: Helvetica, Calibri, Arial, sans-serif; + font-size: 16px; + line-height: 1.5em; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + z-index: 9999; +} +.cc-window.cc-static { + position: static; +} +.cc-window.cc-floating { + padding: 2em; + max-width: 24em; + -ms-flex-direction: column; + flex-direction: column; +} +.cc-window.cc-banner { + padding: 1em 1.8em; + width: 100%; + -ms-flex-direction: row; + flex-direction: row; +} +.cc-revoke { + padding: 0.5em; +} +.cc-header { + font-size: 18px; + font-weight: 700; +} +.cc-btn, +.cc-close, +.cc-link, +.cc-revoke { + cursor: pointer; +} +.cc-link { + opacity: 0.8; + display: inline-block; + padding: 0.2em; +} +.cc-link:hover { + opacity: 1; +} +.cc-link:active, +.cc-link:visited { + color: initial; +} +.cc-btn { + display: block; + padding: 0.4em 0.8em; + font-size: 0.9em; + font-weight: 700; + border-width: 2px; + border-style: solid; + text-align: center; + white-space: nowrap; +} +.cc-banner .cc-btn:last-child { + min-width: 140px; +} +.cc-highlight .cc-btn:first-child { + background-color: transparent; + border-color: transparent; +} +.cc-highlight .cc-btn:first-child:focus, +.cc-highlight .cc-btn:first-child:hover { + background-color: transparent; + text-decoration: underline; +} +.cc-close { + display: block; + position: absolute; + top: 0.5em; + right: 0.5em; + font-size: 1.6em; + opacity: 0.9; + line-height: 0.75; +} +.cc-close:focus, +.cc-close:hover { + opacity: 1; +} +.cc-revoke.cc-top { + top: 0; + left: 3em; + border-bottom-left-radius: 0.5em; + border-bottom-right-radius: 0.5em; +} +.cc-revoke.cc-bottom { + bottom: 0; + left: 3em; + border-top-left-radius: 0.5em; + border-top-right-radius: 0.5em; +} +.cc-revoke.cc-left { + left: 3em; + right: unset; +} +.cc-revoke.cc-right { + right: 3em; + left: unset; +} +.cc-top { + top: 1em; +} +.cc-left { + left: 1em; +} +.cc-right { + right: 1em; +} +.cc-bottom { + bottom: 1em; +} +.cc-floating > .cc-link { + margin-bottom: 1em; +} +.cc-floating .cc-message { + display: block; + margin-bottom: 1em; +} +.cc-window.cc-floating .cc-compliance { + -ms-flex: 1; + flex: 1; +} +.cc-window.cc-banner { + -ms-flex-align: center; + align-items: center; +} +.cc-banner.cc-top { + left: 0; + right: 0; + top: 0; +} +.cc-banner.cc-bottom { + left: 0; + right: 0; + bottom: 0; +} +.cc-banner .cc-message { + -ms-flex: 1; + flex: 1; +} +.cc-compliance { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-line-pack: justify; + align-content: space-between; +} +.cc-compliance > .cc-btn { + -ms-flex: 1; + flex: 1; +} +.cc-btn + .cc-btn { + margin-left: 0.5em; +} +@media print { + .cc-revoke, + .cc-window { + display: none; + } +} +@media screen and (max-width: 900px) { + .cc-btn { + white-space: normal; + } +} +@media screen and (max-width: 414px) and (orientation: portrait), + screen and (max-width: 736px) and (orientation: landscape) { + .cc-window.cc-top { + top: 0; + } + .cc-window.cc-bottom { + bottom: 0; + } + .cc-window.cc-banner, + .cc-window.cc-left, + .cc-window.cc-right { + left: 0; + right: 0; + } + .cc-window.cc-banner { + -ms-flex-direction: column; + flex-direction: column; + } + .cc-window.cc-banner .cc-compliance { + -ms-flex: 1; + flex: 1; + } + .cc-window.cc-floating { + max-width: none; + } + .cc-window .cc-message { + margin-bottom: 1em; + } + .cc-window.cc-banner { + -ms-flex-align: unset; + align-items: unset; + } +} +.cc-floating.cc-theme-classic { + padding: 1.2em; + border-radius: 5px; +} +.cc-floating.cc-type-info.cc-theme-classic .cc-compliance { + text-align: center; + display: inline; + -ms-flex: none; + flex: none; +} +.cc-theme-classic .cc-btn { + border-radius: 5px; +} +.cc-theme-classic .cc-btn:last-child { + min-width: 140px; +} +.cc-floating.cc-type-info.cc-theme-classic .cc-btn { + display: inline-block; +} +.cc-theme-edgeless.cc-window { + padding: 0; +} +.cc-floating.cc-theme-edgeless .cc-message { + margin: 2em 2em 1.5em; +} +.cc-banner.cc-theme-edgeless .cc-btn { + margin: 0; + padding: 0.8em 1.8em; + height: 100%; +} +.cc-banner.cc-theme-edgeless .cc-message { + margin-left: 1em; +} +.cc-floating.cc-theme-edgeless .cc-btn + .cc-btn { + margin-left: 0; +} diff --git a/rootfs/usr/local/share/template-files/data/htdocs/www/css/errorpages.css b/rootfs/usr/local/share/template-files/data/htdocs/www/css/errorpages.css index 5645b88..9a6e59c 100644 --- a/rootfs/usr/local/share/template-files/data/htdocs/www/css/errorpages.css +++ b/rootfs/usr/local/share/template-files/data/htdocs/www/css/errorpages.css @@ -1,13 +1,8 @@ -@import url( - https://fonts.googleapis.com/css?family=Lato:300italic, - 700italic, - 300, - 700 -); +@import url('https://fonts.googleapis.com/css?family=Fira+Sans&display=swap'); body { padding: 50px; - font: 14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif; + font: 14px/1.5 Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #777; font-weight: 300; padding: 1.5em 0; diff --git a/rootfs/usr/local/share/template-files/data/htdocs/www/css/index.css b/rootfs/usr/local/share/template-files/data/htdocs/www/css/index.css index 647284d..946928e 100644 --- a/rootfs/usr/local/share/template-files/data/htdocs/www/css/index.css +++ b/rootfs/usr/local/share/template-files/data/htdocs/www/css/index.css @@ -1,8 +1,18 @@ -@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700); -@import url(./bootstrap.min.css); +@import url('https://fonts.googleapis.com/css?family=Fira+Sans&display=swap'); +td, +th, body { - color: purple; + font-family: 'Fira Sans', Verdana, Helvetica, sans-serif; + font-size: 14px; + font-weight: normal; + font-variant: normal; + text-transform: none; + text-decoration: none; + text-align: center; + align-items: center; + background-color: #333; + color: #fff; background-image: url('../images/bg.png'); } @@ -28,6 +38,35 @@ td { width: 600px; } +h5, +h3 { + padding: 3px; + margin-top: 0px; + margin-bottom: 0px; + background-color: #333; + color: white; + font-family: Verdana, Helvetica, sans-serif; +} + +p { + text-align: center; +} + +div { + text-align: center; +} + +h3 { + font-size: 13px; +} + +h5 { + font-size: 10px; + text-align: right; + background-color: #333; + color: #678ca0; +} + .spacer { margin: 0px; width: 100%; @@ -50,11 +89,6 @@ td { color: red; } -a { - text-decoration: none; - color: #5d83a9; -} - p.main { margin-top: 5px; margin-bottom: 5px; @@ -62,12 +96,18 @@ p.main { font-size: 10px; } +a { + text-decoration: none; + color: #5d83a9; +} + a:visited { - color: #c39; + color: rgb(238, 130, 202); } a:hover { - color: #f00; + font-style: italic; + color: #a296db !important; } a:active { @@ -77,3 +117,7 @@ a:active { tr:hover { background-color: #f5f5f5; } + +table { + width: 100%; +} diff --git a/rootfs/usr/local/share/template-files/data/htdocs/www/health/index.json b/rootfs/usr/local/share/template-files/data/htdocs/www/health/index.json new file mode 100644 index 0000000..51c3093 --- /dev/null +++ b/rootfs/usr/local/share/template-files/data/htdocs/www/health/index.json @@ -0,0 +1 @@ +{ "status": "ok" } diff --git a/rootfs/usr/local/share/template-files/data/htdocs/www/server-health b/rootfs/usr/local/share/template-files/data/htdocs/www/health/index.txt similarity index 100% rename from rootfs/usr/local/share/template-files/data/htdocs/www/server-health rename to rootfs/usr/local/share/template-files/data/htdocs/www/health/index.txt diff --git a/rootfs/usr/local/share/template-files/data/htdocs/www/index.html b/rootfs/usr/local/share/template-files/data/htdocs/www/index.html index ea6c58b..308127d 100644 --- a/rootfs/usr/local/share/template-files/data/htdocs/www/index.html +++ b/rootfs/usr/local/share/template-files/data/htdocs/www/index.html @@ -1,48 +1,107 @@ - + + + - - - + + - - + + + + + - - + - - + - + + + - - - - + + + - - Welcome - -
-

Congratulations

-

- Your caddy container has been setup.




-

+ +

Congratulations

+

+ Your REPLACE_SERVER_SOFTWARE container has been setup.
+ This file is located in /data/htdocs/www/index.html +

+

+

+

+ +

+ +
+ +
+ diff --git a/rootfs/usr/local/share/template-files/data/htdocs/www/index.php b/rootfs/usr/local/share/template-files/data/htdocs/www/index.php new file mode 100644 index 0000000..d642561 --- /dev/null +++ b/rootfs/usr/local/share/template-files/data/htdocs/www/index.php @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Congratulations

+

+ Your REPLACE_SERVER_SOFTWARE container has been setup.
+ This file is located in: + +

+ + SERVER: +
+ SERVER Address: +
+ +

+

+

+ +

+ +
+ + +
+ + + + diff --git a/rootfs/usr/local/share/template-files/data/htdocs/www/info.php b/rootfs/usr/local/share/template-files/data/htdocs/www/info.php index ae965aa..3efde4b 100644 --- a/rootfs/usr/local/share/template-files/data/htdocs/www/info.php +++ b/rootfs/usr/local/share/template-files/data/htdocs/www/info.php @@ -1,45 +1,62 @@ - + + + - - - + + - - + + + + + - - + - - + - - - - - - + + + + - - - Welcome -
-

Congratulations

- -




+
+

+

Congratulations PHP has been successfully configured

+

+ +

diff --git a/rootfs/usr/local/share/template-files/data/htdocs/www/server-health.json b/rootfs/usr/local/share/template-files/data/htdocs/www/server-health.json deleted file mode 100644 index bc4e010..0000000 --- a/rootfs/usr/local/share/template-files/data/htdocs/www/server-health.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "status": "ok" -}