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
* Replace GET by POST for QR codes generation (privacy enhancement)
* Use less.php instead of lesserphp
* 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
// FR : Sera affiché en bas de l'interface
$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

@ -91,8 +91,8 @@ if (
require_once "less.php/lib/Less/Autoloader.php";
Less_Autoloader::register();
$options = array('cache_dir' => '/srv/http/libreqr/temp/', 'compress' => true);
$cssFileName = Less_Cache::Get(array("/srv/http/libreqr/style.less" => ""), $options, $colorScheme);
$options = array('cache_dir' => 'temp/', 'compress' => true);
$cssFileName = Less_Cache::Get(array("style.less" => ""), $options, $colorScheme);
?>
<link type="text/css" rel="stylesheet" href="temp/<?= $cssFileName ?>">

View file

@ -16,15 +16,13 @@ $loc = array(
'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>
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>
https://www.domain.tld/<br><br>
https://www.example/<br><br>
To send an email:<br>
mailto:contact@domain.tld<br><br>
mailto:contact@email.example<br><br>
To share geographic coordinates:<br>
geo:48.867564,2.364057<br><br>
To call a phone number:<br>
tel:+33639981871
geo:48.867564,2.364057
",
'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.",
@ -40,7 +38,7 @@ $loc = array(
'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 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>.
",
'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
$loc = array(
'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_redondancy' => "Taux de redondance",
@ -18,13 +18,11 @@ $loc = array(
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>
https://www.example/<br><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>
geo:48.867564,2.364057<br><br>
Pour appeler un numéro de téléphone :<br>
tel:+33639981871
geo:48.867564,2.364057
",
'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.",

View file

@ -18,13 +18,11 @@ $loc = array(
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>
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>
mailto:contact@domain.tld<br><br>
mailto:contact@email.example<br><br>
Per partejar de coordonadas geograficas:<br>
geo:48.867564,2.364057<br><br>
Per sonar un numèro de telefòn:<br>
tel:+33639981871
geo:48.867564,2.364057
",
'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.",

View file

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