Release 1.3.0 #3
21 changed files with 5990 additions and 4166 deletions
50
CHANGELOG.md
Normal file
50
CHANGELOG.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Added
|
||||
|
||||
* i18n system
|
||||
* English l10n
|
||||
* Changelog
|
||||
|
||||
### Changed
|
||||
|
||||
* Use lesserphp instead of lessphp
|
||||
* Move license info and "What's a QR code" at bottom of the page
|
||||
|
||||
## 1.2.0 - 2020-03-23
|
||||
|
||||
### Added
|
||||
|
||||
* Ability to chooses QR code colors
|
||||
|
||||
### Changed
|
||||
|
||||
* The software is now named LibreQR
|
||||
* Parameters now uses GET instead of POST
|
||||
* The OpenSearch plugin now generate QR codes with arguments used when added
|
||||
|
||||
## 1.1.0 - 2019-03-29
|
||||
|
||||
### Added
|
||||
|
||||
* OpenSearch
|
||||
* WebManifest
|
||||
|
||||
### Changed
|
||||
|
||||
* Server-side LESS compilation
|
||||
* Icons are now themed and in multiple dimensions
|
||||
|
||||
### Fixed
|
||||
|
||||
* Placeholder font
|
||||
|
||||
## 1.0.0 - 2019-02-13
|
||||
|
||||
Initial release
|
104
README.md
104
README.md
|
@ -1,93 +1,101 @@
|
|||
# ![](themes/dark/icons/32.png) LibreQR
|
||||
|
||||
## Présentation
|
||||
[Lire ceci en français](README_fr.md)
|
||||
|
||||
Une interface Web pour générer des codes QR en PHP.
|
||||
A PHP Web interface for generating QR codes.
|
||||
|
||||
## Démo
|
||||
## Demo
|
||||
|
||||
Une instance de ce service est disponible à l'adresse [https://qr.antopie.org](https://qr.antopie.org).
|
||||
A LibreQR instance is available at <https://qr.antopie.org>.
|
||||
|
||||
## Fonctionnement
|
||||
## How it works
|
||||
|
||||
LibreQR inclus un plugin [OpenSearch](https://developer.mozilla.org/docs/Web/OpenSearch), ce qui permet de l'ajouter comme moteur de recherche dans Firefox et de sauvegarder vos paramètres.
|
||||
Vous pouvez ainsi générer un code QR directement depuis la barre de recherche avec les réglages de LibreQR utilisés lors de l'ajout comme moteur de recherche.
|
||||
LibreQR includes an [OpenSearch](https://developer.mozilla.org/docs/Web/OpenSearch) plugin, which allows to add it as a search engine in Firefox and to save settings.
|
||||
You can thus generate a QR code directly from your search bar with the LibreQR's settings used at the time of adding as search engine.
|
||||
|
||||
Un [WebManifest](https://developer.mozilla.org/docs/Web/Manifest) est également inclus, ce qui permet de mieux l'intégrer au système via Fennec (Firefox Android) ou Chromium.
|
||||
A [WebManifest](https://developer.mozilla.org/docs/Web/Manifest) is also included, which allows better system integration using Fennec (Firefox Android) ou Chromium.
|
||||
|
||||
Les codes QR générés sont placés dans le dossier temp/, nommés avec le nombre de caractères aléatoires indiqué dans config.inc.php (32 par défaut), puis supprimés après le temps indiqué dans config.inc.php (7 jours par défaut).
|
||||
QR codes generated are located in the temp/ directory, named with the number of random characters set in config.inc.php (32 by default), and then deleted after the time set in config.inc.php (7 days by default).
|
||||
|
||||
See `config.inc.php` for more settings.
|
||||
|
||||
## Installation
|
||||
|
||||
### Générique
|
||||
### Generic
|
||||
|
||||
Je développe directement dans master, donc en production téléchargez plutôt une version stable dans [l'onglet Versions](https://code.antopie.org/miraty/libreqr/releases).
|
||||
Just place this source code in a Web server with PHP.
|
||||
|
||||
Placez ce code source dans un serveur Web avec PHP, tout simplement.
|
||||
`wget https://code.antopie.org/miraty/libreqr/archive/1.2.0.zip`
|
||||
|
||||
GD extension is required.
|
||||
|
||||
`apt install php7.3-gd`
|
||||
|
||||
LibreQR need writing rights on the `temp/` directory.
|
||||
|
||||
```
|
||||
chown -R www-data:www-data /var/www/libreqr/temp
|
||||
chmod -R 600 /var/www/libreqr/temp
|
||||
```
|
||||
|
||||
### YunoHost
|
||||
|
||||
J'ai créé [un paquet](https://code.antopie.org/miraty/qr_ynh/) pour [YunoHost](https://yunohost.org/).
|
||||
There is [a package](https://code.antopie.org/miraty/qr_ynh/) for [YunoHost](https://yunohost.org/).
|
||||
|
||||
Vous pouvez l'installer depuis l'interface Web d'administration ou avec cette commande :
|
||||
For historical reasons, LibreQR is technically named `qr` in YunoHost.
|
||||
|
||||
You can install it from the WebAdmin or with this command :
|
||||
|
||||
```
|
||||
sudo yunohost app install qr
|
||||
```
|
||||
|
||||
## Thèmes
|
||||
## Themes
|
||||
|
||||
### Changer de thème
|
||||
### Change theme
|
||||
|
||||
Dans config.inc.php, donnez à $theme le nom du thème voulu.
|
||||
In config.inc.php, set $theme to the wanted theme.
|
||||
|
||||
Par défaut, trois thèmes sont proposés :
|
||||
By default, 3 themes are offered:
|
||||
|
||||
* dark, le thème par défaut, sombre. Il est utilisé ici : <https://qr.antopie.org>
|
||||
* light, thème clair
|
||||
* parinux, un thème bleu, créé pour [Bastet](https://bastet.parinux.org), le CHATON de [Parinux](https://parinux.org). Il est utilisé ici : <https://codeqr.parinux.org>
|
||||
* dark, the default dark theme. Used here: <https://qr.antopie.org>
|
||||
* light, the light theme.
|
||||
* parinux, a blue theme, made for [Bastet](https://bastet.parinux.org), the [Parinux](https://parinux.org)'s CHATON. Used here: <https://codeqr.parinux.org>
|
||||
|
||||
### Créer un thème
|
||||
### Make a theme
|
||||
|
||||
* Copiez themes/dark vers themes/[nom de votre thème]
|
||||
* Complétez theme.php en fonction des couleurs CSS voulues dans l'interface
|
||||
* Modifiez l'image source.png en fonction de votre thème
|
||||
* Copy themes/dark to themes/[new theme's name]
|
||||
* Fill theme.php according to CSS colors you want
|
||||
* Change the source.png image according to your theme
|
||||
* To automatically generate favicons with the rights sizes, use `php themes/resize.php [theme's name]`
|
||||
|
||||
* Pour générer automatiquement les icônes aux tailles correctes, utilisez
|
||||
This last step will need [ImageMagick](https://imagemagick.org) and [pngquant](https://pngquant.org) to be installed.
|
||||
|
||||
```
|
||||
php themes/resize.php [nom de votre thème]
|
||||
```
|
||||
```apt install imagemagick pngquant```
|
||||
|
||||
Cela nécessitera d'avoir installé [ImageMagick](https://imagemagick.org) et
|
||||
[pngquant](https://pngquant.org).
|
||||
## Contribute
|
||||
|
||||
## Contribuer
|
||||
|
||||
Si vous souhaitez rapporter un bug, vous pouvez ouvrir un ticket sur <https://code.antopie.org/miraty/libreqr/issues> après vous être créé un compte (méthode préférée) ou me contacter d'une autre manière.
|
||||
If you want to report a bug, you can open an issue at <https://code.antopie.org/miraty/libreqr/issues> after creating an account (prefered method) or contact me in another way.
|
||||
|
||||
## Contact
|
||||
|
||||
Si vous voulez me contacter, par exemple pour demander un éclaircissement sur le fonctionnement de LibreQR ou pour signaler un bug, vous pouvez le faire par :
|
||||
If you want to contact me, for instance to report a bug or ask me a question about installing or using LibreQR, you can get my contact details on <https://miraty.antopie.org>.
|
||||
|
||||
* Matrix : @miraty:matrix.antopie.org
|
||||
* courriel : [miraty+libreqr@antopie.org](mailto:miraty+libreqr@antopie.org) (GPG : [B16B 12A8 957B 2EC7 9659 04A6 B82D 15F0 3E67 B2B5](https://miraty.antopie.org/B16B12A8957B2EC7965904A6B82D15F03E67B2B5.asc))
|
||||
* le Fédiverse : [@Miraty@oc.todon.fr](https://oc.todon.fr/@Miraty)
|
||||
## Libraries
|
||||
|
||||
## Bibliothèques tierces
|
||||
This source code includes:
|
||||
|
||||
Ce code source inclus :
|
||||
* [phpqrcode](https://github.com/t0k4rt/phpqrcode) to generate QR codes
|
||||
* [Ubuntu font for the Web](https://github.com/earaujoassis/ubuntu-fontface)
|
||||
* [lesserphp](https://github.com/MarcusSchwarz/lesserphp) to compile [Less](http://lesscss.org)
|
||||
|
||||
* [phpqrcode](https://github.com/t0k4rt/phpqrcode) pour générer les codes QR
|
||||
* [La police Ubuntu packagée pour le Web](https://github.com/earaujoassis/ubuntu-fontface)
|
||||
* [lessphp](http://leafo.net/lessphp) pour compiler le [Less](http://lesscss.org)
|
||||
|
||||
## Licence
|
||||
## License
|
||||
|
||||
[AGPLv3+](https://code.antopie.org/miraty/libreqr/src/branch/master/LICENSE)
|
||||
|
||||
LibreQR est un logiciel libre ; vous pouvez le diffuser et le modifier suivant les termes de la GNU Affero General Public License telle que publiée par la Free Software Foundation ; soit la version 3 de cette licence, soit (à votre convenance) une version ultérieure.
|
||||
LibreQR is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
LibreQR est diffusé dans l’espoir qu’il sera utile, mais SANS AUCUNE GARANTIE ; sans même une garantie implicite de COMMERCIALISATION ou d’ADÉQUATION À UN USAGE PARTICULIER. Voyez la GNU Affero General Public License pour plus de détails.
|
||||
LibreQR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
||||
|
||||
Vous devriez avoir reçu une copie de la GNU Affero General Public License avec ce code. Sinon, consultez <https://www.gnu.org/licenses/>
|
||||
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
|
100
README_fr.md
Normal file
100
README_fr.md
Normal file
|
@ -0,0 +1,100 @@
|
|||
# ![](themes/dark/icons/32.png) LibreQR
|
||||
|
||||
[Read this in english](README.md)
|
||||
|
||||
Une interface Web en PHP pour générer des codes QR.
|
||||
|
||||
## Démo
|
||||
|
||||
Une instance de LibreQR est disponible sur <https://qr.antopie.org>.
|
||||
|
||||
## Fonctionnement
|
||||
|
||||
LibreQR inclus un plugin [OpenSearch](https://developer.mozilla.org/docs/Web/OpenSearch), ce qui permet de l'ajouter comme moteur de recherche dans Firefox et de sauvegarder vos paramètres.
|
||||
Vous pouvez ainsi générer un code QR directement depuis la barre de recherche avec les réglages de LibreQR utilisés lors de l'ajout comme moteur de recherche.
|
||||
|
||||
Un [WebManifest](https://developer.mozilla.org/docs/Web/Manifest) est également inclus, ce qui permet de mieux l'intégrer au système via Fennec (Firefox Android) ou Chromium.
|
||||
|
||||
Les codes QR générés sont placés dans le dossier temp/, nommés avec le nombre de caractères aléatoires indiqué dans config.inc.php (32 par défaut), puis supprimés après le temps indiqué dans config.inc.php (7 jours par défaut).
|
||||
|
||||
Voir `config.inc.php` pour plus de paramètres.
|
||||
|
||||
## Installation
|
||||
|
||||
### Générique
|
||||
|
||||
Placez simplement ce code source dans un serveur Web avec PHP.
|
||||
|
||||
`wget https://code.antopie.org/miraty/libreqr/archive/1.2.0.zip`
|
||||
|
||||
L'extension GD est requise.
|
||||
|
||||
`apt install php7.3-gd`
|
||||
|
||||
LibreQR a besoin des permissions d'écriture dans le dossier `temp/`.
|
||||
|
||||
```
|
||||
chown -R www-data:www-data /var/www/libreqr/temp
|
||||
chmod -R 600 /var/www/libreqr/temp
|
||||
```
|
||||
|
||||
### YunoHost
|
||||
|
||||
Il y a [un paquet](https://code.antopie.org/miraty/qr_ynh/) pour [YunoHost](https://yunohost.org/).
|
||||
|
||||
Pour des raisons historiques, LibreQR est techniquement nommée `qr` dans YunoHost.
|
||||
|
||||
Vous pouvez l'installer depuis l'interface Web d'administration ou avec cette commande :
|
||||
|
||||
```
|
||||
sudo yunohost app install qr
|
||||
```
|
||||
|
||||
## Thèmes
|
||||
|
||||
### Changer de thème
|
||||
|
||||
Dans config.inc.php, donnez à $theme le nom du thème voulu.
|
||||
|
||||
Par défaut, trois thèmes sont proposés :
|
||||
|
||||
* dark, le thème par défaut, sombre. Il est utilisé ici : <https://qr.antopie.org>
|
||||
* light, thème clair
|
||||
* parinux, un thème bleu, créé pour [Bastet](https://bastet.parinux.org), le CHATON de [Parinux](https://parinux.org). Il est utilisé ici : <https://codeqr.parinux.org>
|
||||
|
||||
### Créer un thème
|
||||
|
||||
* Copiez themes/dark vers themes/[nom de votre thème]
|
||||
* Complétez theme.php en fonction des couleurs CSS voulues dans l'interface
|
||||
* Modifiez l'image source.png en fonction de votre thème
|
||||
* Pour générer automatiquement les icônes aux tailles correctes, utilisez `php themes/resize.php [nom du thème]`
|
||||
|
||||
Cette dernière étape nécessite d'avoir installé [ImageMagick](https://imagemagick.org) et [pngquant](https://pngquant.org).
|
||||
|
||||
```apt install imagemagick pngquant```
|
||||
|
||||
## Contribuer
|
||||
|
||||
Si vous souhaitez rapporter un bug, vous pouvez ouvrir un ticket sur <https://code.antopie.org/miraty/libreqr/issues> après vous être créé un compte (méthode préférée) ou me contacter d'une autre manière.
|
||||
|
||||
## Contact
|
||||
|
||||
Si vous voulez me contacter, par exemple pour signaler un bug ou me poser une question sur l'installation ou l'utilisation de LibreQR, vous trouverez des moyens de me contacter sur <https://miraty.antopie.org>.
|
||||
|
||||
## Bibliothèques tierces
|
||||
|
||||
Ce code source inclus :
|
||||
|
||||
* [phpqrcode](https://github.com/t0k4rt/phpqrcode) pour générer les codes QR
|
||||
* [La police Ubuntu pour le Web](https://github.com/earaujoassis/ubuntu-fontface)
|
||||
* [lesserphp](https://github.com/MarcusSchwarz/lesserphp) pour compiler le [Less](http://lesscss.org)
|
||||
|
||||
## Licence
|
||||
|
||||
[AGPLv3+](https://code.antopie.org/miraty/libreqr/src/branch/master/LICENSE)
|
||||
|
||||
LibreQR est un logiciel libre ; vous pouvez le diffuser et le modifier suivant les termes de la GNU Affero General Public License telle que publiée par la Free Software Foundation ; soit la version 3 de cette licence, soit (à votre convenance) une version ultérieure.
|
||||
|
||||
LibreQR est diffusé dans l’espoir qu’il sera utile, mais SANS AUCUNE GARANTIE ; sans même une garantie implicite de COMMERCIALISATION ou d’ADÉQUATION À UN USAGE PARTICULIER. Voyez la GNU Affero General Public License pour plus de détails.
|
||||
|
||||
Vous devriez avoir reçu une copie de la GNU Affero General Public License avec ce code. Sinon, consultez <https://www.gnu.org/licenses/>
|
|
@ -1,47 +1,31 @@
|
|||
<?php
|
||||
|
||||
// ----- Settings -----
|
||||
// ----- Paramètres -----
|
||||
|
||||
deleteOldQR(60 * 60 * 24 * 7); // Temps en secondes après lequel le code QR sera supprimé lors du chargement d'un page
|
||||
// EN: Time in seconds after which the QR code will be deleted when a page loads.
|
||||
// Default: 60 * 60 * 24 * 7 (one week)
|
||||
// FR : Temps en secondes après lequel le code QR sera supprimé lors du chargement d'une page.
|
||||
// Par défaut : 60 * 60 * 24 * 7 (une semaine)
|
||||
$timeBeforeDeletion = 60 * 60 * 24 * 7;
|
||||
|
||||
$theme = "dark"; // dark, light ou parinux
|
||||
// EN: Theme's name (must be in the themes directory)
|
||||
// FR : Nom du thème (doit être dans le dossier themes)
|
||||
$theme = "dark";
|
||||
|
||||
$fileNameLenght = 32; // Longueur du nom du fichier du code QR
|
||||
// EN: Language used if those requested by the user are not available
|
||||
// FR : Langue utilisée si celles demandées par l'utilisateurice ne sont pas disponibles
|
||||
$locale = "en";
|
||||
|
||||
// ----- Trucs nécessaires partout -----
|
||||
// EN: Should the locales requested by the user be ignored?
|
||||
// FR : Faut-il ignorer les langues demandées par l'utilisateurice ?
|
||||
$forceLocale = false;
|
||||
|
||||
// Définit l'URL racine
|
||||
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')
|
||||
$protocol = "https";
|
||||
else
|
||||
$protocol = "http";
|
||||
$instPath = $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
$instPath = preg_replace('#\?.*$#', '', $instPath);
|
||||
$instPath = preg_replace('#(manifest|opensearch|index).php$#i', '', $instPath);
|
||||
// EN: Lenght of the QR code filename
|
||||
// FR : Longueur du nom du fichier du code QR
|
||||
$fileNameLenght = 32;
|
||||
|
||||
require "themes/" . $theme . "/theme.php"; // Charge le thème graphique
|
||||
|
||||
function generateRandomString($length) {
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
$charactersLength = strlen($characters);
|
||||
$randomString = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
return $randomString;
|
||||
}
|
||||
|
||||
function deleteOldQR($tempsDeSuppression) {
|
||||
/*
|
||||
Cette fonction supprime les fichiers (normalement des images de codes QR)
|
||||
dans temp/ plus vieux que le temps en seconde passé en argument
|
||||
*/
|
||||
$listeCodesQR = new DirectoryIterator("temp");
|
||||
foreach($listeCodesQR as $listeCodesQR) {
|
||||
if ($listeCodesQR->getFilename() != "." AND $listeCodesQR->getFilename() != ".." AND $listeCodesQR->getFilename() != ".gitkeep") {
|
||||
if ((time() - filemtime("temp/" . $listeCodesQR->getFilename())) > $tempsDeSuppression) { // Si le temps actuel (en heure Posix) moins la date de dernière modification de l'image est supérieur à la durée de vie demandée de l'image
|
||||
unlink("temp/" . $listeCodesQR->getFilename()); // Alors supprimer cette image
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// EN: Will be printed at the bottom of the interface
|
||||
// FR : Sera affiché en bas de l'interface
|
||||
$customTextEnabled = false;
|
||||
$customText = "This LibreQR instance is hosted by <a href='https://foo.bar'>foo</a>.";
|
||||
|
|
11
config.yaml.php
Normal file
11
config.yaml.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
require "inc.php";
|
||||
// EN: This file is used to inform users of the settings of your LibreQR instance. If you want to edit these settings, edit config.inc.php.
|
||||
// FR : Ce fichier est utilisé pour informer les utilisateurices des paramètres de votre instance LibreQR. Si vous voulez modifier ces paramètres, modifiez config.inc.php.
|
||||
?>
|
||||
libreqrVersion: "<?= $libreqrVersion ?>"
|
||||
timeBeforeDeletion: <?= $timeBeforeDeletion . "\n" ?>
|
||||
theme: "<?= $theme ?>"
|
||||
locale: "<?= $locale ?>"
|
||||
forceLocale: "<?= $forceLocale ? 'true' : 'false' ?>"
|
||||
fileNameLenght: <?= $fileNameLenght . "\n" ?>
|
|
@ -3,7 +3,7 @@
|
|||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(-400.000000, -247.000000)">
|
||||
<g id="69" transform="translate(400.000000, 247.000000)">
|
||||
<circle id="Oval-7" stroke="<?= $_GET['clr'] ?>" stroke-width="2" cx="12" cy="12" r="10"></circle>
|
||||
<circle id="Oval-7" stroke="<?= htmlspecialchars($_GET['clr']) ?>" stroke-width="2" cx="12" cy="12" r="10"></circle>
|
||||
<path d="M12.016,14.544 C12.384,14.544 12.64,14.256 12.704,13.904 L12.768,13.168 C14.544,12.864 16,11.952 16,9.936 L16,9.904 C16,7.904 14.48,6.656 12.24,6.656 C10.768,6.656 9.696,7.184 8.848,7.984 C8.624,8.176 8.528,8.432 8.528,8.672 C8.528,9.152 8.928,9.552 9.424,9.552 C9.648,9.552 9.856,9.456 10.016,9.328 C10.656,8.752 11.344,8.448 12.192,8.448 C13.344,8.448 14.032,9.072 14.032,9.968 L14.032,10 C14.032,11.008 13.2,11.584 11.696,11.728 C11.264,11.776 11.008,12.096 11.072,12.528 L11.232,13.904 C11.28,14.272 11.552,14.544 11.92,14.544 L12.016,14.544 Z M10.784,16.816 L10.784,16.976 C10.784,17.6 11.264,18.08 11.92,18.08 C12.576,18.08 13.056,17.6 13.056,16.976 L13.056,16.816 C13.056,16.192 12.576,15.712 11.92,15.712 C11.264,15.712 10.784,16.192 10.784,16.816 Z" id="?" fill="<?= $_GET['clr'] ?>"></path>
|
||||
</g>
|
||||
</g>
|
||||
|
|
51
inc.php
Normal file
51
inc.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php // ----- This file is included everywhere -----
|
||||
|
||||
require "config.inc.php";
|
||||
|
||||
$libreqrVersion = "1.3.0";
|
||||
|
||||
// Defines the locale to be used
|
||||
if ($forceLocale == false) {
|
||||
$clientLocales = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
|
||||
$clientLocales = preg_replace("#[A-Z0-9]|q=|;|-|\.#", "", $clientLocales);
|
||||
$clientLocales = explode(',', $clientLocales);
|
||||
$availableLocales = array('fr', 'en', 'template');
|
||||
foreach ($clientLocales as $clientLocale) {
|
||||
if (in_array($clientLocale, $availableLocales)) {
|
||||
$locale = $clientLocale;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
require "locales/" . $locale . ".php";
|
||||
|
||||
// Defines the root URL
|
||||
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')
|
||||
$protocol = "https";
|
||||
else
|
||||
$protocol = "http";
|
||||
$rootPath = $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
$rootPath = preg_replace('#\?.*$#', '', $rootPath);
|
||||
$rootPath = preg_replace('#(manifest|opensearch|index).php$#i', '', $rootPath);
|
||||
|
||||
require "themes/" . $theme . "/theme.php"; // Load theme
|
||||
|
||||
// Used to generate the filename of the QR code
|
||||
function generateRandomString($length) {
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
$charactersLength = strlen($characters);
|
||||
$randomString = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
return $randomString;
|
||||
}
|
||||
|
||||
// Deletes images in temp/ older than the specified time in seconds
|
||||
$files = array_diff(scandir("temp"), array('..', '.', '.gitkeep'));
|
||||
foreach($files as $file) {
|
||||
// If the current time (in Posix time) minus the date of last modification of the file is higher than specified time
|
||||
if ((time() - filemtime("temp/" . $file)) > $timeBeforeDeletion) {
|
||||
unlink("temp/" . $file); // Deletes this image
|
||||
}
|
||||
}
|
163
index.php
163
index.php
|
@ -1,33 +1,23 @@
|
|||
<?php require "config.inc.php"; ?>
|
||||
<?php require "inc.php"; ?>
|
||||
<!--
|
||||
_ _ _ ___ ____
|
||||
| | (_| |__ _ __ ___ / _ \| _ \
|
||||
| | | | '_ \| '__/ _ | | | | |_) |
|
||||
| |___| | |_) | | | __| |_| | _ <
|
||||
|_____|_|_.__/|_| \___|\__\_|_| \_\
|
||||
A PHP Web interface for generating QR codes
|
||||
|
||||
LibreQR version 1.2.0
|
||||
Créé par Miraty et diffusé sous AGPLv3+
|
||||
Code source : https://code.antopie.org/miraty/libreqr
|
||||
Source code : https://code.antopie.org/miraty/libreqr
|
||||
|
||||
Ce fichier fait partie de LibreQR.
|
||||
This file is part of LibreQR.
|
||||
|
||||
LibreQR est un logiciel libre ; vous pouvez le redistribuer ou le modifier
|
||||
suivant les termes de la GNU Affero General Public License
|
||||
telle que publiée par la Free Software Foundation ; soit la version 3
|
||||
de la licence, soit (à votre gré) toute version ultérieure.
|
||||
LibreQR is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
LibreQR est distribué dans l'espoir qu'il sera utile,
|
||||
mais SANS AUCUNE GARANTIE ; sans même la garantie tacite de
|
||||
QUALITÉ MARCHANDE ou d'ADÉQUATION à UN BUT PARTICULIER.
|
||||
Consultez la GNU Affero General Public License pour plus de détails.
|
||||
LibreQR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
||||
|
||||
Vous devez avoir reçu une copie de la GNU Affero General Public License
|
||||
en même temps que LibreQR ; si ce n'est pas le cas,
|
||||
consultez <https://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
|
||||
<?php
|
||||
|
||||
function badQuery() { // Check if browser must be redirected
|
||||
|
@ -93,36 +83,35 @@ if (badQuery()) {
|
|||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<html lang="<?= $locale ?>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Générateur de codes QR</title>
|
||||
<meta name="description" content="Générez des codes QR librement. Choisissez le contenu, la taille, la couleur...">
|
||||
<title>LibreQR · <?= $loc['subtitle'] ?></title>
|
||||
<meta name="description" content="<?= $loc['description'] ?>">
|
||||
<meta name="theme-color" content="<?php echo $variablesTheme['bg']; ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="manifest" href="manifest.php">
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="Générer un code QR" href="opensearch.php?redondancy=<?= $_GET['redondancy'] ?>&margin=<?= $_GET['margin'] ?>&size=<?= $_GET['size'] ?>&bgColor=<?= urlencode($_GET['bgColor']) ?>&mainColor=<?= urlencode($_GET['mainColor']) ?>">
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="<?= $loc['opensearch_actionName'] ?>" href="opensearch.php?redondancy=<?= $_GET['redondancy'] ?>&margin=<?= $_GET['margin'] ?>&size=<?= $_GET['size'] ?>&bgColor=<?= urlencode($_GET['bgColor']) ?>&mainColor=<?= urlencode($_GET['mainColor']) ?>">
|
||||
<?php
|
||||
// If style.min.css exists
|
||||
if (file_exists("style.min.css"))
|
||||
if (file_exists("temp/style.min.css"))
|
||||
// And if it's older than theme.php or config.inc.php (so not up to date)
|
||||
if (filemtime("themes/" . $theme . "/theme.php") > filemtime("style.min.css") OR filemtime("config.inc.php") > filemtime("style.min.css"))
|
||||
if (filemtime("themes/" . $theme . "/theme.php") > filemtime("temp/style.min.css") OR filemtime("config.inc.php") > filemtime("temp/style.min.css"))
|
||||
// Then delete it
|
||||
unlink("style.min.css");
|
||||
unlink("temp/style.min.css");
|
||||
|
||||
require "lessphp/lessc.inc.php";
|
||||
require "lesserphp/lessc.inc.php";
|
||||
$less = new lessc;
|
||||
$less->setVariables($variablesTheme); // Rends ces couleurs utilisables dans style.less
|
||||
$less->setVariables($variablesTheme); // Make these colors available in style.less
|
||||
$less->setFormatter("compressed");
|
||||
$less->checkedCompile("style.less", "style.min.css"); // Compile, minimise et met en cache style.less dans style.min.css
|
||||
$less->checkedCompile("style.less", "temp/style.min.css"); // Compile, minimise and cache style.less into style.min.css
|
||||
?>
|
||||
<link type="text/css" rel="stylesheet" href="style.min.css">
|
||||
<link type="text/css" rel="stylesheet" href="temp/style.min.css">
|
||||
<link type="text/css" rel="stylesheet" href="ubuntu/ubuntu.min.css">
|
||||
|
||||
<?php
|
||||
foreach($themeDimensionsIcons as $dimFav) { // Indique toutes les dimensions d'icones
|
||||
foreach($themeDimensionsIcons as $dimFav) { // Set all icons dimensions
|
||||
echo ' <link rel="icon" type="image/png" href="themes/' . $theme . '/icons/' . $dimFav . '.png" sizes="' . $dimFav . 'x' . $dimFav . '">' . "\n";
|
||||
} ?>
|
||||
|
||||
|
@ -130,14 +119,14 @@ if (badQuery()) {
|
|||
|
||||
<body>
|
||||
|
||||
<div class="center">
|
||||
<main>
|
||||
|
||||
<header>
|
||||
<a id="lienTitres" href="./">
|
||||
<img id="logo" src="themes/<?php echo $theme; ?>/icons/128.png" alt="Code QR stylisé">
|
||||
<div id="titres">
|
||||
<a id="linkTitles" href="./">
|
||||
<img alt="" id="logo" src="themes/<?php echo $theme; ?>/icons/128.png">
|
||||
<div id="titles">
|
||||
<h1>LibreQR</h1>
|
||||
<h2>Générateur de codes QR</h2>
|
||||
<h2><?= $loc['subtitle'] ?></h2>
|
||||
</div>
|
||||
</a>
|
||||
</header>
|
||||
|
@ -147,24 +136,15 @@ if (badQuery()) {
|
|||
<div id="firstWrapper">
|
||||
|
||||
<div class="param">
|
||||
<label for="txt">Texte à encoder</label>
|
||||
<span class="conteneurAide">
|
||||
<span class="boutonAide" tabindex="0"><img id="helpImg" src="help.svg.php?clr=<?= urlencode($variablesTheme["text"]) ?>" alt="Aide"></span>
|
||||
<span class="contenuAide">
|
||||
Vous pouvez encoder ce que vous voulez sous forme de texte.<br>
|
||||
Les logiciels qui décodent ces codes QR pourraient proposer de les ouvrir avec un logiciel dédié, en fonction de leur <a href="https://fr.wikipedia.org/wiki/Sch%C3%A9ma_d%27URI">schéma d'URI</a>.<br><br>
|
||||
Par exemple, pour ouvrir une page Web :<br>
|
||||
https://www.domaine.tld/<br><br>
|
||||
Pour envoyer un mail :<br>
|
||||
mailto:contact@domaine.tld<br><br>
|
||||
Pour partager des coordonnées géographique :<br>
|
||||
geo:48.867564,2.364057<br><br>
|
||||
Pour appeler un numéro de téléphone :<br>
|
||||
tel:0639981871
|
||||
<label for="txt"><?= $loc['label_content'] ?></label>
|
||||
<span class="helpContainer">
|
||||
<span class="helpButton" tabindex="0"><img class="helpImg" src="help.svg.php?clr=<?= urlencode($variablesTheme["text"]) ?>" alt="<?= $loc['alt_help'] ?>"></span>
|
||||
<span class="helpContent">
|
||||
<?= $loc['help_content'] ?>
|
||||
</span>
|
||||
</span>
|
||||
<br>
|
||||
<textarea rows="8" required="" id="txt" placeholder="Entrez le texte à encoder dans le code QR" name="txt"><?php
|
||||
<textarea rows="8" required="" id="txt" placeholder="<?= $loc['placeholder'] ?>" name="txt"><?php
|
||||
|
||||
if (isset($_GET['txt'])) {
|
||||
echo htmlspecialchars($_GET['txt']);
|
||||
|
@ -176,31 +156,31 @@ if (badQuery()) {
|
|||
<div id="menusDeroulants">
|
||||
|
||||
<div class="param">
|
||||
<label for="redondancy">Taux de redondance</label>
|
||||
<span class="conteneurAide">
|
||||
<span class="boutonAide" tabindex="0"><img id="helpImg" src="help.svg.php?clr=<?= urlencode($variablesTheme["text"]) ?>" alt="Aide"></span>
|
||||
<span class="contenuAide">La redondance est le "doublement" des informations dans le code QR afin de corriger les erreurs lors du décodage. Un taux plus élevé produira un code QR plus grand, mais aura plus de chance d'être décodé correctement.</span>
|
||||
<label for="redondancy"><?= $loc['label_redondancy'] ?></label>
|
||||
<span class="helpContainer">
|
||||
<span class="helpButton" tabindex="0"><img class="helpImg" src="help.svg.php?clr=<?= urlencode($variablesTheme["text"]) ?>" alt="<?= $loc['alt_help'] ?>"></span>
|
||||
<span class="helpContent"><?= $loc['help_redondancy'] ?></span>
|
||||
</span>
|
||||
<br>
|
||||
<select id="redondancy" name="redondancy">
|
||||
<option <?php if (isset($_GET['redondancy']) AND ($_GET['redondancy'] == "L")) {echo 'selected="" ';} ?>value="L">L - 7% de redondance</option>
|
||||
<option <?php if (isset($_GET['redondancy']) AND ($_GET['redondancy'] == "M")) {echo 'selected="" ';} ?>value="M">M - 15% de redondance</option>
|
||||
<option <?php if (isset($_GET['redondancy']) AND ($_GET['redondancy'] == "Q")) {echo 'selected="" ';} ?>value="Q">Q - 25% de redondance</option>
|
||||
<option <?php if ((isset($_GET['redondancy']) AND ($_GET['redondancy'] == "H")) OR (!isset($_GET['redondancy']) OR empty($_GET['redondancy']))) {echo 'selected="" ';} ?>value="H">H - 30% de redondance</option>
|
||||
<option <?php if (isset($_GET['redondancy']) AND ($_GET['redondancy'] == "L")) {echo 'selected="" ';} ?>value="L">L - 7%</option>
|
||||
<option <?php if (isset($_GET['redondancy']) AND ($_GET['redondancy'] == "M")) {echo 'selected="" ';} ?>value="M">M - 15%</option>
|
||||
<option <?php if (isset($_GET['redondancy']) AND ($_GET['redondancy'] == "Q")) {echo 'selected="" ';} ?>value="Q">Q - 25%</option>
|
||||
<option <?php if ((isset($_GET['redondancy']) AND ($_GET['redondancy'] == "H")) OR (!isset($_GET['redondancy']) OR empty($_GET['redondancy']))) {echo 'selected="" ';} ?>value="H">H - 30%</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="param">
|
||||
<label for="margin">Taille de la marge</label>
|
||||
<span class="conteneurAide">
|
||||
<span class="boutonAide" tabindex="0"><img id="helpImg" src="help.svg.php?clr=<?= urlencode($variablesTheme["text"]) ?>" alt="Aide"></span>
|
||||
<span class="contenuAide">Nombre de pixels des bandes blanches autour du code QR.</span>
|
||||
<label for="margin"><?= $loc['label_margin'] ?></label>
|
||||
<span class="helpContainer">
|
||||
<span class="helpButton" tabindex="0"><img class="helpImg" src="help.svg.php?clr=<?= urlencode($variablesTheme["text"]) ?>" alt="<?= $loc['alt_help'] ?>"></span>
|
||||
<span class="helpContent"><?= $loc['help_margin'] ?></span>
|
||||
</span>
|
||||
<br>
|
||||
<select id="margin" name="margin">
|
||||
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "0")) {echo 'selected="" ';} ?>value="0">0</option>
|
||||
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "1")) {echo 'selected="" ';} ?>value="1">1</option>
|
||||
<option <?php if ((isset($_GET['margin']) AND ($_GET['margin'] == "2")) OR (!isset($_GET['margin']) OR empty($_GET['margin']))) {echo 'selected="" ';} ?>value="2">2 - par défaut</option>
|
||||
<option <?php if ((isset($_GET['margin']) AND ($_GET['margin'] == "2")) OR (!isset($_GET['margin']) OR empty($_GET['margin']))) {echo 'selected="" ';} ?>value="2">2 - <?= $loc['value_default'] ?></option>
|
||||
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "3")) {echo 'selected="" ';} ?>value="3">3</option>
|
||||
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "4")) {echo 'selected="" ';} ?>value="4">4</option>
|
||||
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "5")) {echo 'selected="" ';} ?>value="5">5</option>
|
||||
|
@ -210,17 +190,17 @@ if (badQuery()) {
|
|||
</div>
|
||||
|
||||
<div class="param">
|
||||
<label for="size">Taille de l'image</label>
|
||||
<span class="conteneurAide">
|
||||
<span class="boutonAide" tabindex="0"><img id="helpImg" src="help.svg.php?clr=<?= urlencode($variablesTheme["text"]) ?>" alt="Aide"></span>
|
||||
<span class="contenuAide">Par combien les dimensions de l'image seront-elles multipliées ?</span>
|
||||
<label for="size"><?= $loc['label_size'] ?></label>
|
||||
<span class="helpContainer">
|
||||
<span class="helpButton" tabindex="0"><img class="helpImg" src="help.svg.php?clr=<?= urlencode($variablesTheme["text"]) ?>" alt="<?= $loc['alt_help'] ?>"></span>
|
||||
<span class="helpContent"><?= $loc['help_size'] ?></span>
|
||||
</span>
|
||||
<br>
|
||||
<select id="size" name="size">
|
||||
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 1)) {echo 'selected="" ';} ?>value="1">1</option>
|
||||
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 2)) {echo 'selected="" ';} ?>value="2">2</option>
|
||||
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 3)) {echo 'selected="" ';} ?>value="3">3</option>
|
||||
<option <?php if ((isset($_GET['size']) AND ($_GET['size'] == 4)) OR (!isset($_GET['size']) OR empty($_GET['size']))) {echo 'selected="" ';} ?>value="4">4 - par défaut</option>
|
||||
<option <?php if ((isset($_GET['size']) AND ($_GET['size'] == 4)) OR (!isset($_GET['size']) OR empty($_GET['size']))) {echo 'selected="" ';} ?>value="4">4 - <?= $loc['value_default'] ?></option>
|
||||
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 5)) {echo 'selected="" ';} ?>value="5">5</option>
|
||||
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 6)) {echo 'selected="" ';} ?>value="6">6</option>
|
||||
<option <?php if (isset($_GET['size']) AND ($_GET['size'] == 8)) {echo 'selected="" ';} ?>value="8">8</option>
|
||||
|
@ -237,22 +217,22 @@ if (badQuery()) {
|
|||
<div id="colors">
|
||||
|
||||
<div class="param">
|
||||
<label for="bgColor">Couleur de fond</label>
|
||||
<div class="conteneurInputColor">
|
||||
<label for="bgColor"><?= $loc['label_bgColor'] ?></label>
|
||||
<div class="inputColorContainer">
|
||||
<input type="color" name="bgColor" id="bgColor" value="<?php if (!empty($_GET['bgColor'])) {echo htmlspecialchars($_GET['bgColor']);} else {echo "#FFFFFF";} ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="param">
|
||||
<label for="mainColor">Couleur de premier plan</label>
|
||||
<div class="conteneurInputColor">
|
||||
<label for="mainColor"><?= $loc['label_mainColor'] ?></label>
|
||||
<div class="inputColorContainer">
|
||||
<input type="color" name="mainColor" id="mainColor" value="<?php if (!empty($_GET['mainColor'])) {echo htmlspecialchars($_GET['mainColor']);} else {echo "#000000";} ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="centrer">
|
||||
<input class="bouton" type="submit" value="Générer" />
|
||||
<div class="centered">
|
||||
<input class="button" type="submit" value="<?= $loc['button_create'] ?>" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
@ -267,34 +247,37 @@ if (badQuery()) {
|
|||
$cheminImage = "temp/" . generateRandomString($fileNameLenght) . ".png";
|
||||
QRcode::png($_GET['txt'], $cheminImage, $_GET['redondancy'], $_GET['size'], $_GET['margin'], false, hexdec($_GET['bgColor']), hexdec($_GET['mainColor']));
|
||||
?>
|
||||
<div class="centrer">
|
||||
<a href="<?php echo $cheminImage; ?>" class="bouton" download="<?php echo htmlspecialchars($_GET['txt']); ?>.png">Télécharger ce code QR</a>
|
||||
<div class="centered">
|
||||
<a href="<?php echo $cheminImage; ?>" class="button" download="<?php echo htmlspecialchars($_GET['txt']); ?>.png"><?= $loc['button_download'] ?></a>
|
||||
</div>
|
||||
|
||||
<div class="centrer" id="showOnlyQR">
|
||||
<a title="Cliquez pour afficher uniquement ce code QR" href="<?php echo $cheminImage; ?>"><img alt='Un code QR contenant "<?php echo htmlspecialchars($_GET['txt']); ?>"' id="qrCode" src="<?php echo $cheminImage; ?>"/></a>
|
||||
<div class="centered" id="showOnlyQR">
|
||||
<a title="<?= $loc['title_showOnlyQR'] ?>" href="<?php echo $cheminImage; ?>"><img alt='<?= $loc['alt_QR_before'] ?><?php echo htmlspecialchars($_GET['txt']); ?><?= $loc['alt_QR_after'] ?>' id="qrCode" src="<?php echo $cheminImage; ?>"/></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div id="metaTexts">
|
||||
<section id="info" class="metaText">
|
||||
<?= $loc['metaText_qr'] ?>
|
||||
</section>
|
||||
|
||||
<section id="info" class="metaText">
|
||||
<h3>Qu'est-ce qu'un code QR ?</h3>
|
||||
Un code QR est un code-barres en 2 dimensions dans lequel est inscrit en binaire du texte. Il peut être décodé avec un appareil muni d'un capteur photo et d'un logiciel adéquat.
|
||||
<a href="https://fr.wikipedia.org/wiki/Code_QR">Code QR sur Wikipédia</a>
|
||||
</section>
|
||||
<?php if ($customTextEnabled) { ?>
|
||||
<section class="metaText">
|
||||
<?= $customText ?>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
<footer class="metaText">
|
||||
LibreQR 1.2.0 est un logiciel libre dont le <a href="https://code.antopie.org/miraty/libreqr/">code source</a> est disponible
|
||||
selon les termes de l'<abbr title="GNU Affero General Public License version 3 ou toute version ultérieure"><a href="LICENSE.html">AGPLv3</a>+</abbr>.
|
||||
</footer>
|
||||
<section class="metaText">
|
||||
<?= $loc['metaText_legal'] ?>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
5
lessphp/LICENSE → lesserphp/LICENSE
Executable file → Normal file
5
lessphp/LICENSE → lesserphp/LICENSE
Executable file → Normal file
|
@ -1,4 +1,4 @@
|
|||
For ease of distribution, lessphp is under a dual license.
|
||||
For ease of distribution, lessphp 0.5.1 is under a dual license.
|
||||
You are free to pick which one suits your needs.
|
||||
|
||||
|
||||
|
@ -9,7 +9,8 @@ MIT LICENSE
|
|||
|
||||
|
||||
|
||||
Copyright (c) 2014 Leaf Corcoran, http://leafo.net/lessphp
|
||||
Copyright (c) 2013 - 2015 Leaf Corcoran, http://leafo.net/lessphp
|
||||
Copyright (c) 2016 - Marcus Schwarz, https://www.maswaba.de
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
13
lessphp/README.md → lesserphp/README.md
Executable file → Normal file
13
lessphp/README.md → lesserphp/README.md
Executable file → Normal file
|
@ -1,9 +1,10 @@
|
|||
[![Build Status](https://travis-ci.org/leafo/lessphp.svg?branch=master)](https://travis-ci.org/leafo/lessphp)
|
||||
[![Build Status](https://travis-ci.org/MarcusSchwarz/lesserphp.svg)](https://travis-ci.org/MarcusSchwarz/lesserphp)
|
||||
|
||||
# lessphp v0.5.0
|
||||
### <http://leafo.net/lessphp>
|
||||
# lesserphp v0.5.4
|
||||
### <http://github.com/MarcusSchwarz/lesserphp>
|
||||
|
||||
`lessphp` is a compiler for LESS written in PHP. The documentation is great,
|
||||
`lesserphp` is a compiler for LESS written in PHP. It is based on lessphp bei leafo.
|
||||
The documentation is great,
|
||||
so check it out: <http://leafo.net/lessphp/docs/>.
|
||||
|
||||
Here's a quick tutorial:
|
||||
|
@ -12,7 +13,7 @@ Here's a quick tutorial:
|
|||
|
||||
The only file required is `lessc.inc.php`, so copy that to your include directory.
|
||||
|
||||
The typical flow of **lessphp** is to create a new instance of `lessc`,
|
||||
The typical flow of **lesserphp** is to create a new instance of `lessc`,
|
||||
configure it how you like, then tell it to compile something using one built in
|
||||
compile methods.
|
||||
|
||||
|
@ -48,7 +49,7 @@ If there any problem compiling your code, an exception is thrown with a helpful
|
|||
<?php
|
||||
try {
|
||||
$less->compile("invalid LESS } {");
|
||||
} catch (exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
echo "fatal error: " . $e->getMessage();
|
||||
}
|
||||
```
|
1400
lesserphp/docs/docs.md
Normal file
1400
lesserphp/docs/docs.md
Normal file
File diff suppressed because it is too large
Load diff
4019
lesserphp/lessc.inc.php
Normal file
4019
lesserphp/lessc.inc.php
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
51
locales/en.php
Normal file
51
locales/en.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
$loc = array(
|
||||
'subtitle' => "QR codes generator",
|
||||
'description' => "Generate QR codes freely. Choose content, size, colors...",
|
||||
|
||||
'label_content' => "Text to encode",
|
||||
'label_redondancy' => "Redondancy rate",
|
||||
'label_margin' => "Margin size",
|
||||
'label_size' => "Image size",
|
||||
'label_bgColor' => "Background color",
|
||||
'label_mainColor' => "Foreground color",
|
||||
|
||||
'placeholder' => "Enter the text to encode in the QR code",
|
||||
|
||||
'value_default' => "default",
|
||||
|
||||
'help_content' => "
|
||||
You can only encode whatever text you want.<br>
|
||||
Softwares which decode these QR codes could suggest to open them with dedicated software, depending on their <a href='https://en.wikipedia.org/wiki/List_of_URI_schemes'>URI scheme</a>.<br><br>
|
||||
For instance, to open a webpage:<br>
|
||||
https://www.domain.tld/<br><br>
|
||||
To send an email:<br>
|
||||
mailto:contact@domain.tld<br><br>
|
||||
To share geographic coordinates:<br>
|
||||
geo:48.867564,2.364057<br><br>
|
||||
To call a phone number:<br>
|
||||
tel:+33639981871
|
||||
",
|
||||
'help_redondancy' => "Redundancy is the duplication of information in the QR code to correct errors during decoding. A higher rate will produce a bigger QR code, but will have a better chance of being decoded correctly.",
|
||||
'help_margin' => "Number of pixels in the white bands around the QR code.",
|
||||
'help_size' => "By how much will the dimensions of the image be multiplied?",
|
||||
|
||||
'button_create' => "Generate",
|
||||
'button_download' => "Download this QR code",
|
||||
|
||||
'title_showOnlyQR' => "Show this QR code only",
|
||||
|
||||
'alt_help' => "Help",
|
||||
'alt_QR_before' => 'QR code meaning "',
|
||||
'alt_QR_after' => '"',
|
||||
|
||||
'metaText_qr' => "
|
||||
<h3>What's a QR code?</h3>
|
||||
A QR code is a 2 dimensions barcode in which a text is written in binary. It can be decoded with a device equipped with a photo sensor and an adequate software.
|
||||
<a href='https://en.wikipedia.org/wiki/QR_code'>QR code on Wikipedia</a>
|
||||
",
|
||||
'metaText_legal' => "LibreQR " . $libreqrVersion . " is a free software whose <a href='https://code.antopie.org/miraty/libreqr/'>source code</a> is available under the terms of the <abbr title='GNU Affero General Public License version 3 or any later version'><a href='LICENSE.html'>AGPLv3</a>+</abbr>.",
|
||||
|
||||
'opensearch_description' => "Generate QR codes from your search or address bar",
|
||||
'opensearch_actionName' => "Generate QR codes from your search or address bar",
|
||||
);
|
51
locales/fr.php
Normal file
51
locales/fr.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
$loc = array(
|
||||
'subtitle' => "Générateur de codes QR",
|
||||
'description' => "Générez des codes QR librement. Choisissez le contenu, la taille, les couleurs...",
|
||||
|
||||
'label_content' => "Texte à encoder",
|
||||
'label_redondancy' => "Taux de redondance",
|
||||
'label_margin' => "Taille de la marge",
|
||||
'label_size' => "Taille de l'image",
|
||||
'label_bgColor' => "Couleur de fond",
|
||||
'label_mainColor' => "Couleur de premier plan",
|
||||
|
||||
'placeholder' => "Entrez le texte à encoder dans le code QR",
|
||||
|
||||
'value_default' => "par défaut",
|
||||
|
||||
'help_content' => "
|
||||
Vous pouvez encoder ce que vous voulez sous forme de texte.<br>
|
||||
Les logiciels qui décodent ces codes QR pourraient proposer de les ouvrir avec un logiciel dédié, en fonction de leur <a href='https://fr.wikipedia.org/wiki/Sch%C3%A9ma_d%27URI'>schéma d'URI</a>.<br><br>
|
||||
Par exemple, pour ouvrir une page Web :<br>
|
||||
https://www.domaine.tld/<br><br>
|
||||
Pour envoyer un mail :<br>
|
||||
mailto:contact@domaine.tld<br><br>
|
||||
Pour partager des coordonnées géographique :<br>
|
||||
geo:48.867564,2.364057<br><br>
|
||||
Pour appeler un numéro de téléphone :<br>
|
||||
tel:+33639981871
|
||||
",
|
||||
'help_redondancy' => "La redondance est la duplication des informations dans le code QR afin de corriger les erreurs lors du décodage. Un taux plus élevé produira un code QR plus grand, mais aura plus de chance d'être décodé correctement.",
|
||||
'help_margin' => "Nombre de pixels des bandes blanches autour du code QR.",
|
||||
'help_size' => "Par combien les dimensions de l'image seront-elles multipliées ?",
|
||||
|
||||
'button_create' => "Générer",
|
||||
'button_download' => "Télécharger ce code QR",
|
||||
|
||||
'title_showOnlyQR' => "Afficher uniquement ce code QR",
|
||||
|
||||
'alt_help' => "Aide",
|
||||
'alt_QR_before' => "Code QR signifiant « ",
|
||||
'alt_QR_after' => " »",
|
||||
|
||||
'metaText_qr' => "
|
||||
<h3>Qu'est-ce qu'un code QR ?</h3>
|
||||
Un code QR est un code-barres en 2 dimensions dans lequel du texte est inscrit en binaire. Il peut être décodé avec un appareil muni d'un capteur photo et d'un logiciel adéquat.
|
||||
<a href='https://fr.wikipedia.org/wiki/Code_QR'>Code QR sur Wikipédia</a>
|
||||
",
|
||||
'metaText_legal' => "LibreQR " . $libreqrVersion . " est un logiciel libre dont le <a href='https://code.antopie.org/miraty/libreqr/'>code source</a> est disponible selon les termes de l'<abbr title='GNU Affero General Public License version 3 ou toute version ultérieure'><a href='LICENSE.html'>AGPLv3</a>+</abbr>.",
|
||||
|
||||
'opensearch_description' => "Générez des codes QR depuis votre barre de recherche ou d'adresse",
|
||||
'opensearch_actionName' => "Générez des codes QR depuis votre barre de recherche ou d'adresse",
|
||||
);
|
36
locales/template.php
Normal file
36
locales/template.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
$loc = array(
|
||||
'subtitle' => "subtitle",
|
||||
'description' => "description",
|
||||
|
||||
'label_content' => "label_content",
|
||||
'label_redondancy' => "label_redondancy",
|
||||
'label_margin' => "label_margin",
|
||||
'label_size' => "label_size",
|
||||
'label_bgColor' => "label_bgColor",
|
||||
'label_mainColor' => "label_mainColor",
|
||||
|
||||
'placeholder' => "placeholder",
|
||||
|
||||
'value_default' => "value_default",
|
||||
|
||||
'help_content' => "help_content",
|
||||
'help_redondancy' => "help_redondancy",
|
||||
'help_margin' => "help_margin",
|
||||
'help_size' => "help_size",
|
||||
|
||||
'button_create' => "button_create",
|
||||
'button_download' => "button_download",
|
||||
|
||||
'title_showOnlyQR' => "title_showOnlyQR",
|
||||
|
||||
'alt_help' => "alt_help",
|
||||
'alt_QR_before' => "alt_QR_before",
|
||||
'alt_QR_after' => "alt_QR_after",
|
||||
|
||||
'metaText_qr' => "metaText_qr",
|
||||
'metaText_legal' => "metaText_legal",
|
||||
|
||||
'opensearch_description' => "opensearch_description",
|
||||
'opensearch_actionName' => "opensearch_actionName",
|
||||
);
|
24
manifest.php
24
manifest.php
|
@ -1,28 +1,28 @@
|
|||
<?php require "config.inc.php"; ?>
|
||||
<?php require "inc.php"; ?>
|
||||
{
|
||||
"dir": "ltr",
|
||||
"lang": "fr",
|
||||
"lang": "<?= $locale ?>",
|
||||
"name": "LibreQR",
|
||||
"short_name": "LibreQR",
|
||||
"description": "Générer un code QR",
|
||||
"start_url": "<?php echo $instPath; ?>",
|
||||
"scope": "<?php echo $instPath; ?>",
|
||||
"description": "<?= $loc['subtitle'] ?>",
|
||||
"start_url": "<?= $instPath; ?>",
|
||||
"scope": "<?= $instPath; ?>",
|
||||
"display": "standalone",
|
||||
"theme_color": "<?php echo $variablesTheme["bg"]; ?>",
|
||||
"background_color": "<?php echo $variablesTheme["bg"]; ?>",
|
||||
"orientation": "portrait",
|
||||
"theme_color": "<?= $variablesTheme["bg"]; ?>",
|
||||
"background_color": "<?= $variablesTheme["bg"]; ?>",
|
||||
"orientation": "portrait",
|
||||
"icons":
|
||||
[
|
||||
<?php for ($i = 0; $i < (count($themeDimensionsIcons) - 1); $i++) { ?>
|
||||
{
|
||||
"src": "themes/<?php echo $theme; ?>/icons/<?php echo $themeDimensionsIcons[$i]; ?>.png",
|
||||
"sizes": "<?php echo $themeDimensionsIcons[$i]; ?>x<?php echo $themeDimensionsIcons[$i]; ?>",
|
||||
"src": "themes/<?= $theme; ?>/icons/<?= $themeDimensionsIcons[$i]; ?>.png",
|
||||
"sizes": "<?= $themeDimensionsIcons[$i]; ?>x<?= $themeDimensionsIcons[$i]; ?>",
|
||||
"type": "image/png"
|
||||
},
|
||||
<?php } ?>
|
||||
{
|
||||
"src": "themes/<?php echo $theme; ?>/icons/<?php echo $themeDimensionsIcons[$i]; ?>.png",
|
||||
"sizes": "<?php echo $themeDimensionsIcons[$i]; ?>x<?php echo $themeDimensionsIcons[$i]; ?>",
|
||||
"src": "themes/<?= $theme; ?>/icons/<?= $themeDimensionsIcons[$i]; ?>.png",
|
||||
"sizes": "<?= $themeDimensionsIcons[$i]; ?>x<?= $themeDimensionsIcons[$i]; ?>",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php require "config.inc.php"; ?>
|
||||
<?php require "inc.php"; ?>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>Générer un code QR</ShortName>
|
||||
<Description>Générez des codes QR depuis votre barre de recherche ou d'adresse</Description>
|
||||
<ShortName>LibreQR</ShortName>
|
||||
<Description><?= $loc['opensearch_actionName'] ?></Description>
|
||||
<?php
|
||||
foreach($themeDimensionsIcons as $dimIcon) {
|
||||
echo ' <Image height="' . $dimIcon . '" width="' . $dimIcon . '" type="image/png">' . $instPath . 'themes/' . $theme . '/icons/' . $dimIcon . '.png</Image>' . "\n";
|
||||
|
|
127
style.less
127
style.less
|
@ -33,6 +33,10 @@ a {
|
|||
}
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
#firstWrapper {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
@ -47,27 +51,27 @@ a {
|
|||
max-width: 480px;
|
||||
}
|
||||
|
||||
.centrer {
|
||||
.centered {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bouton {
|
||||
.button {
|
||||
padding: 3px 10px 3px 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
form {
|
||||
display: block;
|
||||
flex-grow: 1;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.center {
|
||||
main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 814px;
|
||||
height: 99%;
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -76,16 +80,11 @@ body {
|
|||
color: @text;
|
||||
font-weight: normal;
|
||||
font-size: 20px;
|
||||
|
||||
& h1 {
|
||||
color: @text;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
height: 99%;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 20px;
|
||||
html {
|
||||
height: 97%;
|
||||
}
|
||||
|
||||
header {
|
||||
|
@ -100,7 +99,7 @@ header {
|
|||
height: 64px;
|
||||
}
|
||||
|
||||
#titres {
|
||||
#titles {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
|
@ -117,7 +116,7 @@ h2 {
|
|||
font-size: 22px;
|
||||
}
|
||||
|
||||
#lienTitres {
|
||||
#linkTitles {
|
||||
text-align: left;
|
||||
justify-content: center;
|
||||
text-decoration: none;
|
||||
|
@ -129,11 +128,6 @@ h2 {
|
|||
margin-top: 30px;
|
||||
}
|
||||
|
||||
#titre {
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.param {
|
||||
padding: 10px;
|
||||
padding-left: 0px;
|
||||
|
@ -142,7 +136,7 @@ h2 {
|
|||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.conteneurInputColor {
|
||||
.inputColorContainer {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
|
@ -174,18 +168,16 @@ label[for=txt] {
|
|||
|
||||
.metaText {
|
||||
color: @secondaryText;
|
||||
text-align: left;
|
||||
transition: color 0.12s cubic-bezier(0.42, 0.0, 1.0, 1.0);
|
||||
position: fixed;
|
||||
width: 400px;
|
||||
padding: 6px;
|
||||
|
||||
& a:link {
|
||||
& a, a:visited {
|
||||
transition: color 0.12s cubic-bezier(0.42, 0.0, 1.0, 1.0);
|
||||
color: @secondaryText;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&:hover, &:hover a:link {
|
||||
&:hover, &:hover a {
|
||||
color: @text;
|
||||
}
|
||||
|
||||
|
@ -193,8 +185,12 @@ label[for=txt] {
|
|||
|
||||
footer {
|
||||
font-size: 14px;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
padding-top: 20px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
header, footer {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
#info {
|
||||
|
@ -212,7 +208,7 @@ footer {
|
|||
|
||||
/* Inputs */
|
||||
|
||||
#redondancy, #margin, #txt, #size, input[type=color], input[type=submit], .bouton {
|
||||
#redondancy, #margin, #txt, #size, input[type=color], input[type=submit], .button {
|
||||
border: 2px @border solid;
|
||||
border-radius: 10px;
|
||||
font-size: 20px;
|
||||
|
@ -271,24 +267,30 @@ input[type=color] {
|
|||
border: 2px @border solid;
|
||||
}
|
||||
|
||||
/* Infobulle */
|
||||
/* Help message */
|
||||
|
||||
#helpImg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
.helpImg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
margin-bottom: -3px;
|
||||
margin-left: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.boutonAide {
|
||||
height: 0px;
|
||||
width: 0px;
|
||||
.helpButton {
|
||||
height: 22px;
|
||||
width: 22px;
|
||||
color: @secondaryText;
|
||||
cursor: help;
|
||||
font-size: 0.8em;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.conteneurAide .contenuAide {
|
||||
.helpContainer {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.helpContent {
|
||||
position: absolute;
|
||||
transform: scale(0) rotate(-12deg);
|
||||
color: @text;
|
||||
|
@ -312,55 +314,16 @@ input[type=color] {
|
|||
}
|
||||
}
|
||||
|
||||
.conteneurAide:hover .contenuAide, .conteneurAide:focus-within .contenuAide {
|
||||
.helpContainer:hover .helpContent, .helpContainer:focus-within .helpContent {
|
||||
transform: scale(1) rotate(0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Media queries */
|
||||
|
||||
@media (max-width: 1400px) {
|
||||
.metaText {
|
||||
width: 250px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1050px) {
|
||||
|
||||
#metaTexts {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.metaText {
|
||||
width: 100%;
|
||||
position: static;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#info {
|
||||
color: @text;
|
||||
margin-bottom: 20px;
|
||||
padding-top: 30px;
|
||||
font-size: 20px;
|
||||
|
||||
& a:link {
|
||||
color: @text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 850px) {
|
||||
|
||||
#metaTexts {
|
||||
flex-direction: column;
|
||||
width: 480px;
|
||||
justify-content: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.center {
|
||||
main {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
@ -378,11 +341,7 @@ input[type=color] {
|
|||
|
||||
}
|
||||
|
||||
@media (max-width: 500px) { // Version mobile
|
||||
|
||||
#metaTexts {
|
||||
width: auto;
|
||||
}
|
||||
@media (max-width: 500px) { // Mobile version
|
||||
|
||||
#colors {
|
||||
flex-direction: column;
|
||||
|
|
1
style.min.css
vendored
1
style.min.css
vendored
|
@ -1 +0,0 @@
|
|||
*{font-family:"Ubuntu", sans-serif;scrollbar-color:white #2a2a2a;scrollbar-width:auto;}a{color:white;text-decoration:underline;}a:hover{text-decoration:none;}#firstWrapper{display:flex;flex-direction:row;}#menusDeroulants{text-align:center;margin-left:20px;}#qrCode{max-width:480px;}.centrer{text-align:center;}.bouton{padding:3px 10px 3px 10px;text-decoration:none;}form{display:block;margin-bottom:30px;}.center{display:flex;flex-direction:column;justify-content:center;margin-left:auto;margin-right:auto;width:814px;}body{margin:18px;background-color:#2a2a2a;color:white;font-weight:normal;font-size:20px;}body h1{color:white;text-decoration:none;}label{font-size:20px;}header{text-align:center;padding:0px;margin:0px;height:64px;}#logo{width:64px;height:64px;}#titres{margin-left:20px;}h1,h2,h3,h4,h5,h6{margin:0px;font-weight:normal;}h1{font-size:33px;}h2{font-size:22px;}#lienTitres{text-align:left;justify-content:center;text-decoration:none;display:flex;flex-direction:row;}#showOnlyQR{margin-top:30px;}#titre{text-align:center;justify-content:center;}.param{padding:10px;padding-left:0px;margin-left:0px;padding-right:0px;margin-right:0px;}.conteneurInputColor{display:flex;flex-direction:row;justify-content:center;}::selection{color:#2a2a2a;background-color:white;}label[for=txt]{padding-left:22px;}#colors{display:flex;flex-direction:row;justify-content:space-between;text-align:center;}#colors .param{text-align:center;display:flex;justify-content:center;flex-direction:column;width:100%;}.metaText{color:#868686;text-align:left;transition:color 0.12s cubic-bezier(0.42,0.0,1.0,1.0);position:fixed;width:400px;}.metaText a:link{transition:color 0.12s cubic-bezier(0.42,0.0,1.0,1.0);color:#868686;text-decoration:underline;}.metaText:hover,.metaText:hover a:link{color:white;}footer{font-size:14px;bottom:20px;left:20px;}#info{font-size:16px;bottom:20px;right:20px;margin:0px;}#info h3{font-size:20px;font-weight:normal;padding-bottom:10px;}#redondancy,#margin,#txt,#size,input[type=color],input[type=submit],.bouton{border:2px #5f5f5f solid;border-radius:10px;font-size:20px;padding-left:10px;font-weight:normal;color:white;transition:border 0.1s linear;background-color:#31363b;margin-top:8px;}#redondancy:hover,#margin:hover,#txt:hover,#size:hover,input[type=color]:hover,input[type=submit]:hover,.bouton:hover{border:2px #808080 solid;}#redondancy:focus,#margin:focus,#txt:focus,#size:focus,input[type=color]:focus,input[type=submit]:focus,.bouton:focus{border:2px white solid;outline:none;}#redondancy,#size,#margin{background-color:#31363b;width:250px;height:40px;}#txt{background-color:#232629;color:white;padding:10px;margin:10px;width:500px;scrollbar-color:white #232629;scrollbar-width:auto;}input[type=submit]{font-size:28px;padding:10px;padding-left:14px;padding-right:14px;}#txt::placeholder{color:#868686;opacity:1;font-family:"Ubuntu", sans-serif;font-weight:normal;font-size:1em;}input[type=color]{height:60px;width:84px;padding:5px;border:2px #5f5f5f solid;}#helpImg{width:20px;height:20px;margin-bottom:-3px;margin-left:5px;}.boutonAide{height:0px;width:0px;color:#868686;cursor:help;font-size:0.8em;}.conteneurAide .contenuAide{position:absolute;transform:scale(0) rotate(-12deg);color:white;background:#151616;padding:15px;border-radius:10px;box-shadow:0 0 10px rgba(0,0,0,0.5);margin-top:23px;margin-left:-35px;transition:all .25s;opacity:0;max-width:500px;font-size:20px;text-align:left;}@media (max-width: 500px){.conteneurAide .contenuAide{position:fixed;margin:5px;left:0px;top:0px;}}.conteneurAide:hover .contenuAide,.conteneurAide:focus-within .contenuAide{transform:scale(1) rotate(0);opacity:1;}@media (max-width: 1400px){.metaText{width:250px;}}@media (max-width: 1050px){#metaTexts{display:flex;flex-direction:row;}.metaText{width:100%;position:static;font-size:20px;}#info{color:white;margin-bottom:20px;padding-top:30px;font-size:20px;}#info a:link{color:white;}}@media (max-width: 850px){#metaTexts{flex-direction:column;width:480px;justify-content:center;margin-left:auto;margin-right:auto;}.center{width:auto;}#firstWrapper{flex-direction:column;}body{margin:10px;}#txt{width:92%;}}@media (max-width: 500px){#metaTexts{width:auto;}#colors{flex-direction:column;}h1{font-size:28px;padding-top:6px;}#txt{width:85%;}#qrCode{max-width:94%;}}@media (max-width: 415px){h1{padding:0px;}}
|
|
@ -11,5 +11,5 @@ $variablesTheme = array(
|
|||
"borderHover" => "#808080",
|
||||
"borderFocus" => "white",
|
||||
"text" => "white",
|
||||
"secondaryText" => "#868686"
|
||||
"secondaryText" => "#bababa"
|
||||
); // Définit les couleurs du thème
|
||||
|
|
Loading…
Reference in a new issue