Use the example TLD (as per RFC 2606)

This commit is contained in:
Miraty 2021-10-19 17:07:51 +02:00
parent d1774ac141
commit 1527c1852f
7 changed files with 20 additions and 23 deletions

View file

@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed ### Changed
* Replace GET by POST for QR codes generation (privacy enhancement)
* Use less.php instead of lesserphp * Use less.php instead of lesserphp
* Use the prefers-color-scheme CSS feature to let the client choose their prefered theme (dark/light) * Use the prefers-color-scheme CSS feature to let the client choose their prefered theme (dark/light)

View file

@ -28,4 +28,4 @@ $fileNameLenght = 32;
// EN: Will be printed at the bottom of the interface // EN: Will be printed at the bottom of the interface
// FR : Sera affiché en bas de l'interface // FR : Sera affiché en bas de l'interface
$customTextEnabled = false; $customTextEnabled = false;
$customText = "This LibreQR instance is hosted by <a href='https://foo.bar'>foo</a>."; $customText = "This LibreQR instance is hosted by <a href='https://foo.example/'>foo</a>.";

View file

@ -7,7 +7,7 @@
|_____|_|_.__/|_| \___|\__\_|_| \_\ |_____|_|_.__/|_| \___|\__\_|_| \_\
A PHP Web interface for generating QR codes A PHP Web interface for generating QR codes
Source code : https://code.antopie.org/miraty/libreqr Source code: https://code.antopie.org/miraty/libreqr
This file is part of LibreQR. This file is part of LibreQR.
@ -91,8 +91,8 @@ if (
require_once "less.php/lib/Less/Autoloader.php"; require_once "less.php/lib/Less/Autoloader.php";
Less_Autoloader::register(); Less_Autoloader::register();
$options = array('cache_dir' => '/srv/http/libreqr/temp/', 'compress' => true); $options = array('cache_dir' => 'temp/', 'compress' => true);
$cssFileName = Less_Cache::Get(array("/srv/http/libreqr/style.less" => ""), $options, $colorScheme); $cssFileName = Less_Cache::Get(array("style.less" => ""), $options, $colorScheme);
?> ?>
<link type="text/css" rel="stylesheet" href="temp/<?= $cssFileName ?>"> <link type="text/css" rel="stylesheet" href="temp/<?= $cssFileName ?>">

View file

@ -16,15 +16,13 @@ $loc = array(
'help_content' => " 'help_content' => "
You can only encode whatever text you want.<br> 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> Software which decodes 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> For instance, to open a webpage:<br>
https://www.domain.tld/<br><br> https://www.example/<br><br>
To send an email:<br> To send an email:<br>
mailto:contact@domain.tld<br><br> mailto:contact@email.example<br><br>
To share geographic coordinates:<br> To share geographic coordinates:<br>
geo:48.867564,2.364057<br><br> geo:48.867564,2.364057
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_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_margin' => "Number of pixels in the white bands around the QR code.",
@ -40,7 +38,7 @@ $loc = array(
'metaText_qr' => " 'metaText_qr' => "
<h3>What's a QR code?</h3> <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 QR code is a 2 dimensional barcode in which 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>. <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>.", '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>.",

View file

@ -1,7 +1,7 @@
<?php <?php
$loc = array( $loc = array(
'subtitle' => "Générateur de codes QR", 'subtitle' => "Générateur de codes QR",
'description' => "Générez des codes QR librement. Choisissez le contenu, la taille, les couleurs…", 'description' => "Générer des codes QR librement. Choix du contenu, de la taille, des couleurs…",
'label_content' => "Texte à encoder", 'label_content' => "Texte à encoder",
'label_redondancy' => "Taux de redondance", 'label_redondancy' => "Taux de redondance",
@ -18,13 +18,11 @@ $loc = array(
Vous pouvez encoder ce que vous voulez sous forme de texte.<br> 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> 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> Par exemple, pour ouvrir une page Web :<br>
https://www.domaine.tld/<br><br> https://www.example/<br><br>
Pour envoyer un mail :<br> Pour envoyer un mail :<br>
mailto:contact@domaine.tld<br><br> mailto:contact@email.example<br><br>
Pour partager des coordonnées géographique :<br> Pour partager des coordonnées géographique :<br>
geo:48.867564,2.364057<br><br> geo:48.867564,2.364057
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_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_margin' => "Nombre de pixels des bandes blanches autour du code QR.",

View file

@ -18,13 +18,11 @@ $loc = array(
Podètz pas que codar lo tèxt que volètz.<br> Podètz pas que codar lo tèxt que volètz.<br>
Los logicials que deschifran los còdis QR poirián suggerir de los dubrir dins de logicials especials, segon lor <a href='https://en.wikipedia.org/wiki/List_of_URI_schemes'>esquèma URI</a>.<br><br> Los logicials que deschifran los còdis QR poirián suggerir de los dubrir dins de logicials especials, segon lor <a href='https://en.wikipedia.org/wiki/List_of_URI_schemes'>esquèma URI</a>.<br><br>
Per exemple, per dubrir la pagina web:<br> Per exemple, per dubrir la pagina web:<br>
https://www.domain.tld/<br><br> https://www.example/<br><br>
Per enviar un corrièl:<br> Per enviar un corrièl:<br>
mailto:contact@domain.tld<br><br> mailto:contact@email.example<br><br>
Per partejar de coordonadas geograficas:<br> Per partejar de coordonadas geograficas:<br>
geo:48.867564,2.364057<br><br> geo:48.867564,2.364057
Per sonar un numèro de telefòn:<br>
tel:+33639981871
", ",
'help_redondancy' => "La redondància es la duplicacion de las informacions al còdi QR per dire de corregir las errors pendent lo deschiframent. Un taux mai naut produirà un còdi mai grand, mas serà de melhor deschifrar corrèctament.", 'help_redondancy' => "La redondància es la duplicacion de las informacions al còdi QR per dire de corregir las errors pendent lo deschiframent. Un taux mai naut produirà un còdi mai grand, mas serà de melhor deschifrar corrèctament.",
'help_margin' => "Nombre de pixèls de la banda blanca a lentorn del còdi QR.", 'help_margin' => "Nombre de pixèls de la banda blanca a lentorn del còdi QR.",

View file

@ -309,14 +309,16 @@ header, footer {
#redondancy { #redondancy {
width: 250px; width: 250px;
height: 44px;
} }
#size, #margin { #size, #margin {
width: 234px; width: 234px;
height: 38px;
} }
#redondancy, #size, #margin { #redondancy, #size, #margin {
height: 40px;
@media @light { @media @light {
background-color: @bgField-light; background-color: @bgField-light;
} }