119 lines
2.6 KiB
Markdown
119 lines
2.6 KiB
Markdown
|
# Service qrcode.libre-service.eu
|
||
|
|
||
|
# Installation
|
||
|
|
||
|
## Pré-requis
|
||
|
|
||
|
Installation des pré-requis :
|
||
|
```
|
||
|
apt install php7.4-gd imagemagick pngquant
|
||
|
```
|
||
|
|
||
|
## L'application
|
||
|
|
||
|
Choix de l'installation par le dépôt Git :
|
||
|
```
|
||
|
cd /var/www/
|
||
|
git clone https://code.antopie.org/miraty/libreqr.git qrcode.libre-service.eu
|
||
|
```
|
||
|
|
||
|
Sélection de la dernière branche officielle :
|
||
|
```
|
||
|
cd /var/www/qrcode.libre-service.eu/
|
||
|
git checkout -b 1.3.0
|
||
|
```
|
||
|
|
||
|
S'assurer des permissions :
|
||
|
```
|
||
|
cd /var/www/qrcode.libre-service.eu/
|
||
|
chown www-data.www-data temp/
|
||
|
chmod ug+rwx temp/
|
||
|
```
|
||
|
|
||
|
## L'arborescence du service
|
||
|
|
||
|
Tout service a son espace dédié :
|
||
|
```
|
||
|
mkdir -p /srv/qrcode.libre-service.eu/
|
||
|
cd /srv/qrcode.libre-service.eu/
|
||
|
ln -s /var/www/qrcode.libre-service.eu
|
||
|
```
|
||
|
Création d'un dépôt ''tools'' à lier à un projet ''qrcode.libre-service.eu-tools'' sur la forge Devinsy :
|
||
|
```
|
||
|
cd /srv/qrcode.libre-service.eu/tools/
|
||
|
echo "# Service qrcode.libre-service.eu" > README.md
|
||
|
git remote add origin ssh://gitea@forge.libre-service.eu:/libre-service.eu/qrcode.libre-service.eu-tools.git
|
||
|
git push -u origin master
|
||
|
```
|
||
|
|
||
|
# Personnalisation
|
||
|
## Thème personnalisé
|
||
|
|
||
|
Créer le thème personnalisé :
|
||
|
```
|
||
|
cd /var/www/qrcode.libre-service.eu/themes/
|
||
|
cp -a dark libre-service.eu
|
||
|
chmod -R go+rX libre-service.eu
|
||
|
```
|
||
|
|
||
|
Fichier ''themes/libre-service.eu/theme.php'' :
|
||
|
```
|
||
|
$variablesTheme = array(
|
||
|
"bg" => "#67a3f2",
|
||
|
"bgField" => "#2e5281",
|
||
|
"bgTextField" => "white",
|
||
|
"fgTextField" => "black",
|
||
|
"fgDefaultTextField" => "#999999",
|
||
|
"bgHelp" => "#2e5281",
|
||
|
"border" => "#2e5281",
|
||
|
"borderHover" => "#808080",
|
||
|
"borderFocus" => "white",
|
||
|
"text" => "white",
|
||
|
"secondaryText" => "white"
|
||
|
```
|
||
|
Propagations spécifiques dans ''style.less'' :
|
||
|
```
|
||
|
#txt {
|
||
|
background-color: @bgTextField;
|
||
|
- color: @text;
|
||
|
+ color: @fgTextField;
|
||
|
[…]
|
||
|
#txt::placeholder {
|
||
|
- color: @secondaryText;
|
||
|
+ color: @fgDefaultTextField;
|
||
|
opacity: 1;
|
||
|
```
|
||
|
|
||
|
Fichier ''config.inc.php'' :
|
||
|
```
|
||
|
-$theme = "dark";
|
||
|
+$theme = "libre-service.eu";
|
||
|
```
|
||
|
|
||
|
## Favicon
|
||
|
|
||
|
Placer le fichier favicon source dans ''themes/libre-service.eu/icons/source.png'' puis :
|
||
|
```
|
||
|
cd /var/www/qrcode.libre-service.eu/
|
||
|
php themes/resize.php libre-service.eu
|
||
|
```
|
||
|
|
||
|
## Logo principal
|
||
|
Placer le fichier logo dans ''themes/libre-service.eu/icons/libre-service.eu-libreqr-logo.png'' puis :
|
||
|
|
||
|
Fichier ''index.php'' :
|
||
|
```
|
||
|
- <img alt="" id="logo" src="themes/<?php echo $theme; ?>/icons/128.png">
|
||
|
+ <img alt="" id="logo" src="themes/<?php echo $theme; ?>/icons/libre-service.eu-libreqr-logo.png">
|
||
|
```
|
||
|
|
||
|
## Titre
|
||
|
Fichier ''index.php'' :
|
||
|
```
|
||
|
- <h1>LibreQR</h1>
|
||
|
+ <h1>QRCode.libre-service.eu</h1>
|
||
|
```
|
||
|
|
||
|
|
||
|
# Mise à jour
|
||
|
TODO
|