Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • acides/hiboo
  • frju365/hiboo
  • pascoual/hiboo
  • thedarky/hiboo
  • jeremy/hiboo
  • cyrinux/hiboo
  • a.f/hiboo
  • mickge/hiboo
  • llaq/hiboo
  • vaguelysalaried/hiboo
  • felinn-glotte/hiboo
  • AntoninDelFabbro/hiboo
  • docemmetbrown/hiboo
13 results
Show changes
Commits on Source (273)
Showing
with 1355 additions and 129 deletions
......@@ -2,8 +2,8 @@
*.pyc
__pycache__
# For developers
/package-lock.json
/yarn.lock
/node_modules
/venv
/hiboo/static
.env
\ No newline at end of file
.env
stages:
- test
- build
- publish
test:
stage: test
image: docker.tedomum.net/acides/hiboo-testimage:main
variables:
FLASK_APP: hiboo
services:
- name: redis:alpine
alias: redis
cache:
- paths:
- .venv
before_script:
- poetry config virtualenvs.in-project true
- poetry install --with=dev
script:
- poetry run pytest --screenshot=on
artifacts:
paths:
- test-results/
expire_in: 1 week
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" &&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_REF_PROTECTED == "true"
docker:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME%+*}
rules:
- if: $CI_COMMIT_REF_PROTECTED == "true"
release:dry-run:
stage: publish
image: node:alpine
before_script:
- apk add --no-cache git openssh openssl curl
- eval `ssh-agent -s`
- echo "$SSH_PRIVATE_KEY" | openssl enc -d -base64 | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- git checkout $CI_COMMIT_REF_NAME
- git remote set-url origin "git@forge.tedomum.net:$CI_PROJECT_PATH.git"
- git config --global user.name "${GITLAB_USER_LOGIN}"
- git config --global user.email "${GITLAB_USER_EMAIL}"
- npm ci
script:
- GITLAB_TOKEN=${RELEASE_IT_TOKEN} npx release-it --ci --no-npm --gitlab.release --dry-run
- >-
curl
--header "PRIVATE-TOKEN: ${RELEASE_IT_TOKEN}"
--request PUT
-d "description=$(npx release-it --no-npm --changelog)"
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/merge_requests/${CI_MERGE_REQUEST_IID}"
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" &&
$CI_MERGE_REQUEST_LABELS =~ /RELEASE/ &&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
release:prepare:
stage: publish
extends:
- release:dry-run
script:
- GITLAB_TOKEN=${RELEASE_IT_TOKEN} npx release-it --ci --no-npm
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" &&
$CI_MERGE_REQUEST_LABELS =~ /RELEASE/ &&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
when: manual
release:
stage: publish
extends:
- release:dry-run
script:
- GITLAB_TOKEN=${RELEASE_IT_TOKEN} npx release-it --ci --no-git --no-increment --no-npm --gitlab.release
rules:
- if: $CI_COMMIT_BRANCH == "main"
[git]
requireCommits = true
commitMessage = "chore(release): ${version}"
[plugins]
[plugins."@release-it/conventional-changelog"]
infile = "CHANGELOG.md"
[plugins."@release-it/conventional-changelog".preset]
name = "conventionalcommits"
[plugins."@release-it/bumper"]
in = ["package.json", "pyproject.toml"]
out = ["package.json", "pyproject.toml"]
## [0.1.1](https://forge.tedomum.net/acides/hiboo/compare/0.1.0...0.1.1) (2024-10-02)
### Bug Fixes
* **ci:** release workflow fixes ([762b76b](https://forge.tedomum.net/acides/hiboo/commit/762b76b74d2368c91e5e6b2282019328667559e8))
* **db:** KeyError at profile creation ([5b65184](https://forge.tedomum.net/acides/hiboo/commit/5b6518416dda30362dbc829b9105ec2aabe28933))
* **db:** old deleted transition names remain in history table" ([89a3c47](https://forge.tedomum.net/acides/hiboo/commit/89a3c470de426aeed0e873cea57ec892dca0aac0))
* **l10n:** add some missing strings for translation ([7816ccb](https://forge.tedomum.net/acides/hiboo/commit/7816ccb8fd7a300816a23f4a427698fe3793d496))
* **l10n:** translations update from FELINN glotte ([ed46a86](https://forge.tedomum.net/acides/hiboo/commit/ed46a86322b3c91ffbddf37b44a740953a88d088))
* **l10n:** translations update from FELINN glotte ([4d29d58](https://forge.tedomum.net/acides/hiboo/commit/4d29d58504886aadffd0dcec0c8b58aecd8df3e6))
* **l10n:** translations update from FELINN glotte ([5dbfa3c](https://forge.tedomum.net/acides/hiboo/commit/5dbfa3c786a197a1acc670cbe5591174db7cba00))
## 0.1.0 (2024-09-30)
### Features
* **user:** Ability to check if contact is valid ([5310a7d](https://forge.tedomum.net/acides/hiboo/commit/5310a7db13662997551f0367917823e50c040193))
* **user:** add capability to totp key reset ([c7922d4](https://forge.tedomum.net/acides/hiboo/commit/c7922d4deb90a8d5ec360434e0674934b3555579))
### Bug Fixes
* **account username:** update regex validator ([d608a89](https://forge.tedomum.net/acides/hiboo/commit/d608a891078b1dff207bb6672a76bfb4480533eb))
* addresses [#107](https://forge.tedomum.net/acides/hiboo/issues/107) ([5d02ab1](https://forge.tedomum.net/acides/hiboo/commit/5d02ab11f8081aae377562a49d0acfdeca54cc7c))
* addresses [#84](https://forge.tedomum.net/acides/hiboo/issues/84) ([8ac5ccc](https://forge.tedomum.net/acides/hiboo/commit/8ac5ccc803499948050dded106d6d933ba03ff48))
* addresses [#85](https://forge.tedomum.net/acides/hiboo/issues/85) ([3b49206](https://forge.tedomum.net/acides/hiboo/commit/3b49206b093975d694663bb5bc6ed0ad2738ba92))
* ajout de icon dans l'initialisation de la classe ([1a7da6b](https://forge.tedomum.net/acides/hiboo/commit/1a7da6b0808b90ccce76c5512215e52bde234781))
* brand URL to root ([e6b2c09](https://forge.tedomum.net/acides/hiboo/commit/e6b2c09a0fee60e232e2e076831d68e5aa6c5e4c)), closes [#117](https://forge.tedomum.net/acides/hiboo/issues/117)
* **ci:** stick to Debian Bullseye until we are ready to move on ([c936587](https://forge.tedomum.net/acides/hiboo/commit/c9365879c14d5326e870047a80ed6a92b66f2f99))
* clarify wrong TOTP msg ([cba85a6](https://forge.tedomum.net/acides/hiboo/commit/cba85a6a944c87cff56b29c636f3154d231c825f))
* correct wording ([1a5ef6c](https://forge.tedomum.net/acides/hiboo/commit/1a5ef6cfba55728b30e9242eab5674548ff4714a))
* explicitly create auth disabeled ([68c39e7](https://forge.tedomum.net/acides/hiboo/commit/68c39e761cf3a65d30643a3470802278c45f69aa))
* **form:** fix [#106](https://forge.tedomum.net/acides/hiboo/issues/106) ([e58ad16](https://forge.tedomum.net/acides/hiboo/commit/e58ad16c72fc1898a246b08cf80d5664ba58796b))
* head-fixed tables ([bbd6c6a](https://forge.tedomum.net/acides/hiboo/commit/bbd6c6a9b2187da7a0013b608c6ba16ffc037a48))
* less prominent sign out btn ([1af187d](https://forge.tedomum.net/acides/hiboo/commit/1af187dd7217c24c471206b46dd9387e52339d52))
* loading options ([9dfca70](https://forge.tedomum.net/acides/hiboo/commit/9dfca70b3f93ad55f7b8a5b782880e1cd62f9a89))
* make the alert easier to read ([102b0d6](https://forge.tedomum.net/acides/hiboo/commit/102b0d68913864312db1dd3a5d85fc57466ce4b0))
* make the submit field more visible ([3cee099](https://forge.tedomum.net/acides/hiboo/commit/3cee099b48e7f1ee69a9b8cf4ed1ea336712f698))
* max-height for head-fixed tables ([df4596b](https://forge.tedomum.net/acides/hiboo/commit/df4596bc01df72f0b32ad2ddbf86ae6bdcb65972))
* remove redundant action block ([0c26998](https://forge.tedomum.net/acides/hiboo/commit/0c26998057e68d26fca67c2d51c2a7eca846cb14))
* **sec:** protect transition route ([8af8908](https://forge.tedomum.net/acides/hiboo/commit/8af8908bcc07d656c9fd68a434f1679e01020512))
* **syntax:** replace tabulates by spaces ([43423a4](https://forge.tedomum.net/acides/hiboo/commit/43423a4665234bafc1435dbb06db7d5a7b5df129))
* **text:** disable button text is more explicite ([874de02](https://forge.tedomum.net/acides/hiboo/commit/874de02e2bc3cfd0a963dfc9c05ac22f5150bc5e))
* timeline macro sorting ([45d9023](https://forge.tedomum.net/acides/hiboo/commit/45d9023b498997a1dd336bd8ca3d36bcece994c0))
* TOTP enable form layout ([d60ddb1](https://forge.tedomum.net/acides/hiboo/commit/d60ddb113d4682c67a1a9f45eaf3160000a01a18))
* TOTP home form layout ([26b5ae5](https://forge.tedomum.net/acides/hiboo/commit/26b5ae53f9d06356a04fbd60021bffdfa8ef05c9))
* trailing spaces ([582169f](https://forge.tedomum.net/acides/hiboo/commit/582169fcdcd893de9f80f174098287cfb5cc1f73))
* typo ([beb5f45](https://forge.tedomum.net/acides/hiboo/commit/beb5f454508650fc37160561ad806f9ca2d4a821))
* **typo:** invalid keywor, «d» missing ([8b9511f](https://forge.tedomum.net/acides/hiboo/commit/8b9511f9ed5d8bb477f2c32cd808c466073b268c))
* update all messages.po catalogs ([a52348c](https://forge.tedomum.net/acides/hiboo/commit/a52348cb3e99c8dc67544f892fb567c31a95cd4b))
* update messages.pot ([3d883f8](https://forge.tedomum.net/acides/hiboo/commit/3d883f80c1bae9d7fc0c2095a8aa5440269abf6a))
* uppercases are not mandatory ([608063b](https://forge.tedomum.net/acides/hiboo/commit/608063b3df1fa0b33d9c56fac488f1eda20f7661))
* wording ([ca2cc5d](https://forge.tedomum.net/acides/hiboo/commit/ca2cc5d65eca4d63cd8df8ae02c36c2c5fac27ad))
* wrong path for build static ([ba497df](https://forge.tedomum.net/acides/hiboo/commit/ba497dff59c27a276a5c3e7f5831955f63d78b52))
FROM python:3 AS python_build
COPY requirements-prod.txt /requirements.txt
FROM python:3.12 AS python_build
ENV POETRY_HOME=/usr/local
COPY pyproject.toml poetry.lock mkdocs.yml CHANGELOG.md ./
COPY docs ./docs
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3-dev libxmlsec1 libxmlsec1-dev \
libpq-dev libmariadb-dev \
&& rm -rf /var/cache/apt
RUN pip install -r /requirements.txt
&& apt-get install -y --no-install-recommends \
python3-dev libxmlsec1 libxmlsec1-dev \
libpq-dev libmariadb-dev \
&& rm -rf /var/cache/apt
RUN curl -sSL https://install.python-poetry.org | python3 -
RUN poetry config virtualenvs.create false \
&& poetry install --with prod \
&& poetry run mkdocs build
FROM node:buster AS assets_build
COPY yarn.lock package.json webpack.config.js /
RUN yarn install --pure-lockfile
FROM node:bookworm AS assets_build
COPY package-lock.json package.json webpack.config.js /
RUN npm ci
COPY assets /assets
RUN /node_modules/.bin/webpack-cli
FROM python:3-slim
FROM python:3.12-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
zlib1g libfreetype6 libjpeg62-turbo libopenjp2-7 libtiff5 liblcms2-2 \
libpq5 libmariadb3 libxmlsec1 xmlsec1 \
&& rm -rf /var/cache/apt \
&& mkdir /app
&& apt-get install -y --no-install-recommends \
zlib1g libfreetype6 libjpeg62-turbo libopenjp2-7 libtiff6 liblcms2-2 \
libpq5 libmariadb3 libxmlsec1 xmlsec1 \
&& rm -rf /var/cache/apt \
&& mkdir /app
WORKDIR /app
COPY --from=python_build /usr/local/ /usr/local/
COPY --from=assets_build /hiboo/static /app/hiboo/static
COPY --from=python_build /hiboo/static/docs /app/hiboo/static/docs
COPY --from=python_build /usr/local/ /usr/local/
COPY hiboo /app/hiboo
COPY migrations /app/migrations
RUN pybabel compile -d hiboo/translations
ENV FLASK_APP hiboo
CMD gunicorn -w 4 -b :80 --access-logfile - --error-logfile - --preload 'hiboo:create_app()'
CMD gunicorn -w 4 -b '[::]:80' --access-logfile - --error-logfile - --preload 'hiboo:create_app()'
This diff is collapsed.
......@@ -2,61 +2,67 @@
### Quickstart dev guide:
#### Dependencies:
#### Dependencies:
Debian:
Debian:
`
apt-get install python python-dev libmysqlclient-dev libpq-dev libxmlsec1-dev nodejs npm mariadb-server postgresql-libs python-pip python-virtualenv
`
Arch:
Arch:
`
pacman -S git python python-pip python-virtualenv nodejs npm mariadb postgresql-libs
pacman -S git python python-pip python-virtualenv nodejs npm mariadb postgresql-libs
`
Fedora:
Fedora:
`
dnf install -y mysql-devel postgresql-devel xmlsec1-devel python3-devel libtool-ltdl-devel nodejs
`
Hiboo uses [poetry](https://python-poetry.org) as python dependencies manager.
#### Installation:
Clone Hiboo:
```
git clone https://forge.tedomum.net/acides/hiboo && cd hiboo
```
#### Installation:
Create virtualenv and activate it:
Clone Hiboo:
```
mkdir venv
virtualenv venv
source venv/bin/activate
git clone https://forge.tedomum.net/acides/hiboo && cd hiboo
```
Install dependencies:
Install dependencies:
```
pip install -r requirements.txt
npm install
poetry install --with dev
npm ci
```
Import databases:
```
export FLASK_APP=hiboo
flask db upgrade
poetry run flask db upgrade
```
Generate the static folder:
Generate the static folder:
```
./node_modules/.bin/webpack-cli
./node_modules/.bin/webpack-cli
```
#### Run
#### Run
```
export FLASK_APP=hiboo
flask run --reload
poetry run flask run --reload
```
#### Translate
If you create or update messages in the `python`/`html` source files, don't forget to update the messages catalogs:
```sh
pybabel extract -F babel.cfg -o messages.pot hiboo/
pybabel update -i messages.pot -d hiboo/translations/
```
If you wish to contribute to the translation of Hiboo, join us on [the dedicated Weblate repository](https://glotte.felinn.org/projects/hiboo/forge-tedomum-hiboo/)
### Test instance
Our test instance is running at: https://auth.test.tedomum.net
......@@ -69,3 +75,7 @@ You can find some test services at :
- https://riot.test.tedomum.net
Please contact us if you want specific permissions on the test instance.
### Cache config
You can use all cache method with `CACHE_` environment variables supported by [flask_caching](https://flask-caching.readthedocs.io).
import './app.scss';
import './docs.scss';
import './theme.js';
// visible code blocks
/*
* General
*/
pre {
padding: .75rem;
color: #fff;
background: #212529;
border-radius: .25rem;
a {
text-decoration: none;
}
:not(pre) > code {
padding: .25rem;
color: #fff;
background: #212529;
border-radius: .25rem;
}
// dark theme switcher
/*
* Layout and nav
* credit: ColorlibHQ/AdminLTE
*/
.theme-switch {
display: inline-block;
height: 24px;
.app-wrapper {
position: relative;
width: 50px;
}
display: grid;
grid-template-areas:
"hiboo-app-sidebar hiboo-app-header"
"hiboo-app-sidebar hiboo-app-main "
"hiboo-app-sidebar hiboo-app-footer";
grid-template-rows: -webkit-min-content 1fr -webkit-min-content;
grid-template-rows: min-content 1fr min-content;
grid-template-columns: auto 1fr;
grid-gap: 0;
align-content: stretch;
align-items: stretch;
max-width: 100vw;
min-height: 100vh;
.theme-switch input {
display: none;
}
& > * {
min-width: 0;
}
& > .app-sidebar {
z-index: 1038;
grid-area: hiboo-app-sidebar;
max-width: 250px;
transition:
min-width 0.3s ease-in-out,
max-width 0.3s ease-in-out,
margin-left 0.3s ease-in-out,
margin-right 0.3s ease-in-out;
& .nav-link {
font-size: 0.875rem;
font-weight: 500;
&:not(.active) {
color: inherit;
}
}
& .sidebar-heading {
font-size: 0.75rem;
}
@media (min-width: 768px) {
min-width: 250px;
}
@media (min-width: 992px) {
position: -webkit-sticky;
position: sticky;
top: 0;
bottom: 0;
max-height: 100vh;
}
}
& > .app-main-wrapper {
& > .app-header {
z-index: 1034;
grid-area: hiboo-app-header;
max-width: 100vw;
border-bottom: 1px solid var(--bs-border-color);
transition: 0.3s ease-in-out;
#bd-theme.dropdown-toggle::after {
border-top-color: white;
}
}
& > .app-main {
position: relative;
grid-area: hiboo-app-main;
max-width: 100vw;
padding-bottom: 0.75rem;
transition: 0.3s ease-in-out;
@media (min-width: 992px) {
flex: 1 1 auto;
overflow: auto;
}
}
.slider {
background-color: #ccc;
bottom: 0;
cursor: pointer;
left: 0;
position: absolute;
right: 0;
top: 0;
transition: 400ms;
& > .app-footer {
grid-area: hiboo-app-footer;
width: inherit;
max-width: 100vw;
min-height: 3rem;
padding: 1rem;
color: var(--bs-secondary-color);
background-color: var(--bs-body-bg);
border-top: 1px solid var(--bs-border-color);
transition: 0.3s ease-in-out;
}
@media (min-width: 992px) {
max-height: 100vh;
display: flex;
flex-direction: column;
min-height: 100vh;
}
}
}
.slider::before {
background-color: #fff;
bottom: 4px;
content: "";
height: 16px;
left: 4px;
position: absolute;
transition: 400ms;
width: 16px;
/*
* Timeline
* credit: ColorlibHQ/AdminLTE
*/
[data-bs-theme="dark"] {
--timeline-bg: rgb(22, 23, 25);
}
input:checked + .slider {
background-color: #66bb6a;
[data-bs-theme="light"] {
--timeline-bg: rgb(226, 227, 229);
}
input:checked + .slider::before {
transform: translateX(26px);
.timeline {
position: relative;
padding: 0;
margin: 0 0 45px;
// The line
&::before {
border-radius: 0.25rem;
position: absolute;
top: 0;
bottom: 0;
left: 31px;
width: 4px;
margin: 0;
content: "";
background-color: var(--timeline-bg);
}
> div {
&::before,
&::after {
display: table;
content: "";
}
position: relative;
margin-right: 10px;
margin-bottom: 15px;
> .timeline-item {
position: relative;
padding: 0;
margin-top: 0;
margin-right: 15px;
margin-left: 60px;
> .time {
float: right;
padding: 10px;
font-size: 12px;
}
> .timeline-header {
padding: 10px;
margin: 0;
font-size: 16px;
line-height: 1.1;
}
> .timeline-body,
> .timeline-footer {
padding: 10px;
}
> .timeline-body {
> img {
margin: 10px;
}
> dl,
ol,
ul {
margin: 0;
}
}
}
.timeline-icon {
position: absolute;
top: 0;
left: 18px;
width: 30px;
height: 30px;
font-size: 16px;
line-height: 30px;
text-align: center;
border-radius: 50%;
}
}
> .time-label {
> span {
border-radius: 4px;
display: inline-block;
padding: 5px;
font-weight: 600;
}
}
}
.slider.round {
border-radius: 34px;
/*
* Tables
*/
.table-responsive {
thead th {
position: sticky;
top: 0;
z-index: 1;
}
}
.slider.round::before {
border-radius: 50%;
/*
* Action block
*/
.action-block {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.docs-header-img {
height: 2.5rem;
width:2.5rem;
text-align: center;
background-color: #96897b;
img {
max-height: 2rem;
vertical-align: sub;
}
}
.docs-side {
padding: .1875rem .5rem;
&.ds-link {
margin-top: .125rem;
}
&.ds-sublink {
margin-top: .1rem;
}
&:hover {
color: var(--bs-primary-subtle);
background-color: var(--bs-primary-bg-subtle);
}
}
.docs-content {
img {
padding: .25rem;
background-color: var(--bs-body-bg);
border: var(--bs-border-width) solid var(--bs-border-color);
border-radius: var(--bs-border-radius);
max-width: 100%;
height: auto;
}
}
.docs-search {
#mkdocs-search-results {
h3 {
font-size: 1.25rem;
}
}
}
// credit AdminLTE, original code with css here: https://github.com/ColorlibHQ/AdminLTE/commit/e7ed74d4eae67cf00d6b1be6cbbe5f43e551c7b6
var toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
var currentTheme = localStorage.getItem('theme');
var mainHeader = document.querySelector('.main-header');
if (currentTheme) {
if (currentTheme === 'dark') {
if (!document.body.classList.contains('dark-mode')) {
document.body.classList.add("dark-mode");
}
toggleSwitch.checked = true;
/*!
* Color mode toggler for Bootstrap's docs (https://getbootstrap.com/)
* Copyright 2011-2024 The Bootstrap Authors
* Licensed under the Creative Commons Attribution 3.0 Unported License.
*/
(() => {
'use strict'
const getStoredTheme = () => localStorage.getItem('theme')
const setStoredTheme = theme => localStorage.setItem('theme', theme)
const getPreferredTheme = () => {
const storedTheme = getStoredTheme()
if (storedTheme) {
return storedTheme
}
}
function switchTheme(e) {
if (e.target.checked) {
if (!document.body.classList.contains('dark-mode')) {
document.body.classList.add("dark-mode");
}
localStorage.setItem('theme', 'dark');
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
}
const setTheme = theme => {
if (theme === 'auto') {
document.documentElement.setAttribute('data-bs-theme', (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'))
} else {
if (document.body.classList.contains('dark-mode')) {
document.body.classList.remove("dark-mode");
}
localStorage.setItem('theme', 'light');
document.documentElement.setAttribute('data-bs-theme', theme)
}
}
}
setTheme(getPreferredTheme())
const showActiveTheme = (theme, focus = false) => {
const themeSwitcher = document.querySelector('#bd-theme')
if (!themeSwitcher) {
return
}
const themeSwitcherText = document.querySelector('#bd-theme-text')
const activeThemeIcon = document.querySelector('.theme-icon-active use')
const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`)
const svgOfActiveBtn = btnToActive.querySelector('svg use').getAttribute('href')
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
element.classList.remove('active')
element.setAttribute('aria-pressed', 'false')
})
btnToActive.classList.add('active')
btnToActive.setAttribute('aria-pressed', 'true')
activeThemeIcon.setAttribute('href', svgOfActiveBtn)
const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.dataset.bsThemeValue})`
themeSwitcher.setAttribute('aria-label', themeSwitcherLabel)
if (focus) {
themeSwitcher.focus()
}
}
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
const storedTheme = getStoredTheme()
if (storedTheme !== 'light' && storedTheme !== 'dark') {
setTheme(getPreferredTheme())
}
})
window.addEventListener('DOMContentLoaded', () => {
showActiveTheme(getPreferredTheme())
document.querySelectorAll('[data-bs-theme-value]')
.forEach(toggle => {
toggle.addEventListener('click', () => {
const theme = toggle.getAttribute('data-bs-theme-value')
setStoredTheme(theme)
setTheme(theme)
showActiveTheme(theme, true)
})
})
})
})()
toggleSwitch.addEventListener('change', switchTheme, false);
// FA
import 'admin-lte/plugins/fontawesome-free/css/fontawesome.css';
import 'admin-lte/plugins/fontawesome-free/css/regular.css';
import 'admin-lte/plugins/fontawesome-free/css/solid.css';
// AdminLTE
import 'admin-lte/build/scss/adminlte.scss';
import 'admin-lte/build/js/Layout.js';
import 'admin-lte/build/js/ControlSidebar.js';
import 'admin-lte/build/js/PushMenu.js';
import 'admin-lte/build/js/CardRefresh.js';
[python: **.py]
[jinja2: **/templates/**.html]
extensions=jinja2.ext.autoescape,jinja2.ext.with_
../../CHANGELOG.md
\ No newline at end of file
docs/content/assets/img/logo_hiboo.png

4.18 KiB

docs/content/assets/img/signup.png

46.5 KiB

---
title: Admin Manual
---
## Infrastructure
### Deploy Hiboo
### Update Hiboo
## Accounts
### Create admin account
### Moderation
## Applications
### Create a service
### Setup a client
### Update or migrate a service
## Profils
### Claims (migrate existing profiles)
## Moderation
### profile
### Synapse
## API
## Help
### Logs
### Use this guide
### Get help
**Welcome to the Hiboo documentation!**
/// admonition
attrs: {class: 'alert alert-info'}
**Do not get lost!** Choose the apropriate documentation for your purpose 😉
- [User Manual](user_manual/index.md)
- [Admin Manual](admin_manual/index.md)
- [Changelog](./CHANGELOG.md)
///
---
title: User Manual
---
<!--TODO cherry-pick from https://acides.org/docs/hiboo/manual/-->
## Account
### Create an account
1. Open the sing up link into a [web browser](https://www.mozilla.org/firefox/)
2. Fullfill informations
3. Click `Sign Up` button
![Sign up form](../assets/img/signup.png)
## Profiles
## Contact Infos
## Found a bug?
---
title: Manuel d'administration
---
## Infrastructure
### Deploy Hiboo
### Update Hiboo
## Accounts
### Create admin account
### Moderation
## Applications
### Create a service
### Setup a client
### Update or migrate a service
## Profils
### Claims (migrate existing profiles)
## Moderation
### profile
### Synapse
## API
## Help
### Logs
### Use this guide
### Get help