Compare commits
No commits in common. "main" and "page" have entirely different histories.
206
.gitignore
vendored
@ -1,196 +1,22 @@
|
||||
test.py
|
||||
# Created by https://www.gitignore.io/api/python,pycharm+all
|
||||
# Edit at https://www.gitignore.io/?templates=python,pycharm+all
|
||||
.idea
|
||||
|
||||
### PyCharm+all ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/hugo
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=hugo
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
### Hugo ###
|
||||
# Generated files by hugo
|
||||
/public/
|
||||
/resources/_gen/
|
||||
/assets/jsconfig.json
|
||||
hugo_stats.json
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
# Executable may be added to repository
|
||||
hugo.exe
|
||||
hugo.darwin
|
||||
hugo.linux
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
# Temporary lock file while building
|
||||
/.hugo_build.lock
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
# End of https://www.toptal.com/developers/gitignore/api/hugo
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
### PyCharm+all Patch ###
|
||||
# Ignores the whole .idea folder and all .iml files
|
||||
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
|
||||
|
||||
.idea/
|
||||
|
||||
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
|
||||
|
||||
*.iml
|
||||
modules.xml
|
||||
.idea/misc.xml
|
||||
*.ipr
|
||||
|
||||
# Sonarlint plugin
|
||||
.idea/sonarlint
|
||||
|
||||
### Python ###
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# Mr Developer
|
||||
.mr.developer.cfg
|
||||
.project
|
||||
.pydevproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# End of https://www.gitignore.io/api/python,pycharm+all
|
||||
|
175
.gitlab-ci.yml
@ -1,176 +1,11 @@
|
||||
image: python:3.11
|
||||
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
|
||||
|
||||
variables:
|
||||
WINDOWS_PYTHON_PACKAGE_NAME: "python311"
|
||||
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
||||
PIPENV_VENV_IN_PROJECT: 1
|
||||
UPDATE_WINDOWS_DEPS:
|
||||
description: "Set to \"1\" to update windows deps"
|
||||
value: "0"
|
||||
|
||||
cache:
|
||||
key: cache-$CI_COMMIT_REF_SLUG-$WINDOWS_PYTHON_PACKAGE_NAME
|
||||
paths:
|
||||
- .cache/pip
|
||||
- .venv/
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: always
|
||||
- if: $CI_COMMIT_AUTHOR == "Gitlab CI <ci@gitlab.com>"
|
||||
when: never
|
||||
- when: always
|
||||
|
||||
prepare:
|
||||
before_script:
|
||||
- pip install setuptools_scm>=6.2
|
||||
pages:
|
||||
script:
|
||||
- VERSION=$(python -m setuptools_scm)
|
||||
- echo "VERSION=${VERSION}" | tee -a build.env
|
||||
- echo "LINUX_AMD64_BINARY=fime_linux_amd64_${VERSION}" | tee -a build.env
|
||||
- echo "WINDOWS_AMD64_BINARY=fime_windows_amd64_${VERSION}" | tee -a build.env
|
||||
- echo "PACKAGE_REGISTRY_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/fime/${VERSION}" | tee -a build.env
|
||||
- hugo --minify
|
||||
artifacts:
|
||||
paths:
|
||||
- src/fime/_version.py
|
||||
reports:
|
||||
dotenv: build.env
|
||||
|
||||
update_windows_deps:
|
||||
tags:
|
||||
- saas-windows-medium-amd64
|
||||
- public
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
- if: $UPDATE_WINDOWS_DEPS == "1"
|
||||
when: always
|
||||
- if: $CI_COMMIT_BRANCH == "main"
|
||||
changes:
|
||||
- Pipfile
|
||||
- Pipfile.lock
|
||||
when: always
|
||||
before_script:
|
||||
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||
- choco install $WINDOWS_PYTHON_PACKAGE_NAME -y --no-progress
|
||||
- refreshenv
|
||||
- python --version
|
||||
- pip install pipenv
|
||||
script:
|
||||
- pipenv lock --dev
|
||||
- cp Pipfile.lock Pipfile.lock.windows
|
||||
artifacts:
|
||||
paths:
|
||||
- Pipfile.lock.windows
|
||||
- if: $CI_COMMIT_REF_NAME == "page"
|
||||
|
||||
# commit from linux, because setting up SSH in Windows is a fucking nightmare
|
||||
commit_windows_deps:
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
- if: $UPDATE_WINDOWS_DEPS == "1"
|
||||
- if: $CI_COMMIT_BRANCH == "main"
|
||||
changes:
|
||||
- Pipfile
|
||||
- Pipfile.lock
|
||||
needs:
|
||||
- update_windows_deps
|
||||
image: alpine
|
||||
before_script:
|
||||
- apk add --update git openssh-client
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY_REPO_WRITE" | ssh-add -
|
||||
- git config --global user.name "Gitlab CI"
|
||||
- git config --global user.email "ci@gitlab.com"
|
||||
- git remote rm origin && git remote add origin "git@gitlab.com:${CI_PROJECT_PATH}.git"
|
||||
script:
|
||||
- dos2unix Pipfile.lock.windows
|
||||
- git commit -m "Updated windows deps from CI" Pipfile.lock.windows || echo "No changes"
|
||||
- GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git push origin HEAD:$CI_COMMIT_REF_NAME
|
||||
|
||||
package_linux:
|
||||
needs:
|
||||
- prepare
|
||||
before_script:
|
||||
- python --version
|
||||
- pip install pipenv
|
||||
- pipenv sync --dev
|
||||
script:
|
||||
- pipenv run python -m build -w
|
||||
- pipenv run pyinstaller --onefile --name "${LINUX_AMD64_BINARY}" src/fime/main.py
|
||||
artifacts:
|
||||
paths:
|
||||
- dist/*.whl
|
||||
- dist/fime_linux_*
|
||||
|
||||
package_windows:
|
||||
needs:
|
||||
- prepare
|
||||
tags:
|
||||
- saas-windows-medium-amd64
|
||||
# takes forever, so only run if it is worthwhile
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
before_script:
|
||||
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||
- choco install $WINDOWS_PYTHON_PACKAGE_NAME -y --no-progress
|
||||
- refreshenv
|
||||
- python --version
|
||||
- pip install pipenv
|
||||
- mv -force Pipfile.lock.windows Pipfile.lock
|
||||
- pipenv sync --dev
|
||||
script:
|
||||
- pipenv run pyinstaller --onefile --windowed --name "${WINDOWS_AMD64_BINARY}" -i icon.ico src/fime/main.py
|
||||
artifacts:
|
||||
paths:
|
||||
- dist/fime_windows_*
|
||||
|
||||
pypi_upload:
|
||||
needs:
|
||||
- package_linux
|
||||
environment: pypi
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
before_script:
|
||||
- pip install twine
|
||||
script:
|
||||
- twine upload dist/fime-*.whl
|
||||
|
||||
gitlab_package_upload:
|
||||
needs:
|
||||
- prepare
|
||||
- package_linux
|
||||
- package_windows
|
||||
image: curlimages/curl:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
- curl --version
|
||||
- |
|
||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "dist/${LINUX_AMD64_BINARY}" "${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}"
|
||||
- |
|
||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "dist/${WINDOWS_AMD64_BINARY}.exe" "${PACKAGE_REGISTRY_URL}/${WINDOWS_AMD64_BINARY}.exe"
|
||||
|
||||
release_job:
|
||||
needs:
|
||||
- prepare
|
||||
- gitlab_package_upload
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script:
|
||||
- echo "Running the release job."
|
||||
release:
|
||||
tag_name: $CI_COMMIT_TAG
|
||||
name: 'Release $CI_COMMIT_TAG'
|
||||
description: 'Release created using the release-cli.'
|
||||
assets:
|
||||
links:
|
||||
- name: "${LINUX_AMD64_BINARY}"
|
||||
url: "${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}"
|
||||
filepath: "/bin/fime_linux_amd64"
|
||||
link_type: package
|
||||
- name: "${WINDOWS_AMD64_BINARY}.exe"
|
||||
url: "${PACKAGE_REGISTRY_URL}/${WINDOWS_AMD64_BINARY}.exe"
|
||||
filepath: "/bin/fime_windows_amd64.exe"
|
||||
link_type: package
|
||||
|
28
LICENSE
@ -1,28 +0,0 @@
|
||||
MIT License Copyright (c) 2020 - 2022 Faerbit
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Included icons (src/fime/icons) are taken from KDE breeze-icons (https://invent.kde.org/frameworks/breeze-icons),
|
||||
which are licensed under LGPL 3.
|
||||
|
||||
Progress indicator (src/fime/progressindicator.py):
|
||||
Author: Jared P. Sutton <jpsutton@gmail.com>
|
||||
License: LGPL
|
||||
Note: I've licensed this code as LGPL because it was a complete translation of the code found here...
|
||||
https://github.com/mojocorp/QProgressIndicator
|
20
Pipfile
@ -1,20 +0,0 @@
|
||||
[[source]]
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
pyside6 = "~=6.4"
|
||||
requests = "~=2.28"
|
||||
requests-futures = "~=1.0"
|
||||
packaging = "~=23.0"
|
||||
loguru = "~=0.6"
|
||||
browser-cookie3 = "*"
|
||||
|
||||
[dev-packages]
|
||||
pyinstaller = "~=5.6"
|
||||
# wheel packaging on linux is sufficient
|
||||
build = {version = "~=0.10", sys_platform = "== 'linux'" }
|
||||
|
||||
[requires]
|
||||
python_version = "3.11"
|
381
Pipfile.lock
generated
@ -1,381 +0,0 @@
|
||||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "236b0d1f3ca2625232ac2e64bf963e188ff5fa85fc570e46f8e877bf13cb98d3"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
"python_version": "3.11"
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"name": "pypi",
|
||||
"url": "https://pypi.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"browser-cookie3": {
|
||||
"hashes": [
|
||||
"sha256:114e40fe80853211d65f14bc690a7d90c4c287251593dc5767692a950a9006d4",
|
||||
"sha256:3031ad14b96b47ef1e4c8545f2f463e10ad844ef834dcd0ebdae361e31c6119a"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.19.1"
|
||||
},
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
"sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f",
|
||||
"sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==2024.2.2"
|
||||
},
|
||||
"charset-normalizer": {
|
||||
"hashes": [
|
||||
"sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027",
|
||||
"sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087",
|
||||
"sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786",
|
||||
"sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8",
|
||||
"sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09",
|
||||
"sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185",
|
||||
"sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574",
|
||||
"sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e",
|
||||
"sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519",
|
||||
"sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898",
|
||||
"sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269",
|
||||
"sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3",
|
||||
"sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f",
|
||||
"sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6",
|
||||
"sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8",
|
||||
"sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a",
|
||||
"sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73",
|
||||
"sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc",
|
||||
"sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714",
|
||||
"sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2",
|
||||
"sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc",
|
||||
"sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce",
|
||||
"sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d",
|
||||
"sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e",
|
||||
"sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6",
|
||||
"sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269",
|
||||
"sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96",
|
||||
"sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d",
|
||||
"sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a",
|
||||
"sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4",
|
||||
"sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77",
|
||||
"sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d",
|
||||
"sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0",
|
||||
"sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed",
|
||||
"sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068",
|
||||
"sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac",
|
||||
"sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25",
|
||||
"sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8",
|
||||
"sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab",
|
||||
"sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26",
|
||||
"sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2",
|
||||
"sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db",
|
||||
"sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f",
|
||||
"sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5",
|
||||
"sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99",
|
||||
"sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c",
|
||||
"sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d",
|
||||
"sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811",
|
||||
"sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa",
|
||||
"sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a",
|
||||
"sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03",
|
||||
"sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b",
|
||||
"sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04",
|
||||
"sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c",
|
||||
"sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001",
|
||||
"sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458",
|
||||
"sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389",
|
||||
"sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99",
|
||||
"sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985",
|
||||
"sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537",
|
||||
"sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238",
|
||||
"sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f",
|
||||
"sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d",
|
||||
"sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796",
|
||||
"sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a",
|
||||
"sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143",
|
||||
"sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8",
|
||||
"sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c",
|
||||
"sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5",
|
||||
"sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5",
|
||||
"sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711",
|
||||
"sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4",
|
||||
"sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6",
|
||||
"sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c",
|
||||
"sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7",
|
||||
"sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4",
|
||||
"sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b",
|
||||
"sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae",
|
||||
"sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12",
|
||||
"sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c",
|
||||
"sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae",
|
||||
"sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8",
|
||||
"sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887",
|
||||
"sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b",
|
||||
"sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4",
|
||||
"sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f",
|
||||
"sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5",
|
||||
"sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33",
|
||||
"sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519",
|
||||
"sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"
|
||||
],
|
||||
"markers": "python_full_version >= '3.7.0'",
|
||||
"version": "==3.3.2"
|
||||
},
|
||||
"idna": {
|
||||
"hashes": [
|
||||
"sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca",
|
||||
"sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"
|
||||
],
|
||||
"markers": "python_version >= '3.5'",
|
||||
"version": "==3.6"
|
||||
},
|
||||
"jeepney": {
|
||||
"hashes": [
|
||||
"sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806",
|
||||
"sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"
|
||||
],
|
||||
"markers": "python_version >= '3.7' and 'bsd' in sys_platform or sys_platform == 'linux'",
|
||||
"version": "==0.8.0"
|
||||
},
|
||||
"loguru": {
|
||||
"hashes": [
|
||||
"sha256:003d71e3d3ed35f0f8984898359d65b79e5b21943f78af86aa5491210429b8eb",
|
||||
"sha256:e671a53522515f34fd406340ee968cb9ecafbc4b36c679da03c18fd8d0bd51ac"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.5'",
|
||||
"version": "==0.7.2"
|
||||
},
|
||||
"lz4": {
|
||||
"hashes": [
|
||||
"sha256:01fe674ef2889dbb9899d8a67361e0c4a2c833af5aeb37dd505727cf5d2a131e",
|
||||
"sha256:054b4631a355606e99a42396f5db4d22046a3397ffc3269a348ec41eaebd69d2",
|
||||
"sha256:0a136e44a16fc98b1abc404fbabf7f1fada2bdab6a7e970974fb81cf55b636d0",
|
||||
"sha256:0e9c410b11a31dbdc94c05ac3c480cb4b222460faf9231f12538d0074e56c563",
|
||||
"sha256:222a7e35137d7539c9c33bb53fcbb26510c5748779364014235afc62b0ec797f",
|
||||
"sha256:24b3206de56b7a537eda3a8123c644a2b7bf111f0af53bc14bed90ce5562d1aa",
|
||||
"sha256:2b901c7784caac9a1ded4555258207d9e9697e746cc8532129f150ffe1f6ba0d",
|
||||
"sha256:2f7b1839f795315e480fb87d9bc60b186a98e3e5d17203c6e757611ef7dcef61",
|
||||
"sha256:30e8c20b8857adef7be045c65f47ab1e2c4fabba86a9fa9a997d7674a31ea6b6",
|
||||
"sha256:31ea4be9d0059c00b2572d700bf2c1bc82f241f2c3282034a759c9a4d6ca4dc2",
|
||||
"sha256:337cb94488a1b060ef1685187d6ad4ba8bc61d26d631d7ba909ee984ea736be1",
|
||||
"sha256:33c9a6fd20767ccaf70649982f8f3eeb0884035c150c0b818ea660152cf3c809",
|
||||
"sha256:363ab65bf31338eb364062a15f302fc0fab0a49426051429866d71c793c23394",
|
||||
"sha256:43cf03059c0f941b772c8aeb42a0813d68d7081c009542301637e5782f8a33e2",
|
||||
"sha256:56f4fe9c6327adb97406f27a66420b22ce02d71a5c365c48d6b656b4aaeb7775",
|
||||
"sha256:5d35533bf2cee56f38ced91f766cd0038b6abf46f438a80d50c52750088be93f",
|
||||
"sha256:6756212507405f270b66b3ff7f564618de0606395c0fe10a7ae2ffcbbe0b1fba",
|
||||
"sha256:6cdc60e21ec70266947a48839b437d46025076eb4b12c76bd47f8e5eb8a75dcc",
|
||||
"sha256:abc197e4aca8b63f5ae200af03eb95fb4b5055a8f990079b5bdf042f568469dd",
|
||||
"sha256:b14d948e6dce389f9a7afc666d60dd1e35fa2138a8ec5306d30cd2e30d36b40c",
|
||||
"sha256:b47839b53956e2737229d70714f1d75f33e8ac26e52c267f0197b3189ca6de24",
|
||||
"sha256:b6d9ec061b9eca86e4dcc003d93334b95d53909afd5a32c6e4f222157b50c071",
|
||||
"sha256:b891880c187e96339474af2a3b2bfb11a8e4732ff5034be919aa9029484cd201",
|
||||
"sha256:bca8fccc15e3add173da91be8f34121578dc777711ffd98d399be35487c934bf",
|
||||
"sha256:c81703b12475da73a5d66618856d04b1307e43428a7e59d98cfe5a5d608a74c6",
|
||||
"sha256:d2507ee9c99dbddd191c86f0e0c8b724c76d26b0602db9ea23232304382e1f21",
|
||||
"sha256:e36cd7b9d4d920d3bfc2369840da506fa68258f7bb176b8743189793c055e43d",
|
||||
"sha256:e7d84b479ddf39fe3ea05387f10b779155fc0990125f4fb35d636114e1c63a2e",
|
||||
"sha256:eac9af361e0d98335a02ff12fb56caeb7ea1196cf1a49dbf6f17828a131da807",
|
||||
"sha256:edfd858985c23523f4e5a7526ca6ee65ff930207a7ec8a8f57a01eae506aaee7",
|
||||
"sha256:ee9ff50557a942d187ec85462bb0960207e7ec5b19b3b48949263993771c6205",
|
||||
"sha256:f0e822cd7644995d9ba248cb4b67859701748a93e2ab7fc9bc18c599a52e4604",
|
||||
"sha256:f180904f33bdd1e92967923a43c22899e303906d19b2cf8bb547db6653ea6e7d",
|
||||
"sha256:f1d18718f9d78182c6b60f568c9a9cec8a7204d7cb6fad4e511a2ef279e4cb05",
|
||||
"sha256:f4c7bf687303ca47d69f9f0133274958fd672efaa33fb5bcde467862d6c621f0",
|
||||
"sha256:f76176492ff082657ada0d0f10c794b6da5800249ef1692b35cf49b1e93e8ef7"
|
||||
],
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==4.3.3"
|
||||
},
|
||||
"packaging": {
|
||||
"hashes": [
|
||||
"sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5",
|
||||
"sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==23.2"
|
||||
},
|
||||
"pycryptodomex": {
|
||||
"hashes": [
|
||||
"sha256:0daad007b685db36d977f9de73f61f8da2a7104e20aca3effd30752fd56f73e1",
|
||||
"sha256:108e5f1c1cd70ffce0b68739c75734437c919d2eaec8e85bffc2c8b4d2794305",
|
||||
"sha256:19764605feea0df966445d46533729b645033f134baeb3ea26ad518c9fdf212c",
|
||||
"sha256:1be97461c439a6af4fe1cf8bf6ca5936d3db252737d2f379cc6b2e394e12a458",
|
||||
"sha256:25cd61e846aaab76d5791d006497134602a9e451e954833018161befc3b5b9ed",
|
||||
"sha256:2a47bcc478741b71273b917232f521fd5704ab4b25d301669879e7273d3586cc",
|
||||
"sha256:59af01efb011b0e8b686ba7758d59cf4a8263f9ad35911bfe3f416cee4f5c08c",
|
||||
"sha256:5dcac11031a71348faaed1f403a0debd56bf5404232284cf8c761ff918886ebc",
|
||||
"sha256:62a5ec91388984909bb5398ea49ee61b68ecb579123694bffa172c3b0a107079",
|
||||
"sha256:645bd4ca6f543685d643dadf6a856cc382b654cc923460e3a10a49c1b3832aeb",
|
||||
"sha256:653b29b0819605fe0898829c8ad6400a6ccde096146730c2da54eede9b7b8baa",
|
||||
"sha256:69138068268127cd605e03438312d8f271135a33140e2742b417d027a0539427",
|
||||
"sha256:6e186342cfcc3aafaad565cbd496060e5a614b441cacc3995ef0091115c1f6c5",
|
||||
"sha256:76bd15bb65c14900d98835fcd10f59e5e0435077431d3a394b60b15864fddd64",
|
||||
"sha256:7805830e0c56d88f4d491fa5ac640dfc894c5ec570d1ece6ed1546e9df2e98d6",
|
||||
"sha256:7a710b79baddd65b806402e14766c721aee8fb83381769c27920f26476276c1e",
|
||||
"sha256:7a7a8f33a1f1fb762ede6cc9cbab8f2a9ba13b196bfaf7bc6f0b39d2ba315a43",
|
||||
"sha256:82ee7696ed8eb9a82c7037f32ba9b7c59e51dda6f105b39f043b6ef293989cb3",
|
||||
"sha256:88afd7a3af7ddddd42c2deda43d53d3dfc016c11327d0915f90ca34ebda91499",
|
||||
"sha256:8af1a451ff9e123d0d8bd5d5e60f8e3315c3a64f3cdd6bc853e26090e195cdc8",
|
||||
"sha256:8ee606964553c1a0bc74057dd8782a37d1c2bc0f01b83193b6f8bb14523b877b",
|
||||
"sha256:91852d4480a4537d169c29a9d104dda44094c78f1f5b67bca76c29a91042b623",
|
||||
"sha256:9c682436c359b5ada67e882fec34689726a09c461efd75b6ea77b2403d5665b7",
|
||||
"sha256:bc3ee1b4d97081260d92ae813a83de4d2653206967c4a0a017580f8b9548ddbc",
|
||||
"sha256:bca649483d5ed251d06daf25957f802e44e6bb6df2e8f218ae71968ff8f8edc4",
|
||||
"sha256:c39778fd0548d78917b61f03c1fa8bfda6cfcf98c767decf360945fe6f97461e",
|
||||
"sha256:cbe71b6712429650e3883dc81286edb94c328ffcd24849accac0a4dbcc76958a",
|
||||
"sha256:d00fe8596e1cc46b44bf3907354e9377aa030ec4cd04afbbf6e899fc1e2a7781",
|
||||
"sha256:d3584623e68a5064a04748fb6d76117a21a7cb5eaba20608a41c7d0c61721794",
|
||||
"sha256:e48217c7901edd95f9f097feaa0388da215ed14ce2ece803d3f300b4e694abea",
|
||||
"sha256:f2e497413560e03421484189a6b65e33fe800d3bd75590e6d78d4dfdb7accf3b",
|
||||
"sha256:ff5c9a67f8a4fba4aed887216e32cbc48f2a6fb2673bb10a99e43be463e15913"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
|
||||
"version": "==3.20.0"
|
||||
},
|
||||
"pyside6": {
|
||||
"hashes": [
|
||||
"sha256:3b6266fb29bab66526f2bbab2a6610f9f47a4df42ae6fb3713cd8329f593a561",
|
||||
"sha256:5bdaa27d1a921c35764d82a2ec86943488c818cb33b9e16b2784d539b45f6171",
|
||||
"sha256:a8200b2a1f02e42adfd1f41bc60d52d157398778b6ba232d46ad7402bc6f91ec",
|
||||
"sha256:e359ebccd3f90fba85ebd5b93bdeadfa9e5d2fd06b3b5e8985aa5da50ca6243b"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version < '3.13' and python_version >= '3.8'",
|
||||
"version": "==6.6.2"
|
||||
},
|
||||
"pyside6-addons": {
|
||||
"hashes": [
|
||||
"sha256:4fb00bc98bc8335177eaa8f6d70ba687ab9bf00b3ee343abbc7156040f3e586d",
|
||||
"sha256:748151fb49d5fe760b7cf6c88c4ec851e68d66a119939567407115948bf8a08f",
|
||||
"sha256:90f20dcf2caf69307e20d3d682cbe2b1a38e7ddb1f50f4f0e3ae4306219f8883",
|
||||
"sha256:cbdb7393de88a916ed1e9bd8407149f911717d1e06aee04119e26042679d8cce"
|
||||
],
|
||||
"markers": "python_version < '3.13' and python_version >= '3.8'",
|
||||
"version": "==6.6.2"
|
||||
},
|
||||
"pyside6-essentials": {
|
||||
"hashes": [
|
||||
"sha256:030a0565ad2d6361ed8be7826f81fe3dbb7a98330837687608e75cbede5f0ca2",
|
||||
"sha256:11496a322138eab4579c3683d2e3afebb41435412d4109394cb2b9ddaac66fe3",
|
||||
"sha256:41373f9b8fd17bb39a7dc7da85168508fe288955a17117c2e993339f387b23c1",
|
||||
"sha256:90be2cf1a404f1c62777ccc6898895c864376f1fd68ae9f82f7622522bce5814"
|
||||
],
|
||||
"markers": "python_version < '3.13' and python_version >= '3.8'",
|
||||
"version": "==6.6.2"
|
||||
},
|
||||
"requests": {
|
||||
"hashes": [
|
||||
"sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f",
|
||||
"sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==2.31.0"
|
||||
},
|
||||
"requests-futures": {
|
||||
"hashes": [
|
||||
"sha256:4a2f5472e9911a79532137d156aa937cd9cd90fec55677f71b2976d1f7a66d38",
|
||||
"sha256:f55a4ef80070e2858e7d1e73123d2bfaeaf25b93fd34384d8ddf148e2b676373"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.0.1"
|
||||
},
|
||||
"shiboken6": {
|
||||
"hashes": [
|
||||
"sha256:531728324ad3ad4ed7b1d85d2dff548d618182d67024e16e84079f7db104590d",
|
||||
"sha256:60dbad15901ad6fff6e198d8668091bbb2f20b82729412e5fd4d47ac86c97d42",
|
||||
"sha256:9da86622cee5e7201bafe9c5beee3c06d9168c6b8f3e2fac52c1b7df00956bff",
|
||||
"sha256:d4e99e7d1137a7d2c665a465b80baf820829dfba5fe474549d49b0ef81b0abf2"
|
||||
],
|
||||
"markers": "python_version < '3.13' and python_version >= '3.8'",
|
||||
"version": "==6.6.2"
|
||||
},
|
||||
"urllib3": {
|
||||
"hashes": [
|
||||
"sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d",
|
||||
"sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"
|
||||
],
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==2.2.1"
|
||||
}
|
||||
},
|
||||
"develop": {
|
||||
"altgraph": {
|
||||
"hashes": [
|
||||
"sha256:1b5afbb98f6c4dcadb2e2ae6ab9fa994bbb8c1d75f4fa96d340f9437ae454406",
|
||||
"sha256:642743b4750de17e655e6711601b077bc6598dbfa3ba5fa2b2a35ce12b508dff"
|
||||
],
|
||||
"version": "==0.17.4"
|
||||
},
|
||||
"build": {
|
||||
"hashes": [
|
||||
"sha256:af266720050a66c893a6096a2f410989eeac74ff9a68ba194b3f6473e8e26171",
|
||||
"sha256:d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269"
|
||||
],
|
||||
"markers": "python_version >= '3.7' and sys_platform == 'linux'",
|
||||
"version": "==0.10.0"
|
||||
},
|
||||
"packaging": {
|
||||
"hashes": [
|
||||
"sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5",
|
||||
"sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==23.2"
|
||||
},
|
||||
"pyinstaller": {
|
||||
"hashes": [
|
||||
"sha256:16cbd66b59a37f4ee59373a003608d15df180a0d9eb1a29ff3bfbfae64b23d0f",
|
||||
"sha256:27cd64e7cc6b74c5b1066cbf47d75f940b71356166031deb9778a2579bb874c6",
|
||||
"sha256:2c2fe9c52cb4577a3ac39626b84cf16cf30c2792f785502661286184f162ae0d",
|
||||
"sha256:421cd24f26144f19b66d3868b49ed673176765f92fa9f7914cd2158d25b6d17e",
|
||||
"sha256:65133ed89467edb2862036b35d7c5ebd381670412e1e4361215e289c786dd4e6",
|
||||
"sha256:7d51734423685ab2a4324ab2981d9781b203dcae42839161a9ee98bfeaabdade",
|
||||
"sha256:8f6dd0e797ae7efdd79226f78f35eb6a4981db16c13325e962a83395c0ec7420",
|
||||
"sha256:aadafb6f213549a5906829bb252e586e2cf72a7fbdb5731810695e6516f0ab30",
|
||||
"sha256:b2e1c7f5cceb5e9800927ddd51acf9cc78fbaa9e79e822c48b0ee52d9ce3c892",
|
||||
"sha256:c63ef6133eefe36c4b2f4daf4cfea3d6412ece2ca218f77aaf967e52a95ac9b8",
|
||||
"sha256:c8e5d3489c3a7cc5f8401c2d1f48a70e588f9967e391c3b06ddac1f685f8d5d2",
|
||||
"sha256:ddcc2b36052a70052479a9e5da1af067b4496f43686ca3cdda99f8367d0627e4"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version < '3.13' and python_version >= '3.7'",
|
||||
"version": "==5.13.2"
|
||||
},
|
||||
"pyinstaller-hooks-contrib": {
|
||||
"hashes": [
|
||||
"sha256:131494f9cfce190aaa66ed82e82c78b2723d1720ce64d012fbaf938f4ab01d35",
|
||||
"sha256:51a51ea9e1ae6bd5ffa7ec45eba7579624bf4f2472ff56dba0edc186f6ed46a6"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==2024.1"
|
||||
},
|
||||
"pyproject-hooks": {
|
||||
"hashes": [
|
||||
"sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8",
|
||||
"sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==1.0.0"
|
||||
},
|
||||
"setuptools": {
|
||||
"hashes": [
|
||||
"sha256:02fa291a0471b3a18b2b2481ed902af520c69e8ae0919c13da936542754b4c56",
|
||||
"sha256:5c0806c7d9af348e6dd3777b4f4dbb42c7ad85b190104837488eab9a7c945cf8"
|
||||
],
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==69.1.1"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,413 +0,0 @@
|
||||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "236b0d1f3ca2625232ac2e64bf963e188ff5fa85fc570e46f8e877bf13cb98d3"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
"python_version": "3.11"
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"name": "pypi",
|
||||
"url": "https://pypi.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"browser-cookie3": {
|
||||
"hashes": [
|
||||
"sha256:114e40fe80853211d65f14bc690a7d90c4c287251593dc5767692a950a9006d4",
|
||||
"sha256:3031ad14b96b47ef1e4c8545f2f463e10ad844ef834dcd0ebdae361e31c6119a"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.19.1"
|
||||
},
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
"sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f",
|
||||
"sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==2024.2.2"
|
||||
},
|
||||
"charset-normalizer": {
|
||||
"hashes": [
|
||||
"sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027",
|
||||
"sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087",
|
||||
"sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786",
|
||||
"sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8",
|
||||
"sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09",
|
||||
"sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185",
|
||||
"sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574",
|
||||
"sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e",
|
||||
"sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519",
|
||||
"sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898",
|
||||
"sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269",
|
||||
"sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3",
|
||||
"sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f",
|
||||
"sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6",
|
||||
"sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8",
|
||||
"sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a",
|
||||
"sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73",
|
||||
"sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc",
|
||||
"sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714",
|
||||
"sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2",
|
||||
"sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc",
|
||||
"sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce",
|
||||
"sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d",
|
||||
"sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e",
|
||||
"sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6",
|
||||
"sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269",
|
||||
"sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96",
|
||||
"sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d",
|
||||
"sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a",
|
||||
"sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4",
|
||||
"sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77",
|
||||
"sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d",
|
||||
"sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0",
|
||||
"sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed",
|
||||
"sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068",
|
||||
"sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac",
|
||||
"sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25",
|
||||
"sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8",
|
||||
"sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab",
|
||||
"sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26",
|
||||
"sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2",
|
||||
"sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db",
|
||||
"sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f",
|
||||
"sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5",
|
||||
"sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99",
|
||||
"sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c",
|
||||
"sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d",
|
||||
"sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811",
|
||||
"sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa",
|
||||
"sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a",
|
||||
"sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03",
|
||||
"sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b",
|
||||
"sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04",
|
||||
"sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c",
|
||||
"sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001",
|
||||
"sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458",
|
||||
"sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389",
|
||||
"sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99",
|
||||
"sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985",
|
||||
"sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537",
|
||||
"sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238",
|
||||
"sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f",
|
||||
"sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d",
|
||||
"sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796",
|
||||
"sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a",
|
||||
"sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143",
|
||||
"sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8",
|
||||
"sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c",
|
||||
"sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5",
|
||||
"sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5",
|
||||
"sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711",
|
||||
"sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4",
|
||||
"sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6",
|
||||
"sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c",
|
||||
"sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7",
|
||||
"sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4",
|
||||
"sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b",
|
||||
"sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae",
|
||||
"sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12",
|
||||
"sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c",
|
||||
"sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae",
|
||||
"sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8",
|
||||
"sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887",
|
||||
"sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b",
|
||||
"sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4",
|
||||
"sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f",
|
||||
"sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5",
|
||||
"sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33",
|
||||
"sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519",
|
||||
"sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"
|
||||
],
|
||||
"markers": "python_full_version >= '3.7.0'",
|
||||
"version": "==3.3.2"
|
||||
},
|
||||
"colorama": {
|
||||
"hashes": [
|
||||
"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44",
|
||||
"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"
|
||||
],
|
||||
"markers": "sys_platform == 'win32'",
|
||||
"version": "==0.4.6"
|
||||
},
|
||||
"idna": {
|
||||
"hashes": [
|
||||
"sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca",
|
||||
"sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"
|
||||
],
|
||||
"markers": "python_version >= '3.5'",
|
||||
"version": "==3.6"
|
||||
},
|
||||
"loguru": {
|
||||
"hashes": [
|
||||
"sha256:003d71e3d3ed35f0f8984898359d65b79e5b21943f78af86aa5491210429b8eb",
|
||||
"sha256:e671a53522515f34fd406340ee968cb9ecafbc4b36c679da03c18fd8d0bd51ac"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.5'",
|
||||
"version": "==0.7.2"
|
||||
},
|
||||
"lz4": {
|
||||
"hashes": [
|
||||
"sha256:01fe674ef2889dbb9899d8a67361e0c4a2c833af5aeb37dd505727cf5d2a131e",
|
||||
"sha256:054b4631a355606e99a42396f5db4d22046a3397ffc3269a348ec41eaebd69d2",
|
||||
"sha256:0a136e44a16fc98b1abc404fbabf7f1fada2bdab6a7e970974fb81cf55b636d0",
|
||||
"sha256:0e9c410b11a31dbdc94c05ac3c480cb4b222460faf9231f12538d0074e56c563",
|
||||
"sha256:222a7e35137d7539c9c33bb53fcbb26510c5748779364014235afc62b0ec797f",
|
||||
"sha256:24b3206de56b7a537eda3a8123c644a2b7bf111f0af53bc14bed90ce5562d1aa",
|
||||
"sha256:2b901c7784caac9a1ded4555258207d9e9697e746cc8532129f150ffe1f6ba0d",
|
||||
"sha256:2f7b1839f795315e480fb87d9bc60b186a98e3e5d17203c6e757611ef7dcef61",
|
||||
"sha256:30e8c20b8857adef7be045c65f47ab1e2c4fabba86a9fa9a997d7674a31ea6b6",
|
||||
"sha256:31ea4be9d0059c00b2572d700bf2c1bc82f241f2c3282034a759c9a4d6ca4dc2",
|
||||
"sha256:337cb94488a1b060ef1685187d6ad4ba8bc61d26d631d7ba909ee984ea736be1",
|
||||
"sha256:33c9a6fd20767ccaf70649982f8f3eeb0884035c150c0b818ea660152cf3c809",
|
||||
"sha256:363ab65bf31338eb364062a15f302fc0fab0a49426051429866d71c793c23394",
|
||||
"sha256:43cf03059c0f941b772c8aeb42a0813d68d7081c009542301637e5782f8a33e2",
|
||||
"sha256:56f4fe9c6327adb97406f27a66420b22ce02d71a5c365c48d6b656b4aaeb7775",
|
||||
"sha256:5d35533bf2cee56f38ced91f766cd0038b6abf46f438a80d50c52750088be93f",
|
||||
"sha256:6756212507405f270b66b3ff7f564618de0606395c0fe10a7ae2ffcbbe0b1fba",
|
||||
"sha256:6cdc60e21ec70266947a48839b437d46025076eb4b12c76bd47f8e5eb8a75dcc",
|
||||
"sha256:abc197e4aca8b63f5ae200af03eb95fb4b5055a8f990079b5bdf042f568469dd",
|
||||
"sha256:b14d948e6dce389f9a7afc666d60dd1e35fa2138a8ec5306d30cd2e30d36b40c",
|
||||
"sha256:b47839b53956e2737229d70714f1d75f33e8ac26e52c267f0197b3189ca6de24",
|
||||
"sha256:b6d9ec061b9eca86e4dcc003d93334b95d53909afd5a32c6e4f222157b50c071",
|
||||
"sha256:b891880c187e96339474af2a3b2bfb11a8e4732ff5034be919aa9029484cd201",
|
||||
"sha256:bca8fccc15e3add173da91be8f34121578dc777711ffd98d399be35487c934bf",
|
||||
"sha256:c81703b12475da73a5d66618856d04b1307e43428a7e59d98cfe5a5d608a74c6",
|
||||
"sha256:d2507ee9c99dbddd191c86f0e0c8b724c76d26b0602db9ea23232304382e1f21",
|
||||
"sha256:e36cd7b9d4d920d3bfc2369840da506fa68258f7bb176b8743189793c055e43d",
|
||||
"sha256:e7d84b479ddf39fe3ea05387f10b779155fc0990125f4fb35d636114e1c63a2e",
|
||||
"sha256:eac9af361e0d98335a02ff12fb56caeb7ea1196cf1a49dbf6f17828a131da807",
|
||||
"sha256:edfd858985c23523f4e5a7526ca6ee65ff930207a7ec8a8f57a01eae506aaee7",
|
||||
"sha256:ee9ff50557a942d187ec85462bb0960207e7ec5b19b3b48949263993771c6205",
|
||||
"sha256:f0e822cd7644995d9ba248cb4b67859701748a93e2ab7fc9bc18c599a52e4604",
|
||||
"sha256:f180904f33bdd1e92967923a43c22899e303906d19b2cf8bb547db6653ea6e7d",
|
||||
"sha256:f1d18718f9d78182c6b60f568c9a9cec8a7204d7cb6fad4e511a2ef279e4cb05",
|
||||
"sha256:f4c7bf687303ca47d69f9f0133274958fd672efaa33fb5bcde467862d6c621f0",
|
||||
"sha256:f76176492ff082657ada0d0f10c794b6da5800249ef1692b35cf49b1e93e8ef7"
|
||||
],
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==4.3.3"
|
||||
},
|
||||
"packaging": {
|
||||
"hashes": [
|
||||
"sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5",
|
||||
"sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==23.2"
|
||||
},
|
||||
"pycryptodomex": {
|
||||
"hashes": [
|
||||
"sha256:0daad007b685db36d977f9de73f61f8da2a7104e20aca3effd30752fd56f73e1",
|
||||
"sha256:108e5f1c1cd70ffce0b68739c75734437c919d2eaec8e85bffc2c8b4d2794305",
|
||||
"sha256:19764605feea0df966445d46533729b645033f134baeb3ea26ad518c9fdf212c",
|
||||
"sha256:1be97461c439a6af4fe1cf8bf6ca5936d3db252737d2f379cc6b2e394e12a458",
|
||||
"sha256:25cd61e846aaab76d5791d006497134602a9e451e954833018161befc3b5b9ed",
|
||||
"sha256:2a47bcc478741b71273b917232f521fd5704ab4b25d301669879e7273d3586cc",
|
||||
"sha256:59af01efb011b0e8b686ba7758d59cf4a8263f9ad35911bfe3f416cee4f5c08c",
|
||||
"sha256:5dcac11031a71348faaed1f403a0debd56bf5404232284cf8c761ff918886ebc",
|
||||
"sha256:62a5ec91388984909bb5398ea49ee61b68ecb579123694bffa172c3b0a107079",
|
||||
"sha256:645bd4ca6f543685d643dadf6a856cc382b654cc923460e3a10a49c1b3832aeb",
|
||||
"sha256:653b29b0819605fe0898829c8ad6400a6ccde096146730c2da54eede9b7b8baa",
|
||||
"sha256:69138068268127cd605e03438312d8f271135a33140e2742b417d027a0539427",
|
||||
"sha256:6e186342cfcc3aafaad565cbd496060e5a614b441cacc3995ef0091115c1f6c5",
|
||||
"sha256:76bd15bb65c14900d98835fcd10f59e5e0435077431d3a394b60b15864fddd64",
|
||||
"sha256:7805830e0c56d88f4d491fa5ac640dfc894c5ec570d1ece6ed1546e9df2e98d6",
|
||||
"sha256:7a710b79baddd65b806402e14766c721aee8fb83381769c27920f26476276c1e",
|
||||
"sha256:7a7a8f33a1f1fb762ede6cc9cbab8f2a9ba13b196bfaf7bc6f0b39d2ba315a43",
|
||||
"sha256:82ee7696ed8eb9a82c7037f32ba9b7c59e51dda6f105b39f043b6ef293989cb3",
|
||||
"sha256:88afd7a3af7ddddd42c2deda43d53d3dfc016c11327d0915f90ca34ebda91499",
|
||||
"sha256:8af1a451ff9e123d0d8bd5d5e60f8e3315c3a64f3cdd6bc853e26090e195cdc8",
|
||||
"sha256:8ee606964553c1a0bc74057dd8782a37d1c2bc0f01b83193b6f8bb14523b877b",
|
||||
"sha256:91852d4480a4537d169c29a9d104dda44094c78f1f5b67bca76c29a91042b623",
|
||||
"sha256:9c682436c359b5ada67e882fec34689726a09c461efd75b6ea77b2403d5665b7",
|
||||
"sha256:bc3ee1b4d97081260d92ae813a83de4d2653206967c4a0a017580f8b9548ddbc",
|
||||
"sha256:bca649483d5ed251d06daf25957f802e44e6bb6df2e8f218ae71968ff8f8edc4",
|
||||
"sha256:c39778fd0548d78917b61f03c1fa8bfda6cfcf98c767decf360945fe6f97461e",
|
||||
"sha256:cbe71b6712429650e3883dc81286edb94c328ffcd24849accac0a4dbcc76958a",
|
||||
"sha256:d00fe8596e1cc46b44bf3907354e9377aa030ec4cd04afbbf6e899fc1e2a7781",
|
||||
"sha256:d3584623e68a5064a04748fb6d76117a21a7cb5eaba20608a41c7d0c61721794",
|
||||
"sha256:e48217c7901edd95f9f097feaa0388da215ed14ce2ece803d3f300b4e694abea",
|
||||
"sha256:f2e497413560e03421484189a6b65e33fe800d3bd75590e6d78d4dfdb7accf3b",
|
||||
"sha256:ff5c9a67f8a4fba4aed887216e32cbc48f2a6fb2673bb10a99e43be463e15913"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
|
||||
"version": "==3.20.0"
|
||||
},
|
||||
"pyside6": {
|
||||
"hashes": [
|
||||
"sha256:3b6266fb29bab66526f2bbab2a6610f9f47a4df42ae6fb3713cd8329f593a561",
|
||||
"sha256:5bdaa27d1a921c35764d82a2ec86943488c818cb33b9e16b2784d539b45f6171",
|
||||
"sha256:a8200b2a1f02e42adfd1f41bc60d52d157398778b6ba232d46ad7402bc6f91ec",
|
||||
"sha256:e359ebccd3f90fba85ebd5b93bdeadfa9e5d2fd06b3b5e8985aa5da50ca6243b"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version < '3.13' and python_version >= '3.8'",
|
||||
"version": "==6.6.2"
|
||||
},
|
||||
"pyside6-addons": {
|
||||
"hashes": [
|
||||
"sha256:4fb00bc98bc8335177eaa8f6d70ba687ab9bf00b3ee343abbc7156040f3e586d",
|
||||
"sha256:748151fb49d5fe760b7cf6c88c4ec851e68d66a119939567407115948bf8a08f",
|
||||
"sha256:90f20dcf2caf69307e20d3d682cbe2b1a38e7ddb1f50f4f0e3ae4306219f8883",
|
||||
"sha256:cbdb7393de88a916ed1e9bd8407149f911717d1e06aee04119e26042679d8cce"
|
||||
],
|
||||
"markers": "python_version < '3.13' and python_version >= '3.8'",
|
||||
"version": "==6.6.2"
|
||||
},
|
||||
"pyside6-essentials": {
|
||||
"hashes": [
|
||||
"sha256:030a0565ad2d6361ed8be7826f81fe3dbb7a98330837687608e75cbede5f0ca2",
|
||||
"sha256:11496a322138eab4579c3683d2e3afebb41435412d4109394cb2b9ddaac66fe3",
|
||||
"sha256:41373f9b8fd17bb39a7dc7da85168508fe288955a17117c2e993339f387b23c1",
|
||||
"sha256:90be2cf1a404f1c62777ccc6898895c864376f1fd68ae9f82f7622522bce5814"
|
||||
],
|
||||
"markers": "python_version < '3.13' and python_version >= '3.8'",
|
||||
"version": "==6.6.2"
|
||||
},
|
||||
"requests": {
|
||||
"hashes": [
|
||||
"sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f",
|
||||
"sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==2.31.0"
|
||||
},
|
||||
"requests-futures": {
|
||||
"hashes": [
|
||||
"sha256:4a2f5472e9911a79532137d156aa937cd9cd90fec55677f71b2976d1f7a66d38",
|
||||
"sha256:f55a4ef80070e2858e7d1e73123d2bfaeaf25b93fd34384d8ddf148e2b676373"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.0.1"
|
||||
},
|
||||
"shiboken6": {
|
||||
"hashes": [
|
||||
"sha256:531728324ad3ad4ed7b1d85d2dff548d618182d67024e16e84079f7db104590d",
|
||||
"sha256:60dbad15901ad6fff6e198d8668091bbb2f20b82729412e5fd4d47ac86c97d42",
|
||||
"sha256:9da86622cee5e7201bafe9c5beee3c06d9168c6b8f3e2fac52c1b7df00956bff",
|
||||
"sha256:d4e99e7d1137a7d2c665a465b80baf820829dfba5fe474549d49b0ef81b0abf2"
|
||||
],
|
||||
"markers": "python_version < '3.13' and python_version >= '3.8'",
|
||||
"version": "==6.6.2"
|
||||
},
|
||||
"urllib3": {
|
||||
"hashes": [
|
||||
"sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d",
|
||||
"sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"
|
||||
],
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==2.2.1"
|
||||
},
|
||||
"win32-setctime": {
|
||||
"hashes": [
|
||||
"sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2",
|
||||
"sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"
|
||||
],
|
||||
"markers": "sys_platform == 'win32'",
|
||||
"version": "==1.1.0"
|
||||
}
|
||||
},
|
||||
"develop": {
|
||||
"altgraph": {
|
||||
"hashes": [
|
||||
"sha256:1b5afbb98f6c4dcadb2e2ae6ab9fa994bbb8c1d75f4fa96d340f9437ae454406",
|
||||
"sha256:642743b4750de17e655e6711601b077bc6598dbfa3ba5fa2b2a35ce12b508dff"
|
||||
],
|
||||
"version": "==0.17.4"
|
||||
},
|
||||
"build": {
|
||||
"hashes": [
|
||||
"sha256:af266720050a66c893a6096a2f410989eeac74ff9a68ba194b3f6473e8e26171",
|
||||
"sha256:d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269"
|
||||
],
|
||||
"markers": "python_version >= '3.7' and sys_platform == 'linux'",
|
||||
"version": "==0.10.0"
|
||||
},
|
||||
"colorama": {
|
||||
"hashes": [
|
||||
"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44",
|
||||
"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"
|
||||
],
|
||||
"markers": "sys_platform == 'win32'",
|
||||
"version": "==0.4.6"
|
||||
},
|
||||
"packaging": {
|
||||
"hashes": [
|
||||
"sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5",
|
||||
"sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==23.2"
|
||||
},
|
||||
"pefile": {
|
||||
"hashes": [
|
||||
"sha256:82e6114004b3d6911c77c3953e3838654b04511b8b66e8583db70c65998017dc",
|
||||
"sha256:da185cd2af68c08a6cd4481f7325ed600a88f6a813bad9dea07ab3ef73d8d8d6"
|
||||
],
|
||||
"markers": "sys_platform == 'win32'",
|
||||
"version": "==2023.2.7"
|
||||
},
|
||||
"pyinstaller": {
|
||||
"hashes": [
|
||||
"sha256:16cbd66b59a37f4ee59373a003608d15df180a0d9eb1a29ff3bfbfae64b23d0f",
|
||||
"sha256:27cd64e7cc6b74c5b1066cbf47d75f940b71356166031deb9778a2579bb874c6",
|
||||
"sha256:2c2fe9c52cb4577a3ac39626b84cf16cf30c2792f785502661286184f162ae0d",
|
||||
"sha256:421cd24f26144f19b66d3868b49ed673176765f92fa9f7914cd2158d25b6d17e",
|
||||
"sha256:65133ed89467edb2862036b35d7c5ebd381670412e1e4361215e289c786dd4e6",
|
||||
"sha256:7d51734423685ab2a4324ab2981d9781b203dcae42839161a9ee98bfeaabdade",
|
||||
"sha256:8f6dd0e797ae7efdd79226f78f35eb6a4981db16c13325e962a83395c0ec7420",
|
||||
"sha256:aadafb6f213549a5906829bb252e586e2cf72a7fbdb5731810695e6516f0ab30",
|
||||
"sha256:b2e1c7f5cceb5e9800927ddd51acf9cc78fbaa9e79e822c48b0ee52d9ce3c892",
|
||||
"sha256:c63ef6133eefe36c4b2f4daf4cfea3d6412ece2ca218f77aaf967e52a95ac9b8",
|
||||
"sha256:c8e5d3489c3a7cc5f8401c2d1f48a70e588f9967e391c3b06ddac1f685f8d5d2",
|
||||
"sha256:ddcc2b36052a70052479a9e5da1af067b4496f43686ca3cdda99f8367d0627e4"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version < '3.13' and python_version >= '3.7'",
|
||||
"version": "==5.13.2"
|
||||
},
|
||||
"pyinstaller-hooks-contrib": {
|
||||
"hashes": [
|
||||
"sha256:43f3e084ae5f826415399d72ecf2e32328fe859ad7455c7cddfc09f1a61c90b7",
|
||||
"sha256:8f5ac1acdafde9e553c82242aeae2d2f8fb65ec8e2b0ba416547948108a73e01"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==2024.2"
|
||||
},
|
||||
"pyproject-hooks": {
|
||||
"hashes": [
|
||||
"sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8",
|
||||
"sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==1.0.0"
|
||||
},
|
||||
"pywin32-ctypes": {
|
||||
"hashes": [
|
||||
"sha256:3426e063bdd5fd4df74a14fa3cf80a0b42845a87e1d1e81f6549f9daec593a60",
|
||||
"sha256:bf490a1a709baf35d688fe0ecf980ed4de11d2b3e37b51e5442587a75d9957e7"
|
||||
],
|
||||
"markers": "sys_platform == 'win32'",
|
||||
"version": "==0.2.2"
|
||||
},
|
||||
"setuptools": {
|
||||
"hashes": [
|
||||
"sha256:02fa291a0471b3a18b2b2481ed902af520c69e8ae0919c13da936542754b4c56",
|
||||
"sha256:5c0806c7d9af348e6dd3777b4f4dbb42c7ad85b190104837488eab9a7c945cf8"
|
||||
],
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==69.1.1"
|
||||
}
|
||||
}
|
||||
}
|
37
README.md
@ -1,37 +0,0 @@
|
||||
# fime
|
||||
|
||||
Simple time tracking app written with Python and Qt
|
||||
|
||||
Some Jira integration is built in.
|
||||
|
||||
## Installation, Qt versions and You
|
||||
Fime supports using both Qt 5 and Qt 6 via their respective PySide packages.
|
||||
|
||||
On Linux I recommend installing the PySide package provided by the distribution.
|
||||
Install `PySide2` for Qt 5 or `PySide6` for Qt 6.
|
||||
|
||||
Run `pip install --user fime` in that case.
|
||||
|
||||
On other OSes or if you decide not to follow my recommendation run either
|
||||
* `pip install --user fime[qt5]` or
|
||||
* `pip install --user fime[qt6]`
|
||||
|
||||
Note that it both versions of PySide are installed Qt 6 will be preferred.
|
||||
|
||||
If you don't want to deal with this, you can download pre-packaged executables from the [Releases](https://gitlab.com/faerbit/fime/-/releases) section.
|
||||
|
||||
## Configuration
|
||||
|
||||
You probably want to configure the App in the settings dialog before you start using it.
|
||||
|
||||
The Jira URL will just be the base URL to you're Jira Instance (e.g. `https://jira.company.com`)
|
||||
|
||||
The Jira Token is a Personal Access Token. See [here](https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html) on how to get one.
|
||||
|
||||
There is a new authentication method, which uses the cookies from your browser (most popular browsers should be
|
||||
supported). To use it, you configure it and log into your Jira instance in your browser. If it doesn't work, try closing
|
||||
your browser, to force it to write the cookies to the disk
|
||||
|
||||
## License
|
||||
|
||||
Licensed under MIT license. See License.md for more details.
|
33
config.toml
Normal file
@ -0,0 +1,33 @@
|
||||
baseURL = 'https://fime.faerb.it/'
|
||||
languageCode = 'en-us'
|
||||
title = 'fime - Simple time tracking'
|
||||
theme = "ace-documentation"
|
||||
|
||||
[params]
|
||||
disableSearch = true
|
||||
disableReadmoreNav = true
|
||||
menushortcutssnewtab = true
|
||||
toc = true
|
||||
|
||||
|
||||
[markup]
|
||||
[markup.goldmark]
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
|
||||
[outputs]
|
||||
home = [ "HTML"]
|
||||
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fab fa-gitlab fa-2x mt-1'></i>"
|
||||
url = "https://gitlab.com/faerbit/fime"
|
||||
weight = 1
|
||||
|
||||
[[menu.shortcuts]]
|
||||
name = "<button class='btn btn-info mt-n1' ><i class='fab fa-windows fa-2x'></i> <b style='vertical-align: 25%;'>Download</b></button>"
|
||||
url = "https://gitlab.com/faerbit/fime/-/releases/permalink/latest/downloads/bin/fime_windows_amd64.exe"
|
||||
weight = 2
|
||||
[[menu.shortcuts]]
|
||||
name = "<button class='btn btn-info mt-n1'><i class='fab fa-linux fa-2x'></i> <b style='vertical-align: 25%;'>Download</b></button>"
|
||||
url = "https://gitlab.com/faerbit/fime/-/releases/permalink/latest/downloads/bin/fime_linux_amd64"
|
||||
weight = 3
|
101
content/_index.md
Normal file
@ -0,0 +1,101 @@
|
||||
---
|
||||
title: fime
|
||||
---
|
||||
{{< lead >}}
|
||||
fime is a simple time tracking tool, to help you track how much time you spent on each task on a busy day.
|
||||
{{< /lead >}}
|
||||
|
||||
## Features
|
||||
|
||||
<div class="row py-3 mb-5">
|
||||
<div class="col-md-4">
|
||||
<div class="card flex-row border-0">
|
||||
<div class="mt-3">
|
||||
<span class="fas fa-laptop fa-2x text-primary"></span>
|
||||
</div>
|
||||
<div class="card-body pl-2">
|
||||
<h5 class="card-title">
|
||||
Multi-platform.
|
||||
</h5>
|
||||
<p class="card-text text-muted">
|
||||
Written with Python and Qt. Compatible with all major desktop operating systems
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card flex-row border-0">
|
||||
<div class="mt-3">
|
||||
<span class="fas fa-wrench fa-2x text-primary"></span>
|
||||
</div>
|
||||
<div class="card-body pl-2">
|
||||
<h5 class="card-title">
|
||||
Simply functional.
|
||||
</h5>
|
||||
<p class="card-text text-muted">
|
||||
Does what you want, when you ask it to and then gets out of the way
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card flex-row border-0">
|
||||
<div class="mt-3">
|
||||
<span class="fas fa-bug-slash fa-2x fa-flip-horizontal text-primary"></span>
|
||||
</div>
|
||||
<div class="card-body pl-2">
|
||||
<h5 class="card-title">
|
||||
Battle tested.
|
||||
</h5>
|
||||
<p class="card-text text-muted">
|
||||
Used by multiple professionals for several years without problems
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card flex-row border-0">
|
||||
<div class="mt-3">
|
||||
<span class="fas fa-code fa-2x text-primary"></span>
|
||||
</div>
|
||||
<div class="card-body pl-2">
|
||||
<h5 class="card-title">
|
||||
Open source.
|
||||
</h5>
|
||||
<p class="card-text text-muted">
|
||||
Completely open source. Licensed under MIT
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card flex-row border-0">
|
||||
<div class="mt-3">
|
||||
<span class="fab fa-jira fa-2x text-primary"></span>
|
||||
</div>
|
||||
<div class="card-body pl-2">
|
||||
<h5 class="card-title">
|
||||
Jira integrated.
|
||||
</h5>
|
||||
<p class="card-text text-muted">
|
||||
Import issues from Jira and upload time worked on them effortlessly
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card flex-row border-0">
|
||||
<div class="mt-3">
|
||||
<span class="fas fa-hard-drive fa-2x text-primary"></span>
|
||||
</div>
|
||||
<div class="card-body pl-2">
|
||||
<h5 class="card-title">
|
||||
Easy installation.
|
||||
</h5>
|
||||
<p class="card-text text-muted">
|
||||
Just download the executable and run it
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
1
layouts/partials/tableofcontents.html
Normal file
@ -0,0 +1 @@
|
||||
<!-- keep spacing of ToC but don't put content into it-->
|
@ -1,12 +0,0 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools>=45",
|
||||
"wheel",
|
||||
"setuptools_scm>=6.2",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools_scm]
|
||||
version_scheme = "guess-next-dev"
|
||||
local_scheme = "dirty-tag"
|
||||
write_to = "src/fime/_version.py"
|
@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
git pull --rebase
|
||||
last_patch=$(git tag | sort -V | tail -n1 | cut -d "." -f3)
|
||||
git tag "1.0.$((last_patch + 1))"
|
||||
git push gitlab main -o ci.skip
|
||||
git push gitlab --tags
|
||||
git push gitea main
|
||||
git push gitea --tags
|
37
setup.cfg
@ -1,37 +0,0 @@
|
||||
[metadata]
|
||||
name = fime
|
||||
author = Faerbit
|
||||
author_email = faerbit@posteo.net
|
||||
description = Simple time tracking app written with Python and Qt
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
license = MIT License
|
||||
url = https://git.faerb.it/faerbit/fime
|
||||
classifiers =
|
||||
Programming Language :: Python :: 3
|
||||
License :: OSI Approved :: MIT License
|
||||
Operating System :: OS Independent
|
||||
|
||||
[options]
|
||||
zip_safe = True
|
||||
package_dir =
|
||||
= src
|
||||
packages = find:
|
||||
python_requires = >=3.8
|
||||
install_requires =
|
||||
requests
|
||||
requests-futures
|
||||
packaging
|
||||
loguru
|
||||
browser_cookie3
|
||||
|
||||
[options.packages.find]
|
||||
where = src
|
||||
|
||||
[options.extras_require]
|
||||
qt5 = PySide2
|
||||
qt6 = PySide6
|
||||
|
||||
[options.entry_points]
|
||||
gui_scripts =
|
||||
fime = fime.main:main
|
1
src/fime/.gitignore
vendored
@ -1 +0,0 @@
|
||||
_version.py
|
@ -1,5 +0,0 @@
|
||||
try:
|
||||
from fime._version import __version__, __version_tuple__
|
||||
except ImportError:
|
||||
__version__ = version = '0+devfallback'
|
||||
__version_tuple__ = version_tuple = (0, 'devfallback')
|
@ -1,142 +0,0 @@
|
||||
import sys
|
||||
from copy import copy
|
||||
from pathlib import Path
|
||||
from textwrap import dedent
|
||||
from threading import Lock
|
||||
from typing import Optional
|
||||
|
||||
from loguru import logger
|
||||
from packaging.version import Version
|
||||
from requests_futures.sessions import FuturesSession
|
||||
|
||||
try:
|
||||
from PySide6 import QtCore, QtGui, QtWidgets
|
||||
except ImportError:
|
||||
from PySide2 import QtCore, QtGui, QtWidgets
|
||||
|
||||
import fime
|
||||
from fime.progressindicator import ProgressIndicator
|
||||
from fime.util import get_icon
|
||||
|
||||
URL = "https://gitlab.com/faerbit/fime/-/releases/permalink/latest"
|
||||
|
||||
|
||||
class UpdateChecker:
|
||||
def __init__(self):
|
||||
self.session = FuturesSession()
|
||||
future = self.session.get(URL, allow_redirects=False)
|
||||
future.add_done_callback(self.process_response)
|
||||
self.lock = Lock()
|
||||
self._done = False
|
||||
self.result = "Could not determined latest fime version"
|
||||
|
||||
@property
|
||||
def done(self):
|
||||
with self.lock:
|
||||
ret = copy(self._done)
|
||||
return ret
|
||||
|
||||
def process_response(self, future):
|
||||
try:
|
||||
resp = future.result()
|
||||
if resp.status_code != 302 or "Location" not in resp.headers:
|
||||
raise RuntimeError("Requested unexpectedly did not redirect")
|
||||
latest_version = resp.headers["Location"].split("/")[-1]
|
||||
latest_version = Version(latest_version)
|
||||
own_version = Version(fime.__version__)
|
||||
if own_version == latest_version:
|
||||
self.result = "Latest fime version installed"
|
||||
elif own_version > latest_version:
|
||||
self.result = f"Older fime version available: {latest_version}"
|
||||
else:
|
||||
self.result = f"Newer fime version available: {latest_version}"
|
||||
except Exception:
|
||||
logger.exception("Could not get update info")
|
||||
finally:
|
||||
with self.lock:
|
||||
self._done = True
|
||||
|
||||
|
||||
class About(QtWidgets.QDialog):
|
||||
def __init__(self, parent, *args, **kwargs):
|
||||
super().__init__(parent, *args, **kwargs)
|
||||
self.setWindowTitle("About")
|
||||
|
||||
log_dir_path = Path(QtCore.QStandardPaths.writableLocation(QtCore.QStandardPaths.AppDataLocation)) / "logs"
|
||||
|
||||
text = dedent(f"""\
|
||||
fime
|
||||
Copyright (c) 2020 - 2022 Faerbit
|
||||
<a href="https://fime.faerb.it">Website</a> <a href="https://gitlab.com/faerbit/fime/-/blob/main/LICENSE">License</a>
|
||||
|
||||
fime Version {fime.__version__}
|
||||
Qt Version {QtCore.__version__}
|
||||
Python Version {sys.version}
|
||||
|
||||
Log directory: <a href="{log_dir_path}">{log_dir_path}</a>
|
||||
""")
|
||||
text = text.replace("\n", "<br/>")
|
||||
version_label = QtWidgets.QLabel(self)
|
||||
version_label.setText(text)
|
||||
version_label.setTextFormat(QtCore.Qt.RichText)
|
||||
version_label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
|
||||
version_label.setOpenExternalLinks(True)
|
||||
version_label.setAlignment(QtCore.Qt.AlignHCenter)
|
||||
|
||||
self.update_layout = QtWidgets.QHBoxLayout()
|
||||
|
||||
self.ok_button = QtWidgets.QPushButton()
|
||||
self.ok_button.setText("OK")
|
||||
self.ok_button.setIcon(get_icon("dialog-ok"))
|
||||
self.ok_button.pressed.connect(self.accept)
|
||||
self.ok_button.setAutoDefault(True)
|
||||
|
||||
hlayout = QtWidgets.QHBoxLayout()
|
||||
hlayout.addStretch(66)
|
||||
hlayout.addWidget(self.ok_button, 33)
|
||||
|
||||
vlayout = QtWidgets.QVBoxLayout()
|
||||
vlayout.addWidget(version_label)
|
||||
vlayout.addLayout(self.update_layout)
|
||||
vlayout.addLayout(hlayout)
|
||||
|
||||
self.setLayout(vlayout)
|
||||
|
||||
self.update_checker: Optional[UpdateChecker] = None
|
||||
self.update_timer = QtCore.QTimer(self)
|
||||
self.update_timer.setInterval(500)
|
||||
self.update_timer.timeout.connect(self.timer_callback)
|
||||
|
||||
def clear_update_layout(self):
|
||||
while self.update_layout.count():
|
||||
child = self.update_layout.takeAt(0)
|
||||
if child.widget():
|
||||
child.widget().deleteLater()
|
||||
|
||||
def timer_callback(self):
|
||||
if self.update_checker.done:
|
||||
self.clear_update_layout()
|
||||
update_label = QtWidgets.QLabel(self)
|
||||
update_label.setText(self.update_checker.result)
|
||||
update_label.setAlignment(QtCore.Qt.AlignHCenter)
|
||||
|
||||
self.update_layout.addWidget(update_label)
|
||||
self.update_timer.stop()
|
||||
|
||||
def showEvent(self, _):
|
||||
self.clear_update_layout()
|
||||
|
||||
progress_indicator = ProgressIndicator(self)
|
||||
progress_indicator.setAnimationDelay(70)
|
||||
progress_indicator.startAnimation()
|
||||
|
||||
update_label = QtWidgets.QLabel(self)
|
||||
update_label.setText("Checking for latest version...")
|
||||
|
||||
self.update_layout.addStretch()
|
||||
self.update_layout.addWidget(progress_indicator)
|
||||
self.update_layout.addWidget(update_label)
|
||||
self.update_layout.addStretch()
|
||||
|
||||
self.update_checker = UpdateChecker()
|
||||
self.update_timer.start()
|
@ -1,124 +0,0 @@
|
||||
from configparser import ConfigParser
|
||||
from enum import StrEnum
|
||||
from io import StringIO
|
||||
from pathlib import Path
|
||||
|
||||
from loguru import logger
|
||||
|
||||
try:
|
||||
from PySide6 import QtCore
|
||||
except ImportError:
|
||||
from PySide2 import QtCore
|
||||
|
||||
|
||||
def dequotify(string):
|
||||
if string.startswith(('"', "'")) and string.endswith(('"', "'")):
|
||||
return string[1:-1]
|
||||
else:
|
||||
return string
|
||||
|
||||
|
||||
class AuthMethods(StrEnum):
|
||||
TOKEN = "token"
|
||||
COOKIES = "cookies"
|
||||
|
||||
|
||||
class Browsers(StrEnum):
|
||||
AUTO = "auto"
|
||||
FIREFOX = "firefox"
|
||||
CHROME = "chrome"
|
||||
CHROMIUM = "chromium"
|
||||
EDGE = "edge"
|
||||
OPERA = "opera"
|
||||
|
||||
|
||||
class Config:
|
||||
def __init__(self):
|
||||
self._configparser = ConfigParser(interpolation=None)
|
||||
config_dir_path = Path(QtCore.QStandardPaths.writableLocation(QtCore.QStandardPaths.AppConfigLocation))
|
||||
self.config_path = config_dir_path / "fime.conf"
|
||||
if self.config_path.exists():
|
||||
logger.info(f'reading config file "{self.config_path}"')
|
||||
with self.config_path.open(encoding="utf-8") as f:
|
||||
config_text = f.read()
|
||||
config_text = "[DEFAULT]\n" + config_text
|
||||
self._configparser.read_string(config_text)
|
||||
|
||||
def save(self):
|
||||
logger.info(f'writing config file "{self.config_path}"')
|
||||
config_str = StringIO()
|
||||
self._configparser.write(config_str)
|
||||
# do not conform to configparser's stupid section requirement
|
||||
config_str = "\n".join(config_str.getvalue().splitlines()[1:])
|
||||
with self.config_path.open("w", encoding="utf-8") as f:
|
||||
f.write(config_str)
|
||||
|
||||
@property
|
||||
def jira_url(self):
|
||||
return dequotify(self._configparser.get("DEFAULT", "jira_url", fallback=""))
|
||||
|
||||
@jira_url.setter
|
||||
def jira_url(self, value):
|
||||
self._configparser["DEFAULT"]["jira_url"] = f'"{value}"'
|
||||
|
||||
@property
|
||||
def auth_mode(self) -> AuthMethods:
|
||||
if self.jira_token:
|
||||
fallback = AuthMethods.TOKEN.value
|
||||
else:
|
||||
fallback = AuthMethods.COOKIES.value
|
||||
return dequotify(self._configparser.get("DEFAULT", "auth_mode", fallback=fallback)).lower()
|
||||
|
||||
@auth_mode.setter
|
||||
def auth_mode(self, value: AuthMethods):
|
||||
self._configparser["DEFAULT"]["auth_mode"] = f'"{value.value}"'
|
||||
|
||||
@property
|
||||
def cookie_source(self) -> Browsers:
|
||||
return dequotify(self._configparser.get("DEFAULT", "cookie_source", fallback=Browsers.AUTO.value)).lower()
|
||||
|
||||
@cookie_source.setter
|
||||
def cookie_source(self, value: Browsers):
|
||||
self._configparser["DEFAULT"]["cookie_source"] = f'"{value.value}"'
|
||||
|
||||
@property
|
||||
def jira_token(self) -> str:
|
||||
return dequotify(self._configparser.get("DEFAULT", "jira_token", fallback=""))
|
||||
|
||||
@jira_token.setter
|
||||
def jira_token(self, value):
|
||||
self._configparser["DEFAULT"]["jira_token"] = f'"{value}"'
|
||||
|
||||
@property
|
||||
def tray_theme(self):
|
||||
val = dequotify(self._configparser.get("DEFAULT", "tray_theme", fallback="dark")).lower()
|
||||
return val if val in ["light", "dark"] else "dark"
|
||||
|
||||
@tray_theme.setter
|
||||
def tray_theme(self, value):
|
||||
value = value.lower()
|
||||
if value not in ["light", "dark"]:
|
||||
raise RuntimeError('config key "tray_theme" can only be set to "light" or "dark"')
|
||||
self._configparser["DEFAULT"]["tray_theme"] = f'"{value}"'
|
||||
|
||||
@property
|
||||
def flip_menu(self):
|
||||
val = dequotify(self._configparser.get("DEFAULT", "flip_menu", fallback="no")).lower()
|
||||
return val in ["yes", "true", "1"]
|
||||
|
||||
@flip_menu.setter
|
||||
def flip_menu(self, value):
|
||||
if type(value) is not bool:
|
||||
raise RuntimeError('config key "flip_menu" must be a bool')
|
||||
self._configparser["DEFAULT"]["flip_menu"] = f'"{value}"'
|
||||
|
||||
@property
|
||||
def import_auto_change_task(self):
|
||||
val = dequotify(self._configparser.get("DEFAULT", "import_auto_change_task", fallback="no")).lower()
|
||||
return val in ["yes", "true", "1"]
|
||||
|
||||
@import_auto_change_task.setter
|
||||
def import_auto_change_task(self, value):
|
||||
if type(value) is not bool:
|
||||
raise RuntimeError('config key "import_auto_change_task" must be a bool')
|
||||
self._configparser["DEFAULT"]["import_auto_change_task"] = f'"{value}"'
|
426
src/fime/data.py
@ -1,426 +0,0 @@
|
||||
import atexit
|
||||
import base64
|
||||
import json
|
||||
import os
|
||||
from collections.abc import MutableMapping
|
||||
from copy import deepcopy
|
||||
from datetime import datetime, date, timedelta, time
|
||||
from threading import Thread, Event
|
||||
from typing import List, Tuple, Dict, Union
|
||||
|
||||
from loguru import logger
|
||||
|
||||
try:
|
||||
from PySide6 import QtCore
|
||||
except ImportError:
|
||||
from PySide2 import QtCore
|
||||
|
||||
save_delay = 3 * 60
|
||||
max_jira_tasks = 50
|
||||
|
||||
|
||||
class Data(MutableMapping):
|
||||
def __init__(self):
|
||||
data_dir_path = QtCore.QStandardPaths.writableLocation(QtCore.QStandardPaths.AppDataLocation)
|
||||
self.data_path = os.path.join(data_dir_path, "data_{}.json")
|
||||
if not os.path.exists(data_dir_path):
|
||||
os.mkdir(data_dir_path)
|
||||
self._cache = {}
|
||||
self._hot_keys = set()
|
||||
self._trunning = False
|
||||
self._tevent = Event()
|
||||
self._thread = None
|
||||
|
||||
def cleanup():
|
||||
self._trunning = False
|
||||
self._tevent.set()
|
||||
if self._thread:
|
||||
self._thread.join()
|
||||
|
||||
atexit.register(cleanup)
|
||||
|
||||
def __getitem__(self, key):
|
||||
dpath = self.data_path.format(key)
|
||||
if key not in self._cache and os.path.exists(dpath):
|
||||
with open(dpath, "r") as f:
|
||||
self._cache[key] = json.loads(f.read())
|
||||
return self._cache[key]
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
self._cache[key] = value
|
||||
self._hot_keys.add(key)
|
||||
self._schedule_save()
|
||||
|
||||
def _schedule_save(self):
|
||||
if self._trunning:
|
||||
return
|
||||
self._trunning = True
|
||||
self._thread = Thread(target=self._executor, daemon=True)
|
||||
self._thread.start()
|
||||
|
||||
def _executor(self):
|
||||
while self._trunning:
|
||||
self._tevent.wait(save_delay)
|
||||
self._save()
|
||||
|
||||
def _save(self):
|
||||
for key in self._hot_keys:
|
||||
logger.info(f"saving dict {key}")
|
||||
to_write = self._cache[key] # apparently thread-safe
|
||||
with open(self.data_path.format(key), "w+") as f:
|
||||
f.write(json.dumps(to_write))
|
||||
self._hot_keys = set()
|
||||
self._saving = False
|
||||
|
||||
def __delitem__(self, key):
|
||||
return NotImplemented
|
||||
|
||||
def __iter__(self):
|
||||
return NotImplemented
|
||||
|
||||
def __len__(self):
|
||||
# TODO use glob?
|
||||
return NotImplemented
|
||||
|
||||
def __repr__(self):
|
||||
return f"{type(self).__name__}({self._cache})"
|
||||
|
||||
|
||||
class Tasks:
|
||||
def __init__(self, data: Data):
|
||||
self._data = data
|
||||
if "tasks" in self._data:
|
||||
self._tasks = list(map(lambda x: base64.b64decode(x.encode("utf-8")).decode("utf-8"), self._data["tasks"]))
|
||||
else:
|
||||
self._tasks = []
|
||||
if "jira_tasks" in self._data:
|
||||
self._jira_tasks_usage = dict()
|
||||
for k, v in self._data["jira_tasks"].items():
|
||||
key = base64.b64decode(k.encode("utf-8")).decode("utf-8")
|
||||
self._jira_tasks_usage[key] = datetime.fromisoformat(v)
|
||||
self._jira_tasks = sorted(self._jira_tasks_usage.keys(), key=lambda x: self._jira_tasks_usage[x])
|
||||
else:
|
||||
self._jira_tasks_usage = dict()
|
||||
self._jira_tasks = []
|
||||
|
||||
@property
|
||||
def tasks(self) -> List[str]:
|
||||
return self._tasks
|
||||
|
||||
@tasks.setter
|
||||
def tasks(self, tasks):
|
||||
self._tasks = tasks
|
||||
encoded_tasks = list(map(lambda x: base64.b64encode(x.encode("utf-8")).decode("utf-8"), self._tasks))
|
||||
self._data["tasks"] = encoded_tasks
|
||||
|
||||
@property
|
||||
def jira_tasks(self):
|
||||
return self._jira_tasks
|
||||
|
||||
def add_jira_task(self, task_name):
|
||||
if task_name in self._jira_tasks_usage:
|
||||
self._jira_tasks.remove(task_name) # move to end, to make visible again
|
||||
self._jira_tasks.append(task_name)
|
||||
self._jira_tasks_usage[task_name] = datetime.now()
|
||||
if len(self._jira_tasks_usage) > max_jira_tasks:
|
||||
sorted_tasks = sorted(self._jira_tasks_usage.keys(), key=lambda x: self._jira_tasks_usage[x])
|
||||
overhang_tasks = sorted_tasks[:len(sorted_tasks) - max_jira_tasks]
|
||||
for task in overhang_tasks:
|
||||
del self._jira_tasks_usage[task]
|
||||
self._save_jira_tasks()
|
||||
|
||||
def update_jira_task_usage(self, task_name):
|
||||
if task_name in self._jira_tasks_usage:
|
||||
self._jira_tasks_usage[task_name] = datetime.now()
|
||||
self._save_jira_tasks()
|
||||
|
||||
def _save_jira_tasks(self):
|
||||
serialized = dict()
|
||||
for k, v in self._jira_tasks_usage.items():
|
||||
key = base64.b64encode(k.encode("utf-8")).decode("utf-8")
|
||||
serialized[key] = datetime.isoformat(v)
|
||||
self._data["jira_tasks"] = serialized
|
||||
|
||||
@property
|
||||
def all_tasks(self):
|
||||
return self.tasks + self.jira_tasks
|
||||
|
||||
|
||||
class LogCommentsData:
|
||||
_init_day = {"log": [], "comments": {}}
|
||||
|
||||
# Data.__setitem__ only gets triggered, when there is a direct assignment (in contrast to assignment down the tree)
|
||||
# this necessitates reassigning the whole month, when triggering a save is intended
|
||||
def __init__(self, data: Data):
|
||||
self._data = data
|
||||
self._converted = set()
|
||||
|
||||
def _ensure_format(self, pdate: date):
|
||||
month_str = pdate.strftime("%Y-%m")
|
||||
if month_str in self._converted:
|
||||
return
|
||||
if month_str not in self._data:
|
||||
return
|
||||
for day, log in self._data[month_str].items():
|
||||
if type(log) is list:
|
||||
self._data[month_str][day] = {
|
||||
"log": log,
|
||||
"comments": {}
|
||||
}
|
||||
self._converted.add(month_str)
|
||||
|
||||
def get_log(self, pdate: date) -> List[Tuple[datetime, str]]:
|
||||
self._ensure_format(pdate)
|
||||
month_str = pdate.strftime("%Y-%m")
|
||||
day_str = pdate.strftime("%d")
|
||||
if month_str not in self._data:
|
||||
return []
|
||||
if day_str not in self._data[month_str]:
|
||||
return []
|
||||
log_data = self._data[month_str][day_str]["log"]
|
||||
ret = []
|
||||
for entry in log_data:
|
||||
tstr, b64str = entry.split()
|
||||
start_time = datetime.combine(pdate, datetime.strptime(tstr, "%H:%M").time())
|
||||
task = base64.b64decode(b64str.encode("utf-8")).decode("utf-8")
|
||||
ret.append((start_time, task))
|
||||
return ret
|
||||
|
||||
def set_log(self, pdate: date, log: List[Tuple[datetime, str]]):
|
||||
self._ensure_format(pdate)
|
||||
encoded = []
|
||||
for entry in log:
|
||||
tstr = entry[0].strftime("%H:%M")
|
||||
b64str = base64.b64encode(entry[1].encode("utf-8")).decode("utf-8")
|
||||
encoded.append(f"{tstr} {b64str}")
|
||||
month_str = pdate.strftime("%Y-%m")
|
||||
day_str = pdate.strftime("%d")
|
||||
month = self._data.setdefault(month_str, {})
|
||||
if month.setdefault(day_str, self._init_day)["log"] == encoded:
|
||||
return # no changes
|
||||
month.setdefault(day_str, self._init_day)["log"] = encoded
|
||||
# trigger save
|
||||
self._data[month_str] = month
|
||||
|
||||
def add_log_entry(self, task: str, start_time=None):
|
||||
if not start_time:
|
||||
start_time = datetime.now()
|
||||
self._ensure_format(start_time)
|
||||
tstr = start_time.strftime("%H:%M")
|
||||
b64str = base64.b64encode(task.encode("utf-8")).decode("utf-8")
|
||||
encoded = f"{tstr} {b64str}"
|
||||
month_str = start_time.strftime("%Y-%m")
|
||||
day_str = start_time.strftime("%d")
|
||||
month = self._data.setdefault(month_str, {})
|
||||
month.setdefault(day_str, self._init_day)["log"].append(encoded)
|
||||
self._data[month_str] = month
|
||||
|
||||
def get_prev_next_avail(self, pdate: date) -> Tuple[date, date]:
|
||||
prev = None
|
||||
next = None
|
||||
for i in range(1, 32):
|
||||
new_date = pdate - timedelta(days=i)
|
||||
if new_date.strftime("%Y-%m") not in self._data:
|
||||
break
|
||||
if new_date.strftime("%d") in self._data[new_date.strftime("%Y-%m")]:
|
||||
prev = new_date
|
||||
break
|
||||
for i in range(1, 32):
|
||||
new_date = pdate + timedelta(days=i)
|
||||
if new_date > date.today():
|
||||
break
|
||||
if new_date.strftime("%Y-%m") not in self._data:
|
||||
break
|
||||
if new_date.strftime("%d") in self._data[new_date.strftime("%Y-%m")]:
|
||||
next = new_date
|
||||
break
|
||||
return prev, next
|
||||
|
||||
def get_comments(self, pdate: date) -> Dict[str, str]:
|
||||
self._ensure_format(pdate)
|
||||
month_str = pdate.strftime("%Y-%m")
|
||||
day_str = pdate.strftime("%d")
|
||||
if month_str not in self._data:
|
||||
return dict()
|
||||
if day_str not in self._data[month_str]:
|
||||
return dict()
|
||||
comment_data = self._data[month_str][day_str]["comments"]
|
||||
ret = dict()
|
||||
for k, v in comment_data.items():
|
||||
k_dec = base64.b64decode(k.encode("utf-8")).decode("utf-8")
|
||||
v_dec = base64.b64decode(v.encode("utf-8")).decode("utf-8")
|
||||
ret[k_dec] = v_dec
|
||||
return ret
|
||||
|
||||
def set_comments(self, pdate: date, comments: Dict[str, str]):
|
||||
self._ensure_format(pdate)
|
||||
encoded = dict()
|
||||
for k, v in comments.items():
|
||||
k_enc = base64.b64encode(k.encode("utf-8")).decode("utf-8")
|
||||
v_enc = base64.b64encode(v.encode("utf-8")).decode("utf-8")
|
||||
encoded[k_enc] = v_enc
|
||||
month_str = pdate.strftime("%Y-%m")
|
||||
day_str = pdate.strftime("%d")
|
||||
month = self._data.setdefault(month_str, {})
|
||||
if month.setdefault(day_str, self._init_day)["comments"] == encoded:
|
||||
return # no changes
|
||||
month.setdefault(day_str, self._init_day)["comments"] = encoded
|
||||
# trigger save
|
||||
self._data[month_str] = month
|
||||
|
||||
|
||||
class Log:
|
||||
def __init__(self, data: LogCommentsData):
|
||||
self._data = data
|
||||
self._start_date = date.today()
|
||||
|
||||
def cleanup():
|
||||
self.log("End")
|
||||
|
||||
atexit.register(cleanup)
|
||||
|
||||
def log(self, task):
|
||||
if self._start_date != date.today():
|
||||
yesterday = date.today() - timedelta(days=1)
|
||||
yesterday_log = self.last_log(yesterday)
|
||||
if yesterday_log:
|
||||
self._data.add_log_entry("End", datetime.combine(yesterday, time(23, 59)))
|
||||
self._data.add_log_entry(yesterday_log, datetime.combine(date.today(), time(0, 0)))
|
||||
self._start_date = date.today()
|
||||
self._data.add_log_entry(task)
|
||||
|
||||
def last_log(self, day=date.today()):
|
||||
log = self._data.get_log(day)
|
||||
if not log:
|
||||
return None
|
||||
if log[-1][1] == "End":
|
||||
del log[-1]
|
||||
self._data.set_log(day, log)
|
||||
if not log:
|
||||
return None
|
||||
return log[-1][1]
|
||||
|
||||
|
||||
def summary(lcd: LogCommentsData, pdate: date) -> Tuple[Dict[str, timedelta], timedelta]:
|
||||
log = lcd.get_log(pdate)
|
||||
if pdate == date.today():
|
||||
log.append((datetime.now(), "End"))
|
||||
tasks_sums = {}
|
||||
total_sum = timedelta()
|
||||
for i, le in enumerate(log):
|
||||
start_time, task = le
|
||||
if i < len(log) - 1:
|
||||
end_time = log[i+1][0]
|
||||
duration = end_time - start_time
|
||||
if task != "Pause":
|
||||
task_sum = tasks_sums.setdefault(task, timedelta())
|
||||
task_sum += duration
|
||||
tasks_sums[task] = task_sum
|
||||
total_sum += duration
|
||||
return tasks_sums, total_sum
|
||||
|
||||
|
||||
def duration_to_str(duration: timedelta) -> str:
|
||||
dhours, rem = divmod(duration.seconds, 3600)
|
||||
dmins, _ = divmod(rem, 60)
|
||||
return f"{dhours:02d}:{dmins:02d}"
|
||||
|
||||
|
||||
class PrevNextable:
|
||||
def __init__(self, data: LogCommentsData):
|
||||
self._data = data
|
||||
self._prev = None
|
||||
self._next = None
|
||||
self._date = date.today()
|
||||
|
||||
@property
|
||||
def date(self):
|
||||
return self._date
|
||||
|
||||
@date.setter
|
||||
def date(self, value):
|
||||
self._prev, self._next = self._data.get_prev_next_avail(value)
|
||||
self._date = value
|
||||
|
||||
def prev_next_avail(self) -> Tuple[bool, bool]:
|
||||
return self._prev is not None, self._next is not None
|
||||
|
||||
def previous(self):
|
||||
self.date = self._prev
|
||||
|
||||
def next(self):
|
||||
self.date = self._next
|
||||
|
||||
def date_str(self) -> str:
|
||||
return self.date.strftime("%Y-%m-%d")
|
||||
|
||||
|
||||
class Report(PrevNextable):
|
||||
def __init__(self, data: LogCommentsData):
|
||||
super().__init__(data)
|
||||
self._not_log_len = 0
|
||||
|
||||
def report(self) -> Tuple[List[List[str]], int]:
|
||||
log = self._data.get_log(self.date)
|
||||
if self.date == date.today():
|
||||
log.append((datetime.now(), "End"))
|
||||
ret = []
|
||||
for i, t in enumerate(log):
|
||||
start_time, task = t
|
||||
if i < len(log) - 1:
|
||||
end_time = log[i+1][0]
|
||||
duration = end_time - start_time
|
||||
ret.append([task, start_time.strftime("%H:%M"), duration_to_str(duration)])
|
||||
else:
|
||||
ret.append([task, start_time.strftime("%H:%M"), ""])
|
||||
|
||||
ret.append(["", "", ""])
|
||||
ret.append(["", "Sums", ""])
|
||||
|
||||
tasks_summary, total_sum = summary(self._data, self.date)
|
||||
for task, duration in tasks_summary.items():
|
||||
ret.append([task, "", duration_to_str(duration)])
|
||||
ret.append(["Total sum", "", duration_to_str(total_sum)])
|
||||
self._not_log_len = 3 + len(tasks_summary)
|
||||
if self.date == date.today():
|
||||
self._not_log_len += 1
|
||||
editable_len = len(ret) - (4 + len(tasks_summary))
|
||||
|
||||
return ret, editable_len
|
||||
|
||||
def save(self, report):
|
||||
report = report[:-self._not_log_len]
|
||||
if not report:
|
||||
return
|
||||
report = list(map(
|
||||
lambda x: (datetime.combine(self.date, datetime.strptime(x[1], "%H:%M").time()), x[0]),
|
||||
report
|
||||
))
|
||||
self._data.set_log(self.date, report)
|
||||
|
||||
|
||||
class Worklog(PrevNextable):
|
||||
def __init__(self, data: LogCommentsData):
|
||||
super().__init__(data)
|
||||
self._worklog = []
|
||||
|
||||
@property
|
||||
def worklog(self) -> List[List[Union[str, timedelta]]]:
|
||||
tasks_summary, total_sum = summary(self._data, self.date)
|
||||
comments = self._data.get_comments(self.date)
|
||||
self._worklog = []
|
||||
for task, duration in tasks_summary.items():
|
||||
self._worklog.append([task, comments.setdefault(task, ""), duration])
|
||||
self._worklog.append(["Total sum", "", total_sum])
|
||||
return deepcopy(self._worklog)
|
||||
|
||||
@worklog.setter
|
||||
def worklog(self, worklog: List[List[str]]):
|
||||
log = self._data.get_log(self.date)
|
||||
set_comments = dict()
|
||||
for i, (task, comment, duration) in enumerate(worklog[:-1]):
|
||||
set_comments[task] = comment
|
||||
if self._worklog[i][0] != task:
|
||||
log = list(map(lambda x: (x[0], x[1].replace(self._worklog[i][0], task)), log))
|
||||
self._data.set_comments(self.date, set_comments)
|
||||
self._data.set_log(self.date, log)
|
@ -1,2 +0,0 @@
|
||||
class FimeException(Exception):
|
||||
pass
|
@ -1,471 +0,0 @@
|
||||
# Resource object code (Python 3)
|
||||
# Created by: object code
|
||||
# Created by: The Resource Compiler for Qt version 5.15.2
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
try:
|
||||
from PySide6 import QtCore
|
||||
except ImportError:
|
||||
from PySide2 import QtCore
|
||||
|
||||
qt_resource_data = b"\
|
||||
\x00\x00\x02x\
|
||||
<\
|
||||
svg xmlns=\x22http:\
|
||||
//www.w3.org/200\
|
||||
0/svg\x22 viewBox=\x22\
|
||||
0 0 24 24\x22 width\
|
||||
=\x2224\x22 height=\x2224\
|
||||
\x22>\x0a <defs id=\x22d\
|
||||
efs3051\x22>\x0a <s\
|
||||
tyle type=\x22text/\
|
||||
css\x22 id=\x22current\
|
||||
-color-scheme\x22>\x0a\
|
||||
.ColorSche\
|
||||
me-Text {\x0a \
|
||||
color:#232629;\
|
||||
\x0a }\x0a <\
|
||||
/style>\x0a </defs\
|
||||
>\x0a <g transform\
|
||||
=\x22translate(1,1)\
|
||||
\x22>\x0a <path sty\
|
||||
le=\x22fill:current\
|
||||
Color;fill-opaci\
|
||||
ty:1;stroke:none\
|
||||
\x22 d=\x22M 4 3 L 4 5\
|
||||
L 5 5 L 5 4 L 1\
|
||||
7 4 L 17 5 L 18 \
|
||||
5 L 18 3 L 17 3 \
|
||||
L 5 3 L 4 3 z M \
|
||||
11 5 L 5 11.1835\
|
||||
94 L 5.7929688 1\
|
||||
2 L 11 6.6328125\
|
||||
L 16.207031 12 \
|
||||
L 17 11.183594 L\
|
||||
11 5 z M 8 13 L\
|
||||
8 19 L 9 19 L 1\
|
||||
3 19 L 14 19 L 1\
|
||||
4 13 L 13 13 L 1\
|
||||
3 18 L 9 18 L 9 \
|
||||
13 L 8 13 z \x22 cl\
|
||||
ass=\x22ColorScheme\
|
||||
-Text\x22/>\x0a </g>\x0a\
|
||||
</svg>\x0a\
|
||||
\x00\x00\x02\xdd\
|
||||
<\
|
||||
svg xmlns=\x22http:\
|
||||
//www.w3.org/200\
|
||||
0/svg\x22 viewBox=\x22\
|
||||
0 0 32 32\x22>\x0a <d\
|
||||
efs id=\x22defs3051\
|
||||
\x22>\x0a <style ty\
|
||||
pe=\x22text/css\x22 id\
|
||||
=\x22current-color-\
|
||||
scheme\x22>\x0a .\
|
||||
ColorScheme-Text\
|
||||
{\x0a color\
|
||||
:#232629;\x0a \
|
||||
}\x0a </style>\
|
||||
\x0a </defs>\x0a <pat\
|
||||
h style=\x22fill:cu\
|
||||
rrentColor;fill-\
|
||||
opacity:1;stroke\
|
||||
:none\x22 \x0a d\
|
||||
=\x22M16 4A12 12 0 \
|
||||
0 0 7.886719 7.1\
|
||||
79688L7.885 7.17\
|
||||
8A12 12 0 0 0 7.\
|
||||
847656 7.214844 \
|
||||
12 12 0 0 0 4 16\
|
||||
12 12 0 0 0 16 \
|
||||
28 12 12 0 0 0 2\
|
||||
4.11328 24.82031\
|
||||
2L24.12 24.822A1\
|
||||
2 12 0 0 0 24.15\
|
||||
234 24.785156 12\
|
||||
12 0 0 0 28 16 \
|
||||
12 12 0 0 0 16 4\
|
||||
M16 5A11 11 0 0 \
|
||||
1 27 16 11 11 0 \
|
||||
0 1 24.11523 23.\
|
||||
408203L8.592 7.8\
|
||||
85A11 11 0 0 1 1\
|
||||
6 5M7.885 8.592L\
|
||||
23.408 24.12A11 \
|
||||
11 0 0 1 16 27 1\
|
||||
1 11 0 0 1 5 16 \
|
||||
11 11 0 0 1 7.88\
|
||||
4766 8.591797\x22\x0a \
|
||||
class=\x22Color\
|
||||
Scheme-Text\x22\x0a \
|
||||
/>\x0a</svg>\x0a\
|
||||
\x00\x00\x02`\
|
||||
<\
|
||||
svg xmlns=\x22http:\
|
||||
//www.w3.org/200\
|
||||
0/svg\x22 viewBox=\x22\
|
||||
0 0 32 32\x22>\x0a <d\
|
||||
efs\x0a id=\x22def\
|
||||
s3051\x22>\x0a <sty\
|
||||
le\x0a type=\x22\
|
||||
text/css\x22\x0a \
|
||||
id=\x22current-col\
|
||||
or-scheme\x22>\x0a \
|
||||
.ColorScheme-T\
|
||||
ext {\x0a co\
|
||||
lor:#232629;\x0a \
|
||||
}\x0a </sty\
|
||||
le>\x0a </defs>\x0a \
|
||||
<path\x0a style\
|
||||
=\x22fill:currentCo\
|
||||
lor;fill-opacity\
|
||||
:1;stroke:none\x22 \
|
||||
\x0a d=\x22M 16 4 \
|
||||
A 12 12 0 0 0 4 \
|
||||
16 A 12 12 0 0 0\
|
||||
16 28 A 12 12 0\
|
||||
0 0 28 16 A 12 \
|
||||
12 0 0 0 16 4 z \
|
||||
M 16 5 A 11 11 0\
|
||||
0 1 27 16 A 11 \
|
||||
11 0 0 1 16 27 A\
|
||||
11 11 0 0 1 5 1\
|
||||
6 A 11 11 0 0 1 \
|
||||
16 5 z M 15 7 L \
|
||||
15 17 L 24 17 L \
|
||||
24 16 L 16 16 L \
|
||||
16 7 L 15 7 z \x22\x0a\
|
||||
id=\x22path78\x22\
|
||||
\x0a class=\x22Co\
|
||||
lorScheme-Text\x22\x0a\
|
||||
/>\x0a</svg>\x0a\
|
||||
\x00\x00\x01L\
|
||||
<\
|
||||
svg viewBox=\x220 0\
|
||||
32 32\x22 xmlns=\x22h\
|
||||
ttp://www.w3.org\
|
||||
/2000/svg\x22>\x0a \
|
||||
<style\x0a t\
|
||||
ype=\x22text/css\x22\x0a \
|
||||
id=\x22curre\
|
||||
nt-color-scheme\x22\
|
||||
>\x0a .Color\
|
||||
Scheme-Text {\x0a \
|
||||
color:\
|
||||
#232629;\x0a \
|
||||
}\x0a </style>\x0a\
|
||||
<path d=\x22M23\
|
||||
.707 16l-14-14L9\
|
||||
2.707 22.293 16\
|
||||
9 29.293l.707.7\
|
||||
07z\x22 class=\x22Colo\
|
||||
rScheme-Text\x22 fi\
|
||||
ll=\x22currentColor\
|
||||
\x22/>\x0a</svg>\x0a\
|
||||
\x00\x00\x02g\
|
||||
<\
|
||||
svg xmlns=\x22http:\
|
||||
//www.w3.org/200\
|
||||
0/svg\x22 version=\x22\
|
||||
1.1\x22 viewBox=\x220 \
|
||||
0 24 24\x22 width=\x22\
|
||||
24\x22 height=\x2224\x22>\
|
||||
\x0a <style type=\x22\
|
||||
text/css\x22 id=\x22cu\
|
||||
rrent-color-sche\
|
||||
me\x22>\x0a .Co\
|
||||
lorScheme-Negati\
|
||||
veText {\x0a \
|
||||
color:#da44\
|
||||
53;\x0a }\x0a \
|
||||
</style>\x0a <g \
|
||||
transform=\x22trans\
|
||||
late(1,1)\x22>\x0a \
|
||||
<path class=\x22Col\
|
||||
orScheme-Negativ\
|
||||
eText\x22 d=\x22M 3.69\
|
||||
92188 3 L 3 3.69\
|
||||
92188 L 10.30078\
|
||||
1 11 L 3 18.3007\
|
||||
81 C 3 18.300781\
|
||||
3.7112147 18.99\
|
||||
3333 3.6992188 1\
|
||||
9 L 11 11.699219\
|
||||
L 18.300781 19 \
|
||||
C 18.288781 18.9\
|
||||
933 19 18.300781\
|
||||
19 18.300781 L \
|
||||
11.699219 11.001\
|
||||
953 L 19 3.69921\
|
||||
88 L 18.300781 3\
|
||||
L 11 10.300781 \
|
||||
L 3.6992188 3 z \
|
||||
\x22 fill=\x22currentC\
|
||||
olor\x22/>\x0a </g>\x0a<\
|
||||
/svg>\x0a\
|
||||
\x00\x00\x01K\
|
||||
<\
|
||||
svg viewBox=\x220 0\
|
||||
32 32\x22 xmlns=\x22h\
|
||||
ttp://www.w3.org\
|
||||
/2000/svg\x22>\x0a \
|
||||
<style\x0a t\
|
||||
ype=\x22text/css\x22\x0a \
|
||||
id=\x22curre\
|
||||
nt-color-scheme\x22\
|
||||
>\x0a .Color\
|
||||
Scheme-Text {\x0a \
|
||||
color:\
|
||||
#232629;\x0a \
|
||||
}\x0a </style>\x0a\
|
||||
<path d=\x22M8.\
|
||||
293 16l14 14 .70\
|
||||
7-.707L9.707 16 \
|
||||
23 2.707 22.293 \
|
||||
2z\x22 class=\x22Color\
|
||||
Scheme-Text\x22 fil\
|
||||
l=\x22currentColor\x22\
|
||||
/>\x0a</svg>\x0a\
|
||||
\x00\x00\x01\xe6\
|
||||
<\
|
||||
svg xmlns=\x22http:\
|
||||
//www.w3.org/200\
|
||||
0/svg\x22 viewBox=\x22\
|
||||
0 0 24 24\x22 width\
|
||||
=\x2224\x22 height=\x2224\
|
||||
\x22>\x0a <defs id=\x22d\
|
||||
efs3051\x22>\x0a <s\
|
||||
tyle type=\x22text/\
|
||||
css\x22 id=\x22current\
|
||||
-color-scheme\x22>\x0a\
|
||||
.ColorSche\
|
||||
me-Text {\x0a \
|
||||
color:#232629;\
|
||||
\x0a }\x0a <\
|
||||
/style>\x0a </defs\
|
||||
>\x0a <g transform\
|
||||
=\x22translate(1,1)\
|
||||
\x22>\x0a <path sty\
|
||||
le=\x22fill:current\
|
||||
Color;fill-opaci\
|
||||
ty:1;stroke:none\
|
||||
\x22 d=\x22M 10 4 L 10\
|
||||
11 L 3 11 L 3 1\
|
||||
2 L 10 12 L 10 1\
|
||||
9 L 11 19 L 11 1\
|
||||
2 L 18 12 L 18 1\
|
||||
1 L 11 11 L 11 4\
|
||||
L 10 4 z \x22 clas\
|
||||
s=\x22ColorScheme-T\
|
||||
ext\x22/>\x0a </g>\x0a</\
|
||||
svg>\x0a\
|
||||
\x00\x00\x02`\
|
||||
<\
|
||||
svg xmlns=\x22http:\
|
||||
//www.w3.org/200\
|
||||
0/svg\x22 viewBox=\x22\
|
||||
0 0 32 32\x22>\x0a <d\
|
||||
efs\x0a id=\x22def\
|
||||
s3051\x22>\x0a <sty\
|
||||
le\x0a type=\x22\
|
||||
text/css\x22\x0a \
|
||||
id=\x22current-col\
|
||||
or-scheme\x22>\x0a \
|
||||
.ColorScheme-T\
|
||||
ext {\x0a co\
|
||||
lor:#dcd9d6;\x0a \
|
||||
}\x0a </sty\
|
||||
le>\x0a </defs>\x0a \
|
||||
<path\x0a style\
|
||||
=\x22fill:currentCo\
|
||||
lor;fill-opacity\
|
||||
:1;stroke:none\x22 \
|
||||
\x0a d=\x22M 16 4 \
|
||||
A 12 12 0 0 0 4 \
|
||||
16 A 12 12 0 0 0\
|
||||
16 28 A 12 12 0\
|
||||
0 0 28 16 A 12 \
|
||||
12 0 0 0 16 4 z \
|
||||
M 16 5 A 11 11 0\
|
||||
0 1 27 16 A 11 \
|
||||
11 0 0 1 16 27 A\
|
||||
11 11 0 0 1 5 1\
|
||||
6 A 11 11 0 0 1 \
|
||||
16 5 z M 15 7 L \
|
||||
15 17 L 24 17 L \
|
||||
24 16 L 16 16 L \
|
||||
16 7 L 15 7 z \x22\x0a\
|
||||
id=\x22path78\x22\
|
||||
\x0a class=\x22Co\
|
||||
lorScheme-Text\x22\x0a\
|
||||
/>\x0a</svg>\x0a\
|
||||
\x00\x00\x01L\
|
||||
<\
|
||||
svg viewBox=\x220 0\
|
||||
32 32\x22 xmlns=\x22h\
|
||||
ttp://www.w3.org\
|
||||
/2000/svg\x22>\x0a \
|
||||
<style\x0a t\
|
||||
ype=\x22text/css\x22\x0a \
|
||||
id=\x22curre\
|
||||
nt-color-scheme\x22\
|
||||
>\x0a .Color\
|
||||
Scheme-Text {\x0a \
|
||||
color:\
|
||||
#232629;\x0a \
|
||||
}\x0a </style>\x0a\
|
||||
<path d=\x22M23\
|
||||
.707 16l-14-14L9\
|
||||
2.707 22.293 16\
|
||||
9 29.293l.707.7\
|
||||
07z\x22 class=\x22Colo\
|
||||
rScheme-Text\x22 fi\
|
||||
ll=\x22currentColor\
|
||||
\x22/>\x0a</svg>\x0a\
|
||||
\x00\x00\x01c\
|
||||
<\
|
||||
svg viewBox=\x220 0\
|
||||
32 32\x22 xmlns=\x22h\
|
||||
ttp://www.w3.org\
|
||||
/2000/svg\x22><styl\
|
||||
e type=\x22text/css\
|
||||
\x22 id=\x22current-co\
|
||||
lor-scheme\x22>.Col\
|
||||
orScheme-Text{co\
|
||||
lor:#232629;}</s\
|
||||
tyle><path d=\x22m3\
|
||||
0 6.5961948-19.3\
|
||||
03301 19.3032992\
|
||||
-8.696699-8.6966\
|
||||
97.7071076-.7071\
|
||||
06 7.9895914 7.9\
|
||||
89592 18.596195-\
|
||||
18.5961947z\x22 sty\
|
||||
le=\x22fill:current\
|
||||
Color;fill-opaci\
|
||||
ty:1;stroke:none\
|
||||
\x22 class=\x22ColorSc\
|
||||
heme-Text\x22/></sv\
|
||||
g>\
|
||||
\x00\x00\x01\xa2\
|
||||
<\
|
||||
svg xmlns=\x22http:\
|
||||
//www.w3.org/200\
|
||||
0/svg\x22 viewBox=\x22\
|
||||
0 0 24 24\x22 width\
|
||||
=\x2224\x22 height=\x2224\
|
||||
\x22>\x0a <defs id=\x22d\
|
||||
efs3051\x22>\x0a <s\
|
||||
tyle type=\x22text/\
|
||||
css\x22 id=\x22current\
|
||||
-color-scheme\x22>\x0a\
|
||||
.ColorSche\
|
||||
me-Text {\x0a \
|
||||
color:#232629;\
|
||||
\x0a }\x0a <\
|
||||
/style>\x0a </defs\
|
||||
>\x0a <g transform\
|
||||
=\x22translate(1,1)\
|
||||
\x22>\x0a <path sty\
|
||||
le=\x22fill:current\
|
||||
Color\x22 class=\x22Co\
|
||||
lorScheme-Text\x22 \
|
||||
d=\x22M 3 7 L 3 9 L\
|
||||
13 9 L 13 7 L 3\
|
||||
7 z\x22 transform=\
|
||||
\x22translate(3 3)\x22\
|
||||
/>\x0a </g>\x0a</svg>\
|
||||
\x0a\
|
||||
"
|
||||
|
||||
qt_resource_name = b"\
|
||||
\x00\x05\
|
||||
\x00o\xa6S\
|
||||
\x00i\
|
||||
\x00c\x00o\x00n\x00s\
|
||||
\x00\x10\
|
||||
\x03\x84Y\x07\
|
||||
\x00c\
|
||||
\x00l\x00o\x00u\x00d\x00-\x00u\x00p\x00l\x00o\x00a\x00d\x00.\x00s\x00v\x00g\
|
||||
\x00\x11\
|
||||
\x03S\x8a\x87\
|
||||
\x00d\
|
||||
\x00i\x00a\x00l\x00o\x00g\x00-\x00c\x00a\x00n\x00c\x00e\x00l\x00.\x00s\x00v\x00g\
|
||||
\
|
||||
\x00\x13\
|
||||
\x03gvg\
|
||||
\x00a\
|
||||
\x00p\x00p\x00o\x00i\x00n\x00t\x00m\x00e\x00n\x00t\x00-\x00n\x00e\x00w\x00.\x00s\
|
||||
\x00v\x00g\
|
||||
\x00\x0f\
|
||||
\x0f\x22iG\
|
||||
\x00a\
|
||||
\x00r\x00r\x00o\x00w\x00-\x00r\x00i\x00g\x00h\x00t\x00.\x00s\x00v\x00g\
|
||||
\x00\x16\
|
||||
\x0e\x92\x91G\
|
||||
\x00e\
|
||||
\x00d\x00i\x00t\x00-\x00d\x00e\x00l\x00e\x00t\x00e\x00-\x00r\x00e\x00m\x00o\x00v\
|
||||
\x00e\x00.\x00s\x00v\x00g\
|
||||
\x00\x0e\
|
||||
\x08\xfa8\xa7\
|
||||
\x00a\
|
||||
\x00r\x00r\x00o\x00w\x00-\x00l\x00e\x00f\x00t\x00.\x00s\x00v\x00g\
|
||||
\x00\x0c\
|
||||
\x09\xc6\x14\xa7\
|
||||
\x00l\
|
||||
\x00i\x00s\x00t\x00-\x00a\x00d\x00d\x00.\x00s\x00v\x00g\
|
||||
\x00\x19\
|
||||
\x0b9\x06g\
|
||||
\x00a\
|
||||
\x00p\x00p\x00o\x00i\x00n\x00t\x00m\x00e\x00n\x00t\x00-\x00n\x00e\x00w\x00-\x00l\
|
||||
\x00i\x00g\x00h\x00t\x00.\x00s\x00v\x00g\
|
||||
\x00\x0b\
|
||||
\x0c+\x12G\
|
||||
\x00g\
|
||||
\x00o\x00-\x00n\x00e\x00x\x00t\x00.\x00s\x00v\x00g\
|
||||
\x00\x0d\
|
||||
\x09\xae0'\
|
||||
\x00d\
|
||||
\x00i\x00a\x00l\x00o\x00g\x00-\x00o\x00k\x00.\x00s\x00v\x00g\
|
||||
\x00\x0f\
|
||||
\x020\x86g\
|
||||
\x00l\
|
||||
\x00i\x00s\x00t\x00-\x00r\x00e\x00m\x00o\x00v\x00e\x00.\x00s\x00v\x00g\
|
||||
"
|
||||
|
||||
qt_resource_struct = b"\
|
||||
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
|
||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0b\x00\x00\x00\x02\
|
||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||
\x00\x00\x01\x94\x00\x00\x00\x00\x00\x01\x00\x00\x13\xd0\
|
||||
\x00\x00\x01}.b\xfd-\
|
||||
\x00\x00\x006\x00\x00\x00\x00\x00\x01\x00\x00\x02|\
|
||||
\x00\x00\x01}.a\xe4+\
|
||||
\x00\x00\x00^\x00\x00\x00\x00\x00\x01\x00\x00\x05]\
|
||||
\x00\x00\x01}.\x1a\xb9\xf9\
|
||||
\x00\x00\x00\x10\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
|
||||
\x00\x00\x01}fHlR\
|
||||
\x00\x00\x00\xe0\x00\x00\x00\x00\x00\x01\x00\x00\x0b|\
|
||||
\x00\x00\x01}.b $\
|
||||
\x00\x00\x01t\x00\x00\x00\x00\x00\x01\x00\x00\x12i\
|
||||
\x00\x00\x01}.a\xce_\
|
||||
\x00\x00\x01\x02\x00\x00\x00\x00\x00\x01\x00\x00\x0c\xcb\
|
||||
\x00\x00\x01}.b\xe1.\
|
||||
\x00\x00\x01 \x00\x00\x00\x00\x00\x01\x00\x00\x0e\xb5\
|
||||
\x00\x00\x01}/\x83\xea~\
|
||||
\x00\x00\x01X\x00\x00\x00\x00\x00\x01\x00\x00\x11\x19\
|
||||
\x00\x00\x01}.b\x05\xfc\
|
||||
\x00\x00\x00\xae\x00\x00\x00\x00\x00\x01\x00\x00\x09\x11\
|
||||
\x00\x00\x01}fHlR\
|
||||
\x00\x00\x00\x8a\x00\x00\x00\x00\x00\x01\x00\x00\x07\xc1\
|
||||
\x00\x00\x01}.b1)\
|
||||
"
|
||||
|
||||
def qInitResources():
|
||||
QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||
|
||||
def qCleanupResources():
|
||||
QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||
|
||||
qInitResources()
|
@ -1,18 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<defs
|
||||
id="defs3051">
|
||||
<style
|
||||
type="text/css"
|
||||
id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dcd9d6;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 16 4 A 12 12 0 0 0 4 16 A 12 12 0 0 0 16 28 A 12 12 0 0 0 28 16 A 12 12 0 0 0 16 4 z M 16 5 A 11 11 0 0 1 27 16 A 11 11 0 0 1 16 27 A 11 11 0 0 1 5 16 A 11 11 0 0 1 16 5 z M 15 7 L 15 17 L 24 17 L 24 16 L 16 16 L 16 7 L 15 7 z "
|
||||
id="path78"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
Before Width: | Height: | Size: 608 B |
@ -1,18 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<defs
|
||||
id="defs3051">
|
||||
<style
|
||||
type="text/css"
|
||||
id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 16 4 A 12 12 0 0 0 4 16 A 12 12 0 0 0 16 28 A 12 12 0 0 0 28 16 A 12 12 0 0 0 16 4 z M 16 5 A 11 11 0 0 1 27 16 A 11 11 0 0 1 16 27 A 11 11 0 0 1 5 16 A 11 11 0 0 1 16 5 z M 15 7 L 15 17 L 24 17 L 24 16 L 16 16 L 16 7 L 15 7 z "
|
||||
id="path78"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
Before Width: | Height: | Size: 608 B |
@ -1,10 +0,0 @@
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<style
|
||||
type="text/css"
|
||||
id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
<path d="M8.293 16l14 14 .707-.707L9.707 16 23 2.707 22.293 2z" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 331 B |
@ -1,10 +0,0 @@
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<style
|
||||
type="text/css"
|
||||
id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
<path d="M23.707 16l-14-14L9 2.707 22.293 16 9 29.293l.707.707z" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 332 B |
@ -1,12 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g transform="translate(1,1)">
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none" d="M 4 3 L 4 5 L 5 5 L 5 4 L 17 4 L 17 5 L 18 5 L 18 3 L 17 3 L 5 3 L 4 3 z M 11 5 L 5 11.183594 L 5.7929688 12 L 11 6.6328125 L 16.207031 12 L 17 11.183594 L 11 5 z M 8 13 L 8 19 L 9 19 L 13 19 L 14 19 L 14 13 L 13 13 L 13 18 L 9 18 L 9 13 L 8 13 z " class="ColorScheme-Text"/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 632 B |
@ -1,13 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M16 4A12 12 0 0 0 7.886719 7.179688L7.885 7.178A12 12 0 0 0 7.847656 7.214844 12 12 0 0 0 4 16 12 12 0 0 0 16 28 12 12 0 0 0 24.11328 24.820312L24.12 24.822A12 12 0 0 0 24.15234 24.785156 12 12 0 0 0 28 16 12 12 0 0 0 16 4M16 5A11 11 0 0 1 27 16 11 11 0 0 1 24.11523 23.408203L8.592 7.885A11 11 0 0 1 16 5M7.885 8.592L23.408 24.12A11 11 0 0 1 16 27 11 11 0 0 1 5 16 11 11 0 0 1 7.884766 8.591797"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
Before Width: | Height: | Size: 733 B |
@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><style type="text/css" id="current-color-scheme">.ColorScheme-Text{color:#232629;}</style><path d="m30 6.5961948-19.303301 19.3032992-8.696699-8.696697.7071076-.707106 7.9895914 7.989592 18.596195-18.5961947z" style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Text"/></svg>
|
Before Width: | Height: | Size: 355 B |
@ -1,10 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 24 24" width="24" height="24">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-NegativeText {
|
||||
color:#da4453;
|
||||
}
|
||||
</style>
|
||||
<g transform="translate(1,1)">
|
||||
<path class="ColorScheme-NegativeText" d="M 3.6992188 3 L 3 3.6992188 L 10.300781 11 L 3 18.300781 C 3 18.300781 3.7112147 18.993333 3.6992188 19 L 11 11.699219 L 18.300781 19 C 18.288781 18.9933 19 18.300781 19 18.300781 L 11.699219 11.001953 L 19 3.6992188 L 18.300781 3 L 11 10.300781 L 3.6992188 3 z " fill="currentColor"/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 615 B |
@ -1,10 +0,0 @@
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<style
|
||||
type="text/css"
|
||||
id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
<path d="M23.707 16l-14-14L9 2.707 22.293 16 9 29.293l.707.707z" class="ColorScheme-Text" fill="currentColor"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 332 B |
@ -1,12 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g transform="translate(1,1)">
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none" d="M 10 4 L 10 11 L 3 11 L 3 12 L 10 12 L 10 19 L 11 19 L 11 12 L 18 12 L 18 11 L 11 11 L 11 4 L 10 4 z " class="ColorScheme-Text"/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 486 B |
@ -1,12 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#232629;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g transform="translate(1,1)">
|
||||
<path style="fill:currentColor" class="ColorScheme-Text" d="M 3 7 L 3 9 L 13 9 L 13 7 L 3 7 z" transform="translate(3 3)"/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 418 B |
@ -1,16 +0,0 @@
|
||||
<!DOCTYPE RCC>
|
||||
<RCC version="1.0">
|
||||
<qresource prefix="icons">
|
||||
<file>appointment-new.svg</file>
|
||||
<file>appointment-new-light.svg</file>
|
||||
<file>arrow-left.svg</file>
|
||||
<file>arrow-right.svg</file>
|
||||
<file>cloud-upload.svg</file>
|
||||
<file>dialog-cancel.svg</file>
|
||||
<file>dialog-ok.svg</file>
|
||||
<file>edit-delete-remove.svg</file>
|
||||
<file>go-next.svg</file>
|
||||
<file>list-add.svg</file>
|
||||
<file>list-remove.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
rcc resources.qrc -g python -o __init__.py
|
||||
sed -i 's/^.*import QtCore.*$/try:\n from PySide6 import QtCore\nexcept ImportError:\n from PySide2 import QtCore/g' __init__.py
|
@ -1,95 +0,0 @@
|
||||
try:
|
||||
from PySide6 import QtCore, QtGui, QtWidgets
|
||||
except ImportError:
|
||||
from PySide2 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from fime.config import Config
|
||||
from fime.progressindicator import ProgressIndicator
|
||||
from fime.task_completer import TaskCompleter
|
||||
from fime.util import get_icon
|
||||
|
||||
|
||||
class ImportTask(QtWidgets.QDialog):
|
||||
def __init__(self, config: Config, parent, *args, **kwargs):
|
||||
super().__init__(parent, *args, **kwargs)
|
||||
self.setWindowTitle("New Tasks")
|
||||
|
||||
self.config = config
|
||||
|
||||
self.line_edit = QtWidgets.QLineEdit(self)
|
||||
self.completer = TaskCompleter(config)
|
||||
self.line_edit.setCompleter(self.completer)
|
||||
self.line_edit.textChanged.connect(self.completer.update_picker)
|
||||
self.line_edit.setFocus()
|
||||
|
||||
self.indicator = ProgressIndicator(self)
|
||||
self.indicator.setAnimationDelay(70)
|
||||
self.indicator.setDisplayedWhenStopped(False)
|
||||
self.completer.running.connect(self.spin)
|
||||
self.completer.stopped.connect(self.no_spin)
|
||||
|
||||
self.auto_change_task_check_box = QtWidgets.QCheckBox()
|
||||
self.auto_change_task_check_box.setText("Set as active task after import")
|
||||
|
||||
ok_button = QtWidgets.QPushButton()
|
||||
ok_button.setText("OK")
|
||||
ok_button.setIcon(get_icon("dialog-ok"))
|
||||
ok_button.pressed.connect(self.accept)
|
||||
ok_button.setAutoDefault(True)
|
||||
|
||||
cancel_button = QtWidgets.QPushButton()
|
||||
cancel_button.setText("Cancel")
|
||||
cancel_button.setIcon(get_icon("dialog-cancel"))
|
||||
cancel_button.pressed.connect(self.reject)
|
||||
cancel_button.setAutoDefault(False)
|
||||
|
||||
alayout = QtWidgets.QStackedLayout()
|
||||
alayout.setStackingMode(QtWidgets.QStackedLayout.StackAll)
|
||||
alayout.addWidget(self.line_edit)
|
||||
size = self.line_edit.height()
|
||||
self.indicator.setMaximumSize(QtCore.QSize(size * 0.75, size * 0.75))
|
||||
aalayout = QtWidgets.QVBoxLayout()
|
||||
aalayout.addWidget(self.indicator, alignment=QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
|
||||
marg = aalayout.contentsMargins()
|
||||
marg.setRight(size * 0.15)
|
||||
aalayout.setContentsMargins(marg)
|
||||
aawidget = QtWidgets.QWidget()
|
||||
aawidget.setLayout(aalayout)
|
||||
alayout.addWidget(aawidget)
|
||||
alayout.setCurrentWidget(aawidget)
|
||||
|
||||
blayout = QtWidgets.QHBoxLayout()
|
||||
blayout.addSpacing(300)
|
||||
blayout.addWidget(self.auto_change_task_check_box)
|
||||
blayout.addWidget(cancel_button)
|
||||
blayout.addWidget(ok_button)
|
||||
|
||||
layout = QtWidgets.QVBoxLayout()
|
||||
layout.addLayout(alayout)
|
||||
layout.addLayout(blayout)
|
||||
self.setLayout(layout)
|
||||
self.resize(500, 0)
|
||||
|
||||
@QtCore.Slot()
|
||||
def spin(self):
|
||||
self.indicator.startAnimation()
|
||||
|
||||
@QtCore.Slot()
|
||||
def no_spin(self):
|
||||
self.indicator.stopAnimation()
|
||||
|
||||
@property
|
||||
def task_text(self):
|
||||
return self.line_edit.text()
|
||||
|
||||
@property
|
||||
def change_task(self):
|
||||
return self.auto_change_task_check_box.isChecked()
|
||||
|
||||
def showEvent(self, _):
|
||||
self.auto_change_task_check_box.setChecked(self.config.import_auto_change_task)
|
||||
# pick up config changes
|
||||
self.completer.update()
|
||||
self.line_edit.setText("")
|
||||
self.raise_()
|
||||
self.line_edit.setFocus()
|
219
src/fime/main.py
@ -1,219 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import signal
|
||||
import sys
|
||||
from functools import partial
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from loguru import logger
|
||||
|
||||
try:
|
||||
from PySide6 import QtCore, QtWidgets
|
||||
PYSIDE_6 = True
|
||||
except ImportError:
|
||||
from PySide2 import QtCore, QtWidgets
|
||||
PYSIDE_6 = False
|
||||
|
||||
from fime.about import About
|
||||
from fime.config import Config
|
||||
from fime.worklog import WorklogDialog
|
||||
from fime.data import Tasks, Log, Data, LogCommentsData, Worklog, Report
|
||||
from fime.exceptions import FimeException
|
||||
from fime.import_task import ImportTask
|
||||
from fime.report import ReportDialog
|
||||
from fime.settings import Settings
|
||||
from fime.task_edit import TaskEdit
|
||||
from fime.util import get_screen_height, get_icon
|
||||
|
||||
|
||||
class App:
|
||||
def __init__(self):
|
||||
self.app = QtWidgets.QApplication(sys.argv)
|
||||
self.app.setQuitOnLastWindowClosed(False)
|
||||
|
||||
data = Data()
|
||||
self.tasks = Tasks(data)
|
||||
lcd = LogCommentsData(data)
|
||||
self.log = Log(lcd)
|
||||
self._active_task = self.log.last_log() or "Nothing"
|
||||
|
||||
self.config = Config()
|
||||
|
||||
self.menu = QtWidgets.QMenu(None)
|
||||
|
||||
self.import_task = ImportTask(self.config, None)
|
||||
self.import_task.accepted.connect(self.new_task_imported)
|
||||
|
||||
self.taskEdit = TaskEdit(self.tasks, None)
|
||||
self.taskEdit.accepted.connect(self.tasks_edited)
|
||||
|
||||
self.reportDialog = ReportDialog(self.tasks, Report(lcd), None)
|
||||
self.reportDialog.accepted.connect(self.log_edited)
|
||||
|
||||
self.worklogDialog = WorklogDialog(self.config, Worklog(lcd), None)
|
||||
self.worklogDialog.accepted.connect(self.log_edited)
|
||||
|
||||
self.settings = Settings(self.config, None)
|
||||
self.settings.accepted.connect(self.update_icon)
|
||||
self.settings.accepted.connect(self.update_tray_menu)
|
||||
|
||||
self.about = About(None)
|
||||
|
||||
self.tray = QtWidgets.QSystemTrayIcon()
|
||||
self.tray.setContextMenu(self.menu)
|
||||
self.update_icon()
|
||||
self.tray.show()
|
||||
self.tray.setToolTip("fime")
|
||||
self.update_tray_menu()
|
||||
|
||||
self.last_dialog: Optional[QtWidgets.QDialog] = None
|
||||
|
||||
def update_icon(self):
|
||||
if self.config.tray_theme == "light":
|
||||
icon = get_icon("appointment-new-light")
|
||||
else:
|
||||
icon = get_icon("appointment-new")
|
||||
self.tray.setIcon(icon)
|
||||
|
||||
@QtCore.Slot()
|
||||
def new_task_imported(self):
|
||||
if self.import_task.task_text:
|
||||
self.tasks.add_jira_task(self.import_task.task_text)
|
||||
if self.import_task.change_task:
|
||||
self.change_task(self.import_task.task_text)
|
||||
self.update_tray_menu()
|
||||
|
||||
@QtCore.Slot()
|
||||
def tasks_edited(self):
|
||||
self.tasks.tasks = self.taskEdit.tasks
|
||||
self.update_tray_menu()
|
||||
|
||||
@QtCore.Slot()
|
||||
def log_edited(self):
|
||||
self.active_task = self.log.last_log() or "Nothing"
|
||||
|
||||
@property
|
||||
def active_task(self):
|
||||
return self._active_task
|
||||
|
||||
@active_task.setter
|
||||
def active_task(self, task):
|
||||
self._active_task = task
|
||||
self.tray.setToolTip(f"{task} - fime")
|
||||
self.update_tray_menu()
|
||||
|
||||
def close_open_dialog(self):
|
||||
if self.last_dialog and self.last_dialog.isVisible():
|
||||
self.last_dialog.reject()
|
||||
|
||||
def change_task(self, task):
|
||||
self.close_open_dialog()
|
||||
self.active_task = task
|
||||
self.log.log(task)
|
||||
self.tasks.update_jira_task_usage(task)
|
||||
|
||||
def open_new_dialog(self, new_dialog: QtWidgets.QDialog):
|
||||
self.close_open_dialog()
|
||||
self.last_dialog = new_dialog
|
||||
new_dialog.show()
|
||||
|
||||
def update_tray_menu(self):
|
||||
menu_items = []
|
||||
tmp_action = self.menu.addAction("tmp")
|
||||
action_height = self.menu.actionGeometry(tmp_action).height()
|
||||
|
||||
def add_tasks(tasks):
|
||||
for t in tasks:
|
||||
menu_items.append((t, partial(self.change_task, t)))
|
||||
|
||||
self.menu.clear()
|
||||
add_tasks(self.tasks.tasks)
|
||||
|
||||
menu_items.append((1, None))
|
||||
already_taken = (len(self.tasks.tasks) + 6) * action_height
|
||||
available_space = get_screen_height(self.menu) * 0.8 - already_taken
|
||||
jira_entry_count = int(available_space // action_height)
|
||||
add_tasks(self.tasks.jira_tasks[-jira_entry_count:])
|
||||
|
||||
menu_items.append((1, None))
|
||||
add_tasks(["Pause"])
|
||||
if self.active_task == "Nothing":
|
||||
add_tasks(["Nothing"])
|
||||
|
||||
menu_items.append((1, None))
|
||||
jira_integration = self.config.jira_url and self.config.jira_token
|
||||
if jira_integration:
|
||||
menu_items.append(("Import Jira task", partial(self.open_new_dialog, self.import_task)))
|
||||
menu_items.append(("Edit tasks", partial(self.open_new_dialog, self.taskEdit)))
|
||||
menu_items.append(("Report", partial(self.open_new_dialog, self.reportDialog)))
|
||||
if jira_integration:
|
||||
menu_items.append(("Worklog", partial(self.open_new_dialog, self.worklogDialog)))
|
||||
|
||||
menu_items.append((1, None))
|
||||
|
||||
menu_items.append(("Settings", partial(self.open_new_dialog, self.settings)))
|
||||
menu_items.append(("About", partial(self.open_new_dialog, self.about)))
|
||||
menu_items.append(("Close", self.app.quit))
|
||||
|
||||
if self.config.flip_menu:
|
||||
menu_items.reverse()
|
||||
|
||||
seps = 0
|
||||
for item in menu_items:
|
||||
if item[0] == 1:
|
||||
self.menu.addSeparator()
|
||||
seps += 1
|
||||
continue
|
||||
action = self.menu.addAction(item[0])
|
||||
if item[0] == self.active_task and seps <= 2:
|
||||
action.setIcon(get_icon("go-next"))
|
||||
action.triggered.connect(item[1])
|
||||
|
||||
def sigterm_handler(self, signo, _frame):
|
||||
logger.debug(f'handling signal "{signal.strsignal(signo)}"')
|
||||
self.app.quit()
|
||||
|
||||
def run(self):
|
||||
timer = QtCore.QTimer(None)
|
||||
# interrupt event loop regularly for signal handling
|
||||
timer.timeout.connect(lambda: None)
|
||||
timer.start(500)
|
||||
signal.signal(signal.SIGTERM, self.sigterm_handler)
|
||||
signal.signal(signal.SIGINT, self.sigterm_handler)
|
||||
if PYSIDE_6:
|
||||
self.app.exec()
|
||||
else:
|
||||
self.app.exec_()
|
||||
|
||||
|
||||
def init_logging():
|
||||
log_dir_path = Path(QtCore.QStandardPaths.writableLocation(QtCore.QStandardPaths.AppDataLocation)) / "logs"
|
||||
logger.add(log_dir_path / "fime_{time:YYYY-MM-DD}.log", rotation="1d", retention="30d", compression="zip", level="DEBUG")
|
||||
|
||||
|
||||
def excepthook(e_type, e_value, tb_obj):
|
||||
if e_type is FimeException:
|
||||
QtWidgets.QMessageBox.critical(None, "Error", str(e_value), QtWidgets.QMessageBox.Ok)
|
||||
elif issubclass(e_type, KeyboardInterrupt):
|
||||
sys.__excepthook__(e_type, e_value, tb_obj)
|
||||
else:
|
||||
logger.critical("Unhandled exception", exc_info=(e_type, e_value, tb_obj))
|
||||
sys.__excepthook__(e_type, e_value, tb_obj)
|
||||
|
||||
|
||||
def main():
|
||||
# important for QStandardPath to be correct
|
||||
QtCore.QCoreApplication.setApplicationName("fime")
|
||||
init_logging()
|
||||
if PYSIDE_6:
|
||||
logger.info("using PySide6 / Qt6")
|
||||
else:
|
||||
logger.info("using PySide2 / Qt5")
|
||||
# also catches exceptions in other threads
|
||||
sys.excepthook = excepthook
|
||||
app = App()
|
||||
app.run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@ -1,119 +0,0 @@
|
||||
try:
|
||||
from PySide6 import QtCore, QtGui, QtWidgets
|
||||
except ImportError:
|
||||
from PySide2 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class ProgressIndicator(QtWidgets.QWidget):
|
||||
m_angle = None
|
||||
m_timerId = None
|
||||
m_delay = None
|
||||
m_displayedWhenStopped = None
|
||||
m_color = None
|
||||
|
||||
def __init__(self, parent):
|
||||
# Call parent class constructor first
|
||||
super().__init__(parent)
|
||||
|
||||
# Initialize Qt Properties
|
||||
self.setProperties()
|
||||
|
||||
# Intialize instance variables
|
||||
self.m_angle = 0
|
||||
self.m_timerId = -1
|
||||
self.m_delay = 40
|
||||
self.m_displayedWhenStopped = False
|
||||
self.m_color = QtCore.Qt.black
|
||||
|
||||
# Set size and focus policy
|
||||
self.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
|
||||
self.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
|
||||
# Show the widget
|
||||
self.show()
|
||||
|
||||
def animationDelay(self):
|
||||
return self.delay
|
||||
|
||||
def isAnimated(self):
|
||||
return (self.m_timerId != -1)
|
||||
|
||||
def isDisplayedWhenStopped(self):
|
||||
return self.m_displayedWhenStopped
|
||||
|
||||
def getColor(self):
|
||||
return self.color
|
||||
|
||||
def sizeHint(self):
|
||||
return QtCore.QSize(20, 20)
|
||||
|
||||
def startAnimation(self):
|
||||
self.m_angle = 0
|
||||
|
||||
if self.m_timerId == -1:
|
||||
self.m_timerId = self.startTimer(self.m_delay)
|
||||
|
||||
def stopAnimation(self):
|
||||
if self.m_timerId != -1:
|
||||
self.killTimer(self.m_timerId)
|
||||
|
||||
self.m_timerId = -1
|
||||
self.update()
|
||||
|
||||
def setAnimationDelay(self, delay):
|
||||
if self.m_timerId != -1:
|
||||
self.killTimer(self.m_timerId)
|
||||
|
||||
self.m_delay = delay
|
||||
|
||||
if self.m_timerId != -1:
|
||||
self.m_timerId = self.startTimer(self.m_delay)
|
||||
|
||||
def setDisplayedWhenStopped(self, state):
|
||||
self.m_displayedWhenStopped = state
|
||||
self.update()
|
||||
|
||||
def setColor(self, color):
|
||||
self.m_color = color
|
||||
self.update()
|
||||
|
||||
def timerEvent(self, event):
|
||||
self.m_angle = (self.m_angle + 30) % 360
|
||||
self.update()
|
||||
|
||||
def paintEvent(self, event):
|
||||
if (not self.m_displayedWhenStopped) and (not self.isAnimated()):
|
||||
return
|
||||
|
||||
width = min(self.width(), self.height())
|
||||
|
||||
painter = QtGui.QPainter(self)
|
||||
painter.setRenderHint(QtGui.QPainter.Antialiasing)
|
||||
|
||||
outerRadius = (width - 1) * 0.5
|
||||
innerRadius = (width - 1) * 0.5 * 0.38
|
||||
|
||||
capsuleHeight = outerRadius - innerRadius
|
||||
capsuleWidth = capsuleHeight * .23 if (width > 32) else capsuleHeight * .35
|
||||
capsuleRadius = capsuleWidth / 2
|
||||
|
||||
color = QtGui.QColor(self.m_color)
|
||||
for i in range(0, 12):
|
||||
if self.isAnimated():
|
||||
color.setAlphaF(1.0 - (i / 12.0))
|
||||
else:
|
||||
color.setAlphaF(0.2)
|
||||
|
||||
painter.setPen(QtCore.Qt.NoPen)
|
||||
painter.setBrush(color)
|
||||
painter.save()
|
||||
painter.translate(self.rect().center())
|
||||
painter.rotate(self.m_angle - (i * 30.0))
|
||||
painter.drawRoundedRect(capsuleWidth * -0.5, (innerRadius + capsuleHeight) * -1, capsuleWidth,
|
||||
capsuleHeight, capsuleRadius, capsuleRadius)
|
||||
painter.restore()
|
||||
|
||||
def setProperties(self):
|
||||
self.delay = QtCore.Property(int, self.animationDelay, self.setAnimationDelay)
|
||||
self.displayedWhenStopped = QtCore.Property(bool, self.isDisplayedWhenStopped, self.setDisplayedWhenStopped)
|
||||
self.color = QtCore.Property(QtGui.QColor, self.getColor, self.setColor)
|
@ -1,233 +0,0 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from loguru import logger
|
||||
|
||||
try:
|
||||
from PySide6 import QtCore, QtGui, QtWidgets
|
||||
except ImportError:
|
||||
from PySide2 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from datetime import datetime, date
|
||||
|
||||
from fime.data import Tasks, Report
|
||||
from fime.util import get_screen_height, get_icon, EditStartedDetector
|
||||
|
||||
|
||||
class ReportDialog(QtWidgets.QDialog):
|
||||
class TaskItemCompleter(EditStartedDetector):
|
||||
def __init__(self, tasks: Tasks, parent=None):
|
||||
super().__init__(parent)
|
||||
self._tasks = tasks
|
||||
|
||||
def createEditor(self, parent, option, index):
|
||||
editor = super().createEditor(parent, option, index)
|
||||
completer = QtWidgets.QCompleter(self._tasks.all_tasks, parent)
|
||||
completer.setFilterMode(QtCore.Qt.MatchFlag.MatchContains)
|
||||
completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
|
||||
editor.setCompleter(completer)
|
||||
return editor
|
||||
|
||||
def __init__(self, tasks: Tasks, report: Report, parent, *args, **kwargs):
|
||||
super().__init__(parent, *args, **kwargs)
|
||||
self._report = report
|
||||
self._report_data: Optional[List[List[str]]] = None
|
||||
self._changing_items = False
|
||||
self._new_log_task = ""
|
||||
self._new_log_pos = -1
|
||||
self._edit_len = -1
|
||||
|
||||
self.setWindowTitle("Report")
|
||||
|
||||
self.tableWidget = QtWidgets.QTableWidget()
|
||||
self.tableWidget.verticalHeader().hide()
|
||||
self.tableWidget.setColumnCount(3)
|
||||
self.tableWidget.setHorizontalHeaderLabels(["Task", "Start time", "Duration"])
|
||||
self.tableWidget.cellChanged.connect(self.cell_changed)
|
||||
taskItemCompleter = ReportDialog.TaskItemCompleter(tasks, self)
|
||||
taskItemCompleter.editStarted.connect(self.disable_buttons)
|
||||
taskItemCompleter.editFinished.connect(self.enable_buttons)
|
||||
self.tableWidget.setItemDelegateForColumn(0, taskItemCompleter)
|
||||
editStartedDetector = EditStartedDetector(self)
|
||||
editStartedDetector.editStarted.connect(self.disable_buttons)
|
||||
editStartedDetector.editFinished.connect(self.enable_buttons)
|
||||
self.tableWidget.setItemDelegateForColumn(1, editStartedDetector)
|
||||
self.header = QtWidgets.QHeaderView(QtCore.Qt.Orientation.Horizontal)
|
||||
self.header.setMinimumSectionSize(1)
|
||||
self.header.setSectionResizeMode(QtWidgets.QHeaderView.ResizeToContents)
|
||||
self.tableWidget.setHorizontalHeader(self.header)
|
||||
self.header.setSectionResizeMode(self.header.logicalIndex(0), QtWidgets.QHeaderView.Stretch)
|
||||
|
||||
self.previous_button = QtWidgets.QPushButton()
|
||||
self.previous_button.setText("Previous")
|
||||
self.previous_button.setIcon(get_icon("arrow-left"))
|
||||
self.previous_button.pressed.connect(self.previous)
|
||||
self.previous_button.setAutoDefault(False)
|
||||
|
||||
self.next_button = QtWidgets.QPushButton()
|
||||
self.next_button.setText("Next")
|
||||
self.next_button.setIcon(get_icon("arrow-right"))
|
||||
self.next_button.pressed.connect(self.next)
|
||||
self.next_button.setAutoDefault(False)
|
||||
|
||||
self.new_button = QtWidgets.QPushButton()
|
||||
self.new_button.setText("New item")
|
||||
self.new_button.setIcon(get_icon("list-add"))
|
||||
self.new_button.pressed.connect(self.new_log)
|
||||
self.new_button.setAutoDefault(False)
|
||||
|
||||
self.del_button = QtWidgets.QPushButton()
|
||||
self.del_button.setText("Delete item")
|
||||
self.del_button.setIcon(get_icon("list-remove"))
|
||||
self.del_button.pressed.connect(self.del_log)
|
||||
self.del_button.setAutoDefault(False)
|
||||
|
||||
self.ok_button = QtWidgets.QPushButton()
|
||||
self.ok_button.setText("OK")
|
||||
self.ok_button.setIcon(get_icon("dialog-ok"))
|
||||
self.ok_button.pressed.connect(self._accept)
|
||||
self.ok_button.setAutoDefault(True)
|
||||
|
||||
blayout = QtWidgets.QHBoxLayout()
|
||||
blayout.addWidget(self.previous_button)
|
||||
blayout.addWidget(self.next_button)
|
||||
blayout.addWidget(self.new_button)
|
||||
blayout.addWidget(self.del_button)
|
||||
blayout.addWidget(self.ok_button)
|
||||
|
||||
layout = QtWidgets.QVBoxLayout(self)
|
||||
layout.addWidget(self.tableWidget)
|
||||
layout.addLayout(blayout)
|
||||
self.setLayout(layout)
|
||||
|
||||
def showEvent(self, _):
|
||||
self._report.date = date.today()
|
||||
self.update_title()
|
||||
self.refresh_table()
|
||||
self.update_prev_next()
|
||||
self.raise_()
|
||||
|
||||
def save(self):
|
||||
self._report.save(self._report_data)
|
||||
|
||||
def update_title(self):
|
||||
self.setWindowTitle(f"Report {self._report.date_str()}")
|
||||
|
||||
def refresh_table(self):
|
||||
self._report_data, self._edit_len = self._report.report()
|
||||
self.tableWidget.setRowCount(len(self._report_data))
|
||||
|
||||
self._changing_items = True
|
||||
for row, _ in enumerate(self._report_data):
|
||||
item0 = QtWidgets.QTableWidgetItem(self._report_data[row][0])
|
||||
self.tableWidget.setItem(row, 0, item0)
|
||||
item1 = QtWidgets.QTableWidgetItem(self._report_data[row][1])
|
||||
self.tableWidget.setItem(row, 1, item1)
|
||||
item2 = QtWidgets.QTableWidgetItem(self._report_data[row][2])
|
||||
self.tableWidget.setItem(row, 2, item2)
|
||||
item2.setFlags(item2.flags() & QtCore.Qt.ItemIsEnabled)
|
||||
if row >= self._edit_len:
|
||||
item0.setFlags(item1.flags() & QtCore.Qt.ItemIsEnabled)
|
||||
if row > self._edit_len:
|
||||
item1.setFlags(item0.flags() & QtCore.Qt.ItemIsEnabled)
|
||||
self._changing_items = False
|
||||
|
||||
self.tableWidget.resizeColumnToContents(0)
|
||||
|
||||
if self.tableWidget.rowCount() > 4:
|
||||
self.tableWidget.setMinimumHeight(
|
||||
min(
|
||||
(self.tableWidget.rowCount()) * self.tableWidget.rowHeight(0) + self.header.height() + 4,
|
||||
get_screen_height(self.tableWidget) * 0.8
|
||||
)
|
||||
)
|
||||
|
||||
def update_prev_next(self):
|
||||
prev, next_ = self._report.prev_next_avail()
|
||||
self.previous_button.setEnabled(prev)
|
||||
self.next_button.setEnabled(next_)
|
||||
|
||||
@QtCore.Slot()
|
||||
def del_log(self):
|
||||
row = self.tableWidget.currentRow()
|
||||
if row > len(self._report_data) - 4:
|
||||
return
|
||||
del self._report_data[row]
|
||||
self.save()
|
||||
self.refresh_table()
|
||||
|
||||
@QtCore.Slot()
|
||||
def new_log(self):
|
||||
after = min(self.tableWidget.currentItem().row(), self._edit_len-1) + 1
|
||||
self._new_log_pos = after
|
||||
self.tableWidget.insertRow(after)
|
||||
self.tableWidget.setCurrentCell(after, 0)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self._changing_items = True
|
||||
self.tableWidget.setItem(after, 0, item)
|
||||
self._changing_items = False
|
||||
self.tableWidget.editItem(item)
|
||||
|
||||
@QtCore.Slot()
|
||||
def disable_buttons(self):
|
||||
self.previous_button.setEnabled(False)
|
||||
self.next_button.setEnabled(False)
|
||||
self.del_button.setEnabled(False)
|
||||
self.new_button.setEnabled(False)
|
||||
self.ok_button.setEnabled(False)
|
||||
|
||||
@QtCore.Slot()
|
||||
def enable_buttons(self):
|
||||
self.del_button.setEnabled(True)
|
||||
self.new_button.setEnabled(True)
|
||||
self.ok_button.setEnabled(True)
|
||||
self.update_prev_next()
|
||||
|
||||
@QtCore.Slot()
|
||||
def _accept(self):
|
||||
self.save()
|
||||
self.accept()
|
||||
|
||||
@QtCore.Slot()
|
||||
def previous(self):
|
||||
self.save()
|
||||
self._report.previous()
|
||||
self.update_title()
|
||||
self.refresh_table()
|
||||
self.update_prev_next()
|
||||
|
||||
@QtCore.Slot()
|
||||
def next(self):
|
||||
self.save()
|
||||
self._report.next()
|
||||
self.update_title()
|
||||
self.refresh_table()
|
||||
self.update_prev_next()
|
||||
|
||||
@QtCore.Slot()
|
||||
def cell_changed(self, row, column):
|
||||
if self._changing_items:
|
||||
return
|
||||
if column == 2:
|
||||
self.tableWidget.item(row, column).setText(self._report_data[row][column])
|
||||
return
|
||||
item = self.tableWidget.item(row, column)
|
||||
if column == 0:
|
||||
if self._new_log_pos == row:
|
||||
self._new_log_task = self.tableWidget.item(row, column).text() or "Unnamed"
|
||||
return
|
||||
else:
|
||||
self._report_data[row][column] = item.text() or "Unnamed"
|
||||
if column == 1:
|
||||
try:
|
||||
new_time = datetime.strptime(item.text(), "%H:%M").time()
|
||||
except ValueError:
|
||||
item.setText(self._report_data[row][column])
|
||||
return
|
||||
if self._new_log_pos == row:
|
||||
self._report_data.insert(row, [self._new_log_task, new_time.strftime("%H:%M"), ""])
|
||||
else:
|
||||
self._report_data[row][column] = new_time.strftime("%H:%M")
|
||||
self._new_log_pos = -1
|
||||
self._new_log_task = ""
|
||||
self.save()
|
||||
self.refresh_table()
|
@ -1,144 +0,0 @@
|
||||
from fime.util import get_icon
|
||||
|
||||
try:
|
||||
from PySide6 import QtCore, QtGui, QtWidgets
|
||||
except ImportError:
|
||||
from PySide2 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from fime.config import Config, AuthMethods, Browsers
|
||||
|
||||
AUTH_METHODS_PRESENTATION = {
|
||||
AuthMethods.TOKEN: "Jira Access Token",
|
||||
AuthMethods.COOKIES: "Browser Cookies",
|
||||
}
|
||||
|
||||
AUTH_METHODS_VALUE = {v: k for k, v in AUTH_METHODS_PRESENTATION.items()}
|
||||
|
||||
class Settings(QtWidgets.QDialog):
|
||||
def __init__(self, config: Config, parent, *args, **kwargs):
|
||||
super().__init__(parent, *args, **kwargs)
|
||||
self.setWindowTitle("Settings")
|
||||
|
||||
self.config = config
|
||||
|
||||
caption_label = QtWidgets.QLabel()
|
||||
caption_label.setText("Settings")
|
||||
caption_label.setAlignment(QtCore.Qt.AlignHCenter)
|
||||
|
||||
settings_layout = QtWidgets.QGridLayout()
|
||||
|
||||
jira_url_label = QtWidgets.QLabel()
|
||||
jira_url_label.setText("Jira URL")
|
||||
settings_layout.addWidget(jira_url_label, 0, 0)
|
||||
self.jira_url_edit = QtWidgets.QLineEdit()
|
||||
settings_layout.addWidget(self.jira_url_edit, 0, 1)
|
||||
|
||||
auth_method_label = QtWidgets.QLabel()
|
||||
auth_method_label.setText("Authentication method")
|
||||
settings_layout.addWidget(auth_method_label, 1, 0)
|
||||
self.auth_method_combo_box = QtWidgets.QComboBox()
|
||||
for am in AuthMethods:
|
||||
self.auth_method_combo_box.addItem(AUTH_METHODS_PRESENTATION[am])
|
||||
self.auth_method_combo_box.currentTextChanged.connect(self._auth_method_update)
|
||||
settings_layout.addWidget(self.auth_method_combo_box, 1, 1, QtCore.Qt.AlignRight)
|
||||
|
||||
self.jira_token_label = QtWidgets.QLabel()
|
||||
self.jira_token_label.setText("Jira Personal Access Token<br/> see <a href='https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html#UsingPersonalAccessTokens-CreatingPATsinapplication'>here</a> for how to get one")
|
||||
self.jira_token_label.setTextFormat(QtCore.Qt.RichText)
|
||||
self.jira_token_label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
|
||||
self.jira_token_label.setOpenExternalLinks(True)
|
||||
settings_layout.addWidget(self.jira_token_label, 2, 0)
|
||||
self.jira_token_edit = QtWidgets.QLineEdit()
|
||||
settings_layout.addWidget(self.jira_token_edit, 2, 1)
|
||||
|
||||
self.cookie_source_label = QtWidgets.QLabel()
|
||||
self.cookie_source_label.setText("Cookie source browser")
|
||||
settings_layout.addWidget(self.cookie_source_label, 2, 0)
|
||||
self.cookie_source_combo_box = QtWidgets.QComboBox()
|
||||
for b in Browsers:
|
||||
self.cookie_source_combo_box.addItem(b.capitalize())
|
||||
settings_layout.addWidget(self.cookie_source_combo_box, 2, 1, QtCore.Qt.AlignRight)
|
||||
|
||||
tray_theme_label = QtWidgets.QLabel()
|
||||
tray_theme_label.setText("Tray theme")
|
||||
settings_layout.addWidget(tray_theme_label, 3, 0)
|
||||
self.tray_theme_combo_box = QtWidgets.QComboBox()
|
||||
self.tray_theme_combo_box.addItem("Light")
|
||||
self.tray_theme_combo_box.addItem("Dark")
|
||||
settings_layout.addWidget(self.tray_theme_combo_box, 3, 1, QtCore.Qt.AlignRight)
|
||||
|
||||
flip_menu_label = QtWidgets.QLabel()
|
||||
flip_menu_label.setText("Flip menu")
|
||||
settings_layout.addWidget(flip_menu_label, 4, 0)
|
||||
self.flip_menu_check_box = QtWidgets.QCheckBox()
|
||||
settings_layout.addWidget(self.flip_menu_check_box, 4, 1, QtCore.Qt.AlignRight)
|
||||
|
||||
import_auto_change_task_label = QtWidgets.QLabel()
|
||||
import_auto_change_task_label.setText("Automatically select task as active task\nafter task import")
|
||||
settings_layout.addWidget(import_auto_change_task_label, 5, 0)
|
||||
self.import_auto_change_task_check_box = QtWidgets.QCheckBox()
|
||||
settings_layout.addWidget(self.import_auto_change_task_check_box, 5, 1, QtCore.Qt.AlignRight)
|
||||
|
||||
self.ok_button = QtWidgets.QPushButton()
|
||||
self.ok_button.setText("OK")
|
||||
self.ok_button.setIcon(get_icon("dialog-ok"))
|
||||
self.ok_button.pressed.connect(self.accept)
|
||||
self.ok_button.setAutoDefault(True)
|
||||
|
||||
button_layout = QtWidgets.QHBoxLayout()
|
||||
button_layout.addStretch(66)
|
||||
button_layout.addWidget(self.ok_button, 33)
|
||||
|
||||
layout = QtWidgets.QVBoxLayout()
|
||||
layout.addWidget(caption_label)
|
||||
layout.addLayout(settings_layout)
|
||||
layout.addLayout(button_layout)
|
||||
|
||||
self.setLayout(layout)
|
||||
self.resize(500, 0)
|
||||
self.accepted.connect(self._accepted)
|
||||
|
||||
def showEvent(self, _):
|
||||
self.jira_url_edit.setText(self.config.jira_url)
|
||||
self.auth_method_combo_box.setCurrentText(AUTH_METHODS_PRESENTATION[self.config.auth_mode])
|
||||
self.jira_token_edit.setText(self.config.jira_token)
|
||||
self.cookie_source_combo_box.setCurrentText(self.config.cookie_source.capitalize())
|
||||
self.tray_theme_combo_box.setCurrentText(self.config.tray_theme.capitalize())
|
||||
self.flip_menu_check_box.setChecked(self.config.flip_menu)
|
||||
self.import_auto_change_task_check_box.setChecked(self.config.import_auto_change_task)
|
||||
self._auth_method_update()
|
||||
|
||||
def _accepted(self):
|
||||
self.config.jira_url = self.jira_url_edit.text()
|
||||
self.config.auth_mode = AUTH_METHODS_VALUE[self.auth_method_combo_box.currentText()]
|
||||
self.config.jira_token = self.jira_token_edit.text()
|
||||
self.config.cookie_source = Browsers(self.cookie_source_combo_box.currentText().lower())
|
||||
self.config.tray_theme = self.tray_theme_combo_box.currentText()
|
||||
self.config.flip_menu = self.flip_menu_check_box.isChecked()
|
||||
self.config.import_auto_change_task = self.import_auto_change_task_check_box.isChecked()
|
||||
self.config.save()
|
||||
|
||||
def _auth_method_update(self):
|
||||
match AUTH_METHODS_VALUE[self.auth_method_combo_box.currentText()]:
|
||||
case AuthMethods.TOKEN:
|
||||
self.jira_token_label.show()
|
||||
self.jira_token_edit.show()
|
||||
self.cookie_source_label.hide()
|
||||
self.cookie_source_combo_box.hide()
|
||||
case AuthMethods.COOKIES:
|
||||
self.jira_token_label.hide()
|
||||
self.jira_token_edit.hide()
|
||||
self.cookie_source_label.show()
|
||||
self.cookie_source_combo_box.show()
|
||||
case _:
|
||||
raise AssertionError("unhandled auth method")
|
||||
|
||||
|
||||
# only for dev/debug
|
||||
if __name__ == "__main__":
|
||||
QtCore.QCoreApplication.setApplicationName("fime")
|
||||
app = QtWidgets.QApplication()
|
||||
cfg = Config()
|
||||
settings = Settings(cfg, None)
|
||||
settings.show()
|
||||
app.exec()
|
@ -1,182 +0,0 @@
|
||||
import os
|
||||
import re
|
||||
import threading
|
||||
from enum import Enum, auto
|
||||
from functools import reduce, partial
|
||||
from queue import Queue, Empty
|
||||
|
||||
from loguru import logger
|
||||
from requests import Response
|
||||
|
||||
from fime.util import add_auth
|
||||
|
||||
try:
|
||||
from PySide6 import QtCore, QtWidgets
|
||||
except ImportError:
|
||||
from PySide2 import QtCore, QtWidgets
|
||||
from requests_futures.sessions import FuturesSession
|
||||
|
||||
from fime.config import Config
|
||||
|
||||
|
||||
class TaskCompleter(QtWidgets.QCompleter):
|
||||
class RifState(Enum):
|
||||
RUNNING = auto()
|
||||
STOPPED = auto()
|
||||
|
||||
running = QtCore.Signal()
|
||||
stopped = QtCore.Signal()
|
||||
|
||||
def __init__(self, config: Config, parent=None, *args, **kwargs):
|
||||
super().__init__([], parent, *args, **kwargs)
|
||||
self.setFilterMode(QtCore.Qt.MatchFlag.MatchContains)
|
||||
self.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
|
||||
self.session = FuturesSession()
|
||||
self.session.headers["Accept"] = "application/json"
|
||||
self.config = config
|
||||
self.picker_url = None
|
||||
self.search_url = None
|
||||
self.issue_url_tmpl = None
|
||||
self.issue_key_regex = re.compile(r"^[a-zA-Z0-9]+-[0-9]+")
|
||||
self.update()
|
||||
self.text = ""
|
||||
self.response_text = ""
|
||||
self.model_data = set()
|
||||
self.escalate = False
|
||||
self.update_timer = QtCore.QTimer(self)
|
||||
self.update_timer.timeout.connect(self.process_response)
|
||||
self.update_timer.setInterval(200)
|
||||
self.queue = Queue()
|
||||
# Request In Flight
|
||||
self.rif_counter = 0
|
||||
self.rif_counter_lock = threading.Lock()
|
||||
self.last_rif_state = TaskCompleter.RifState.STOPPED
|
||||
|
||||
def update(self):
|
||||
self.picker_url = os.path.join(self.config.jira_url, "rest/api/2/issue/picker")
|
||||
self.search_url = os.path.join(self.config.jira_url, "rest/api/2/search")
|
||||
self.issue_url_tmpl = os.path.join(self.config.jira_url, "rest/api/2/issue/{}")
|
||||
self.session = FuturesSession()
|
||||
add_auth(self.config, self.session)
|
||||
|
||||
@QtCore.Slot()
|
||||
def process_response(self):
|
||||
with self.rif_counter_lock:
|
||||
if self.last_rif_state is TaskCompleter.RifState.STOPPED and self.rif_counter != 0:
|
||||
self.last_rif_state = TaskCompleter.RifState.RUNNING
|
||||
self.running.emit()
|
||||
if self.last_rif_state is TaskCompleter.RifState.RUNNING and self.rif_counter == 0:
|
||||
self.last_rif_state = TaskCompleter.RifState.STOPPED
|
||||
self.stopped.emit()
|
||||
try:
|
||||
while not self.queue.empty():
|
||||
result_dict = self.queue.get_nowait()
|
||||
if result_dict["response_text"] == self.text:
|
||||
if self.text == self.response_text:
|
||||
self.response_text = result_dict["response_text"]
|
||||
self.model_data = set(result_dict["result"])
|
||||
else:
|
||||
self.model_data = self.model_data.union(set(result_dict["result"]))
|
||||
self.model().setStringList(self.model_data)
|
||||
self.complete()
|
||||
except Empty:
|
||||
return
|
||||
|
||||
@QtCore.Slot(str)
|
||||
def update_picker(self, text):
|
||||
self.text = text
|
||||
if self.text == self.currentCompletion():
|
||||
# do not update, after auto-completion was used
|
||||
return
|
||||
if self.escalate:
|
||||
self.update_search()
|
||||
self.update_issue()
|
||||
if not self.update_timer.isActive():
|
||||
self.update_timer.start()
|
||||
future = self.session.get(
|
||||
url=self.picker_url,
|
||||
params={
|
||||
"query": self.text
|
||||
},
|
||||
)
|
||||
with self.rif_counter_lock:
|
||||
self.rif_counter += 1
|
||||
future.add_done_callback(partial(self.picker_response_callback, self.text))
|
||||
|
||||
def picker_response_callback(self, text, future):
|
||||
with self.rif_counter_lock:
|
||||
self.rif_counter -= 1
|
||||
try:
|
||||
result = future.result()
|
||||
issues = reduce(lambda x, y: x + (y["issues"]), result.json()["sections"], [])
|
||||
extracted = list(map(lambda x: f"{x['key']} {x['summaryText']}", issues))
|
||||
if extracted:
|
||||
self.queue.put({
|
||||
"response_text": text,
|
||||
"result": extracted,
|
||||
})
|
||||
else:
|
||||
if not self.escalate:
|
||||
logger.debug("No picker results. Escalating")
|
||||
self.escalate = True
|
||||
self.update_search()
|
||||
self.update_issue()
|
||||
except Exception:
|
||||
logger.exception("Ignoring exception, as it only breaks autocompletion")
|
||||
return
|
||||
|
||||
def update_search(self):
|
||||
for jql in [f"text = {self.text}", f"key = {self.text}"]:
|
||||
future = self.session.get(
|
||||
url=self.search_url,
|
||||
params={
|
||||
"jql": jql,
|
||||
"maxResults": 10,
|
||||
"fields": "key,summary",
|
||||
},
|
||||
)
|
||||
with self.rif_counter_lock:
|
||||
self.rif_counter += 1
|
||||
future.add_done_callback(partial(self.search_response_callback, self.text))
|
||||
|
||||
def search_response_callback(self, text, future):
|
||||
with self.rif_counter_lock:
|
||||
self.rif_counter -= 1
|
||||
try:
|
||||
result = future.result()
|
||||
json_result = result.json()
|
||||
if "issues" in json_result:
|
||||
extracted = list(map(lambda x: f"{x['key']} {x['fields']['summary']}", json_result["issues"]))
|
||||
self.queue.put({
|
||||
"response_text": text,
|
||||
"result": extracted,
|
||||
})
|
||||
except Exception:
|
||||
logger.exception("Ignoring exception, as it only breaks autocompletion")
|
||||
return
|
||||
|
||||
def update_issue(self):
|
||||
stripped = self.text.strip()
|
||||
if not self.issue_key_regex.match(stripped):
|
||||
return
|
||||
future = self.session.get(self.issue_url_tmpl.format(stripped.upper()))
|
||||
with self.rif_counter_lock:
|
||||
self.rif_counter += 1
|
||||
future.add_done_callback(partial(self.issue_response_callback, self.text))
|
||||
|
||||
def issue_response_callback(self, text: str, future):
|
||||
with self.rif_counter_lock:
|
||||
self.rif_counter -= 1
|
||||
try:
|
||||
resp: Response = future.result()
|
||||
if resp.status_code < 199 or resp.status_code >= 300:
|
||||
return
|
||||
json_result = resp.json()
|
||||
extracted = f'{text.strip().upper()} {json_result["fields"]["summary"]}'
|
||||
self.queue.put({
|
||||
"response_text": text,
|
||||
"result": extracted,
|
||||
})
|
||||
except Exception:
|
||||
logger.exception("Ignoring exception, as it only breaks autocompletion")
|
||||
return
|
@ -1,90 +0,0 @@
|
||||
try:
|
||||
from PySide6 import QtCore, QtGui, QtWidgets
|
||||
except ImportError:
|
||||
from PySide2 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from fime.data import Tasks
|
||||
from fime.util import get_icon, EditStartedDetector
|
||||
|
||||
|
||||
class TaskEdit(QtWidgets.QDialog):
|
||||
def __init__(self, tasks: Tasks, parent, *args, **kwargs):
|
||||
super().__init__(parent, *args, **kwargs)
|
||||
self._task_data = tasks
|
||||
|
||||
self.setWindowTitle("Edit Tasks")
|
||||
self.list = QtCore.QStringListModel()
|
||||
|
||||
self.tableView = QtWidgets.QTableView()
|
||||
self.tableView.setModel(self.list)
|
||||
self.tableView.horizontalHeader().setStretchLastSection(True)
|
||||
self.tableView.horizontalHeader().hide()
|
||||
self.tableView.verticalHeader().hide()
|
||||
editStartedDetector = EditStartedDetector(self)
|
||||
editStartedDetector.editStarted.connect(self.disable_buttons)
|
||||
editStartedDetector.editFinished.connect(self.enable_buttons)
|
||||
self.tableView.setItemDelegate(editStartedDetector)
|
||||
|
||||
self.new_button = QtWidgets.QPushButton()
|
||||
self.new_button.setText("New item")
|
||||
self.new_button.setIcon(get_icon("list-add"))
|
||||
self.new_button.pressed.connect(self.new_task)
|
||||
self.new_button.setAutoDefault(False)
|
||||
|
||||
self.del_button = QtWidgets.QPushButton()
|
||||
self.del_button.setText("Delete item")
|
||||
self.del_button.setIcon(get_icon("list-remove"))
|
||||
self.del_button.pressed.connect(self.del_task)
|
||||
self.del_button.setAutoDefault(False)
|
||||
|
||||
self.ok_button = QtWidgets.QPushButton()
|
||||
self.ok_button.setText("OK")
|
||||
self.ok_button.setIcon(get_icon("dialog-ok"))
|
||||
self.ok_button.pressed.connect(self.accept)
|
||||
self.ok_button.setAutoDefault(True)
|
||||
|
||||
blayout = QtWidgets.QHBoxLayout()
|
||||
blayout.addWidget(self.new_button)
|
||||
blayout.addWidget(self.del_button)
|
||||
blayout.addWidget(self.ok_button)
|
||||
|
||||
layout = QtWidgets.QVBoxLayout()
|
||||
layout.addWidget(self.tableView)
|
||||
layout.addLayout(blayout)
|
||||
self.setLayout(layout)
|
||||
|
||||
@QtCore.Slot()
|
||||
def disable_buttons(self):
|
||||
self.del_button.setEnabled(False)
|
||||
self.new_button.setEnabled(False)
|
||||
self.ok_button.setEnabled(False)
|
||||
|
||||
@QtCore.Slot()
|
||||
def enable_buttons(self):
|
||||
self.del_button.setEnabled(True)
|
||||
self.new_button.setEnabled(True)
|
||||
self.ok_button.setEnabled(True)
|
||||
|
||||
@QtCore.Slot()
|
||||
def new_task(self):
|
||||
l = self.list.stringList()
|
||||
l.append("")
|
||||
self.list.setStringList(l)
|
||||
i = self.list.index(len(l)-1)
|
||||
self.tableView.setCurrentIndex(i)
|
||||
self.tableView.edit(i)
|
||||
|
||||
@QtCore.Slot()
|
||||
def del_task(self):
|
||||
l = self.list.stringList()
|
||||
del l[self.tableView.currentIndex().row()]
|
||||
self.list.setStringList(l)
|
||||
|
||||
@property
|
||||
def tasks(self):
|
||||
ret = self.list.stringList()
|
||||
return list(filter(None, ret)) # filter empty strings
|
||||
|
||||
def showEvent(self, _):
|
||||
self.list.setStringList(self._task_data.tasks)
|
||||
self.raise_()
|
@ -1,82 +0,0 @@
|
||||
import enum
|
||||
|
||||
import browser_cookie3
|
||||
from loguru import logger
|
||||
from requests import Session
|
||||
|
||||
from fime.config import Config, AuthMethods, Browsers
|
||||
|
||||
try:
|
||||
from PySide6 import QtCore, QtGui, QtWidgets
|
||||
except ImportError:
|
||||
from PySide2 import QtCore, QtGui, QtWidgets
|
||||
|
||||
# noinspection PyUnresolvedReferences
|
||||
import fime.icons
|
||||
|
||||
|
||||
def get_screen_height(qobject):
|
||||
if hasattr(qobject, "screen"):
|
||||
return qobject.screen().size().height()
|
||||
else:
|
||||
logger.info("unable to detect screen height falling back to default value of 1080")
|
||||
return 1080
|
||||
|
||||
|
||||
def get_screen_width(qobject):
|
||||
if hasattr(qobject, "screen"):
|
||||
return qobject.screen().size().width()
|
||||
else:
|
||||
logger.info("unable to detect screen width falling back to default value of 1920")
|
||||
return 1920
|
||||
|
||||
|
||||
def get_icon(icon_name):
|
||||
theme_name = icon_name.replace("-light", "") # respect system theme
|
||||
fallback = QtGui.QIcon(f":/icons/{icon_name}").pixmap(256, 256)
|
||||
return QtGui.QIcon.fromTheme(theme_name, fallback)
|
||||
|
||||
|
||||
class EditStartedDetector(QtWidgets.QStyledItemDelegate):
|
||||
editStarted = QtCore.Signal()
|
||||
editFinished = QtCore.Signal()
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
|
||||
def createEditor(self, parent, option, index):
|
||||
editor = super().createEditor(parent, option, index)
|
||||
editor.editingFinished.connect(self.editFinished)
|
||||
self.editStarted.emit()
|
||||
return editor
|
||||
|
||||
|
||||
class Status(enum.Enum):
|
||||
PROGRESS = enum.auto()
|
||||
OK = enum.auto()
|
||||
ERROR = enum.auto()
|
||||
|
||||
|
||||
def add_auth(config: Config, session: Session):
|
||||
match config.auth_mode:
|
||||
case AuthMethods.TOKEN:
|
||||
session.headers["Authorization"] = f"Bearer {config.jira_token}"
|
||||
case AuthMethods.COOKIES:
|
||||
match config.cookie_source:
|
||||
case Browsers.AUTO:
|
||||
cookie_jar = browser_cookie3.load()
|
||||
case Browsers.FIREFOX:
|
||||
cookie_jar = browser_cookie3.firefox()
|
||||
case Browsers.CHROME:
|
||||
cookie_jar = browser_cookie3.chrome()
|
||||
case Browsers.CHROMIUM:
|
||||
cookie_jar = browser_cookie3.chromium()
|
||||
case Browsers.EDGE:
|
||||
cookie_jar = browser_cookie3.edge()
|
||||
case Browsers.OPERA:
|
||||
cookie_jar = browser_cookie3.opera()
|
||||
case _:
|
||||
raise AssertionError("Unknown cookie_source")
|
||||
session.cookies = cookie_jar
|
||||
case _:
|
||||
raise AssertionError("Unknown auth method")
|
@ -1,345 +0,0 @@
|
||||
from datetime import date
|
||||
from functools import reduce, partial
|
||||
from typing import List, Tuple
|
||||
|
||||
from fime.config import Config
|
||||
from fime.data import Worklog, duration_to_str
|
||||
from fime.progressindicator import ProgressIndicator
|
||||
from fime.task_completer import TaskCompleter
|
||||
from fime.util import get_icon, EditStartedDetector, Status, get_screen_height, get_screen_width
|
||||
from fime.worklog_rest import WorklogRest
|
||||
|
||||
try:
|
||||
from PySide6 import QtCore, QtGui, QtWidgets
|
||||
except ImportError:
|
||||
from PySide2 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class WorklogDialog(QtWidgets.QDialog):
|
||||
class TabTable(QtWidgets.QTableWidget):
|
||||
def __init__(self, parent, *args, **kwargs):
|
||||
super().__init__(parent, *args, **kwargs)
|
||||
|
||||
def focusNextPrevChild(self, next_):
|
||||
if self.currentColumn() == 1:
|
||||
event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
|
||||
QtCore.Qt.Key_Down if next_ else QtCore.Qt.Key_Up,
|
||||
QtCore.Qt.NoModifier)
|
||||
self.keyPressEvent(event)
|
||||
if event.isAccepted():
|
||||
return True
|
||||
return super().focusNextPrevChild(next_)
|
||||
|
||||
class ClickWidget(QtWidgets.QWidget):
|
||||
def __init__(self, item, table, parent, *args, **kwargs):
|
||||
super().__init__(parent, *args, **kwargs)
|
||||
self.item = item
|
||||
self.table = table
|
||||
|
||||
def mouseDoubleClickEvent(self, event):
|
||||
self.table.removeCellWidget(self.item.row(), self.item.column())
|
||||
self.table.openPersistentEditor(self.item)
|
||||
editor = self.table.cellWidget(self.table.currentRow(), self.table.currentColumn())
|
||||
editor.setFocus()
|
||||
|
||||
class TableTextEdit(QtWidgets.QTextEdit):
|
||||
text_changed = QtCore.Signal(str, int)
|
||||
|
||||
def __init__(self, text, row, parent, *args, **kwargs):
|
||||
super().__init__(parent, *args, **kwargs)
|
||||
self.row = row
|
||||
self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.setLineWrapMode(QtWidgets.QTextEdit.WidgetWidth)
|
||||
self.setAcceptRichText(False)
|
||||
self.setTabChangesFocus(True)
|
||||
self.setText(text)
|
||||
self.document().adjustSize()
|
||||
self.on_text_changed()
|
||||
self.moveCursor(QtGui.QTextCursor.End)
|
||||
self.textChanged.connect(self.on_text_changed)
|
||||
|
||||
@QtCore.Slot()
|
||||
def on_text_changed(self):
|
||||
self.setFixedHeight(self.document().size().toSize().height())
|
||||
self.text_changed.emit(self.document().toPlainText(), self.row)
|
||||
|
||||
class TaskItemCompleter(EditStartedDetector):
|
||||
edit_finished_row = QtCore.Signal(int)
|
||||
|
||||
def __init__(self, config, parent=None):
|
||||
super().__init__(parent)
|
||||
self.config = config
|
||||
self.return_ = False
|
||||
self.initial_text = ""
|
||||
self.editor = None
|
||||
|
||||
def createEditor(self, parent, option, index):
|
||||
self.editor = super().createEditor(parent, option, index)
|
||||
self.editFinished.connect(partial(self.edit_finished_row_target, index.row()))
|
||||
self.return_ = False
|
||||
self.initial_text = index.data()
|
||||
self.editor.returnPressed.connect(self.return_pressed)
|
||||
completer = TaskCompleter(self.config)
|
||||
completer.setFilterMode(QtCore.Qt.MatchFlag.MatchContains)
|
||||
completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
|
||||
self.editor.setCompleter(completer)
|
||||
self.editor.textChanged.connect(completer.update_picker)
|
||||
return self.editor
|
||||
|
||||
@QtCore.Slot()
|
||||
def return_pressed(self):
|
||||
self.return_ = True
|
||||
|
||||
@QtCore.Slot()
|
||||
def edit_finished_row_target(self, row):
|
||||
if not self.return_ or self.editor.text() == self.initial_text:
|
||||
self.edit_finished_row.emit(row)
|
||||
|
||||
def __init__(self, config: Config, worklog: Worklog, parent, *args, **kwargs):
|
||||
super().__init__(parent, *args, **kwargs)
|
||||
|
||||
self.config = config
|
||||
self.rest = None
|
||||
|
||||
self._changing_items = False
|
||||
self._worklog = worklog
|
||||
self._worklog_data: List[List[str]] = []
|
||||
self._statuses: List[Tuple[Status, str]] = []
|
||||
self.row_height = None
|
||||
self._focussed = False
|
||||
|
||||
self.setWindowTitle("Worklog")
|
||||
|
||||
self.tableWidget = WorklogDialog.TabTable(self)
|
||||
self.tableWidget.setColumnCount(3)
|
||||
self.tableWidget.setHorizontalHeaderLabels(["Task", "Comment", "Duration"])
|
||||
self.tableWidget.cellChanged.connect(self.cell_changed)
|
||||
taskItemCompleter = WorklogDialog.TaskItemCompleter(config, self)
|
||||
taskItemCompleter.editStarted.connect(self.disable_buttons)
|
||||
taskItemCompleter.editFinished.connect(self.enable_buttons)
|
||||
taskItemCompleter.edit_finished_row.connect(self.update_status_view)
|
||||
self.tableWidget.setItemDelegateForColumn(0, taskItemCompleter)
|
||||
self.hheader = QtWidgets.QHeaderView(QtCore.Qt.Orientation.Horizontal)
|
||||
self.hheader.setMinimumSectionSize(10)
|
||||
self.tableWidget.setHorizontalHeader(self.hheader)
|
||||
self.hheader.setSectionResizeMode(self.hheader.logicalIndex(0), QtWidgets.QHeaderView.Fixed)
|
||||
self.hheader.setSectionResizeMode(self.hheader.logicalIndex(1), QtWidgets.QHeaderView.Fixed)
|
||||
self.hheader.resizeSection(self.hheader.logicalIndex(1), get_screen_width(self) * 0.2)
|
||||
self.hheader.setSectionResizeMode(self.hheader.logicalIndex(2), QtWidgets.QHeaderView.ResizeToContents)
|
||||
self.vheader = QtWidgets.QHeaderView(QtCore.Qt.Orientation.Vertical)
|
||||
self.vheader.setSectionResizeMode(QtWidgets.QHeaderView.ResizeToContents)
|
||||
self.vheader.hide()
|
||||
self.tableWidget.setVerticalHeader(self.vheader)
|
||||
self.tableWidget.setMaximumWidth(get_screen_width(self) * 0.8)
|
||||
|
||||
self.previous_button = QtWidgets.QPushButton()
|
||||
self.previous_button.setText("Previous")
|
||||
self.previous_button.setIcon(get_icon("arrow-left"))
|
||||
self.previous_button.pressed.connect(self.previous)
|
||||
self.previous_button.setAutoDefault(False)
|
||||
|
||||
self.next_button = QtWidgets.QPushButton()
|
||||
self.next_button.setText("Next")
|
||||
self.next_button.setIcon(get_icon("arrow-right"))
|
||||
self.next_button.pressed.connect(self.next)
|
||||
self.next_button.setAutoDefault(False)
|
||||
|
||||
self.upload_button = QtWidgets.QPushButton()
|
||||
self.upload_button.setText("Upload")
|
||||
self.upload_button.setIcon(get_icon("cloud-upload"))
|
||||
self.upload_button.pressed.connect(self.upload)
|
||||
self.upload_button.setAutoDefault(False)
|
||||
self.upload_button.setMinimumWidth(self.upload_button.minimumSizeHint().width() * 1.33)
|
||||
self.upload_button.setEnabled(False)
|
||||
|
||||
self.ok_button = QtWidgets.QPushButton()
|
||||
self.ok_button.setText("OK")
|
||||
self.ok_button.setIcon(get_icon("dialog-ok"))
|
||||
self.ok_button.pressed.connect(self._accept)
|
||||
self.ok_button.setAutoDefault(True)
|
||||
|
||||
alayout = QtWidgets.QHBoxLayout()
|
||||
alayout.addWidget(self.previous_button)
|
||||
alayout.addWidget(self.next_button)
|
||||
alayout.addSpacerItem(QtWidgets.QSpacerItem(1, 1, QtWidgets.QSizePolicy.Expanding))
|
||||
alayout.addWidget(self.upload_button)
|
||||
alayout.addWidget(self.ok_button)
|
||||
|
||||
layout = QtWidgets.QVBoxLayout(self)
|
||||
layout.addWidget(self.tableWidget)
|
||||
layout.addLayout(alayout)
|
||||
self.setLayout(layout)
|
||||
|
||||
self.update_timer = QtCore.QTimer(self)
|
||||
self.update_timer.setInterval(500)
|
||||
self.update_timer.timeout.connect(self.update_statuses)
|
||||
|
||||
def showEvent(self, _):
|
||||
# reinitialize to purge caches and pick up config changes
|
||||
self.rest = WorklogRest(self.config)
|
||||
self._worklog.date = date.today()
|
||||
self.update_all()
|
||||
self.upload_button.setEnabled(False)
|
||||
self.raise_()
|
||||
|
||||
def update_all(self):
|
||||
self.refresh_table()
|
||||
self.update_title()
|
||||
self.update_prev_next()
|
||||
self._statuses = []
|
||||
self.update_statuses()
|
||||
self.update_timer.start()
|
||||
|
||||
def update_statuses(self):
|
||||
issue_keys = []
|
||||
for row in self._worklog_data[:-1]:
|
||||
issue_keys.append(row[0].split()[0])
|
||||
old_statuses = self._statuses
|
||||
self._statuses = self.rest.get_issues_state(issue_keys, self._worklog.date)
|
||||
for row, status in enumerate(self._statuses):
|
||||
if len(old_statuses) != len(self._statuses) or old_statuses[row][0] != status[0]:
|
||||
self.update_status_view(row)
|
||||
if not self._worklog_data[row][1] and status[2]:
|
||||
self._worklog_data[row][1] = status[2]
|
||||
self.tableWidget.cellWidget(row, 1).setPlainText(status[2])
|
||||
all_ok = reduce(lambda acc, it: acc and it[0] is Status.OK, self._statuses, True)
|
||||
if all_ok:
|
||||
self.upload_button.setEnabled(True)
|
||||
all_done = reduce(lambda acc, it: acc and it[0] is not Status.PROGRESS, self._statuses, True)
|
||||
if all_done:
|
||||
self.update_timer.stop()
|
||||
|
||||
def save(self):
|
||||
self._worklog.worklog = self._worklog_data
|
||||
|
||||
def update_title(self):
|
||||
self.setWindowTitle(f"Worklog {self._worklog.date_str()}")
|
||||
|
||||
def refresh_table(self):
|
||||
self._worklog_data = self._worklog.worklog
|
||||
self._changing_items = True
|
||||
if not self.row_height:
|
||||
self.tableWidget.setRowCount(1)
|
||||
item = QtWidgets.QTableWidgetItem("test")
|
||||
self.tableWidget.setItem(0, 0, item)
|
||||
self.row_height = self.tableWidget.rowHeight(0)
|
||||
self.tableWidget.setRowCount(len(self._worklog_data))
|
||||
|
||||
for row, _ in enumerate(self._worklog_data):
|
||||
item0 = QtWidgets.QTableWidgetItem(self._worklog_data[row][0])
|
||||
self.tableWidget.setItem(row, 0, item0)
|
||||
if row == len(self._worklog_data) - 1:
|
||||
self.tableWidget.removeCellWidget(row, 0)
|
||||
item0.setFlags(item0.flags() & QtCore.Qt.ItemIsEnabled)
|
||||
item1 = QtWidgets.QTableWidgetItem("")
|
||||
self.tableWidget.setItem(row, 1, item1)
|
||||
item1.setFlags(item1.flags() & QtCore.Qt.ItemIsEnabled)
|
||||
else:
|
||||
text_edit = WorklogDialog.TableTextEdit(self._worklog_data[row][1], row, self)
|
||||
text_edit.textChanged.connect(self.on_resize)
|
||||
text_edit.setFrameStyle(QtWidgets.QFrame.NoFrame)
|
||||
text_edit.text_changed.connect(self.text_edit_changed)
|
||||
self.tableWidget.setCellWidget(row, 1, text_edit)
|
||||
if row == 0 and not self._focussed:
|
||||
text_edit.setFocus()
|
||||
self._focussed = True
|
||||
item2 = QtWidgets.QTableWidgetItem(duration_to_str(self._worklog_data[row][2]))
|
||||
self.tableWidget.setItem(row, 2, item2)
|
||||
item2.setFlags(item2.flags() & QtCore.Qt.ItemIsEnabled)
|
||||
self._changing_items = False
|
||||
|
||||
self.tableWidget.resizeColumnToContents(0)
|
||||
self.tableWidget.setColumnWidth(0, self.tableWidget.columnWidth(0) + self.row_height)
|
||||
desired_width = self.tableWidget.columnWidth(0) + self.tableWidget.columnWidth(1) + self.tableWidget.columnWidth(2) + 4
|
||||
self.tableWidget.setMinimumWidth(min(desired_width, self.tableWidget.maximumWidth()))
|
||||
if self.tableWidget.rowCount() > 4:
|
||||
desired_height = self.tableWidget.rowCount() * self.tableWidget.rowHeight(0) \
|
||||
+ self.tableWidget.horizontalHeader().height() + 4
|
||||
self.tableWidget.setMinimumHeight(min(desired_height, get_screen_height(self.tableWidget) * 0.8))
|
||||
self.adjustSize()
|
||||
|
||||
@QtCore.Slot(int)
|
||||
def update_status_view(self, row):
|
||||
if self._statuses[row][0] is Status.PROGRESS:
|
||||
icon = ProgressIndicator(self)
|
||||
icon.setMaximumSize(QtCore.QSize(self.row_height * 0.75, self.row_height * 0.75))
|
||||
icon.setAnimationDelay(70)
|
||||
icon.startAnimation()
|
||||
else:
|
||||
if self._statuses[row][0] is Status.OK:
|
||||
item_name = "dialog-ok"
|
||||
elif self._statuses[row][0] is Status.ERROR:
|
||||
item_name = "edit-delete-remove"
|
||||
icon = QtWidgets.QLabel()
|
||||
icon.setPixmap(get_icon(item_name).pixmap(self.row_height * 0.75, self.row_height * 0.75))
|
||||
icon.setToolTip(self._statuses[row][1])
|
||||
layout = QtWidgets.QHBoxLayout()
|
||||
layout.addWidget(icon, alignment=QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
|
||||
layout.setContentsMargins(self.row_height * 0.1, self.row_height * 0.1,
|
||||
self.row_height * 0.1, self.row_height * 0.1)
|
||||
|
||||
wdgt = WorklogDialog.ClickWidget(self.tableWidget.item(row, 0), self.tableWidget, self)
|
||||
wdgt.setLayout(layout)
|
||||
self.tableWidget.setCellWidget(row, 0, wdgt)
|
||||
|
||||
@QtCore.Slot()
|
||||
def on_resize(self):
|
||||
self.tableWidget.resizeRowsToContents()
|
||||
|
||||
@QtCore.Slot()
|
||||
def disable_buttons(self):
|
||||
self.previous_button.setEnabled(False)
|
||||
self.next_button.setEnabled(False)
|
||||
self.upload_button.setEnabled(False)
|
||||
self.ok_button.setEnabled(False)
|
||||
|
||||
@QtCore.Slot()
|
||||
def enable_buttons(self):
|
||||
self.ok_button.setEnabled(True)
|
||||
self.update_prev_next()
|
||||
|
||||
def update_prev_next(self):
|
||||
prev, next_ = self._worklog.prev_next_avail()
|
||||
self.previous_button.setEnabled(prev)
|
||||
self.next_button.setEnabled(next_)
|
||||
|
||||
@QtCore.Slot()
|
||||
def previous(self):
|
||||
self.save()
|
||||
self._worklog.previous()
|
||||
self._focussed = False
|
||||
self.update_all()
|
||||
self.upload_button.setEnabled(False)
|
||||
|
||||
@QtCore.Slot()
|
||||
def next(self):
|
||||
self.save()
|
||||
self._worklog.next()
|
||||
self._focussed = False
|
||||
self.update_all()
|
||||
self.upload_button.setEnabled(False)
|
||||
|
||||
@QtCore.Slot()
|
||||
def upload(self):
|
||||
issues = list(map(lambda x: (x[0].split()[0], x[1], x[2]), self._worklog_data[:-1]))
|
||||
self.rest.upload(issues, self._worklog.date)
|
||||
self.update_statuses()
|
||||
self.update_timer.start()
|
||||
|
||||
@QtCore.Slot()
|
||||
def cell_changed(self, row, _):
|
||||
if self._changing_items:
|
||||
return
|
||||
self._worklog_data[row][0] = self.tableWidget.item(row, 0).text()
|
||||
self.save()
|
||||
self.update_all()
|
||||
self.upload_button.setEnabled(False)
|
||||
|
||||
@QtCore.Slot()
|
||||
def text_edit_changed(self, text, row):
|
||||
self._worklog_data[row][1] = text
|
||||
|
||||
@QtCore.Slot()
|
||||
def _accept(self):
|
||||
self.save()
|
||||
self.accept()
|
@ -1,172 +0,0 @@
|
||||
import os
|
||||
from concurrent.futures import Future
|
||||
from datetime import date, datetime, timedelta, time
|
||||
from functools import partial
|
||||
from textwrap import dedent
|
||||
from threading import Lock
|
||||
from typing import List, Dict, Tuple, Optional
|
||||
|
||||
import requests
|
||||
from loguru import logger
|
||||
from requests_futures.sessions import FuturesSession
|
||||
|
||||
from fime.config import Config
|
||||
from fime.exceptions import FimeException
|
||||
from fime.util import Status, add_auth
|
||||
|
||||
|
||||
class WorklogRest:
|
||||
def __init__(self, config: Config):
|
||||
self.config = config
|
||||
self.user_url = os.path.join(config.jira_url, "rest/api/2/myself")
|
||||
self.issue_url = os.path.join(config.jira_url, "rest/api/2/issue/{}")
|
||||
self.worklog_url = os.path.join(config.jira_url, "rest/api/2/issue/{}/worklog")
|
||||
self.worklog_update_url = os.path.join(config.jira_url, "rest/api/2/issue/{issue_key}/worklog/{worklog_id}")
|
||||
self.session = FuturesSession()
|
||||
self.session.headers["Accept"] = "application/json"
|
||||
add_auth(config, self.session)
|
||||
self._user = None
|
||||
self._user_future = self._req_user()
|
||||
self._issue_state: Dict[str, Tuple[Status, str]] = dict()
|
||||
self._issue_previous_comments: Dict[str, str] = dict()
|
||||
self._issue_worklog_id: Dict[str, str] = dict()
|
||||
self._issues_lock = Lock()
|
||||
|
||||
def _req_user(self):
|
||||
future = self.session.get(self.user_url)
|
||||
future.add_done_callback(self._resp_user)
|
||||
return future
|
||||
|
||||
@logger.catch(message="Could not get user key")
|
||||
def _resp_user(self, future):
|
||||
self._user = future.result().json()["key"]
|
||||
|
||||
def get_issues_state(self, issue_keys: List[str], pdate: date) -> List[Tuple[Status, str, Optional[str]]]:
|
||||
ret = []
|
||||
with self._issues_lock:
|
||||
for issue_key in issue_keys:
|
||||
if issue_key not in self._issue_state:
|
||||
self._issue_state[issue_key] = (Status.PROGRESS, "Working")
|
||||
self._req_issue(issue_key, pdate)
|
||||
if issue_key in self._issue_previous_comments:
|
||||
prev_comment = self._issue_previous_comments[issue_key]
|
||||
else:
|
||||
prev_comment = None
|
||||
ret.append((*self._issue_state[issue_key], prev_comment))
|
||||
return ret
|
||||
|
||||
def _req_issue(self, issue_key: str, pdate: date):
|
||||
future = self.session.get(self.issue_url.format(issue_key))
|
||||
future.add_done_callback(partial(self._resp_issue, issue_key, pdate))
|
||||
|
||||
def _resp_issue(self, issue_key: str, pdate: date, future: Future):
|
||||
resp: requests.Response = future.result()
|
||||
with self._issues_lock:
|
||||
if resp.status_code == 200:
|
||||
issue_title = f'{issue_key} {resp.json()["fields"]["summary"]}'
|
||||
self._req_worklog_check(issue_key, issue_title, pdate)
|
||||
else:
|
||||
self._issue_state[issue_key] = (Status.ERROR, "Could not find specified issue")
|
||||
|
||||
def _req_worklog_check(self, issue_key: str, issue_title: str, pdate: date):
|
||||
future = self.session.get(self.worklog_url.format(issue_key))
|
||||
future.add_done_callback(partial(self._resp_worklog_check, issue_key, issue_title, pdate))
|
||||
|
||||
def _resp_worklog_check(self, issue_key: str, issue_title: str, pdate: date, future: Future):
|
||||
resp = future.result()
|
||||
worklogs = resp.json()["worklogs"]
|
||||
worklogs = sorted(
|
||||
worklogs, key=lambda x: datetime.strptime(x["started"], "%Y-%m-%dT%H:%M:%S.%f%z"), reverse=True)
|
||||
self._user_future.result()
|
||||
if not self._user:
|
||||
with self._issues_lock:
|
||||
self._issue_state[issue_key] = (Status.OK, issue_title)
|
||||
return
|
||||
worklog_found = False
|
||||
with self._issues_lock:
|
||||
for log in worklogs:
|
||||
if log["author"]["key"] == self._user:
|
||||
if datetime.strptime(log["started"], "%Y-%m-%dT%H:%M:%S.%f%z").date() == pdate:
|
||||
self._issue_worklog_id[issue_key] = log["id"]
|
||||
worklog_found = True
|
||||
else:
|
||||
self._issue_previous_comments[issue_key] = log["comment"].strip()
|
||||
worklog_found = True
|
||||
break
|
||||
if worklog_found:
|
||||
logger.debug(f"Found existing worklog for issue {issue_key}")
|
||||
else:
|
||||
logger.debug(f"Did not find existing worklog for issue {issue_key}")
|
||||
self._issue_state[issue_key] = (Status.OK, issue_title)
|
||||
|
||||
def _upload_sanity_check(self, issue_keys: List[str]):
|
||||
if not self._user:
|
||||
raise FimeException("Could not get user key")
|
||||
# lock is held by caller
|
||||
for issue_key in issue_keys:
|
||||
if issue_key not in self._issue_state or self._issue_state[issue_key][0] is not Status.OK:
|
||||
raise FimeException(f"Issue with key {issue_key} in unexpected state")
|
||||
|
||||
def upload(self, issues: List[Tuple[str, str, timedelta]], pdate: date):
|
||||
"""@:param issues: [(
|
||||
"ISS-1234",
|
||||
"I did some stuff",
|
||||
timedelta(seconds=300),
|
||||
), ... ]
|
||||
"""
|
||||
with self._issues_lock:
|
||||
self._upload_sanity_check(list(map(lambda x: x[0], issues)))
|
||||
for issue in issues:
|
||||
issue_key, comment, time_spent = issue
|
||||
if issue_key in self._issue_worklog_id:
|
||||
self._worklog_update(issue_key, self._issue_worklog_id[issue_key], comment, time_spent, pdate)
|
||||
else:
|
||||
self._worklog_create(issue_key, comment, time_spent, pdate)
|
||||
self._issue_state[issue[0]] = (Status.PROGRESS, "Working")
|
||||
|
||||
def _worklog_create(self, issue_key: str, comment: str, time_spent: timedelta, pdate: date):
|
||||
future = self.session.post(
|
||||
self.worklog_url.format(issue_key),
|
||||
headers={
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
json={
|
||||
"started": datetime.combine(
|
||||
pdate, time(8, 0), datetime.now().astimezone().tzinfo).strftime("%Y-%m-%dT%H:%M:%S.000%z"),
|
||||
"timeSpentSeconds": time_spent.seconds,
|
||||
"comment": comment,
|
||||
}
|
||||
)
|
||||
future.add_done_callback(partial(self._worklog_resp, issue_key))
|
||||
|
||||
def _worklog_update(self, issue_key: str, worklog_id: str, comment: str, time_spent: timedelta, pdate: date):
|
||||
future = self.session.put(
|
||||
self.worklog_update_url.format(issue_key=issue_key, worklog_id=worklog_id),
|
||||
headers={
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
json={
|
||||
"started": datetime.combine(
|
||||
pdate, time(8, 0), datetime.now().astimezone().tzinfo).strftime("%Y-%m-%dT%H:%M:%S.000%z"),
|
||||
"timeSpentSeconds": time_spent.seconds,
|
||||
"comment": comment,
|
||||
}
|
||||
)
|
||||
future.add_done_callback(partial(self._worklog_resp, issue_key))
|
||||
|
||||
def _worklog_resp(self, issue_key: str, future: Future):
|
||||
resp: requests.Response = future.result()
|
||||
with self._issues_lock:
|
||||
if resp.status_code in (200, 201):
|
||||
self._issue_state[issue_key] = (Status.OK, "Successfully uploaded")
|
||||
logger.info(f"Successfully uploaded issue {issue_key}")
|
||||
else:
|
||||
msg = dedent(f"""\
|
||||
Worklog upload failed:
|
||||
Method: {resp.request.method}
|
||||
URL: {resp.request.url}
|
||||
Response code: {resp.status_code}
|
||||
Response: {resp.text}
|
||||
""")
|
||||
self._issue_state[issue_key] = (Status.ERROR, msg)
|
||||
logger.error(msg)
|
26
themes/ace-documentation/CHANGELOG.md
Normal file
@ -0,0 +1,26 @@
|
||||
## Version 1.0.4
|
||||
- Updated Bootstrap to v4.5
|
||||
|
||||
## Version 1.0.3
|
||||
- [FIX] Typo in readme, added changelog, updated config.toml in exampleSite
|
||||
- [FIX] Remove source map imports from JS files ([@jhollowe, PR #8](https://github.com/vantagedesign/ace-documentation/pull/8))
|
||||
- [FIX] Fix minifier error with spacing in next-prev-page ([@jhollowe, PR #6](https://github.com/vantagedesign/ace-documentation/pull/6))
|
||||
- [ADD] Allow disabling the TOC ([@jhollowe, PR #9](https://github.com/vantagedesign/ace-documentation/pull/9))
|
||||
- [ADD] Allow Google Analytics to only track production site ([@jhollowe, PR #7](https://github.com/vantagedesign/ace-documentation/pull/7))
|
||||
- [FIX] Prevent empty heaver toggler ([@jhollowe, PR #3](https://github.com/vantagedesign/ace-documentation/pull/3))
|
||||
- [ADD] New table shortcode for styled tables (fixes [issue #2](https://github.com/vantagedesign/ace-documentation/issues/2))
|
||||
- [ADD] Allow disabling the Read more navigation per page or for the entire site using the config (implements [issue #10](https://github.com/vantagedesign/ace-documentation/issues/10))
|
||||
- [ADD] Documentation for various config options, such as disabling toc, readmore, analytics and search.
|
||||
|
||||
|
||||
## Version 1.0.2
|
||||
|
||||
- [FIX] Fixed folder structure in exampleSite for non-extended Hugo version.
|
||||
|
||||
## Version 1.0.1
|
||||
|
||||
- [FIX] Include the resources folder in the theme for Hugo standard version.
|
||||
|
||||
## Version 1.0.0
|
||||
|
||||
- Initial release
|
20
themes/ace-documentation/LICENSE.md
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 Vantage Design
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
84
themes/ace-documentation/README.md
Normal file
@ -0,0 +1,84 @@
|
||||
# [Ace documentation](https://docs.vantage-design.com/ace)
|
||||
|
||||
![Product thumbnail](https://raw.githubusercontent.com/vantagedesign/assets/master/ace-documentation/ace-thumbnail-shadow.png)
|
||||
|
||||
Create beautiful documentation for your projects with Ace for Hugo. Powered by Bootstrap and SASS, featuring must-have features such as syntax highlighting, copy-able code blocks, full search, a responsive layout and the power of Markdown to create your content.
|
||||
|
||||
Writing documentation has never been so easy.
|
||||
|
||||
### Rich in features
|
||||
Ace offers a variety of custom components and features which are a must-have for building project documentation. Code blocks are enriched with syntax highlighting and a copy button, allowing for your users to easily read your code and copy it into their project. Furthermore, a special version of the code block renders the HTML content in both the code block and on the page, giving your users a preview of what the code looks like.
|
||||
|
||||
Other shortcodes allow you to use Bootstrap components in your content, such as alerts, buttons, panels, collapse elements and more.
|
||||
|
||||
Full search allows your users to quickly find the content they require, and a responsive design makes your documentation available on both desktop and mobile devices.
|
||||
|
||||
### Beautiful minimalist design
|
||||
With a minimal design, the attention of users is focused on that which matters: your content.
|
||||
|
||||
|
||||
|
||||
## Demo & documentation
|
||||
The documentation for Ace was, of course, built with Ace. Therefore, the documentation for Ace also serves as a demo.
|
||||
|
||||
- [Ace demo & documentation](https://docs.vantage-design.com/ace)
|
||||
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
- [Download from GitHub](https://github.com/vantagedesign/ace-documentation/releases)
|
||||
- Clone the repo `git clone https://github.com/vantagedesign/ace-documentation.git`
|
||||
|
||||
*Note:* this theme only works with Hugo's extended version, due to the SCSS compile functionality.
|
||||
|
||||
|
||||
|
||||
## Resources
|
||||
|
||||
- [Store page](https://vantage-design.com/products/documentation-themes/4/ace-documentation)
|
||||
- [Demo](https://docs.vantage-design.com/ace)
|
||||
- [Documentation](https://docs.vantage-design.com/ace)
|
||||
- [Issues](https://github.com/vantagedesign/ace-documentation/issues)
|
||||
- [License](https://github.com/vantagedesign/ace-documentation/blob/master/LICENSE.md)
|
||||
|
||||
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
We use GitHub Issues as the official bug tracker for the Ace documentation. When reporting an issue, please follow the following guidelines:
|
||||
|
||||
1. Make sure that you are using the latest version of Ace documentation.
|
||||
2. Provide us with reproducible steps for recreating the issue, in order for us to find the issue and fix is as soon as possible.
|
||||
3. Specify your browser and version of Ace.
|
||||
|
||||
|
||||
|
||||
## Contributing to Ace
|
||||
|
||||
Contributions are highly appreciated and may be done by reporting issues with new feature suggestions or bug fixes, or by making pull requests. We'll try our best to get those sorted as soon as possible.
|
||||
|
||||
Please make pull requests to the [dev branch](https://github.com/vantagedesign/ace-documentation/tree/dev). Make sure you're always running the latest version of Ace and that you are not committing breaking changes.
|
||||
|
||||
|
||||
|
||||
## Licensing
|
||||
|
||||
- Copyright 2020 [Vantage Design](https://vantage-design.com)
|
||||
- Licensed under MIT (https://github.com/vantagedesign/ace-documentation/blob/master/LICENSE.md)
|
||||
|
||||
|
||||
|
||||
## Useful links
|
||||
|
||||
- [More products](https://vantage-design.com)
|
||||
- [Free products](https://vantage-design.com/products/free-products/)
|
||||
- [Premium products](https://vantage-design.com/products/premium-products/)
|
||||
- [Design systems](https://vantage-design.com/products/design-systems/)
|
||||
- [Page templates](https://vantage-design.com/products/page-templates/)
|
||||
- [Documentation themes](https://vantage-design.com/products/documentation-themes/)
|
||||
|
||||
### Social Media
|
||||
|
||||
- Facebook: <https://www.facebook.com/vantagedesignofficial>
|
||||
- Instagram: <https://www.instagram.com/vantagedesignofficial>
|
2
themes/ace-documentation/archetypes/default.md
Normal file
@ -0,0 +1,2 @@
|
||||
+++
|
||||
+++
|
128
themes/ace-documentation/assets/css/ace.scss
Normal file
@ -0,0 +1,128 @@
|
||||
/* -------------------------------------------------------------------------
|
||||
* ACE DOCUMENTATION
|
||||
* Stylesheet
|
||||
* @author Vantage Design
|
||||
* @version 1.0.4
|
||||
* @license https://github.com/vantagedesign/ace-documentation/blob/master/LICENSE
|
||||
* ------------------------------------------------------------------------ */
|
||||
|
||||
$primary: #1565c0;
|
||||
$secondary: #e28112;
|
||||
$success: #28a745;
|
||||
$info: #0DA0D6;
|
||||
$warning: #ffc107;
|
||||
$danger: #dc3545;
|
||||
$light: #f8f9fa;
|
||||
$dark: #343a40;
|
||||
|
||||
@import "bootstrap/bootstrap";
|
||||
|
||||
/* Typography styling */
|
||||
.main > h1{
|
||||
padding-top: 2rem;
|
||||
}
|
||||
|
||||
.main > h2{
|
||||
padding-top: 4rem;
|
||||
margin-top:-1rem;
|
||||
}
|
||||
|
||||
.main > h3, .main > h4, .main > h5, .main > h6{
|
||||
padding-top: 4rem;
|
||||
margin-top:-3rem;
|
||||
}
|
||||
|
||||
.haschildren ul{
|
||||
color: gray;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.haschildren.active ul, .haschildren.parent ul{
|
||||
display:block;
|
||||
}
|
||||
|
||||
.highlight > pre {
|
||||
padding:15px;
|
||||
}
|
||||
|
||||
.navbar-brand img {
|
||||
height: 3rem;
|
||||
}
|
||||
|
||||
.feed-icons img {
|
||||
height: 1.5rem;
|
||||
}
|
||||
|
||||
/* Side navigation menus */
|
||||
.docs-sidenav span.badge.badge-primary, .docs-toc span.badge.badge-primary{
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.docs-sidenav, .docs-toc{
|
||||
height: calc(100vh - 4rem);
|
||||
top:4rem;
|
||||
position: sticky;
|
||||
overflow: auto;
|
||||
}
|
||||
.docs-sidenav .navbar, .docs-toc .navbar{
|
||||
padding-right: 0;
|
||||
}
|
||||
.docs-sidenav .navbar-collapse, .docs-sidenav .navbar-nav{
|
||||
width: 100%;
|
||||
}
|
||||
.docs-sidenav .nav-link, .docs-toc li a{
|
||||
display: flex;
|
||||
align-items: start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.docs-sidenav .nav-link > span.badge.badge-primary, .docs-toc li a > span.badge.badge-primary{
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.docs-toc.large{
|
||||
height: calc(100vh - 4rem);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.docs-toc.large{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
|
||||
.docs-toc{
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.docs-toc a{
|
||||
font-size: 14px;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.docs-toc a:hover{
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.docs-toc ul{
|
||||
list-style: none;
|
||||
padding-left:8px;
|
||||
margin-top:3px;
|
||||
}
|
||||
|
||||
.docs-toc ul:first-child{
|
||||
padding-left:0;
|
||||
}
|
||||
|
||||
/* Table tweak for JavaScript methods */
|
||||
table td:first-child > code{
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
table > tbody > tr > td, .bd-content > table > tbody > tr > th, .bd-content > table > tfoot > tr > td, .bd-content > table > tfoot > tr > th, .bd-content > table > thead > tr > td, .bd-content > table > thead > tr > th {
|
||||
padding: .75rem;
|
||||
vertical-align: top;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
51
themes/ace-documentation/assets/css/bootstrap/_alert.scss
Normal file
@ -0,0 +1,51 @@
|
||||
//
|
||||
// Base styles
|
||||
//
|
||||
|
||||
.alert {
|
||||
position: relative;
|
||||
padding: $alert-padding-y $alert-padding-x;
|
||||
margin-bottom: $alert-margin-bottom;
|
||||
border: $alert-border-width solid transparent;
|
||||
@include border-radius($alert-border-radius);
|
||||
}
|
||||
|
||||
// Headings for larger alerts
|
||||
.alert-heading {
|
||||
// Specified to prevent conflicts of changing $headings-color
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
// Provide class for links that match alerts
|
||||
.alert-link {
|
||||
font-weight: $alert-link-font-weight;
|
||||
}
|
||||
|
||||
|
||||
// Dismissible alerts
|
||||
//
|
||||
// Expand the right padding and account for the close button's positioning.
|
||||
|
||||
.alert-dismissible {
|
||||
padding-right: $close-font-size + $alert-padding-x * 2;
|
||||
|
||||
// Adjust close link position
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: $alert-padding-y $alert-padding-x;
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Alternate styles
|
||||
//
|
||||
// Generate contextual modifier classes for colorizing the alert.
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
.alert-#{$color} {
|
||||
@include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
|
||||
}
|
||||
}
|
54
themes/ace-documentation/assets/css/bootstrap/_badge.scss
Normal file
@ -0,0 +1,54 @@
|
||||
// Base class
|
||||
//
|
||||
// Requires one of the contextual, color modifier classes for `color` and
|
||||
// `background-color`.
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: $badge-padding-y $badge-padding-x;
|
||||
@include font-size($badge-font-size);
|
||||
font-weight: $badge-font-weight;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
@include border-radius($badge-border-radius);
|
||||
@include transition($badge-transition);
|
||||
|
||||
@at-root a#{&} {
|
||||
@include hover-focus() {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Empty badges collapse automatically
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Quick fix for badges in buttons
|
||||
.btn .badge {
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
// Pill badges
|
||||
//
|
||||
// Make them extra rounded with a modifier to replace v3's badges.
|
||||
|
||||
.badge-pill {
|
||||
padding-right: $badge-pill-padding-x;
|
||||
padding-left: $badge-pill-padding-x;
|
||||
@include border-radius($badge-pill-border-radius);
|
||||
}
|
||||
|
||||
// Colors
|
||||
//
|
||||
// Contextual variations (linked badges get darker on :hover).
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
.badge-#{$color} {
|
||||
@include badge-variant($value);
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
.breadcrumb {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
|
||||
margin-bottom: $breadcrumb-margin-bottom;
|
||||
@include font-size($breadcrumb-font-size);
|
||||
list-style: none;
|
||||
background-color: $breadcrumb-bg;
|
||||
@include border-radius($breadcrumb-border-radius);
|
||||
}
|
||||
|
||||
.breadcrumb-item {
|
||||
display: flex;
|
||||
|
||||
// The separator between breadcrumbs (by default, a forward-slash: "/")
|
||||
+ .breadcrumb-item {
|
||||
padding-left: $breadcrumb-item-padding;
|
||||
|
||||
&::before {
|
||||
display: inline-block; // Suppress underlining of the separator in modern browsers
|
||||
padding-right: $breadcrumb-item-padding;
|
||||
color: $breadcrumb-divider-color;
|
||||
content: escape-svg($breadcrumb-divider);
|
||||
}
|
||||
}
|
||||
|
||||
// IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
|
||||
// without `<ul>`s. The `::before` pseudo-element generates an element
|
||||
// *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
|
||||
//
|
||||
// To trick IE into suppressing the underline, we give the pseudo-element an
|
||||
// underline and then immediately remove it.
|
||||
+ .breadcrumb-item:hover::before {
|
||||
text-decoration: underline;
|
||||
}
|
||||
// stylelint-disable-next-line no-duplicate-selectors
|
||||
+ .breadcrumb-item:hover::before {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: $breadcrumb-active-color;
|
||||
}
|
||||
}
|
163
themes/ace-documentation/assets/css/bootstrap/_button-group.scss
Normal file
@ -0,0 +1,163 @@
|
||||
// stylelint-disable selector-no-qualifying-type
|
||||
|
||||
// Make the div behave like a button
|
||||
.btn-group,
|
||||
.btn-group-vertical {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
vertical-align: middle; // match .btn alignment given font-size hack above
|
||||
|
||||
> .btn {
|
||||
position: relative;
|
||||
flex: 1 1 auto;
|
||||
|
||||
// Bring the hover, focused, and "active" buttons to the front to overlay
|
||||
// the borders properly
|
||||
@include hover() {
|
||||
z-index: 1;
|
||||
}
|
||||
&:focus,
|
||||
&:active,
|
||||
&.active {
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Optional: Group multiple button groups together for a toolbar
|
||||
.btn-toolbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.input-group {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
// Prevent double borders when buttons are next to each other
|
||||
> .btn:not(:first-child),
|
||||
> .btn-group:not(:first-child) {
|
||||
margin-left: -$btn-border-width;
|
||||
}
|
||||
|
||||
// Reset rounded corners
|
||||
> .btn:not(:last-child):not(.dropdown-toggle),
|
||||
> .btn-group:not(:last-child) > .btn {
|
||||
@include border-right-radius(0);
|
||||
}
|
||||
|
||||
> .btn:not(:first-child),
|
||||
> .btn-group:not(:first-child) > .btn {
|
||||
@include border-left-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Sizing
|
||||
//
|
||||
// Remix the default button sizing classes into new ones for easier manipulation.
|
||||
|
||||
.btn-group-sm > .btn { @extend .btn-sm; }
|
||||
.btn-group-lg > .btn { @extend .btn-lg; }
|
||||
|
||||
|
||||
//
|
||||
// Split button dropdowns
|
||||
//
|
||||
|
||||
.dropdown-toggle-split {
|
||||
padding-right: $btn-padding-x * .75;
|
||||
padding-left: $btn-padding-x * .75;
|
||||
|
||||
&::after,
|
||||
.dropup &::after,
|
||||
.dropright &::after {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.dropleft &::before {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-sm + .dropdown-toggle-split {
|
||||
padding-right: $btn-padding-x-sm * .75;
|
||||
padding-left: $btn-padding-x-sm * .75;
|
||||
}
|
||||
|
||||
.btn-lg + .dropdown-toggle-split {
|
||||
padding-right: $btn-padding-x-lg * .75;
|
||||
padding-left: $btn-padding-x-lg * .75;
|
||||
}
|
||||
|
||||
|
||||
// The clickable button for toggling the menu
|
||||
// Set the same inset shadow as the :active state
|
||||
.btn-group.show .dropdown-toggle {
|
||||
@include box-shadow($btn-active-box-shadow);
|
||||
|
||||
// Show no shadow for `.btn-link` since it has no other button styles.
|
||||
&.btn-link {
|
||||
@include box-shadow(none);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Vertical button groups
|
||||
//
|
||||
|
||||
.btn-group-vertical {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
|
||||
> .btn,
|
||||
> .btn-group {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
> .btn:not(:first-child),
|
||||
> .btn-group:not(:first-child) {
|
||||
margin-top: -$btn-border-width;
|
||||
}
|
||||
|
||||
// Reset rounded corners
|
||||
> .btn:not(:last-child):not(.dropdown-toggle),
|
||||
> .btn-group:not(:last-child) > .btn {
|
||||
@include border-bottom-radius(0);
|
||||
}
|
||||
|
||||
> .btn:not(:first-child),
|
||||
> .btn-group:not(:first-child) > .btn {
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Checkbox and radio options
|
||||
//
|
||||
// In order to support the browser's form validation feedback, powered by the
|
||||
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
|
||||
// `display: none;` or `visibility: hidden;` as that also hides the popover.
|
||||
// Simply visually hiding the inputs via `opacity` would leave them clickable in
|
||||
// certain cases which is prevented by using `clip` and `pointer-events`.
|
||||
// This way, we ensure a DOM element is visible to position the popover from.
|
||||
//
|
||||
// See https://github.com/twbs/bootstrap/pull/12794 and
|
||||
// https://github.com/twbs/bootstrap/pull/14559 for more information.
|
||||
|
||||
.btn-group-toggle {
|
||||
> .btn,
|
||||
> .btn-group > .btn {
|
||||
margin-bottom: 0; // Override default `<label>` value
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
position: absolute;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
}
|
142
themes/ace-documentation/assets/css/bootstrap/_buttons.scss
Normal file
@ -0,0 +1,142 @@
|
||||
// stylelint-disable selector-no-qualifying-type
|
||||
|
||||
//
|
||||
// Base styles
|
||||
//
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
font-family: $btn-font-family;
|
||||
font-weight: $btn-font-weight;
|
||||
color: $body-color;
|
||||
text-align: center;
|
||||
text-decoration: if($link-decoration == none, null, none);
|
||||
white-space: $btn-white-space;
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
background-color: transparent;
|
||||
border: $btn-border-width solid transparent;
|
||||
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
|
||||
@include transition($btn-transition);
|
||||
|
||||
@include hover() {
|
||||
color: $body-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: $btn-focus-box-shadow;
|
||||
}
|
||||
|
||||
// Disabled comes first so active can properly restyle
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
opacity: $btn-disabled-opacity;
|
||||
@include box-shadow(none);
|
||||
}
|
||||
|
||||
&:not(:disabled):not(.disabled) {
|
||||
cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
@include box-shadow($btn-active-box-shadow);
|
||||
|
||||
&:focus {
|
||||
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Future-proof disabling of clicks on `<a>` elements
|
||||
a.btn.disabled,
|
||||
fieldset:disabled a.btn {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Alternate buttons
|
||||
//
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
.btn-#{$color} {
|
||||
@include button-variant($value, $value);
|
||||
}
|
||||
}
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
.btn-outline-#{$color} {
|
||||
@include button-outline-variant($value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Link buttons
|
||||
//
|
||||
|
||||
// Make a button look and behave like a link
|
||||
.btn-link {
|
||||
font-weight: $font-weight-normal;
|
||||
color: $link-color;
|
||||
text-decoration: $link-decoration;
|
||||
|
||||
@include hover() {
|
||||
color: $link-hover-color;
|
||||
text-decoration: $link-hover-decoration;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.focus {
|
||||
text-decoration: $link-hover-decoration;
|
||||
}
|
||||
|
||||
&:disabled,
|
||||
&.disabled {
|
||||
color: $btn-link-disabled-color;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
// No need for an active state here
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Button Sizes
|
||||
//
|
||||
|
||||
.btn-lg {
|
||||
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Block button
|
||||
//
|
||||
|
||||
.btn-block {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
// Vertically space out multiple block buttons
|
||||
+ .btn-block {
|
||||
margin-top: $btn-block-spacing-y;
|
||||
}
|
||||
}
|
||||
|
||||
// Specificity overrides
|
||||
input[type="submit"],
|
||||
input[type="reset"],
|
||||
input[type="button"] {
|
||||
&.btn-block {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
282
themes/ace-documentation/assets/css/bootstrap/_card.scss
Normal file
@ -0,0 +1,282 @@
|
||||
//
|
||||
// Base styles
|
||||
//
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
|
||||
height: $card-height;
|
||||
word-wrap: break-word;
|
||||
background-color: $card-bg;
|
||||
background-clip: border-box;
|
||||
border: $card-border-width solid $card-border-color;
|
||||
@include border-radius($card-border-radius);
|
||||
|
||||
> hr {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
> .list-group {
|
||||
border-top: inherit;
|
||||
border-bottom: inherit;
|
||||
|
||||
&:first-child {
|
||||
border-top-width: 0;
|
||||
@include border-top-radius($card-inner-border-radius);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom-width: 0;
|
||||
@include border-bottom-radius($card-inner-border-radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-body {
|
||||
// Enable `flex-grow: 1` for decks and groups so that card blocks take up
|
||||
// as much space as possible, ensuring footers are aligned to the bottom.
|
||||
flex: 1 1 auto;
|
||||
// Workaround for the image size bug in IE
|
||||
// See: https://github.com/twbs/bootstrap/pull/28855
|
||||
min-height: 1px;
|
||||
padding: $card-spacer-x;
|
||||
color: $card-color;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
margin-bottom: $card-spacer-y;
|
||||
}
|
||||
|
||||
.card-subtitle {
|
||||
margin-top: -$card-spacer-y / 2;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.card-text:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.card-link {
|
||||
@include hover() {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
+ .card-link {
|
||||
margin-left: $card-spacer-x;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Optional textual caps
|
||||
//
|
||||
|
||||
.card-header {
|
||||
padding: $card-spacer-y $card-spacer-x;
|
||||
margin-bottom: 0; // Removes the default margin-bottom of <hN>
|
||||
color: $card-cap-color;
|
||||
background-color: $card-cap-bg;
|
||||
border-bottom: $card-border-width solid $card-border-color;
|
||||
|
||||
&:first-child {
|
||||
@include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
|
||||
}
|
||||
|
||||
+ .list-group {
|
||||
.list-group-item:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
padding: $card-spacer-y $card-spacer-x;
|
||||
color: $card-cap-color;
|
||||
background-color: $card-cap-bg;
|
||||
border-top: $card-border-width solid $card-border-color;
|
||||
|
||||
&:last-child {
|
||||
@include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Header navs
|
||||
//
|
||||
|
||||
.card-header-tabs {
|
||||
margin-right: -$card-spacer-x / 2;
|
||||
margin-bottom: -$card-spacer-y;
|
||||
margin-left: -$card-spacer-x / 2;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.card-header-pills {
|
||||
margin-right: -$card-spacer-x / 2;
|
||||
margin-left: -$card-spacer-x / 2;
|
||||
}
|
||||
|
||||
// Card image
|
||||
.card-img-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: $card-img-overlay-padding;
|
||||
}
|
||||
|
||||
.card-img,
|
||||
.card-img-top,
|
||||
.card-img-bottom {
|
||||
flex-shrink: 0; // For IE: https://github.com/twbs/bootstrap/issues/29396
|
||||
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
|
||||
}
|
||||
|
||||
.card-img,
|
||||
.card-img-top {
|
||||
@include border-top-radius($card-inner-border-radius);
|
||||
}
|
||||
|
||||
.card-img,
|
||||
.card-img-bottom {
|
||||
@include border-bottom-radius($card-inner-border-radius);
|
||||
}
|
||||
|
||||
|
||||
// Card deck
|
||||
|
||||
.card-deck {
|
||||
.card {
|
||||
margin-bottom: $card-deck-margin;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
margin-right: -$card-deck-margin;
|
||||
margin-left: -$card-deck-margin;
|
||||
|
||||
.card {
|
||||
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
||||
flex: 1 0 0%;
|
||||
margin-right: $card-deck-margin;
|
||||
margin-bottom: 0; // Override the default
|
||||
margin-left: $card-deck-margin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Card groups
|
||||
//
|
||||
|
||||
.card-group {
|
||||
// The child selector allows nested `.card` within `.card-group`
|
||||
// to display properly.
|
||||
> .card {
|
||||
margin-bottom: $card-group-margin;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
// The child selector allows nested `.card` within `.card-group`
|
||||
// to display properly.
|
||||
> .card {
|
||||
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
||||
flex: 1 0 0%;
|
||||
margin-bottom: 0;
|
||||
|
||||
+ .card {
|
||||
margin-left: 0;
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
// Handle rounded corners
|
||||
@if $enable-rounded {
|
||||
&:not(:last-child) {
|
||||
@include border-right-radius(0);
|
||||
|
||||
.card-img-top,
|
||||
.card-header {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.card-img-bottom,
|
||||
.card-footer {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:first-child) {
|
||||
@include border-left-radius(0);
|
||||
|
||||
.card-img-top,
|
||||
.card-header {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
.card-img-bottom,
|
||||
.card-footer {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Columns
|
||||
//
|
||||
|
||||
.card-columns {
|
||||
.card {
|
||||
margin-bottom: $card-columns-margin;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
column-count: $card-columns-count;
|
||||
column-gap: $card-columns-gap;
|
||||
orphans: 1;
|
||||
widows: 1;
|
||||
|
||||
.card {
|
||||
display: inline-block; // Don't let them vertically span multiple columns
|
||||
width: 100%; // Don't let their width change
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Accordion
|
||||
//
|
||||
|
||||
.accordion {
|
||||
> .card {
|
||||
overflow: hidden;
|
||||
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 0;
|
||||
@include border-bottom-radius(0);
|
||||
}
|
||||
|
||||
&:not(:first-of-type) {
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
|
||||
> .card-header {
|
||||
@include border-radius(0);
|
||||
margin-bottom: -$card-border-width;
|
||||
}
|
||||
}
|
||||
}
|
197
themes/ace-documentation/assets/css/bootstrap/_carousel.scss
Normal file
@ -0,0 +1,197 @@
|
||||
// Notes on the classes:
|
||||
//
|
||||
// 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
|
||||
// even when their scroll action started on a carousel, but for compatibility (with Firefox)
|
||||
// we're preventing all actions instead
|
||||
// 2. The .carousel-item-left and .carousel-item-right is used to indicate where
|
||||
// the active slide is heading.
|
||||
// 3. .active.carousel-item is the current slide.
|
||||
// 4. .active.carousel-item-left and .active.carousel-item-right is the current
|
||||
// slide in its in-transition state. Only one of these occurs at a time.
|
||||
// 5. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
|
||||
// is the upcoming slide in transition.
|
||||
|
||||
.carousel {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.carousel.pointer-event {
|
||||
touch-action: pan-y;
|
||||
}
|
||||
|
||||
.carousel-inner {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
@include clearfix();
|
||||
}
|
||||
|
||||
.carousel-item {
|
||||
position: relative;
|
||||
display: none;
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin-right: -100%;
|
||||
backface-visibility: hidden;
|
||||
@include transition($carousel-transition);
|
||||
}
|
||||
|
||||
.carousel-item.active,
|
||||
.carousel-item-next,
|
||||
.carousel-item-prev {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.carousel-item-next:not(.carousel-item-left),
|
||||
.active.carousel-item-right {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.carousel-item-prev:not(.carousel-item-right),
|
||||
.active.carousel-item-left {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Alternate transitions
|
||||
//
|
||||
|
||||
.carousel-fade {
|
||||
.carousel-item {
|
||||
opacity: 0;
|
||||
transition-property: opacity;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.carousel-item.active,
|
||||
.carousel-item-next.carousel-item-left,
|
||||
.carousel-item-prev.carousel-item-right {
|
||||
z-index: 1;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.active.carousel-item-left,
|
||||
.active.carousel-item-right {
|
||||
z-index: 0;
|
||||
opacity: 0;
|
||||
@include transition(opacity 0s $carousel-transition-duration);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Left/right controls for nav
|
||||
//
|
||||
|
||||
.carousel-control-prev,
|
||||
.carousel-control-next {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
// Use flex for alignment (1-3)
|
||||
display: flex; // 1. allow flex styles
|
||||
align-items: center; // 2. vertically center contents
|
||||
justify-content: center; // 3. horizontally center contents
|
||||
width: $carousel-control-width;
|
||||
color: $carousel-control-color;
|
||||
text-align: center;
|
||||
opacity: $carousel-control-opacity;
|
||||
@include transition($carousel-control-transition);
|
||||
|
||||
// Hover/focus state
|
||||
@include hover-focus() {
|
||||
color: $carousel-control-color;
|
||||
text-decoration: none;
|
||||
outline: 0;
|
||||
opacity: $carousel-control-hover-opacity;
|
||||
}
|
||||
}
|
||||
.carousel-control-prev {
|
||||
left: 0;
|
||||
@if $enable-gradients {
|
||||
background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
|
||||
}
|
||||
}
|
||||
.carousel-control-next {
|
||||
right: 0;
|
||||
@if $enable-gradients {
|
||||
background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
|
||||
}
|
||||
}
|
||||
|
||||
// Icons for within
|
||||
.carousel-control-prev-icon,
|
||||
.carousel-control-next-icon {
|
||||
display: inline-block;
|
||||
width: $carousel-control-icon-width;
|
||||
height: $carousel-control-icon-width;
|
||||
background: no-repeat 50% / 100% 100%;
|
||||
}
|
||||
.carousel-control-prev-icon {
|
||||
background-image: escape-svg($carousel-control-prev-icon-bg);
|
||||
}
|
||||
.carousel-control-next-icon {
|
||||
background-image: escape-svg($carousel-control-next-icon-bg);
|
||||
}
|
||||
|
||||
|
||||
// Optional indicator pips
|
||||
//
|
||||
// Add an ordered list with the following class and add a list item for each
|
||||
// slide your carousel holds.
|
||||
|
||||
.carousel-indicators {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 15;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-left: 0; // override <ol> default
|
||||
// Use the .carousel-control's width as margin so we don't overlay those
|
||||
margin-right: $carousel-control-width;
|
||||
margin-left: $carousel-control-width;
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
box-sizing: content-box;
|
||||
flex: 0 1 auto;
|
||||
width: $carousel-indicator-width;
|
||||
height: $carousel-indicator-height;
|
||||
margin-right: $carousel-indicator-spacer;
|
||||
margin-left: $carousel-indicator-spacer;
|
||||
text-indent: -999px;
|
||||
cursor: pointer;
|
||||
background-color: $carousel-indicator-active-bg;
|
||||
background-clip: padding-box;
|
||||
// Use transparent borders to increase the hit area by 10px on top and bottom.
|
||||
border-top: $carousel-indicator-hit-area-height solid transparent;
|
||||
border-bottom: $carousel-indicator-hit-area-height solid transparent;
|
||||
opacity: .5;
|
||||
@include transition($carousel-indicator-transition);
|
||||
}
|
||||
|
||||
.active {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Optional captions
|
||||
//
|
||||
//
|
||||
|
||||
.carousel-caption {
|
||||
position: absolute;
|
||||
right: (100% - $carousel-caption-width) / 2;
|
||||
bottom: 20px;
|
||||
left: (100% - $carousel-caption-width) / 2;
|
||||
z-index: 10;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
color: $carousel-caption-color;
|
||||
text-align: center;
|
||||
}
|
40
themes/ace-documentation/assets/css/bootstrap/_close.scss
Normal file
@ -0,0 +1,40 @@
|
||||
.close {
|
||||
float: right;
|
||||
@include font-size($close-font-size);
|
||||
font-weight: $close-font-weight;
|
||||
line-height: 1;
|
||||
color: $close-color;
|
||||
text-shadow: $close-text-shadow;
|
||||
opacity: .5;
|
||||
|
||||
// Override <a>'s hover style
|
||||
@include hover() {
|
||||
color: $close-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:not(:disabled):not(.disabled) {
|
||||
@include hover-focus() {
|
||||
opacity: .75;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Additional properties for button version
|
||||
// iOS requires the button element instead of an anchor tag.
|
||||
// If you want the anchor version, it requires `href="#"`.
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
||||
|
||||
// stylelint-disable-next-line selector-no-qualifying-type
|
||||
button.close {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
// Future-proof disabling of clicks on `<a>` elements
|
||||
|
||||
// stylelint-disable-next-line selector-no-qualifying-type
|
||||
a.close.disabled {
|
||||
pointer-events: none;
|
||||
}
|
48
themes/ace-documentation/assets/css/bootstrap/_code.scss
Normal file
@ -0,0 +1,48 @@
|
||||
// Inline code
|
||||
code {
|
||||
@include font-size($code-font-size);
|
||||
color: $code-color;
|
||||
word-wrap: break-word;
|
||||
|
||||
// Streamline the style when inside anchors to avoid broken underline and more
|
||||
a > & {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// User input typically entered via keyboard
|
||||
kbd {
|
||||
padding: $kbd-padding-y $kbd-padding-x;
|
||||
@include font-size($kbd-font-size);
|
||||
color: $kbd-color;
|
||||
background-color: $kbd-bg;
|
||||
@include border-radius($border-radius-sm);
|
||||
@include box-shadow($kbd-box-shadow);
|
||||
|
||||
kbd {
|
||||
padding: 0;
|
||||
@include font-size(100%);
|
||||
font-weight: $nested-kbd-font-weight;
|
||||
@include box-shadow(none);
|
||||
}
|
||||
}
|
||||
|
||||
// Blocks of code
|
||||
pre {
|
||||
display: block;
|
||||
@include font-size($code-font-size);
|
||||
color: $pre-color;
|
||||
|
||||
// Account for some code outputs that place code tags in pre tags
|
||||
code {
|
||||
@include font-size(inherit);
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
}
|
||||
|
||||
// Enable scrollable blocks of code
|
||||
.pre-scrollable {
|
||||
max-height: $pre-scrollable-max-height;
|
||||
overflow-y: scroll;
|
||||
}
|
522
themes/ace-documentation/assets/css/bootstrap/_custom-forms.scss
Normal file
@ -0,0 +1,522 @@
|
||||
// Embedded icons from Open Iconic.
|
||||
// Released under MIT and copyright 2014 Waybury.
|
||||
// https://useiconic.com/open
|
||||
|
||||
|
||||
// Checkboxes and radios
|
||||
//
|
||||
// Base class takes care of all the key behavioral aspects.
|
||||
|
||||
.custom-control {
|
||||
position: relative;
|
||||
display: block;
|
||||
min-height: $font-size-base * $line-height-base;
|
||||
padding-left: $custom-control-gutter + $custom-control-indicator-size;
|
||||
}
|
||||
|
||||
.custom-control-inline {
|
||||
display: inline-flex;
|
||||
margin-right: $custom-control-spacer-x;
|
||||
}
|
||||
|
||||
.custom-control-input {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
z-index: -1; // Put the input behind the label so it doesn't overlay text
|
||||
width: $custom-control-indicator-size;
|
||||
height: ($font-size-base * $line-height-base + $custom-control-indicator-size) / 2;
|
||||
opacity: 0;
|
||||
|
||||
&:checked ~ .custom-control-label::before {
|
||||
color: $custom-control-indicator-checked-color;
|
||||
border-color: $custom-control-indicator-checked-border-color;
|
||||
@include gradient-bg($custom-control-indicator-checked-bg);
|
||||
@include box-shadow($custom-control-indicator-checked-box-shadow);
|
||||
}
|
||||
|
||||
&:focus ~ .custom-control-label::before {
|
||||
// the mixin is not used here to make sure there is feedback
|
||||
@if $enable-shadows {
|
||||
box-shadow: $input-box-shadow, $input-focus-box-shadow;
|
||||
} @else {
|
||||
box-shadow: $custom-control-indicator-focus-box-shadow;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus:not(:checked) ~ .custom-control-label::before {
|
||||
border-color: $custom-control-indicator-focus-border-color;
|
||||
}
|
||||
|
||||
&:not(:disabled):active ~ .custom-control-label::before {
|
||||
color: $custom-control-indicator-active-color;
|
||||
background-color: $custom-control-indicator-active-bg;
|
||||
border-color: $custom-control-indicator-active-border-color;
|
||||
@include box-shadow($custom-control-indicator-active-box-shadow);
|
||||
}
|
||||
|
||||
// Use [disabled] and :disabled to work around https://github.com/twbs/bootstrap/issues/28247
|
||||
&[disabled],
|
||||
&:disabled {
|
||||
~ .custom-control-label {
|
||||
color: $custom-control-label-disabled-color;
|
||||
|
||||
&::before {
|
||||
background-color: $custom-control-indicator-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Custom control indicators
|
||||
//
|
||||
// Build the custom controls out of pseudo-elements.
|
||||
|
||||
.custom-control-label {
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
color: $custom-control-label-color;
|
||||
vertical-align: top;
|
||||
cursor: $custom-control-cursor;
|
||||
|
||||
// Background-color and (when enabled) gradient
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
|
||||
left: -($custom-control-gutter + $custom-control-indicator-size);
|
||||
display: block;
|
||||
width: $custom-control-indicator-size;
|
||||
height: $custom-control-indicator-size;
|
||||
pointer-events: none;
|
||||
content: "";
|
||||
background-color: $custom-control-indicator-bg;
|
||||
border: $custom-control-indicator-border-color solid $custom-control-indicator-border-width;
|
||||
@include box-shadow($custom-control-indicator-box-shadow);
|
||||
}
|
||||
|
||||
// Foreground (icon)
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
|
||||
left: -($custom-control-gutter + $custom-control-indicator-size);
|
||||
display: block;
|
||||
width: $custom-control-indicator-size;
|
||||
height: $custom-control-indicator-size;
|
||||
content: "";
|
||||
background: no-repeat 50% / #{$custom-control-indicator-bg-size};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Checkboxes
|
||||
//
|
||||
// Tweak just a few things for checkboxes.
|
||||
|
||||
.custom-checkbox {
|
||||
.custom-control-label::before {
|
||||
@include border-radius($custom-checkbox-indicator-border-radius);
|
||||
}
|
||||
|
||||
.custom-control-input:checked ~ .custom-control-label {
|
||||
&::after {
|
||||
background-image: escape-svg($custom-checkbox-indicator-icon-checked);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-input:indeterminate ~ .custom-control-label {
|
||||
&::before {
|
||||
border-color: $custom-checkbox-indicator-indeterminate-border-color;
|
||||
@include gradient-bg($custom-checkbox-indicator-indeterminate-bg);
|
||||
@include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
|
||||
}
|
||||
&::after {
|
||||
background-image: escape-svg($custom-checkbox-indicator-icon-indeterminate);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-input:disabled {
|
||||
&:checked ~ .custom-control-label::before {
|
||||
background-color: $custom-control-indicator-checked-disabled-bg;
|
||||
}
|
||||
&:indeterminate ~ .custom-control-label::before {
|
||||
background-color: $custom-control-indicator-checked-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Radios
|
||||
//
|
||||
// Tweak just a few things for radios.
|
||||
|
||||
.custom-radio {
|
||||
.custom-control-label::before {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: $custom-radio-indicator-border-radius;
|
||||
}
|
||||
|
||||
.custom-control-input:checked ~ .custom-control-label {
|
||||
&::after {
|
||||
background-image: escape-svg($custom-radio-indicator-icon-checked);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-input:disabled {
|
||||
&:checked ~ .custom-control-label::before {
|
||||
background-color: $custom-control-indicator-checked-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// switches
|
||||
//
|
||||
// Tweak a few things for switches
|
||||
|
||||
.custom-switch {
|
||||
padding-left: $custom-switch-width + $custom-control-gutter;
|
||||
|
||||
.custom-control-label {
|
||||
&::before {
|
||||
left: -($custom-switch-width + $custom-control-gutter);
|
||||
width: $custom-switch-width;
|
||||
pointer-events: all;
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: $custom-switch-indicator-border-radius;
|
||||
}
|
||||
|
||||
&::after {
|
||||
top: add(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2, $custom-control-indicator-border-width * 2);
|
||||
left: add(-($custom-switch-width + $custom-control-gutter), $custom-control-indicator-border-width * 2);
|
||||
width: $custom-switch-indicator-size;
|
||||
height: $custom-switch-indicator-size;
|
||||
background-color: $custom-control-indicator-border-color;
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: $custom-switch-indicator-border-radius;
|
||||
@include transition(transform .15s ease-in-out, $custom-forms-transition);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-input:checked ~ .custom-control-label {
|
||||
&::after {
|
||||
background-color: $custom-control-indicator-bg;
|
||||
transform: translateX($custom-switch-width - $custom-control-indicator-size);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-input:disabled {
|
||||
&:checked ~ .custom-control-label::before {
|
||||
background-color: $custom-control-indicator-checked-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Select
|
||||
//
|
||||
// Replaces the browser default select with a custom one, mostly pulled from
|
||||
// https://primer.github.io/.
|
||||
//
|
||||
|
||||
.custom-select {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: $custom-select-height;
|
||||
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
|
||||
font-family: $custom-select-font-family;
|
||||
@include font-size($custom-select-font-size);
|
||||
font-weight: $custom-select-font-weight;
|
||||
line-height: $custom-select-line-height;
|
||||
color: $custom-select-color;
|
||||
vertical-align: middle;
|
||||
background: $custom-select-bg $custom-select-background;
|
||||
border: $custom-select-border-width solid $custom-select-border-color;
|
||||
@include border-radius($custom-select-border-radius, 0);
|
||||
@include box-shadow($custom-select-box-shadow);
|
||||
appearance: none;
|
||||
|
||||
&:focus {
|
||||
border-color: $custom-select-focus-border-color;
|
||||
outline: 0;
|
||||
@if $enable-shadows {
|
||||
@include box-shadow($custom-select-box-shadow, $custom-select-focus-box-shadow);
|
||||
} @else {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
box-shadow: $custom-select-focus-box-shadow;
|
||||
}
|
||||
|
||||
&::-ms-value {
|
||||
// For visual consistency with other platforms/browsers,
|
||||
// suppress the default white text on blue background highlight given to
|
||||
// the selected option text when the (still closed) <select> receives focus
|
||||
// in IE and (under certain conditions) Edge.
|
||||
// See https://github.com/twbs/bootstrap/issues/19398.
|
||||
color: $input-color;
|
||||
background-color: $input-bg;
|
||||
}
|
||||
}
|
||||
|
||||
&[multiple],
|
||||
&[size]:not([size="1"]) {
|
||||
height: auto;
|
||||
padding-right: $custom-select-padding-x;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
color: $custom-select-disabled-color;
|
||||
background-color: $custom-select-disabled-bg;
|
||||
}
|
||||
|
||||
// Hides the default caret in IE11
|
||||
&::-ms-expand {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Remove outline from select box in FF
|
||||
&:-moz-focusring {
|
||||
color: transparent;
|
||||
text-shadow: 0 0 0 $custom-select-color;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-select-sm {
|
||||
height: $custom-select-height-sm;
|
||||
padding-top: $custom-select-padding-y-sm;
|
||||
padding-bottom: $custom-select-padding-y-sm;
|
||||
padding-left: $custom-select-padding-x-sm;
|
||||
@include font-size($custom-select-font-size-sm);
|
||||
}
|
||||
|
||||
.custom-select-lg {
|
||||
height: $custom-select-height-lg;
|
||||
padding-top: $custom-select-padding-y-lg;
|
||||
padding-bottom: $custom-select-padding-y-lg;
|
||||
padding-left: $custom-select-padding-x-lg;
|
||||
@include font-size($custom-select-font-size-lg);
|
||||
}
|
||||
|
||||
|
||||
// File
|
||||
//
|
||||
// Custom file input.
|
||||
|
||||
.custom-file {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: $custom-file-height;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.custom-file-input {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: $custom-file-height;
|
||||
margin: 0;
|
||||
opacity: 0;
|
||||
|
||||
&:focus ~ .custom-file-label {
|
||||
border-color: $custom-file-focus-border-color;
|
||||
box-shadow: $custom-file-focus-box-shadow;
|
||||
}
|
||||
|
||||
// Use [disabled] and :disabled to work around https://github.com/twbs/bootstrap/issues/28247
|
||||
&[disabled] ~ .custom-file-label,
|
||||
&:disabled ~ .custom-file-label {
|
||||
background-color: $custom-file-disabled-bg;
|
||||
}
|
||||
|
||||
@each $lang, $value in $custom-file-text {
|
||||
&:lang(#{$lang}) ~ .custom-file-label::after {
|
||||
content: $value;
|
||||
}
|
||||
}
|
||||
|
||||
~ .custom-file-label[data-browse]::after {
|
||||
content: attr(data-browse);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-file-label {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
height: $custom-file-height;
|
||||
padding: $custom-file-padding-y $custom-file-padding-x;
|
||||
font-family: $custom-file-font-family;
|
||||
font-weight: $custom-file-font-weight;
|
||||
line-height: $custom-file-line-height;
|
||||
color: $custom-file-color;
|
||||
background-color: $custom-file-bg;
|
||||
border: $custom-file-border-width solid $custom-file-border-color;
|
||||
@include border-radius($custom-file-border-radius);
|
||||
@include box-shadow($custom-file-box-shadow);
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 3;
|
||||
display: block;
|
||||
height: $custom-file-height-inner;
|
||||
padding: $custom-file-padding-y $custom-file-padding-x;
|
||||
line-height: $custom-file-line-height;
|
||||
color: $custom-file-button-color;
|
||||
content: "Browse";
|
||||
@include gradient-bg($custom-file-button-bg);
|
||||
border-left: inherit;
|
||||
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Range
|
||||
//
|
||||
// Style range inputs the same across browsers. Vendor-specific rules for pseudo
|
||||
// elements cannot be mixed. As such, there are no shared styles for focus or
|
||||
// active states on prefixed selectors.
|
||||
|
||||
.custom-range {
|
||||
width: 100%;
|
||||
height: add($custom-range-thumb-height, $custom-range-thumb-focus-box-shadow-width * 2);
|
||||
padding: 0; // Need to reset padding
|
||||
background-color: transparent;
|
||||
appearance: none;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
|
||||
// Pseudo-elements must be split across multiple rulesets to have an effect.
|
||||
// No box-shadow() mixin for focus accessibility.
|
||||
&::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
||||
&::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
||||
&::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
||||
}
|
||||
|
||||
&::-moz-focus-outer {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
&::-webkit-slider-thumb {
|
||||
width: $custom-range-thumb-width;
|
||||
height: $custom-range-thumb-height;
|
||||
margin-top: ($custom-range-track-height - $custom-range-thumb-height) / 2; // Webkit specific
|
||||
@include gradient-bg($custom-range-thumb-bg);
|
||||
border: $custom-range-thumb-border;
|
||||
@include border-radius($custom-range-thumb-border-radius);
|
||||
@include box-shadow($custom-range-thumb-box-shadow);
|
||||
@include transition($custom-forms-transition);
|
||||
appearance: none;
|
||||
|
||||
&:active {
|
||||
@include gradient-bg($custom-range-thumb-active-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&::-webkit-slider-runnable-track {
|
||||
width: $custom-range-track-width;
|
||||
height: $custom-range-track-height;
|
||||
color: transparent; // Why?
|
||||
cursor: $custom-range-track-cursor;
|
||||
background-color: $custom-range-track-bg;
|
||||
border-color: transparent;
|
||||
@include border-radius($custom-range-track-border-radius);
|
||||
@include box-shadow($custom-range-track-box-shadow);
|
||||
}
|
||||
|
||||
&::-moz-range-thumb {
|
||||
width: $custom-range-thumb-width;
|
||||
height: $custom-range-thumb-height;
|
||||
@include gradient-bg($custom-range-thumb-bg);
|
||||
border: $custom-range-thumb-border;
|
||||
@include border-radius($custom-range-thumb-border-radius);
|
||||
@include box-shadow($custom-range-thumb-box-shadow);
|
||||
@include transition($custom-forms-transition);
|
||||
appearance: none;
|
||||
|
||||
&:active {
|
||||
@include gradient-bg($custom-range-thumb-active-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&::-moz-range-track {
|
||||
width: $custom-range-track-width;
|
||||
height: $custom-range-track-height;
|
||||
color: transparent;
|
||||
cursor: $custom-range-track-cursor;
|
||||
background-color: $custom-range-track-bg;
|
||||
border-color: transparent; // Firefox specific?
|
||||
@include border-radius($custom-range-track-border-radius);
|
||||
@include box-shadow($custom-range-track-box-shadow);
|
||||
}
|
||||
|
||||
&::-ms-thumb {
|
||||
width: $custom-range-thumb-width;
|
||||
height: $custom-range-thumb-height;
|
||||
margin-top: 0; // Edge specific
|
||||
margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
||||
margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
||||
@include gradient-bg($custom-range-thumb-bg);
|
||||
border: $custom-range-thumb-border;
|
||||
@include border-radius($custom-range-thumb-border-radius);
|
||||
@include box-shadow($custom-range-thumb-box-shadow);
|
||||
@include transition($custom-forms-transition);
|
||||
appearance: none;
|
||||
|
||||
&:active {
|
||||
@include gradient-bg($custom-range-thumb-active-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&::-ms-track {
|
||||
width: $custom-range-track-width;
|
||||
height: $custom-range-track-height;
|
||||
color: transparent;
|
||||
cursor: $custom-range-track-cursor;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
border-width: $custom-range-thumb-height / 2;
|
||||
@include box-shadow($custom-range-track-box-shadow);
|
||||
}
|
||||
|
||||
&::-ms-fill-lower {
|
||||
background-color: $custom-range-track-bg;
|
||||
@include border-radius($custom-range-track-border-radius);
|
||||
}
|
||||
|
||||
&::-ms-fill-upper {
|
||||
margin-right: 15px; // arbitrary?
|
||||
background-color: $custom-range-track-bg;
|
||||
@include border-radius($custom-range-track-border-radius);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
&::-webkit-slider-thumb {
|
||||
background-color: $custom-range-thumb-disabled-bg;
|
||||
}
|
||||
|
||||
&::-webkit-slider-runnable-track {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&::-moz-range-thumb {
|
||||
background-color: $custom-range-thumb-disabled-bg;
|
||||
}
|
||||
|
||||
&::-moz-range-track {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&::-ms-thumb {
|
||||
background-color: $custom-range-thumb-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-label::before,
|
||||
.custom-file-label,
|
||||
.custom-select {
|
||||
@include transition($custom-forms-transition);
|
||||
}
|
192
themes/ace-documentation/assets/css/bootstrap/_dropdown.scss
Normal file
@ -0,0 +1,192 @@
|
||||
// The dropdown wrapper (`<div>`)
|
||||
.dropup,
|
||||
.dropright,
|
||||
.dropdown,
|
||||
.dropleft {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
white-space: nowrap;
|
||||
|
||||
// Generate the caret automatically
|
||||
@include caret();
|
||||
}
|
||||
|
||||
// The dropdown menu
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
z-index: $zindex-dropdown;
|
||||
display: none; // none by default, but block on "open" of the menu
|
||||
float: left;
|
||||
min-width: $dropdown-min-width;
|
||||
padding: $dropdown-padding-y 0;
|
||||
margin: $dropdown-spacer 0 0; // override default ul
|
||||
@include font-size($dropdown-font-size);
|
||||
color: $dropdown-color;
|
||||
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
||||
list-style: none;
|
||||
background-color: $dropdown-bg;
|
||||
background-clip: padding-box;
|
||||
border: $dropdown-border-width solid $dropdown-border-color;
|
||||
@include border-radius($dropdown-border-radius);
|
||||
@include box-shadow($dropdown-box-shadow);
|
||||
}
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
|
||||
.dropdown-menu#{$infix}-left {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.dropdown-menu#{$infix}-right {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
||||
// Just add .dropup after the standard .dropdown class and you're set.
|
||||
.dropup {
|
||||
.dropdown-menu {
|
||||
top: auto;
|
||||
bottom: 100%;
|
||||
margin-top: 0;
|
||||
margin-bottom: $dropdown-spacer;
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
@include caret(up);
|
||||
}
|
||||
}
|
||||
|
||||
.dropright {
|
||||
.dropdown-menu {
|
||||
top: 0;
|
||||
right: auto;
|
||||
left: 100%;
|
||||
margin-top: 0;
|
||||
margin-left: $dropdown-spacer;
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
@include caret(right);
|
||||
&::after {
|
||||
vertical-align: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dropleft {
|
||||
.dropdown-menu {
|
||||
top: 0;
|
||||
right: 100%;
|
||||
left: auto;
|
||||
margin-top: 0;
|
||||
margin-right: $dropdown-spacer;
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
@include caret(left);
|
||||
&::before {
|
||||
vertical-align: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// When enabled Popper.js, reset basic dropdown position
|
||||
// stylelint-disable-next-line no-duplicate-selectors
|
||||
.dropdown-menu {
|
||||
&[x-placement^="top"],
|
||||
&[x-placement^="right"],
|
||||
&[x-placement^="bottom"],
|
||||
&[x-placement^="left"] {
|
||||
right: auto;
|
||||
bottom: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Dividers (basically an `<hr>`) within the dropdown
|
||||
.dropdown-divider {
|
||||
@include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y, true);
|
||||
}
|
||||
|
||||
// Links, buttons, and more within the dropdown menu
|
||||
//
|
||||
// `<button>`-specific styles are denoted with `// For <button>s`
|
||||
.dropdown-item {
|
||||
display: block;
|
||||
width: 100%; // For `<button>`s
|
||||
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
||||
clear: both;
|
||||
font-weight: $font-weight-normal;
|
||||
color: $dropdown-link-color;
|
||||
text-align: inherit; // For `<button>`s
|
||||
text-decoration: if($link-decoration == none, null, none);
|
||||
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
||||
background-color: transparent; // For `<button>`s
|
||||
border: 0; // For `<button>`s
|
||||
|
||||
// Prevent dropdown overflow if there's no padding
|
||||
// See https://github.com/twbs/bootstrap/pull/27703
|
||||
@if $dropdown-padding-y == 0 {
|
||||
&:first-child {
|
||||
@include border-top-radius($dropdown-inner-border-radius);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
@include border-bottom-radius($dropdown-inner-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
@include hover-focus() {
|
||||
color: $dropdown-link-hover-color;
|
||||
text-decoration: none;
|
||||
@include gradient-bg($dropdown-link-hover-bg);
|
||||
}
|
||||
|
||||
&.active,
|
||||
&:active {
|
||||
color: $dropdown-link-active-color;
|
||||
text-decoration: none;
|
||||
@include gradient-bg($dropdown-link-active-bg);
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
color: $dropdown-link-disabled-color;
|
||||
pointer-events: none;
|
||||
background-color: transparent;
|
||||
// Remove CSS gradients if they're enabled
|
||||
@if $enable-gradients {
|
||||
background-image: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// Dropdown section headers
|
||||
.dropdown-header {
|
||||
display: block;
|
||||
padding: $dropdown-header-padding;
|
||||
margin-bottom: 0; // for use with heading elements
|
||||
@include font-size($font-size-sm);
|
||||
color: $dropdown-header-color;
|
||||
white-space: nowrap; // as with > li > a
|
||||
}
|
||||
|
||||
// Dropdown text
|
||||
.dropdown-item-text {
|
||||
display: block;
|
||||
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
||||
color: $dropdown-link-color;
|
||||
}
|
347
themes/ace-documentation/assets/css/bootstrap/_forms.scss
Normal file
@ -0,0 +1,347 @@
|
||||
// stylelint-disable selector-no-qualifying-type
|
||||
|
||||
//
|
||||
// Textual form controls
|
||||
//
|
||||
|
||||
.form-control {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: $input-height;
|
||||
padding: $input-padding-y $input-padding-x;
|
||||
font-family: $input-font-family;
|
||||
@include font-size($input-font-size);
|
||||
font-weight: $input-font-weight;
|
||||
line-height: $input-line-height;
|
||||
color: $input-color;
|
||||
background-color: $input-bg;
|
||||
background-clip: padding-box;
|
||||
border: $input-border-width solid $input-border-color;
|
||||
|
||||
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
||||
@include border-radius($input-border-radius, 0);
|
||||
|
||||
@include box-shadow($input-box-shadow);
|
||||
@include transition($input-transition);
|
||||
|
||||
// Unstyle the caret on `<select>`s in IE10+.
|
||||
&::-ms-expand {
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
// Remove select outline from select box in FF
|
||||
&:-moz-focusring {
|
||||
color: transparent;
|
||||
text-shadow: 0 0 0 $input-color;
|
||||
}
|
||||
|
||||
// Customize the `:focus` state to imitate native WebKit styles.
|
||||
@include form-control-focus($ignore-warning: true);
|
||||
|
||||
// Placeholder
|
||||
&::placeholder {
|
||||
color: $input-placeholder-color;
|
||||
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
// Disabled and read-only inputs
|
||||
//
|
||||
// HTML5 says that controls under a fieldset > legend:first-child won't be
|
||||
// disabled if the fieldset is disabled. Due to implementation difficulty, we
|
||||
// don't honor that edge case; we style them as disabled anyway.
|
||||
&:disabled,
|
||||
&[readonly] {
|
||||
background-color: $input-disabled-bg;
|
||||
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="date"],
|
||||
input[type="time"],
|
||||
input[type="datetime-local"],
|
||||
input[type="month"] {
|
||||
&.form-control {
|
||||
appearance: none; // Fix appearance for date inputs in Safari
|
||||
}
|
||||
}
|
||||
|
||||
select.form-control {
|
||||
&:focus::-ms-value {
|
||||
// Suppress the nested default white text on blue background highlight given to
|
||||
// the selected option text when the (still closed) <select> receives focus
|
||||
// in IE and (under certain conditions) Edge, as it looks bad and cannot be made to
|
||||
// match the appearance of the native widget.
|
||||
// See https://github.com/twbs/bootstrap/issues/19398.
|
||||
color: $input-color;
|
||||
background-color: $input-bg;
|
||||
}
|
||||
}
|
||||
|
||||
// Make file inputs better match text inputs by forcing them to new lines.
|
||||
.form-control-file,
|
||||
.form-control-range {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Labels
|
||||
//
|
||||
|
||||
// For use with horizontal and inline forms, when you need the label (or legend)
|
||||
// text to align with the form controls.
|
||||
.col-form-label {
|
||||
padding-top: add($input-padding-y, $input-border-width);
|
||||
padding-bottom: add($input-padding-y, $input-border-width);
|
||||
margin-bottom: 0; // Override the `<label>/<legend>` default
|
||||
@include font-size(inherit); // Override the `<legend>` default
|
||||
line-height: $input-line-height;
|
||||
}
|
||||
|
||||
.col-form-label-lg {
|
||||
padding-top: add($input-padding-y-lg, $input-border-width);
|
||||
padding-bottom: add($input-padding-y-lg, $input-border-width);
|
||||
@include font-size($input-font-size-lg);
|
||||
line-height: $input-line-height-lg;
|
||||
}
|
||||
|
||||
.col-form-label-sm {
|
||||
padding-top: add($input-padding-y-sm, $input-border-width);
|
||||
padding-bottom: add($input-padding-y-sm, $input-border-width);
|
||||
@include font-size($input-font-size-sm);
|
||||
line-height: $input-line-height-sm;
|
||||
}
|
||||
|
||||
|
||||
// Readonly controls as plain text
|
||||
//
|
||||
// Apply class to a readonly input to make it appear like regular plain
|
||||
// text (without any border, background color, focus indicator)
|
||||
|
||||
.form-control-plaintext {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: $input-padding-y 0;
|
||||
margin-bottom: 0; // match inputs if this class comes on inputs with default margins
|
||||
@include font-size($input-font-size);
|
||||
line-height: $input-line-height;
|
||||
color: $input-plaintext-color;
|
||||
background-color: transparent;
|
||||
border: solid transparent;
|
||||
border-width: $input-border-width 0;
|
||||
|
||||
&.form-control-sm,
|
||||
&.form-control-lg {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Form control sizing
|
||||
//
|
||||
// Build on `.form-control` with modifier classes to decrease or increase the
|
||||
// height and font-size of form controls.
|
||||
//
|
||||
// Repeated in `_input_group.scss` to avoid Sass extend issues.
|
||||
|
||||
.form-control-sm {
|
||||
height: $input-height-sm;
|
||||
padding: $input-padding-y-sm $input-padding-x-sm;
|
||||
@include font-size($input-font-size-sm);
|
||||
line-height: $input-line-height-sm;
|
||||
@include border-radius($input-border-radius-sm);
|
||||
}
|
||||
|
||||
.form-control-lg {
|
||||
height: $input-height-lg;
|
||||
padding: $input-padding-y-lg $input-padding-x-lg;
|
||||
@include font-size($input-font-size-lg);
|
||||
line-height: $input-line-height-lg;
|
||||
@include border-radius($input-border-radius-lg);
|
||||
}
|
||||
|
||||
// stylelint-disable-next-line no-duplicate-selectors
|
||||
select.form-control {
|
||||
&[size],
|
||||
&[multiple] {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
textarea.form-control {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
// Form groups
|
||||
//
|
||||
// Designed to help with the organization and spacing of vertical forms. For
|
||||
// horizontal forms, use the predefined grid classes.
|
||||
|
||||
.form-group {
|
||||
margin-bottom: $form-group-margin-bottom;
|
||||
}
|
||||
|
||||
.form-text {
|
||||
display: block;
|
||||
margin-top: $form-text-margin-top;
|
||||
}
|
||||
|
||||
|
||||
// Form grid
|
||||
//
|
||||
// Special replacement for our grid system's `.row` for tighter form layouts.
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-right: -$form-grid-gutter-width / 2;
|
||||
margin-left: -$form-grid-gutter-width / 2;
|
||||
|
||||
> .col,
|
||||
> [class*="col-"] {
|
||||
padding-right: $form-grid-gutter-width / 2;
|
||||
padding-left: $form-grid-gutter-width / 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Checkboxes and radios
|
||||
//
|
||||
// Indent the labels to position radios/checkboxes as hanging controls.
|
||||
|
||||
.form-check {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding-left: $form-check-input-gutter;
|
||||
}
|
||||
|
||||
.form-check-input {
|
||||
position: absolute;
|
||||
margin-top: $form-check-input-margin-y;
|
||||
margin-left: -$form-check-input-gutter;
|
||||
|
||||
// Use [disabled] and :disabled for workaround https://github.com/twbs/bootstrap/issues/28247
|
||||
&[disabled] ~ .form-check-label,
|
||||
&:disabled ~ .form-check-label {
|
||||
color: $text-muted;
|
||||
}
|
||||
}
|
||||
|
||||
.form-check-label {
|
||||
margin-bottom: 0; // Override default `<label>` bottom margin
|
||||
}
|
||||
|
||||
.form-check-inline {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding-left: 0; // Override base .form-check
|
||||
margin-right: $form-check-inline-margin-x;
|
||||
|
||||
// Undo .form-check-input defaults and add some `margin-right`.
|
||||
.form-check-input {
|
||||
position: static;
|
||||
margin-top: 0;
|
||||
margin-right: $form-check-inline-input-margin-x;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Form validation
|
||||
//
|
||||
// Provide feedback to users when form field values are valid or invalid. Works
|
||||
// primarily for client-side validation via scoped `:invalid` and `:valid`
|
||||
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
|
||||
// server side validation.
|
||||
|
||||
@each $state, $data in $form-validation-states {
|
||||
@include form-validation-state($state, map-get($data, color), map-get($data, icon));
|
||||
}
|
||||
|
||||
// Inline forms
|
||||
//
|
||||
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
|
||||
// forms begin stacked on extra small (mobile) devices and then go inline when
|
||||
// viewports reach <768px.
|
||||
//
|
||||
// Requires wrapping inputs and labels with `.form-group` for proper display of
|
||||
// default HTML form controls and our custom form controls (e.g., input groups).
|
||||
|
||||
.form-inline {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
align-items: center; // Prevent shorter elements from growing to same height as others (e.g., small buttons growing to normal sized button height)
|
||||
|
||||
// Because we use flex, the initial sizing of checkboxes is collapsed and
|
||||
// doesn't occupy the full-width (which is what we want for xs grid tier),
|
||||
// so we force that here.
|
||||
.form-check {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// Kick in the inline
|
||||
@include media-breakpoint-up(sm) {
|
||||
label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// Inline-block all the things for "inline"
|
||||
.form-group {
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
flex-flow: row wrap;
|
||||
align-items: center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// Allow folks to *not* use `.form-group`
|
||||
.form-control {
|
||||
display: inline-block;
|
||||
width: auto; // Prevent labels from stacking above inputs in `.form-group`
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
// Make static controls behave like regular ones
|
||||
.form-control-plaintext {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.input-group,
|
||||
.custom-select {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
// Remove default margin on radios/checkboxes that were used for stacking, and
|
||||
// then undo the floating of radios and checkboxes to match.
|
||||
.form-check {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: auto;
|
||||
padding-left: 0;
|
||||
}
|
||||
.form-check-input {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
margin-top: 0;
|
||||
margin-right: $form-check-input-margin-x;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.custom-control {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.custom-control-label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
141
themes/ace-documentation/assets/css/bootstrap/_functions.scss
Normal file
@ -0,0 +1,141 @@
|
||||
// Bootstrap functions
|
||||
//
|
||||
// Utility mixins and functions for evaluating source code across our variables, maps, and mixins.
|
||||
|
||||
// Ascending
|
||||
// Used to evaluate Sass maps like our grid breakpoints.
|
||||
@mixin _assert-ascending($map, $map-name) {
|
||||
$prev-key: null;
|
||||
$prev-num: null;
|
||||
@each $key, $num in $map {
|
||||
@if $prev-num == null or unit($num) == "%" or unit($prev-num) == "%" {
|
||||
// Do nothing
|
||||
} @else if not comparable($prev-num, $num) {
|
||||
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
||||
} @else if $prev-num >= $num {
|
||||
@warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
||||
}
|
||||
$prev-key: $key;
|
||||
$prev-num: $num;
|
||||
}
|
||||
}
|
||||
|
||||
// Starts at zero
|
||||
// Used to ensure the min-width of the lowest breakpoint starts at 0.
|
||||
@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
|
||||
@if length($map) > 0 {
|
||||
$values: map-values($map);
|
||||
$first-value: nth($values, 1);
|
||||
@if $first-value != 0 {
|
||||
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Replace `$search` with `$replace` in `$string`
|
||||
// Used on our SVG icon backgrounds for custom forms.
|
||||
//
|
||||
// @author Hugo Giraudel
|
||||
// @param {String} $string - Initial string
|
||||
// @param {String} $search - Substring to replace
|
||||
// @param {String} $replace ('') - New value
|
||||
// @return {String} - Updated string
|
||||
@function str-replace($string, $search, $replace: "") {
|
||||
$index: str-index($string, $search);
|
||||
|
||||
@if $index {
|
||||
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
|
||||
}
|
||||
|
||||
@return $string;
|
||||
}
|
||||
|
||||
// See https://codepen.io/kevinweber/pen/dXWoRw
|
||||
@function escape-svg($string) {
|
||||
@if str-index($string, "data:image/svg+xml") {
|
||||
@each $char, $encoded in $escaped-characters {
|
||||
// Do not escape the url brackets
|
||||
@if str-index($string, "url(") == 1 {
|
||||
$string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
|
||||
} @else {
|
||||
$string: str-replace($string, $char, $encoded);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@return $string;
|
||||
}
|
||||
|
||||
// Color contrast
|
||||
@function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
|
||||
$r: red($color);
|
||||
$g: green($color);
|
||||
$b: blue($color);
|
||||
|
||||
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
|
||||
|
||||
@if ($yiq >= $yiq-contrasted-threshold) {
|
||||
@return $dark;
|
||||
} @else {
|
||||
@return $light;
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve color Sass maps
|
||||
@function color($key: "blue") {
|
||||
@return map-get($colors, $key);
|
||||
}
|
||||
|
||||
@function theme-color($key: "primary") {
|
||||
@return map-get($theme-colors, $key);
|
||||
}
|
||||
|
||||
@function gray($key: "100") {
|
||||
@return map-get($grays, $key);
|
||||
}
|
||||
|
||||
// Request a theme color level
|
||||
@function theme-color-level($color-name: "primary", $level: 0) {
|
||||
$color: theme-color($color-name);
|
||||
$color-base: if($level > 0, $black, $white);
|
||||
$level: abs($level);
|
||||
|
||||
@return mix($color-base, $color, $level * $theme-color-interval);
|
||||
}
|
||||
|
||||
// Return valid calc
|
||||
@function add($value1, $value2, $return-calc: true) {
|
||||
@if $value1 == null {
|
||||
@return $value2;
|
||||
}
|
||||
|
||||
@if $value2 == null {
|
||||
@return $value1;
|
||||
}
|
||||
|
||||
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
||||
@return $value1 + $value2;
|
||||
}
|
||||
|
||||
@return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
|
||||
}
|
||||
|
||||
@function subtract($value1, $value2, $return-calc: true) {
|
||||
@if $value1 == null and $value2 == null {
|
||||
@return null;
|
||||
}
|
||||
|
||||
@if $value1 == null {
|
||||
@return -$value2;
|
||||
}
|
||||
|
||||
@if $value2 == null {
|
||||
@return $value1;
|
||||
}
|
||||
|
||||
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
||||
@return $value1 - $value2;
|
||||
}
|
||||
|
||||
@return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
|
||||
}
|
77
themes/ace-documentation/assets/css/bootstrap/_grid.scss
Normal file
@ -0,0 +1,77 @@
|
||||
// Container widths
|
||||
//
|
||||
// Set the container width, and override it for fixed navbars in media queries.
|
||||
|
||||
@if $enable-grid-classes {
|
||||
// Single container class with breakpoint max-widths
|
||||
.container {
|
||||
@include make-container();
|
||||
@include make-container-max-widths();
|
||||
}
|
||||
|
||||
// 100% wide container at all breakpoints
|
||||
.container-fluid {
|
||||
@include make-container();
|
||||
}
|
||||
|
||||
// Responsive containers that are 100% wide until a breakpoint
|
||||
@each $breakpoint, $container-max-width in $container-max-widths {
|
||||
.container-#{$breakpoint} {
|
||||
@extend .container-fluid;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up($breakpoint, $grid-breakpoints) {
|
||||
%responsive-container-#{$breakpoint} {
|
||||
max-width: $container-max-width;
|
||||
}
|
||||
|
||||
// Extend each breakpoint which is smaller or equal to the current breakpoint
|
||||
$extend-breakpoint: true;
|
||||
|
||||
@each $name, $width in $grid-breakpoints {
|
||||
@if ($extend-breakpoint) {
|
||||
.container#{breakpoint-infix($name, $grid-breakpoints)} {
|
||||
@extend %responsive-container-#{$breakpoint};
|
||||
}
|
||||
|
||||
// Once the current breakpoint is reached, stop extending
|
||||
@if ($breakpoint == $name) {
|
||||
$extend-breakpoint: false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Row
|
||||
//
|
||||
// Rows contain your columns.
|
||||
|
||||
@if $enable-grid-classes {
|
||||
.row {
|
||||
@include make-row();
|
||||
}
|
||||
|
||||
// Remove the negative margin from default .row, then the horizontal padding
|
||||
// from all immediate children columns (to prevent runaway style inheritance).
|
||||
.no-gutters {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
|
||||
> .col,
|
||||
> [class*="col-"] {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Columns
|
||||
//
|
||||
// Common styles for small and large grid columns
|
||||
|
||||
@if $enable-grid-classes {
|
||||
@include make-grid-columns();
|
||||
}
|
42
themes/ace-documentation/assets/css/bootstrap/_images.scss
Normal file
@ -0,0 +1,42 @@
|
||||
// Responsive images (ensure images don't scale beyond their parents)
|
||||
//
|
||||
// This is purposefully opt-in via an explicit class rather than being the default for all `<img>`s.
|
||||
// We previously tried the "images are responsive by default" approach in Bootstrap v2,
|
||||
// and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps)
|
||||
// which weren't expecting the images within themselves to be involuntarily resized.
|
||||
// See also https://github.com/twbs/bootstrap/issues/18178
|
||||
.img-fluid {
|
||||
@include img-fluid();
|
||||
}
|
||||
|
||||
|
||||
// Image thumbnails
|
||||
.img-thumbnail {
|
||||
padding: $thumbnail-padding;
|
||||
background-color: $thumbnail-bg;
|
||||
border: $thumbnail-border-width solid $thumbnail-border-color;
|
||||
@include border-radius($thumbnail-border-radius);
|
||||
@include box-shadow($thumbnail-box-shadow);
|
||||
|
||||
// Keep them at most 100% wide
|
||||
@include img-fluid();
|
||||
}
|
||||
|
||||
//
|
||||
// Figures
|
||||
//
|
||||
|
||||
.figure {
|
||||
// Ensures the caption's text aligns with the image.
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.figure-img {
|
||||
margin-bottom: $spacer / 2;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.figure-caption {
|
||||
@include font-size($figure-caption-font-size);
|
||||
color: $figure-caption-color;
|
||||
}
|
192
themes/ace-documentation/assets/css/bootstrap/_input-group.scss
Normal file
@ -0,0 +1,192 @@
|
||||
// stylelint-disable selector-no-qualifying-type
|
||||
|
||||
//
|
||||
// Base styles
|
||||
//
|
||||
|
||||
.input-group {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: wrap; // For form validation feedback
|
||||
align-items: stretch;
|
||||
width: 100%;
|
||||
|
||||
> .form-control,
|
||||
> .form-control-plaintext,
|
||||
> .custom-select,
|
||||
> .custom-file {
|
||||
position: relative; // For focus state's z-index
|
||||
flex: 1 1 auto;
|
||||
width: 1%;
|
||||
min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
|
||||
margin-bottom: 0;
|
||||
|
||||
+ .form-control,
|
||||
+ .custom-select,
|
||||
+ .custom-file {
|
||||
margin-left: -$input-border-width;
|
||||
}
|
||||
}
|
||||
|
||||
// Bring the "active" form control to the top of surrounding elements
|
||||
> .form-control:focus,
|
||||
> .custom-select:focus,
|
||||
> .custom-file .custom-file-input:focus ~ .custom-file-label {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
// Bring the custom file input above the label
|
||||
> .custom-file .custom-file-input:focus {
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
> .form-control,
|
||||
> .custom-select {
|
||||
&:not(:last-child) { @include border-right-radius(0); }
|
||||
&:not(:first-child) { @include border-left-radius(0); }
|
||||
}
|
||||
|
||||
// Custom file inputs have more complex markup, thus requiring different
|
||||
// border-radius overrides.
|
||||
> .custom-file {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&:not(:last-child) .custom-file-label,
|
||||
&:not(:last-child) .custom-file-label::after { @include border-right-radius(0); }
|
||||
&:not(:first-child) .custom-file-label { @include border-left-radius(0); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Prepend and append
|
||||
//
|
||||
// While it requires one extra layer of HTML for each, dedicated prepend and
|
||||
// append elements allow us to 1) be less clever, 2) simplify our selectors, and
|
||||
// 3) support HTML5 form validation.
|
||||
|
||||
.input-group-prepend,
|
||||
.input-group-append {
|
||||
display: flex;
|
||||
|
||||
// Ensure buttons are always above inputs for more visually pleasing borders.
|
||||
// This isn't needed for `.input-group-text` since it shares the same border-color
|
||||
// as our inputs.
|
||||
.btn {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
||||
&:focus {
|
||||
z-index: 3;
|
||||
}
|
||||
}
|
||||
|
||||
.btn + .btn,
|
||||
.btn + .input-group-text,
|
||||
.input-group-text + .input-group-text,
|
||||
.input-group-text + .btn {
|
||||
margin-left: -$input-border-width;
|
||||
}
|
||||
}
|
||||
|
||||
.input-group-prepend { margin-right: -$input-border-width; }
|
||||
.input-group-append { margin-left: -$input-border-width; }
|
||||
|
||||
|
||||
// Textual addons
|
||||
//
|
||||
// Serves as a catch-all element for any text or radio/checkbox input you wish
|
||||
// to prepend or append to an input.
|
||||
|
||||
.input-group-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: $input-padding-y $input-padding-x;
|
||||
margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
|
||||
@include font-size($input-font-size); // Match inputs
|
||||
font-weight: $font-weight-normal;
|
||||
line-height: $input-line-height;
|
||||
color: $input-group-addon-color;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
background-color: $input-group-addon-bg;
|
||||
border: $input-border-width solid $input-group-addon-border-color;
|
||||
@include border-radius($input-border-radius);
|
||||
|
||||
// Nuke default margins from checkboxes and radios to vertically center within.
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Sizing
|
||||
//
|
||||
// Remix the default form control sizing classes into new ones for easier
|
||||
// manipulation.
|
||||
|
||||
.input-group-lg > .form-control:not(textarea),
|
||||
.input-group-lg > .custom-select {
|
||||
height: $input-height-lg;
|
||||
}
|
||||
|
||||
.input-group-lg > .form-control,
|
||||
.input-group-lg > .custom-select,
|
||||
.input-group-lg > .input-group-prepend > .input-group-text,
|
||||
.input-group-lg > .input-group-append > .input-group-text,
|
||||
.input-group-lg > .input-group-prepend > .btn,
|
||||
.input-group-lg > .input-group-append > .btn {
|
||||
padding: $input-padding-y-lg $input-padding-x-lg;
|
||||
@include font-size($input-font-size-lg);
|
||||
line-height: $input-line-height-lg;
|
||||
@include border-radius($input-border-radius-lg);
|
||||
}
|
||||
|
||||
.input-group-sm > .form-control:not(textarea),
|
||||
.input-group-sm > .custom-select {
|
||||
height: $input-height-sm;
|
||||
}
|
||||
|
||||
.input-group-sm > .form-control,
|
||||
.input-group-sm > .custom-select,
|
||||
.input-group-sm > .input-group-prepend > .input-group-text,
|
||||
.input-group-sm > .input-group-append > .input-group-text,
|
||||
.input-group-sm > .input-group-prepend > .btn,
|
||||
.input-group-sm > .input-group-append > .btn {
|
||||
padding: $input-padding-y-sm $input-padding-x-sm;
|
||||
@include font-size($input-font-size-sm);
|
||||
line-height: $input-line-height-sm;
|
||||
@include border-radius($input-border-radius-sm);
|
||||
}
|
||||
|
||||
.input-group-lg > .custom-select,
|
||||
.input-group-sm > .custom-select {
|
||||
padding-right: $custom-select-padding-x + $custom-select-indicator-padding;
|
||||
}
|
||||
|
||||
|
||||
// Prepend and append rounded corners
|
||||
//
|
||||
// These rulesets must come after the sizing ones to properly override sm and lg
|
||||
// border-radius values when extending. They're more specific than we'd like
|
||||
// with the `.input-group >` part, but without it, we cannot override the sizing.
|
||||
|
||||
|
||||
.input-group > .input-group-prepend > .btn,
|
||||
.input-group > .input-group-prepend > .input-group-text,
|
||||
.input-group > .input-group-append:not(:last-child) > .btn,
|
||||
.input-group > .input-group-append:not(:last-child) > .input-group-text,
|
||||
.input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle),
|
||||
.input-group > .input-group-append:last-child > .input-group-text:not(:last-child) {
|
||||
@include border-right-radius(0);
|
||||
}
|
||||
|
||||
.input-group > .input-group-append > .btn,
|
||||
.input-group > .input-group-append > .input-group-text,
|
||||
.input-group > .input-group-prepend:not(:first-child) > .btn,
|
||||
.input-group > .input-group-prepend:not(:first-child) > .input-group-text,
|
||||
.input-group > .input-group-prepend:first-child > .btn:not(:first-child),
|
||||
.input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) {
|
||||
@include border-left-radius(0);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
.jumbotron {
|
||||
padding: $jumbotron-padding ($jumbotron-padding / 2);
|
||||
margin-bottom: $jumbotron-padding;
|
||||
color: $jumbotron-color;
|
||||
background-color: $jumbotron-bg;
|
||||
@include border-radius($border-radius-lg);
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
padding: ($jumbotron-padding * 2) $jumbotron-padding;
|
||||
}
|
||||
}
|
||||
|
||||
.jumbotron-fluid {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
@include border-radius(0);
|
||||
}
|
154
themes/ace-documentation/assets/css/bootstrap/_list-group.scss
Normal file
@ -0,0 +1,154 @@
|
||||
// Base class
|
||||
//
|
||||
// Easily usable on <ul>, <ol>, or <div>.
|
||||
|
||||
.list-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
// No need to set list-style: none; since .list-group-item is block level
|
||||
padding-left: 0; // reset padding because ul and ol
|
||||
margin-bottom: 0;
|
||||
@include border-radius($list-group-border-radius);
|
||||
}
|
||||
|
||||
|
||||
// Interactive list items
|
||||
//
|
||||
// Use anchor or button elements instead of `li`s or `div`s to create interactive
|
||||
// list items. Includes an extra `.active` modifier class for selected items.
|
||||
|
||||
.list-group-item-action {
|
||||
width: 100%; // For `<button>`s (anchors become 100% by default though)
|
||||
color: $list-group-action-color;
|
||||
text-align: inherit; // For `<button>`s (anchors inherit)
|
||||
|
||||
// Hover state
|
||||
@include hover-focus() {
|
||||
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
||||
color: $list-group-action-hover-color;
|
||||
text-decoration: none;
|
||||
background-color: $list-group-hover-bg;
|
||||
}
|
||||
|
||||
&:active {
|
||||
color: $list-group-action-active-color;
|
||||
background-color: $list-group-action-active-bg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Individual list items
|
||||
//
|
||||
// Use on `li`s or `div`s within the `.list-group` parent.
|
||||
|
||||
.list-group-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
||||
color: $list-group-color;
|
||||
text-decoration: if($link-decoration == none, null, none);
|
||||
background-color: $list-group-bg;
|
||||
border: $list-group-border-width solid $list-group-border-color;
|
||||
|
||||
&:first-child {
|
||||
@include border-top-radius(inherit);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
@include border-bottom-radius(inherit);
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
color: $list-group-disabled-color;
|
||||
pointer-events: none;
|
||||
background-color: $list-group-disabled-bg;
|
||||
}
|
||||
|
||||
// Include both here for `<a>`s and `<button>`s
|
||||
&.active {
|
||||
z-index: 2; // Place active items above their siblings for proper border styling
|
||||
color: $list-group-active-color;
|
||||
background-color: $list-group-active-bg;
|
||||
border-color: $list-group-active-border-color;
|
||||
}
|
||||
|
||||
& + & {
|
||||
border-top-width: 0;
|
||||
|
||||
&.active {
|
||||
margin-top: -$list-group-border-width;
|
||||
border-top-width: $list-group-border-width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Horizontal
|
||||
//
|
||||
// Change the layout of list group items from vertical (default) to horizontal.
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
|
||||
.list-group-horizontal#{$infix} {
|
||||
flex-direction: row;
|
||||
|
||||
> .list-group-item {
|
||||
&:first-child {
|
||||
@include border-bottom-left-radius($list-group-border-radius);
|
||||
@include border-top-right-radius(0);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
@include border-top-right-radius($list-group-border-radius);
|
||||
@include border-bottom-left-radius(0);
|
||||
}
|
||||
|
||||
&.active {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
& + .list-group-item {
|
||||
border-top-width: $list-group-border-width;
|
||||
border-left-width: 0;
|
||||
|
||||
&.active {
|
||||
margin-left: -$list-group-border-width;
|
||||
border-left-width: $list-group-border-width;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Flush list items
|
||||
//
|
||||
// Remove borders and border-radius to keep list group items edge-to-edge. Most
|
||||
// useful within other components (e.g., cards).
|
||||
|
||||
.list-group-flush {
|
||||
@include border-radius(0);
|
||||
|
||||
> .list-group-item {
|
||||
border-width: 0 0 $list-group-border-width;
|
||||
|
||||
&:last-child {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Contextual variants
|
||||
//
|
||||
// Add modifier classes to change text and background color on individual items.
|
||||
// Organizationally, this must come after the `:hover` states.
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
@include list-group-item-variant($color, theme-color-level($color, -9), theme-color-level($color, 6));
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
.media {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.media-body {
|
||||
flex: 1;
|
||||
}
|
47
themes/ace-documentation/assets/css/bootstrap/_mixins.scss
Normal file
@ -0,0 +1,47 @@
|
||||
// Toggles
|
||||
//
|
||||
// Used in conjunction with global variables to enable certain theme features.
|
||||
|
||||
// Vendor
|
||||
@import "vendor/rfs";
|
||||
|
||||
// Deprecate
|
||||
@import "mixins/deprecate";
|
||||
|
||||
// Utilities
|
||||
@import "mixins/breakpoints";
|
||||
@import "mixins/hover";
|
||||
@import "mixins/image";
|
||||
@import "mixins/badge";
|
||||
@import "mixins/resize";
|
||||
@import "mixins/screen-reader";
|
||||
@import "mixins/size";
|
||||
@import "mixins/reset-text";
|
||||
@import "mixins/text-emphasis";
|
||||
@import "mixins/text-hide";
|
||||
@import "mixins/text-truncate";
|
||||
@import "mixins/visibility";
|
||||
|
||||
// Components
|
||||
@import "mixins/alert";
|
||||
@import "mixins/buttons";
|
||||
@import "mixins/caret";
|
||||
@import "mixins/pagination";
|
||||
@import "mixins/lists";
|
||||
@import "mixins/list-group";
|
||||
@import "mixins/nav-divider";
|
||||
@import "mixins/forms";
|
||||
@import "mixins/table-row";
|
||||
|
||||
// Skins
|
||||
@import "mixins/background-variant";
|
||||
@import "mixins/border-radius";
|
||||
@import "mixins/box-shadow";
|
||||
@import "mixins/gradients";
|
||||
@import "mixins/transition";
|
||||
|
||||
// Layout
|
||||
@import "mixins/clearfix";
|
||||
@import "mixins/grid-framework";
|
||||
@import "mixins/grid";
|
||||
@import "mixins/float";
|
241
themes/ace-documentation/assets/css/bootstrap/_modal.scss
Normal file
@ -0,0 +1,241 @@
|
||||
// .modal-open - body class for killing the scroll
|
||||
// .modal - container to scroll within
|
||||
// .modal-dialog - positioning shell for the actual modal
|
||||
// .modal-content - actual modal w/ bg and corners and stuff
|
||||
|
||||
|
||||
.modal-open {
|
||||
// Kill the scroll on the body
|
||||
overflow: hidden;
|
||||
|
||||
.modal {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Container that the modal scrolls within
|
||||
.modal {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-modal;
|
||||
display: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
||||
// https://github.com/twbs/bootstrap/pull/10951.
|
||||
outline: 0;
|
||||
// We deliberately don't use `-webkit-overflow-scrolling: touch;` due to a
|
||||
// gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
|
||||
// See also https://github.com/twbs/bootstrap/issues/17695
|
||||
}
|
||||
|
||||
// Shell div to position the modal with bottom padding
|
||||
.modal-dialog {
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: $modal-dialog-margin;
|
||||
// allow clicks to pass through for custom click handling to close modal
|
||||
pointer-events: none;
|
||||
|
||||
// When fading in the modal, animate it to slide down
|
||||
.modal.fade & {
|
||||
@include transition($modal-transition);
|
||||
transform: $modal-fade-transform;
|
||||
}
|
||||
.modal.show & {
|
||||
transform: $modal-show-transform;
|
||||
}
|
||||
|
||||
// When trying to close, animate focus to scale
|
||||
.modal.modal-static & {
|
||||
transform: $modal-scale-transform;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-dialog-scrollable {
|
||||
display: flex; // IE10/11
|
||||
max-height: subtract(100%, $modal-dialog-margin * 2);
|
||||
|
||||
.modal-content {
|
||||
max-height: subtract(100vh, $modal-dialog-margin * 2); // IE10/11
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-dialog-centered {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: subtract(100%, $modal-dialog-margin * 2);
|
||||
|
||||
// Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
|
||||
&::before {
|
||||
display: block; // IE10
|
||||
height: subtract(100vh, $modal-dialog-margin * 2);
|
||||
height: min-content; // Reset height to 0 except on IE
|
||||
content: "";
|
||||
}
|
||||
|
||||
// Ensure `.modal-body` shows scrollbar (IE10/11)
|
||||
&.modal-dialog-scrollable {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
.modal-content {
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Actual modal
|
||||
.modal-content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
|
||||
// counteract the pointer-events: none; in the .modal-dialog
|
||||
color: $modal-content-color;
|
||||
pointer-events: auto;
|
||||
background-color: $modal-content-bg;
|
||||
background-clip: padding-box;
|
||||
border: $modal-content-border-width solid $modal-content-border-color;
|
||||
@include border-radius($modal-content-border-radius);
|
||||
@include box-shadow($modal-content-box-shadow-xs);
|
||||
// Remove focus outline from opened modal
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
// Modal background
|
||||
.modal-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-modal-backdrop;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: $modal-backdrop-bg;
|
||||
|
||||
// Fade for backdrop
|
||||
&.fade { opacity: 0; }
|
||||
&.show { opacity: $modal-backdrop-opacity; }
|
||||
}
|
||||
|
||||
// Modal header
|
||||
// Top section of the modal w/ title and dismiss
|
||||
.modal-header {
|
||||
display: flex;
|
||||
align-items: flex-start; // so the close btn always stays on the upper right corner
|
||||
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
|
||||
padding: $modal-header-padding;
|
||||
border-bottom: $modal-header-border-width solid $modal-header-border-color;
|
||||
@include border-top-radius($modal-content-inner-border-radius);
|
||||
|
||||
.close {
|
||||
padding: $modal-header-padding;
|
||||
// auto on the left force icon to the right even when there is no .modal-title
|
||||
margin: (-$modal-header-padding-y) (-$modal-header-padding-x) (-$modal-header-padding-y) auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Title text within header
|
||||
.modal-title {
|
||||
margin-bottom: 0;
|
||||
line-height: $modal-title-line-height;
|
||||
}
|
||||
|
||||
// Modal body
|
||||
// Where all modal content resides (sibling of .modal-header and .modal-footer)
|
||||
.modal-body {
|
||||
position: relative;
|
||||
// Enable `flex-grow: 1` so that the body take up as much space as possible
|
||||
// when there should be a fixed height on `.modal-dialog`.
|
||||
flex: 1 1 auto;
|
||||
padding: $modal-inner-padding;
|
||||
}
|
||||
|
||||
// Footer (for actions)
|
||||
.modal-footer {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center; // vertically center
|
||||
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
|
||||
padding: $modal-inner-padding - $modal-footer-margin-between / 2;
|
||||
border-top: $modal-footer-border-width solid $modal-footer-border-color;
|
||||
@include border-bottom-radius($modal-content-inner-border-radius);
|
||||
|
||||
// Place margin between footer elements
|
||||
// This solution is far from ideal because of the universal selector usage,
|
||||
// but is needed to fix https://github.com/twbs/bootstrap/issues/24800
|
||||
// stylelint-disable-next-line selector-max-universal
|
||||
> * {
|
||||
margin: $modal-footer-margin-between / 2;
|
||||
}
|
||||
}
|
||||
|
||||
// Measure scrollbar width for padding body during modal show/hide
|
||||
.modal-scrollbar-measure {
|
||||
position: absolute;
|
||||
top: -9999px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
// Scale up the modal
|
||||
@include media-breakpoint-up(sm) {
|
||||
// Automatically set modal's width for larger viewports
|
||||
.modal-dialog {
|
||||
max-width: $modal-md;
|
||||
margin: $modal-dialog-margin-y-sm-up auto;
|
||||
}
|
||||
|
||||
.modal-dialog-scrollable {
|
||||
max-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
|
||||
|
||||
.modal-content {
|
||||
max-height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
|
||||
}
|
||||
}
|
||||
|
||||
.modal-dialog-centered {
|
||||
min-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
|
||||
|
||||
&::before {
|
||||
height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
|
||||
height: min-content;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
@include box-shadow($modal-content-box-shadow-sm-up);
|
||||
}
|
||||
|
||||
.modal-sm { max-width: $modal-sm; }
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
.modal-lg,
|
||||
.modal-xl {
|
||||
max-width: $modal-lg;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(xl) {
|
||||
.modal-xl { max-width: $modal-xl; }
|
||||
}
|
121
themes/ace-documentation/assets/css/bootstrap/_nav.scss
Normal file
@ -0,0 +1,121 @@
|
||||
// Base class
|
||||
//
|
||||
// Kickstart any navigation component with a set of style resets. Works with
|
||||
// `<nav>`s, `<ul>`s or `<ol>`s.
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding-left: 0;
|
||||
margin-bottom: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
display: block;
|
||||
padding: $nav-link-padding-y $nav-link-padding-x;
|
||||
text-decoration: if($link-decoration == none, null, none);
|
||||
|
||||
@include hover-focus() {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
// Disabled state lightens text
|
||||
&.disabled {
|
||||
color: $nav-link-disabled-color;
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Tabs
|
||||
//
|
||||
|
||||
.nav-tabs {
|
||||
border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;
|
||||
|
||||
.nav-item {
|
||||
margin-bottom: -$nav-tabs-border-width;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
border: $nav-tabs-border-width solid transparent;
|
||||
@include border-top-radius($nav-tabs-border-radius);
|
||||
|
||||
@include hover-focus() {
|
||||
border-color: $nav-tabs-link-hover-border-color;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $nav-link-disabled-color;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-link.active,
|
||||
.nav-item.show .nav-link {
|
||||
color: $nav-tabs-link-active-color;
|
||||
background-color: $nav-tabs-link-active-bg;
|
||||
border-color: $nav-tabs-link-active-border-color;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
// Make dropdown border overlap tab border
|
||||
margin-top: -$nav-tabs-border-width;
|
||||
// Remove the top rounded corners here since there is a hard edge above the menu
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Pills
|
||||
//
|
||||
|
||||
.nav-pills {
|
||||
.nav-link {
|
||||
@include border-radius($nav-pills-border-radius);
|
||||
}
|
||||
|
||||
.nav-link.active,
|
||||
.show > .nav-link {
|
||||
color: $nav-pills-link-active-color;
|
||||
background-color: $nav-pills-link-active-bg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Justified variants
|
||||
//
|
||||
|
||||
.nav-fill {
|
||||
.nav-item {
|
||||
flex: 1 1 auto;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-justified {
|
||||
.nav-item {
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Tabbable tabs
|
||||
//
|
||||
// Hide tabbable panes to start, show them when `.active`
|
||||
|
||||
.tab-content {
|
||||
> .tab-pane {
|
||||
display: none;
|
||||
}
|
||||
> .active {
|
||||
display: block;
|
||||
}
|
||||
}
|
324
themes/ace-documentation/assets/css/bootstrap/_navbar.scss
Normal file
@ -0,0 +1,324 @@
|
||||
// Contents
|
||||
//
|
||||
// Navbar
|
||||
// Navbar brand
|
||||
// Navbar nav
|
||||
// Navbar text
|
||||
// Navbar divider
|
||||
// Responsive navbar
|
||||
// Navbar position
|
||||
// Navbar themes
|
||||
|
||||
|
||||
// Navbar
|
||||
//
|
||||
// Provide a static navbar from which we expand to create full-width, fixed, and
|
||||
// other navbar variations.
|
||||
|
||||
.navbar {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: wrap; // allow us to do the line break for collapsing content
|
||||
align-items: center;
|
||||
justify-content: space-between; // space out brand from logo
|
||||
padding: $navbar-padding-y $navbar-padding-x;
|
||||
|
||||
// Because flex properties aren't inherited, we need to redeclare these first
|
||||
// few properties so that content nested within behave properly.
|
||||
%container-flex-properties {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.container,
|
||||
.container-fluid {
|
||||
@extend %container-flex-properties;
|
||||
}
|
||||
|
||||
@each $breakpoint, $container-max-width in $container-max-widths {
|
||||
> .container#{breakpoint-infix($breakpoint, $container-max-widths)} {
|
||||
@extend %container-flex-properties;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar brand
|
||||
//
|
||||
// Used for brand, project, or site names.
|
||||
|
||||
.navbar-brand {
|
||||
display: inline-block;
|
||||
padding-top: $navbar-brand-padding-y;
|
||||
padding-bottom: $navbar-brand-padding-y;
|
||||
margin-right: $navbar-padding-x;
|
||||
@include font-size($navbar-brand-font-size);
|
||||
line-height: inherit;
|
||||
white-space: nowrap;
|
||||
|
||||
@include hover-focus() {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar nav
|
||||
//
|
||||
// Custom navbar navigation (doesn't require `.nav`, but does make use of `.nav-link`).
|
||||
|
||||
.navbar-nav {
|
||||
display: flex;
|
||||
flex-direction: column; // cannot use `inherit` to get the `.navbar`s value
|
||||
padding-left: 0;
|
||||
margin-bottom: 0;
|
||||
list-style: none;
|
||||
|
||||
.nav-link {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
position: static;
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar text
|
||||
//
|
||||
//
|
||||
|
||||
.navbar-text {
|
||||
display: inline-block;
|
||||
padding-top: $nav-link-padding-y;
|
||||
padding-bottom: $nav-link-padding-y;
|
||||
}
|
||||
|
||||
|
||||
// Responsive navbar
|
||||
//
|
||||
// Custom styles for responsive collapsing and toggling of navbar contents.
|
||||
// Powered by the collapse Bootstrap JavaScript plugin.
|
||||
|
||||
// When collapsed, prevent the toggleable navbar contents from appearing in
|
||||
// the default flexbox row orientation. Requires the use of `flex-wrap: wrap`
|
||||
// on the `.navbar` parent.
|
||||
.navbar-collapse {
|
||||
flex-basis: 100%;
|
||||
flex-grow: 1;
|
||||
// For always expanded or extra full navbars, ensure content aligns itself
|
||||
// properly vertically. Can be easily overridden with flex utilities.
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
// Button for toggling the navbar when in its collapsed state
|
||||
.navbar-toggler {
|
||||
padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
|
||||
@include font-size($navbar-toggler-font-size);
|
||||
line-height: 1;
|
||||
background-color: transparent; // remove default button style
|
||||
border: $border-width solid transparent; // remove default button style
|
||||
@include border-radius($navbar-toggler-border-radius);
|
||||
|
||||
@include hover-focus() {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Keep as a separate element so folks can easily override it with another icon
|
||||
// or image file as needed.
|
||||
.navbar-toggler-icon {
|
||||
display: inline-block;
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
vertical-align: middle;
|
||||
content: "";
|
||||
background: no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
// Generate series of `.navbar-expand-*` responsive classes for configuring
|
||||
// where your navbar collapses.
|
||||
.navbar-expand {
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
||||
$infix: breakpoint-infix($next, $grid-breakpoints);
|
||||
|
||||
&#{$infix} {
|
||||
@include media-breakpoint-down($breakpoint) {
|
||||
%container-navbar-expand-#{$breakpoint} {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
> .container,
|
||||
> .container-fluid {
|
||||
@extend %container-navbar-expand-#{$breakpoint};
|
||||
}
|
||||
|
||||
@each $size, $container-max-width in $container-max-widths {
|
||||
> .container#{breakpoint-infix($size, $container-max-widths)} {
|
||||
@extend %container-navbar-expand-#{$breakpoint};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up($next) {
|
||||
flex-flow: row nowrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.navbar-nav {
|
||||
flex-direction: row;
|
||||
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding-right: $navbar-nav-link-padding-x;
|
||||
padding-left: $navbar-nav-link-padding-x;
|
||||
}
|
||||
}
|
||||
|
||||
// For nesting containers, have to redeclare for alignment purposes
|
||||
%container-nesting-#{$breakpoint} {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
> .container,
|
||||
> .container-fluid {
|
||||
@extend %container-nesting-#{$breakpoint};
|
||||
}
|
||||
|
||||
@each $size, $container-max-width in $container-max-widths {
|
||||
> .container#{breakpoint-infix($size, $container-max-widths)} {
|
||||
@extend %container-nesting-#{$breakpoint};
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-collapse {
|
||||
display: flex !important; // stylelint-disable-line declaration-no-important
|
||||
|
||||
// Changes flex-bases to auto because of an IE10 bug
|
||||
flex-basis: auto;
|
||||
}
|
||||
|
||||
.navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar themes
|
||||
//
|
||||
// Styles for switching between navbars with light or dark background.
|
||||
|
||||
// Dark links against a light background
|
||||
.navbar-light {
|
||||
.navbar-brand {
|
||||
color: $navbar-light-brand-color;
|
||||
|
||||
@include hover-focus() {
|
||||
color: $navbar-light-brand-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-nav {
|
||||
.nav-link {
|
||||
color: $navbar-light-color;
|
||||
|
||||
@include hover-focus() {
|
||||
color: $navbar-light-hover-color;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $navbar-light-disabled-color;
|
||||
}
|
||||
}
|
||||
|
||||
.show > .nav-link,
|
||||
.active > .nav-link,
|
||||
.nav-link.show,
|
||||
.nav-link.active {
|
||||
color: $navbar-light-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-toggler {
|
||||
color: $navbar-light-color;
|
||||
border-color: $navbar-light-toggler-border-color;
|
||||
}
|
||||
|
||||
.navbar-toggler-icon {
|
||||
background-image: escape-svg($navbar-light-toggler-icon-bg);
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
color: $navbar-light-color;
|
||||
a {
|
||||
color: $navbar-light-active-color;
|
||||
|
||||
@include hover-focus() {
|
||||
color: $navbar-light-active-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// White links against a dark background
|
||||
.navbar-dark {
|
||||
.navbar-brand {
|
||||
color: $navbar-dark-brand-color;
|
||||
|
||||
@include hover-focus() {
|
||||
color: $navbar-dark-brand-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-nav {
|
||||
.nav-link {
|
||||
color: $navbar-dark-color;
|
||||
|
||||
@include hover-focus() {
|
||||
color: $navbar-dark-hover-color;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $navbar-dark-disabled-color;
|
||||
}
|
||||
}
|
||||
|
||||
.show > .nav-link,
|
||||
.active > .nav-link,
|
||||
.nav-link.show,
|
||||
.nav-link.active {
|
||||
color: $navbar-dark-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-toggler {
|
||||
color: $navbar-dark-color;
|
||||
border-color: $navbar-dark-toggler-border-color;
|
||||
}
|
||||
|
||||
.navbar-toggler-icon {
|
||||
background-image: escape-svg($navbar-dark-toggler-icon-bg);
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
color: $navbar-dark-color;
|
||||
a {
|
||||
color: $navbar-dark-active-color;
|
||||
|
||||
@include hover-focus() {
|
||||
color: $navbar-dark-active-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
.pagination {
|
||||
display: flex;
|
||||
@include list-unstyled();
|
||||
@include border-radius();
|
||||
}
|
||||
|
||||
.page-link {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: $pagination-padding-y $pagination-padding-x;
|
||||
margin-left: -$pagination-border-width;
|
||||
line-height: $pagination-line-height;
|
||||
color: $pagination-color;
|
||||
text-decoration: if($link-decoration == none, null, none);
|
||||
background-color: $pagination-bg;
|
||||
border: $pagination-border-width solid $pagination-border-color;
|
||||
|
||||
&:hover {
|
||||
z-index: 2;
|
||||
color: $pagination-hover-color;
|
||||
text-decoration: none;
|
||||
background-color: $pagination-hover-bg;
|
||||
border-color: $pagination-hover-border-color;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
z-index: 3;
|
||||
outline: $pagination-focus-outline;
|
||||
box-shadow: $pagination-focus-box-shadow;
|
||||
}
|
||||
}
|
||||
|
||||
.page-item {
|
||||
&:first-child {
|
||||
.page-link {
|
||||
margin-left: 0;
|
||||
@include border-left-radius($border-radius);
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
.page-link {
|
||||
@include border-right-radius($border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
&.active .page-link {
|
||||
z-index: 3;
|
||||
color: $pagination-active-color;
|
||||
background-color: $pagination-active-bg;
|
||||
border-color: $pagination-active-border-color;
|
||||
}
|
||||
|
||||
&.disabled .page-link {
|
||||
color: $pagination-disabled-color;
|
||||
pointer-events: none;
|
||||
// Opinionated: remove the "hand" cursor set previously for .page-link
|
||||
cursor: auto;
|
||||
background-color: $pagination-disabled-bg;
|
||||
border-color: $pagination-disabled-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Sizing
|
||||
//
|
||||
|
||||
.pagination-lg {
|
||||
@include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $border-radius-lg);
|
||||
}
|
||||
|
||||
.pagination-sm {
|
||||
@include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, $border-radius-sm);
|
||||
}
|
170
themes/ace-documentation/assets/css/bootstrap/_popover.scss
Normal file
@ -0,0 +1,170 @@
|
||||
.popover {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-popover;
|
||||
display: block;
|
||||
max-width: $popover-max-width;
|
||||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||
// So reset our font and text properties to avoid inheriting weird values.
|
||||
@include reset-text();
|
||||
@include font-size($popover-font-size);
|
||||
// Allow breaking very long words so they don't overflow the popover's bounds
|
||||
word-wrap: break-word;
|
||||
background-color: $popover-bg;
|
||||
background-clip: padding-box;
|
||||
border: $popover-border-width solid $popover-border-color;
|
||||
@include border-radius($popover-border-radius);
|
||||
@include box-shadow($popover-box-shadow);
|
||||
|
||||
.arrow {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: $popover-arrow-width;
|
||||
height: $popover-arrow-height;
|
||||
margin: 0 $popover-border-radius;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
content: "";
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-top {
|
||||
margin-bottom: $popover-arrow-height;
|
||||
|
||||
> .arrow {
|
||||
bottom: subtract(-$popover-arrow-height, $popover-border-width);
|
||||
|
||||
&::before {
|
||||
bottom: 0;
|
||||
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-top-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
&::after {
|
||||
bottom: $popover-border-width;
|
||||
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-top-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-right {
|
||||
margin-left: $popover-arrow-height;
|
||||
|
||||
> .arrow {
|
||||
left: subtract(-$popover-arrow-height, $popover-border-width);
|
||||
width: $popover-arrow-height;
|
||||
height: $popover-arrow-width;
|
||||
margin: $popover-border-radius 0; // make sure the arrow does not touch the popover's rounded corners
|
||||
|
||||
&::before {
|
||||
left: 0;
|
||||
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-right-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
&::after {
|
||||
left: $popover-border-width;
|
||||
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-right-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-bottom {
|
||||
margin-top: $popover-arrow-height;
|
||||
|
||||
> .arrow {
|
||||
top: subtract(-$popover-arrow-height, $popover-border-width);
|
||||
|
||||
&::before {
|
||||
top: 0;
|
||||
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
|
||||
border-bottom-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
&::after {
|
||||
top: $popover-border-width;
|
||||
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
|
||||
border-bottom-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
|
||||
// This will remove the popover-header's border just below the arrow
|
||||
.popover-header::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
display: block;
|
||||
width: $popover-arrow-width;
|
||||
margin-left: -$popover-arrow-width / 2;
|
||||
content: "";
|
||||
border-bottom: $popover-border-width solid $popover-header-bg;
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-left {
|
||||
margin-right: $popover-arrow-height;
|
||||
|
||||
> .arrow {
|
||||
right: subtract(-$popover-arrow-height, $popover-border-width);
|
||||
width: $popover-arrow-height;
|
||||
height: $popover-arrow-width;
|
||||
margin: $popover-border-radius 0; // make sure the arrow does not touch the popover's rounded corners
|
||||
|
||||
&::before {
|
||||
right: 0;
|
||||
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
|
||||
border-left-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
&::after {
|
||||
right: $popover-border-width;
|
||||
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
|
||||
border-left-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-auto {
|
||||
&[x-placement^="top"] {
|
||||
@extend .bs-popover-top;
|
||||
}
|
||||
&[x-placement^="right"] {
|
||||
@extend .bs-popover-right;
|
||||
}
|
||||
&[x-placement^="bottom"] {
|
||||
@extend .bs-popover-bottom;
|
||||
}
|
||||
&[x-placement^="left"] {
|
||||
@extend .bs-popover-left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Offset the popover to account for the popover arrow
|
||||
.popover-header {
|
||||
padding: $popover-header-padding-y $popover-header-padding-x;
|
||||
margin-bottom: 0; // Reset the default from Reboot
|
||||
@include font-size($font-size-base);
|
||||
color: $popover-header-color;
|
||||
background-color: $popover-header-bg;
|
||||
border-bottom: $popover-border-width solid darken($popover-header-bg, 5%);
|
||||
@include border-top-radius($popover-inner-border-radius);
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.popover-body {
|
||||
padding: $popover-body-padding-y $popover-body-padding-x;
|
||||
color: $popover-body-color;
|
||||
}
|
141
themes/ace-documentation/assets/css/bootstrap/_print.scss
Normal file
@ -0,0 +1,141 @@
|
||||
// stylelint-disable declaration-no-important, selector-no-qualifying-type
|
||||
|
||||
// Source: https://github.com/h5bp/main.css/blob/master/src/_print.css
|
||||
|
||||
// ==========================================================================
|
||||
// Print styles.
|
||||
// Inlined to avoid the additional HTTP request:
|
||||
// https://www.phpied.com/delay-loading-your-print-css/
|
||||
// ==========================================================================
|
||||
|
||||
@if $enable-print-styles {
|
||||
@media print {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
// Bootstrap specific; comment out `color` and `background`
|
||||
//color: $black !important; // Black prints faster
|
||||
text-shadow: none !important;
|
||||
//background: transparent !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
a {
|
||||
&:not(.btn) {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
// Bootstrap specific; comment the following selector out
|
||||
//a[href]::after {
|
||||
// content: " (" attr(href) ")";
|
||||
//}
|
||||
|
||||
abbr[title]::after {
|
||||
content: " (" attr(title) ")";
|
||||
}
|
||||
|
||||
// Bootstrap specific; comment the following selector out
|
||||
//
|
||||
// Don't show links that are fragment identifiers,
|
||||
// or use the `javascript:` pseudo protocol
|
||||
//
|
||||
|
||||
//a[href^="#"]::after,
|
||||
//a[href^="javascript:"]::after {
|
||||
// content: "";
|
||||
//}
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
pre,
|
||||
blockquote {
|
||||
border: $border-width solid $gray-500; // Bootstrap custom code; using `$border-width` instead of 1px
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
//
|
||||
// Printing Tables:
|
||||
// https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
|
||||
//
|
||||
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
|
||||
tr,
|
||||
img {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
p,
|
||||
h2,
|
||||
h3 {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
|
||||
// Bootstrap specific changes start
|
||||
|
||||
// Specify a size and min-width to make printing closer across browsers.
|
||||
// We don't set margin here because it breaks `size` in Chrome. We also
|
||||
// don't use `!important` on `size` as it breaks in Chrome.
|
||||
@page {
|
||||
size: $print-page-size;
|
||||
}
|
||||
body {
|
||||
min-width: $print-body-min-width !important;
|
||||
}
|
||||
.container {
|
||||
min-width: $print-body-min-width !important;
|
||||
}
|
||||
|
||||
// Bootstrap components
|
||||
.navbar {
|
||||
display: none;
|
||||
}
|
||||
.badge {
|
||||
border: $border-width solid $black;
|
||||
}
|
||||
|
||||
.table {
|
||||
border-collapse: collapse !important;
|
||||
|
||||
td,
|
||||
th {
|
||||
background-color: $white !important;
|
||||
}
|
||||
}
|
||||
|
||||
.table-bordered {
|
||||
th,
|
||||
td {
|
||||
border: 1px solid $gray-300 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.table-dark {
|
||||
color: inherit;
|
||||
|
||||
th,
|
||||
td,
|
||||
thead th,
|
||||
tbody + tbody {
|
||||
border-color: $table-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
.table .thead-dark th {
|
||||
color: inherit;
|
||||
border-color: $table-border-color;
|
||||
}
|
||||
|
||||
// Bootstrap specific changes end
|
||||
}
|
||||
}
|
47
themes/ace-documentation/assets/css/bootstrap/_progress.scss
Normal file
@ -0,0 +1,47 @@
|
||||
// Disable animation if transitions are disabled
|
||||
@if $enable-transitions {
|
||||
@keyframes progress-bar-stripes {
|
||||
from { background-position: $progress-height 0; }
|
||||
to { background-position: 0 0; }
|
||||
}
|
||||
}
|
||||
|
||||
.progress {
|
||||
display: flex;
|
||||
height: $progress-height;
|
||||
overflow: hidden; // force rounded corners by cropping it
|
||||
line-height: 0;
|
||||
@include font-size($progress-font-size);
|
||||
background-color: $progress-bg;
|
||||
@include border-radius($progress-border-radius);
|
||||
@include box-shadow($progress-box-shadow);
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
color: $progress-bar-color;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
background-color: $progress-bar-bg;
|
||||
@include transition($progress-bar-transition);
|
||||
}
|
||||
|
||||
.progress-bar-striped {
|
||||
@include gradient-striped();
|
||||
background-size: $progress-height $progress-height;
|
||||
}
|
||||
|
||||
@if $enable-transitions {
|
||||
.progress-bar-animated {
|
||||
animation: progress-bar-stripes $progress-bar-animation-timing;
|
||||
|
||||
@if $enable-prefers-reduced-motion-media-query {
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
480
themes/ace-documentation/assets/css/bootstrap/_reboot.scss
Normal file
@ -0,0 +1,480 @@
|
||||
// stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
|
||||
|
||||
// Reboot
|
||||
//
|
||||
// Normalization of HTML elements, manually forked from Normalize.css to remove
|
||||
// styles targeting irrelevant browsers while applying new styles.
|
||||
//
|
||||
// Normalize is licensed MIT. https://github.com/necolas/normalize.css
|
||||
|
||||
|
||||
// Document
|
||||
//
|
||||
// 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
|
||||
// 2. Change the default font family in all browsers.
|
||||
// 3. Correct the line height in all browsers.
|
||||
// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
|
||||
// 5. Change the default tap highlight to be completely transparent in iOS.
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box; // 1
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif; // 2
|
||||
line-height: 1.15; // 3
|
||||
-webkit-text-size-adjust: 100%; // 4
|
||||
-webkit-tap-highlight-color: rgba($black, 0); // 5
|
||||
}
|
||||
|
||||
// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
|
||||
// TODO: remove in v5
|
||||
// stylelint-disable-next-line selector-list-comma-newline-after
|
||||
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// Body
|
||||
//
|
||||
// 1. Remove the margin in all browsers.
|
||||
// 2. As a best practice, apply a default `background-color`.
|
||||
// 3. Set an explicit initial text-align value so that we can later use
|
||||
// the `inherit` value on things like `<th>` elements.
|
||||
|
||||
body {
|
||||
margin: 0; // 1
|
||||
font-family: $font-family-base;
|
||||
@include font-size($font-size-base);
|
||||
font-weight: $font-weight-base;
|
||||
line-height: $line-height-base;
|
||||
color: $body-color;
|
||||
text-align: left; // 3
|
||||
background-color: $body-bg; // 2
|
||||
}
|
||||
|
||||
// Future-proof rule: in browsers that support :focus-visible, suppress the focus outline
|
||||
// on elements that programmatically receive focus but wouldn't normally show a visible
|
||||
// focus outline. In general, this would mean that the outline is only applied if the
|
||||
// interaction that led to the element receiving programmatic focus was a keyboard interaction,
|
||||
// or the browser has somehow determined that the user is primarily a keyboard user and/or
|
||||
// wants focus outlines to always be presented.
|
||||
//
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible
|
||||
// and https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/
|
||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
||||
outline: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
// Content grouping
|
||||
//
|
||||
// 1. Add the correct box sizing in Firefox.
|
||||
// 2. Show the overflow in Edge and IE.
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; // 1
|
||||
height: 0; // 1
|
||||
overflow: visible; // 2
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Typography
|
||||
//
|
||||
|
||||
// Remove top margins from headings
|
||||
//
|
||||
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
|
||||
// margin for easier control within type scales as it avoids margin collapsing.
|
||||
// stylelint-disable-next-line selector-list-comma-newline-after
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: $headings-margin-bottom;
|
||||
}
|
||||
|
||||
// Reset margins on paragraphs
|
||||
//
|
||||
// Similarly, the top margin on `<p>`s get reset. However, we also reset the
|
||||
// bottom margin to use `rem` units instead of `em`.
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: $paragraph-margin-bottom;
|
||||
}
|
||||
|
||||
// Abbreviations
|
||||
//
|
||||
// 1. Duplicate behavior to the data-* attribute for our tooltip plugin
|
||||
// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
// 3. Add explicit cursor to indicate changed behavior.
|
||||
// 4. Remove the bottom border in Firefox 39-.
|
||||
// 5. Prevent the text-decoration to be skipped.
|
||||
|
||||
abbr[title],
|
||||
abbr[data-original-title] { // 1
|
||||
text-decoration: underline; // 2
|
||||
text-decoration: underline dotted; // 2
|
||||
cursor: help; // 3
|
||||
border-bottom: 0; // 4
|
||||
text-decoration-skip-ink: none; // 5
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: $dt-font-weight;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: .5rem;
|
||||
margin-left: 0; // Undo browser default
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari
|
||||
}
|
||||
|
||||
small {
|
||||
@include font-size(80%); // Add the correct font size in all browsers
|
||||
}
|
||||
|
||||
//
|
||||
// Prevent `sub` and `sup` elements from affecting the line height in
|
||||
// all browsers.
|
||||
//
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
@include font-size(75%);
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub { bottom: -.25em; }
|
||||
sup { top: -.5em; }
|
||||
|
||||
|
||||
//
|
||||
// Links
|
||||
//
|
||||
|
||||
a {
|
||||
color: $link-color;
|
||||
text-decoration: $link-decoration;
|
||||
background-color: transparent; // Remove the gray background on active links in IE 10.
|
||||
|
||||
@include hover() {
|
||||
color: $link-hover-color;
|
||||
text-decoration: $link-hover-decoration;
|
||||
}
|
||||
}
|
||||
|
||||
// And undo these styles for placeholder links/named anchors (without href).
|
||||
// It would be more straightforward to just use a[href] in previous block, but that
|
||||
// causes specificity issues in many other styles that are too complex to fix.
|
||||
// See https://github.com/twbs/bootstrap/issues/19402
|
||||
|
||||
a:not([href]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
|
||||
@include hover() {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Code
|
||||
//
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: $font-family-monospace;
|
||||
@include font-size(1em); // Correct the odd `em` font sizing in all browsers.
|
||||
}
|
||||
|
||||
pre {
|
||||
// Remove browser default top margin
|
||||
margin-top: 0;
|
||||
// Reset browser default of `1em` to use `rem`s
|
||||
margin-bottom: 1rem;
|
||||
// Don't allow content to break outside
|
||||
overflow: auto;
|
||||
// Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,
|
||||
// making it impossible to interact with the content
|
||||
-ms-overflow-style: scrollbar;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Figures
|
||||
//
|
||||
|
||||
figure {
|
||||
// Apply a consistent margin strategy (matches our type styles).
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Images and content
|
||||
//
|
||||
|
||||
img {
|
||||
vertical-align: middle;
|
||||
border-style: none; // Remove the border on images inside links in IE 10-.
|
||||
}
|
||||
|
||||
svg {
|
||||
// Workaround for the SVG overflow bug in IE10/11 is still required.
|
||||
// See https://github.com/twbs/bootstrap/issues/26878
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Tables
|
||||
//
|
||||
|
||||
table {
|
||||
border-collapse: collapse; // Prevent double borders
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: $table-cell-padding;
|
||||
padding-bottom: $table-cell-padding;
|
||||
color: $table-caption-color;
|
||||
text-align: left;
|
||||
caption-side: bottom;
|
||||
}
|
||||
|
||||
th {
|
||||
// Matches default `<td>` alignment by inheriting from the `<body>`, or the
|
||||
// closest parent with a set `text-align`.
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Forms
|
||||
//
|
||||
|
||||
label {
|
||||
// Allow labels to use `margin` for spacing.
|
||||
display: inline-block;
|
||||
margin-bottom: $label-margin-bottom;
|
||||
}
|
||||
|
||||
// Remove the default `border-radius` that macOS Chrome adds.
|
||||
//
|
||||
// Details at https://github.com/twbs/bootstrap/issues/24093
|
||||
button {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
// Work around a Firefox/IE bug where the transparent `button` background
|
||||
// results in a loss of the default `button` focus styles.
|
||||
//
|
||||
// Credit: https://github.com/suitcss/base/
|
||||
button:focus {
|
||||
outline: 1px dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0; // Remove the margin in Firefox and Safari
|
||||
font-family: inherit;
|
||||
@include font-size(inherit);
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
overflow: visible; // Show the overflow in Edge
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none; // Remove the inheritance of text transform in Firefox
|
||||
}
|
||||
|
||||
// Set the cursor for non-`<button>` buttons
|
||||
//
|
||||
// Details at https://github.com/twbs/bootstrap/pull/30562
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
// Remove the inheritance of word-wrap in Safari.
|
||||
//
|
||||
// Details at https://github.com/twbs/bootstrap/issues/24990
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
|
||||
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||
// controls in Android 4.
|
||||
// 2. Correct the inability to style clickable types in iOS and Safari.
|
||||
button,
|
||||
[type="button"], // 1
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button; // 2
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled button elements.
|
||||
@if $enable-pointer-cursor-for-buttons {
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
&:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
|
||||
padding: 0; // 2. Remove the padding in IE 10-
|
||||
}
|
||||
|
||||
|
||||
textarea {
|
||||
overflow: auto; // Remove the default vertical scrollbar in IE.
|
||||
// Textareas should really only resize vertically so they don't break their (horizontal) containers.
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
// Browsers set a default `min-width: min-content;` on fieldsets,
|
||||
// unlike e.g. `<div>`s, which have `min-width: 0;` by default.
|
||||
// So we reset that to ensure fieldsets behave more like a standard block element.
|
||||
// See https://github.com/twbs/bootstrap/issues/12359
|
||||
// and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
|
||||
min-width: 0;
|
||||
// Reset the default outline behavior of fieldsets so they don't affect page layout.
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
// 1. Correct the text wrapping in Edge and IE.
|
||||
// 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
legend {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%; // 1
|
||||
padding: 0;
|
||||
margin-bottom: .5rem;
|
||||
@include font-size(1.5rem);
|
||||
line-height: inherit;
|
||||
color: inherit; // 2
|
||||
white-space: normal; // 1
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
}
|
||||
|
||||
// Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type="search"] {
|
||||
// This overrides the extra rounded corners on search inputs in iOS so that our
|
||||
// `.form-control` class can properly style them. Note that this cannot simply
|
||||
// be added to `.form-control` as it's not specific enough. For details, see
|
||||
// https://github.com/twbs/bootstrap/issues/11586.
|
||||
outline-offset: -2px; // 2. Correct the outline style in Safari.
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
//
|
||||
// Remove the inner padding in Chrome and Safari on macOS.
|
||||
//
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
//
|
||||
// 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
// 2. Change font properties to `inherit` in Safari.
|
||||
//
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit; // 2
|
||||
-webkit-appearance: button; // 1
|
||||
}
|
||||
|
||||
//
|
||||
// Correct element displays
|
||||
//
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item; // Add the correct display in all browsers
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none; // Add the correct display in IE
|
||||
}
|
||||
|
||||
// Always hide an element with the `hidden` HTML attribute (from PureCSS).
|
||||
// Needed for proper display in IE 10-.
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
20
themes/ace-documentation/assets/css/bootstrap/_root.scss
Normal file
@ -0,0 +1,20 @@
|
||||
// Do not forget to update getting-started/theming.md!
|
||||
:root {
|
||||
// Custom variable values only support SassScript inside `#{}`.
|
||||
@each $color, $value in $colors {
|
||||
--#{$color}: #{$value};
|
||||
}
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
--#{$color}: #{$value};
|
||||
}
|
||||
|
||||
@each $bp, $value in $grid-breakpoints {
|
||||
--breakpoint-#{$bp}: #{$value};
|
||||
}
|
||||
|
||||
// Use `inspect` for lists so that quoted items keep the quotes.
|
||||
// See https://github.com/sass/sass/issues/2383#issuecomment-336349172
|
||||
--font-family-sans-serif: #{inspect($font-family-sans-serif)};
|
||||
--font-family-monospace: #{inspect($font-family-monospace)};
|
||||
}
|
56
themes/ace-documentation/assets/css/bootstrap/_spinners.scss
Normal file
@ -0,0 +1,56 @@
|
||||
//
|
||||
// Rotating border
|
||||
//
|
||||
|
||||
@keyframes spinner-border {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.spinner-border {
|
||||
display: inline-block;
|
||||
width: $spinner-width;
|
||||
height: $spinner-height;
|
||||
vertical-align: text-bottom;
|
||||
border: $spinner-border-width solid currentColor;
|
||||
border-right-color: transparent;
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: 50%;
|
||||
animation: spinner-border .75s linear infinite;
|
||||
}
|
||||
|
||||
.spinner-border-sm {
|
||||
width: $spinner-width-sm;
|
||||
height: $spinner-height-sm;
|
||||
border-width: $spinner-border-width-sm;
|
||||
}
|
||||
|
||||
//
|
||||
// Growing circle
|
||||
//
|
||||
|
||||
@keyframes spinner-grow {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.spinner-grow {
|
||||
display: inline-block;
|
||||
width: $spinner-width;
|
||||
height: $spinner-height;
|
||||
vertical-align: text-bottom;
|
||||
background-color: currentColor;
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: 50%;
|
||||
opacity: 0;
|
||||
animation: spinner-grow .75s linear infinite;
|
||||
}
|
||||
|
||||
.spinner-grow-sm {
|
||||
width: $spinner-width-sm;
|
||||
height: $spinner-height-sm;
|
||||
}
|
185
themes/ace-documentation/assets/css/bootstrap/_tables.scss
Normal file
@ -0,0 +1,185 @@
|
||||
//
|
||||
// Basic Bootstrap table
|
||||
//
|
||||
|
||||
.table {
|
||||
width: 100%;
|
||||
margin-bottom: $spacer;
|
||||
color: $table-color;
|
||||
background-color: $table-bg; // Reset for nesting within parents with `background-color`.
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: $table-cell-padding;
|
||||
vertical-align: top;
|
||||
border-top: $table-border-width solid $table-border-color;
|
||||
}
|
||||
|
||||
thead th {
|
||||
vertical-align: bottom;
|
||||
border-bottom: (2 * $table-border-width) solid $table-border-color;
|
||||
}
|
||||
|
||||
tbody + tbody {
|
||||
border-top: (2 * $table-border-width) solid $table-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Condensed table w/ half padding
|
||||
//
|
||||
|
||||
.table-sm {
|
||||
th,
|
||||
td {
|
||||
padding: $table-cell-padding-sm;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Border versions
|
||||
//
|
||||
// Add or remove borders all around the table and between all the columns.
|
||||
|
||||
.table-bordered {
|
||||
border: $table-border-width solid $table-border-color;
|
||||
|
||||
th,
|
||||
td {
|
||||
border: $table-border-width solid $table-border-color;
|
||||
}
|
||||
|
||||
thead {
|
||||
th,
|
||||
td {
|
||||
border-bottom-width: 2 * $table-border-width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-borderless {
|
||||
th,
|
||||
td,
|
||||
thead th,
|
||||
tbody + tbody {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Zebra-striping
|
||||
//
|
||||
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
||||
|
||||
.table-striped {
|
||||
tbody tr:nth-of-type(#{$table-striped-order}) {
|
||||
background-color: $table-accent-bg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Hover effect
|
||||
//
|
||||
// Placed here since it has to come after the potential zebra striping
|
||||
|
||||
.table-hover {
|
||||
tbody tr {
|
||||
@include hover() {
|
||||
color: $table-hover-color;
|
||||
background-color: $table-hover-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Table backgrounds
|
||||
//
|
||||
// Exact selectors below required to override `.table-striped` and prevent
|
||||
// inheritance to nested tables.
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
@include table-row-variant($color, theme-color-level($color, $table-bg-level), theme-color-level($color, $table-border-level));
|
||||
}
|
||||
|
||||
@include table-row-variant(active, $table-active-bg);
|
||||
|
||||
|
||||
// Dark styles
|
||||
//
|
||||
// Same table markup, but inverted color scheme: dark background and light text.
|
||||
|
||||
// stylelint-disable-next-line no-duplicate-selectors
|
||||
.table {
|
||||
.thead-dark {
|
||||
th {
|
||||
color: $table-dark-color;
|
||||
background-color: $table-dark-bg;
|
||||
border-color: $table-dark-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
.thead-light {
|
||||
th {
|
||||
color: $table-head-color;
|
||||
background-color: $table-head-bg;
|
||||
border-color: $table-border-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-dark {
|
||||
color: $table-dark-color;
|
||||
background-color: $table-dark-bg;
|
||||
|
||||
th,
|
||||
td,
|
||||
thead th {
|
||||
border-color: $table-dark-border-color;
|
||||
}
|
||||
|
||||
&.table-bordered {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
&.table-striped {
|
||||
tbody tr:nth-of-type(#{$table-striped-order}) {
|
||||
background-color: $table-dark-accent-bg;
|
||||
}
|
||||
}
|
||||
|
||||
&.table-hover {
|
||||
tbody tr {
|
||||
@include hover() {
|
||||
color: $table-dark-hover-color;
|
||||
background-color: $table-dark-hover-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Responsive tables
|
||||
//
|
||||
// Generate series of `.table-responsive-*` classes for configuring the screen
|
||||
// size of where your table will overflow.
|
||||
|
||||
.table-responsive {
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
||||
$infix: breakpoint-infix($next, $grid-breakpoints);
|
||||
|
||||
&#{$infix} {
|
||||
@include media-breakpoint-down($breakpoint) {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
// Prevent double border on horizontal scroll due to use of `display: block;`
|
||||
> .table-bordered {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
44
themes/ace-documentation/assets/css/bootstrap/_toasts.scss
Normal file
@ -0,0 +1,44 @@
|
||||
.toast {
|
||||
max-width: $toast-max-width;
|
||||
overflow: hidden; // cheap rounded corners on nested items
|
||||
@include font-size($toast-font-size);
|
||||
color: $toast-color;
|
||||
background-color: $toast-background-color;
|
||||
background-clip: padding-box;
|
||||
border: $toast-border-width solid $toast-border-color;
|
||||
box-shadow: $toast-box-shadow;
|
||||
backdrop-filter: blur(10px);
|
||||
opacity: 0;
|
||||
@include border-radius($toast-border-radius);
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: $toast-padding-x;
|
||||
}
|
||||
|
||||
&.showing {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.show {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.hide {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.toast-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: $toast-padding-y $toast-padding-x;
|
||||
color: $toast-header-color;
|
||||
background-color: $toast-header-background-color;
|
||||
background-clip: padding-box;
|
||||
border-bottom: $toast-border-width solid $toast-header-border-color;
|
||||
}
|
||||
|
||||
.toast-body {
|
||||
padding: $toast-padding-x; // apply to both vertical and horizontal
|
||||
}
|
115
themes/ace-documentation/assets/css/bootstrap/_tooltip.scss
Normal file
@ -0,0 +1,115 @@
|
||||
// Base class
|
||||
.tooltip {
|
||||
position: absolute;
|
||||
z-index: $zindex-tooltip;
|
||||
display: block;
|
||||
margin: $tooltip-margin;
|
||||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||
// So reset our font and text properties to avoid inheriting weird values.
|
||||
@include reset-text();
|
||||
@include font-size($tooltip-font-size);
|
||||
// Allow breaking very long words so they don't overflow the tooltip's bounds
|
||||
word-wrap: break-word;
|
||||
opacity: 0;
|
||||
|
||||
&.show { opacity: $tooltip-opacity; }
|
||||
|
||||
.arrow {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: $tooltip-arrow-width;
|
||||
height: $tooltip-arrow-height;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-tooltip-top {
|
||||
padding: $tooltip-arrow-height 0;
|
||||
|
||||
.arrow {
|
||||
bottom: 0;
|
||||
|
||||
&::before {
|
||||
top: 0;
|
||||
border-width: $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
|
||||
border-top-color: $tooltip-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-tooltip-right {
|
||||
padding: 0 $tooltip-arrow-height;
|
||||
|
||||
.arrow {
|
||||
left: 0;
|
||||
width: $tooltip-arrow-height;
|
||||
height: $tooltip-arrow-width;
|
||||
|
||||
&::before {
|
||||
right: 0;
|
||||
border-width: ($tooltip-arrow-width / 2) $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
|
||||
border-right-color: $tooltip-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-tooltip-bottom {
|
||||
padding: $tooltip-arrow-height 0;
|
||||
|
||||
.arrow {
|
||||
top: 0;
|
||||
|
||||
&::before {
|
||||
bottom: 0;
|
||||
border-width: 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
|
||||
border-bottom-color: $tooltip-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-tooltip-left {
|
||||
padding: 0 $tooltip-arrow-height;
|
||||
|
||||
.arrow {
|
||||
right: 0;
|
||||
width: $tooltip-arrow-height;
|
||||
height: $tooltip-arrow-width;
|
||||
|
||||
&::before {
|
||||
left: 0;
|
||||
border-width: ($tooltip-arrow-width / 2) 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
|
||||
border-left-color: $tooltip-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-tooltip-auto {
|
||||
&[x-placement^="top"] {
|
||||
@extend .bs-tooltip-top;
|
||||
}
|
||||
&[x-placement^="right"] {
|
||||
@extend .bs-tooltip-right;
|
||||
}
|
||||
&[x-placement^="bottom"] {
|
||||
@extend .bs-tooltip-bottom;
|
||||
}
|
||||
&[x-placement^="left"] {
|
||||
@extend .bs-tooltip-left;
|
||||
}
|
||||
}
|
||||
|
||||
// Wrapper for the tooltip content
|
||||
.tooltip-inner {
|
||||
max-width: $tooltip-max-width;
|
||||
padding: $tooltip-padding-y $tooltip-padding-x;
|
||||
color: $tooltip-color;
|
||||
text-align: center;
|
||||
background-color: $tooltip-bg;
|
||||
@include border-radius($tooltip-border-radius);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
.fade {
|
||||
@include transition($transition-fade);
|
||||
|
||||
&:not(.show) {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.collapse {
|
||||
&:not(.show) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.collapsing {
|
||||
position: relative;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
@include transition($transition-collapse);
|
||||
}
|
125
themes/ace-documentation/assets/css/bootstrap/_type.scss
Normal file
@ -0,0 +1,125 @@
|
||||
// stylelint-disable declaration-no-important, selector-list-comma-newline-after
|
||||
|
||||
//
|
||||
// Headings
|
||||
//
|
||||
|
||||
h1, h2, h3, h4, h5, h6,
|
||||
.h1, .h2, .h3, .h4, .h5, .h6 {
|
||||
margin-bottom: $headings-margin-bottom;
|
||||
font-family: $headings-font-family;
|
||||
font-weight: $headings-font-weight;
|
||||
line-height: $headings-line-height;
|
||||
color: $headings-color;
|
||||
}
|
||||
|
||||
h1, .h1 { @include font-size($h1-font-size); }
|
||||
h2, .h2 { @include font-size($h2-font-size); }
|
||||
h3, .h3 { @include font-size($h3-font-size); }
|
||||
h4, .h4 { @include font-size($h4-font-size); }
|
||||
h5, .h5 { @include font-size($h5-font-size); }
|
||||
h6, .h6 { @include font-size($h6-font-size); }
|
||||
|
||||
.lead {
|
||||
@include font-size($lead-font-size);
|
||||
font-weight: $lead-font-weight;
|
||||
}
|
||||
|
||||
// Type display classes
|
||||
.display-1 {
|
||||
@include font-size($display1-size);
|
||||
font-weight: $display1-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-2 {
|
||||
@include font-size($display2-size);
|
||||
font-weight: $display2-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-3 {
|
||||
@include font-size($display3-size);
|
||||
font-weight: $display3-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-4 {
|
||||
@include font-size($display4-size);
|
||||
font-weight: $display4-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Horizontal rules
|
||||
//
|
||||
|
||||
hr {
|
||||
margin-top: $hr-margin-y;
|
||||
margin-bottom: $hr-margin-y;
|
||||
border: 0;
|
||||
border-top: $hr-border-width solid $hr-border-color;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Emphasis
|
||||
//
|
||||
|
||||
small,
|
||||
.small {
|
||||
@include font-size($small-font-size);
|
||||
font-weight: $font-weight-normal;
|
||||
}
|
||||
|
||||
mark,
|
||||
.mark {
|
||||
padding: $mark-padding;
|
||||
background-color: $mark-bg;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Lists
|
||||
//
|
||||
|
||||
.list-unstyled {
|
||||
@include list-unstyled();
|
||||
}
|
||||
|
||||
// Inline turns list items into inline-block
|
||||
.list-inline {
|
||||
@include list-unstyled();
|
||||
}
|
||||
.list-inline-item {
|
||||
display: inline-block;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: $list-inline-padding;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Misc
|
||||
//
|
||||
|
||||
// Builds on `abbr`
|
||||
.initialism {
|
||||
@include font-size(90%);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
// Blockquotes
|
||||
.blockquote {
|
||||
margin-bottom: $spacer;
|
||||
@include font-size($blockquote-font-size);
|
||||
}
|
||||
|
||||
.blockquote-footer {
|
||||
display: block;
|
||||
@include font-size($blockquote-small-font-size);
|
||||
color: $blockquote-small-color;
|
||||
|
||||
&::before {
|
||||
content: "\2014\00A0"; // em dash, nbsp
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
@import "utilities/align";
|
||||
@import "utilities/background";
|
||||
@import "utilities/borders";
|
||||
@import "utilities/clearfix";
|
||||
@import "utilities/display";
|
||||
@import "utilities/embed";
|
||||
@import "utilities/flex";
|
||||
@import "utilities/float";
|
||||
@import "utilities/interactions";
|
||||
@import "utilities/overflow";
|
||||
@import "utilities/position";
|
||||
@import "utilities/screenreaders";
|
||||
@import "utilities/shadows";
|
||||
@import "utilities/sizing";
|
||||
@import "utilities/spacing";
|
||||
@import "utilities/stretched-link";
|
||||
@import "utilities/text";
|
||||
@import "utilities/visibility";
|
1147
themes/ace-documentation/assets/css/bootstrap/_variables.scss
Normal file
29
themes/ace-documentation/assets/css/bootstrap/bootstrap-grid.scss
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
/*!
|
||||
* Bootstrap Grid v4.5.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors
|
||||
* Copyright 2011-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
-ms-overflow-style: scrollbar;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
@import "functions";
|
||||
@import "variables";
|
||||
|
||||
@import "mixins/breakpoints";
|
||||
@import "mixins/grid-framework";
|
||||
@import "mixins/grid";
|
||||
|
||||
@import "grid";
|
||||
@import "utilities/display";
|
||||
@import "utilities/flex";
|
||||
@import "utilities/spacing";
|
12
themes/ace-documentation/assets/css/bootstrap/bootstrap-reboot.scss
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.5.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors
|
||||
* Copyright 2011-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
|
||||
@import "functions";
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
@import "reboot";
|
44
themes/ace-documentation/assets/css/bootstrap/bootstrap.scss
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/*!
|
||||
* Bootstrap v4.5.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors
|
||||
* Copyright 2011-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
@import "functions";
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
@import "root";
|
||||
@import "reboot";
|
||||
@import "type";
|
||||
@import "images";
|
||||
@import "code";
|
||||
@import "grid";
|
||||
@import "tables";
|
||||
@import "forms";
|
||||
@import "buttons";
|
||||
@import "transitions";
|
||||
@import "dropdown";
|
||||
@import "button-group";
|
||||
@import "input-group";
|
||||
@import "custom-forms";
|
||||
@import "nav";
|
||||
@import "navbar";
|
||||
@import "card";
|
||||
@import "breadcrumb";
|
||||
@import "pagination";
|
||||
@import "badge";
|
||||
@import "jumbotron";
|
||||
@import "alert";
|
||||
@import "progress";
|
||||
@import "media";
|
||||
@import "list-group";
|
||||
@import "close";
|
||||
@import "toasts";
|
||||
@import "modal";
|
||||
@import "tooltip";
|
||||
@import "popover";
|
||||
@import "carousel";
|
||||
@import "spinners";
|
||||
@import "utilities";
|
||||
@import "print";
|
@ -0,0 +1,13 @@
|
||||
@mixin alert-variant($background, $border, $color) {
|
||||
color: $color;
|
||||
@include gradient-bg($background);
|
||||
border-color: $border;
|
||||
|
||||
hr {
|
||||
border-top-color: darken($border, 5%);
|
||||
}
|
||||
|
||||
.alert-link {
|
||||
color: darken($color, 10%);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
// stylelint-disable declaration-no-important
|
||||
|
||||
// Contextual backgrounds
|
||||
|
||||
@mixin bg-variant($parent, $color, $ignore-warning: false) {
|
||||
#{$parent} {
|
||||
background-color: $color !important;
|
||||
}
|
||||
a#{$parent},
|
||||
button#{$parent} {
|
||||
@include hover-focus() {
|
||||
background-color: darken($color, 10%) !important;
|
||||
}
|
||||
}
|
||||
@include deprecate("The `bg-variant` mixin", "v4.4.0", "v5", $ignore-warning);
|
||||
}
|
||||
|
||||
@mixin bg-gradient-variant($parent, $color, $ignore-warning: false) {
|
||||
#{$parent} {
|
||||
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
|
||||
}
|
||||
@include deprecate("The `bg-gradient-variant` mixin", "v4.5.0", "v5", $ignore-warning);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
@mixin badge-variant($bg) {
|
||||
color: color-yiq($bg);
|
||||
background-color: $bg;
|
||||
|
||||
@at-root a#{&} {
|
||||
@include hover-focus() {
|
||||
color: color-yiq($bg);
|
||||
background-color: darken($bg, 10%);
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
// stylelint-disable property-blacklist
|
||||
// Single side border-radius
|
||||
|
||||
// Helper function to replace negative values with 0
|
||||
@function valid-radius($radius) {
|
||||
$return: ();
|
||||
@each $value in $radius {
|
||||
@if type-of($value) == number {
|
||||
$return: append($return, max($value, 0));
|
||||
} @else {
|
||||
$return: append($return, $value);
|
||||
}
|
||||
}
|
||||
@return $return;
|
||||
}
|
||||
|
||||
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
|
||||
@if $enable-rounded {
|
||||
border-radius: valid-radius($radius);
|
||||
}
|
||||
@else if $fallback-border-radius != false {
|
||||
border-radius: $fallback-border-radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-left-radius: valid-radius($radius);
|
||||
border-top-right-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-right-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-right-radius: valid-radius($radius);
|
||||
border-bottom-right-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-bottom-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-bottom-right-radius: valid-radius($radius);
|
||||
border-bottom-left-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-left-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-left-radius: valid-radius($radius);
|
||||
border-bottom-left-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-left-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-left-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-right-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-right-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-bottom-right-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-bottom-right-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-bottom-left-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-bottom-left-radius: valid-radius($radius);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
@mixin box-shadow($shadow...) {
|
||||
@if $enable-shadows {
|
||||
$result: ();
|
||||
|
||||
@if (length($shadow) == 1) {
|
||||
// We can pass `@include box-shadow(none);`
|
||||
$result: $shadow;
|
||||
} @else {
|
||||
// Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;`
|
||||
@for $i from 1 through length($shadow) {
|
||||
@if nth($shadow, $i) != "none" {
|
||||
$result: append($result, nth($shadow, $i), "comma");
|
||||
}
|
||||
}
|
||||
}
|
||||
@if (length($result) > 0) {
|
||||
box-shadow: $result;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
// Breakpoint viewport sizes and media queries.
|
||||
//
|
||||
// Breakpoints are defined as a map of (name: minimum width), order from small to large:
|
||||
//
|
||||
// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)
|
||||
//
|
||||
// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
|
||||
|
||||
// Name of the next breakpoint, or null for the last breakpoint.
|
||||
//
|
||||
// >> breakpoint-next(sm)
|
||||
// md
|
||||
// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
||||
// md
|
||||
// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
|
||||
// md
|
||||
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
|
||||
$n: index($breakpoint-names, $name);
|
||||
@return if($n != null and $n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
|
||||
}
|
||||
|
||||
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
|
||||
//
|
||||
// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
||||
// 576px
|
||||
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
|
||||
$min: map-get($breakpoints, $name);
|
||||
@return if($min != 0, $min, null);
|
||||
}
|
||||
|
||||
// Maximum breakpoint width. Null for the largest (last) breakpoint.
|
||||
// The maximum value is calculated as the minimum of the next one less 0.02px
|
||||
// to work around the limitations of `min-` and `max-` prefixes and viewports with fractional widths.
|
||||
// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
|
||||
// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
|
||||
// See https://bugs.webkit.org/show_bug.cgi?id=178261
|
||||
//
|
||||
// >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
||||
// 767.98px
|
||||
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
|
||||
$next: breakpoint-next($name, $breakpoints);
|
||||
@return if($next, breakpoint-min($next, $breakpoints) - .02, null);
|
||||
}
|
||||
|
||||
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
|
||||
// Useful for making responsive utilities.
|
||||
//
|
||||
// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
||||
// "" (Returns a blank string)
|
||||
// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
||||
// "-sm"
|
||||
@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
|
||||
@return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
|
||||
}
|
||||
|
||||
// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
|
||||
// Makes the @content apply to the given breakpoint and wider.
|
||||
@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {
|
||||
$min: breakpoint-min($name, $breakpoints);
|
||||
@if $min {
|
||||
@media (min-width: $min) {
|
||||
@content;
|
||||
}
|
||||
} @else {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
// Media of at most the maximum breakpoint width. No query for the largest breakpoint.
|
||||
// Makes the @content apply to the given breakpoint and narrower.
|
||||
@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {
|
||||
$max: breakpoint-max($name, $breakpoints);
|
||||
@if $max {
|
||||
@media (max-width: $max) {
|
||||
@content;
|
||||
}
|
||||
} @else {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
// Media that spans multiple breakpoint widths.
|
||||
// Makes the @content apply between the min and max breakpoints
|
||||
@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
|
||||
$min: breakpoint-min($lower, $breakpoints);
|
||||
$max: breakpoint-max($upper, $breakpoints);
|
||||
|
||||
@if $min != null and $max != null {
|
||||
@media (min-width: $min) and (max-width: $max) {
|
||||
@content;
|
||||
}
|
||||
} @else if $max == null {
|
||||
@include media-breakpoint-up($lower, $breakpoints) {
|
||||
@content;
|
||||
}
|
||||
} @else if $min == null {
|
||||
@include media-breakpoint-down($upper, $breakpoints) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Media between the breakpoint's minimum and maximum widths.
|
||||
// No minimum for the smallest breakpoint, and no maximum for the largest one.
|
||||
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
|
||||
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
|
||||
$min: breakpoint-min($name, $breakpoints);
|
||||
$max: breakpoint-max($name, $breakpoints);
|
||||
|
||||
@if $min != null and $max != null {
|
||||
@media (min-width: $min) and (max-width: $max) {
|
||||
@content;
|
||||
}
|
||||
} @else if $max == null {
|
||||
@include media-breakpoint-up($name, $breakpoints) {
|
||||
@content;
|
||||
}
|
||||
} @else if $min == null {
|
||||
@include media-breakpoint-down($name, $breakpoints) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
// Button variants
|
||||
//
|
||||
// Easily pump out default styles, as well as :hover, :focus, :active,
|
||||
// and disabled options for all buttons
|
||||
|
||||
@mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
|
||||
color: color-yiq($background);
|
||||
@include gradient-bg($background);
|
||||
border-color: $border;
|
||||
@include box-shadow($btn-box-shadow);
|
||||
|
||||
@include hover() {
|
||||
color: color-yiq($hover-background);
|
||||
@include gradient-bg($hover-background);
|
||||
border-color: $hover-border;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.focus {
|
||||
color: color-yiq($hover-background);
|
||||
@include gradient-bg($hover-background);
|
||||
border-color: $hover-border;
|
||||
@if $enable-shadows {
|
||||
@include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
|
||||
} @else {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
||||
}
|
||||
}
|
||||
|
||||
// Disabled comes first so active can properly restyle
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
color: color-yiq($background);
|
||||
background-color: $background;
|
||||
border-color: $border;
|
||||
// Remove CSS gradients if they're enabled
|
||||
@if $enable-gradients {
|
||||
background-image: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:disabled):not(.disabled):active,
|
||||
&:not(:disabled):not(.disabled).active,
|
||||
.show > &.dropdown-toggle {
|
||||
color: color-yiq($active-background);
|
||||
background-color: $active-background;
|
||||
@if $enable-gradients {
|
||||
background-image: none; // Remove the gradient for the pressed/active state
|
||||
}
|
||||
border-color: $active-border;
|
||||
|
||||
&:focus {
|
||||
@if $enable-shadows and $btn-active-box-shadow != none {
|
||||
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
|
||||
} @else {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin button-outline-variant($color, $color-hover: color-yiq($color), $active-background: $color, $active-border: $color) {
|
||||
color: $color;
|
||||
border-color: $color;
|
||||
|
||||
@include hover() {
|
||||
color: $color-hover;
|
||||
background-color: $active-background;
|
||||
border-color: $active-border;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.focus {
|
||||
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
color: $color;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&:not(:disabled):not(.disabled):active,
|
||||
&:not(:disabled):not(.disabled).active,
|
||||
.show > &.dropdown-toggle {
|
||||
color: color-yiq($active-background);
|
||||
background-color: $active-background;
|
||||
border-color: $active-border;
|
||||
|
||||
&:focus {
|
||||
@if $enable-shadows and $btn-active-box-shadow != none {
|
||||
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
|
||||
} @else {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Button sizes
|
||||
@mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
|
||||
padding: $padding-y $padding-x;
|
||||
@include font-size($font-size);
|
||||
line-height: $line-height;
|
||||
// Manually declare to provide an override to the browser default
|
||||
@include border-radius($border-radius, 0);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
@mixin caret-down() {
|
||||
border-top: $caret-width solid;
|
||||
border-right: $caret-width solid transparent;
|
||||
border-bottom: 0;
|
||||
border-left: $caret-width solid transparent;
|
||||
}
|
||||
|
||||
@mixin caret-up() {
|
||||
border-top: 0;
|
||||
border-right: $caret-width solid transparent;
|
||||
border-bottom: $caret-width solid;
|
||||
border-left: $caret-width solid transparent;
|
||||
}
|
||||
|
||||
@mixin caret-right() {
|
||||
border-top: $caret-width solid transparent;
|
||||
border-right: 0;
|
||||
border-bottom: $caret-width solid transparent;
|
||||
border-left: $caret-width solid;
|
||||
}
|
||||
|
||||
@mixin caret-left() {
|
||||
border-top: $caret-width solid transparent;
|
||||
border-right: $caret-width solid;
|
||||
border-bottom: $caret-width solid transparent;
|
||||
}
|
||||
|
||||
@mixin caret($direction: down) {
|
||||
@if $enable-caret {
|
||||
&::after {
|
||||
display: inline-block;
|
||||
margin-left: $caret-spacing;
|
||||
vertical-align: $caret-vertical-align;
|
||||
content: "";
|
||||
@if $direction == down {
|
||||
@include caret-down();
|
||||
} @else if $direction == up {
|
||||
@include caret-up();
|
||||
} @else if $direction == right {
|
||||
@include caret-right();
|
||||
}
|
||||
}
|
||||
|
||||
@if $direction == left {
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&::before {
|
||||
display: inline-block;
|
||||
margin-right: $caret-spacing;
|
||||
vertical-align: $caret-vertical-align;
|
||||
content: "";
|
||||
@include caret-left();
|
||||
}
|
||||
}
|
||||
|
||||
&:empty::after {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
@mixin clearfix() {
|
||||
&::after {
|
||||
display: block;
|
||||
clear: both;
|
||||
content: "";
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
// Deprecate mixin
|
||||
//
|
||||
// This mixin can be used to deprecate mixins or functions.
|
||||
// `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to
|
||||
// some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap)
|
||||
@mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) {
|
||||
@if ($enable-deprecation-messages != false and $ignore-warning != true) {
|
||||
@warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}.";
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
// stylelint-disable declaration-no-important
|
||||
|
||||
@mixin float-left() {
|
||||
float: left !important;
|
||||
@include deprecate("The `float-left` mixin", "v4.3.0", "v5");
|
||||
}
|
||||
@mixin float-right() {
|
||||
float: right !important;
|
||||
@include deprecate("The `float-right` mixin", "v4.3.0", "v5");
|
||||
}
|
||||
@mixin float-none() {
|
||||
float: none !important;
|
||||
@include deprecate("The `float-none` mixin", "v4.3.0", "v5");
|
||||
}
|