diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..727bc05 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.directory diff --git a/README.md b/README.md index 1d401a4..78ed5da 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ![Logo](themes/defaut/favicons/32.png) Générateur de codes QR +# ![](themes/dark/favicons/32.png) LibreQR ## Présentation @@ -10,12 +10,11 @@ Une instance de ce service est disponible à l'adresse [https://qr.antopie.org]( ## Fonctionnement -Le Générateur de codes QR inclus un plugin [OpenSearch](https://developer.mozilla.org/docs/Web/OpenSearch), ce qui permet de l'ajouter comme moteur de recherche dans Firefox. -Vous pouvez ainsi générer un code QR directement depuis la barre de recherche. +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. - ## Installation ### Générique @@ -26,7 +25,9 @@ Placez ce code source dans un serveur Web avec PHP, tout simplement. ### YunoHost -J'ai créé un [paquet](https://code.antopie.org/miraty/qr_ynh/) [YunoHost](https://yunohost.org/). +J'ai créé un [paquet](https://code.antopie.org/miraty/qr_ynh/) pour [YunoHost](https://yunohost.org/). + +Vous pouvez l'installer depuis l'interface d'administration ou avec cette commande : ``` sudo yunohost app install https://code.antopie.org/miraty/qr_ynh/ @@ -36,18 +37,28 @@ sudo yunohost app install https://code.antopie.org/miraty/qr_ynh/ ### Changer de thème -Dans options.inc.php, donnez à $theme le nom du thème voulu. +Dans config.inc.php, donnez à $theme le nom du thème voulu. -Par défaut, deux thèmes sont proposés : +Par défaut, trois thèmes sont proposés : -* defaut, le thème par défaut, sombre. Il est utilisé ici : -* parinux, un thème bleu, créé pour [Bastet](https://bastet.parinux.org/), le chaton de [Parinux](https://parinux.org/). Il est utilisé ici : +* dark, le thème par défaut, sombre. Il est utilisé ici : +* 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 : ### Créer un thème -* Copiez themes/defaut vers themes/[nom de votre thème] -* Depuis ce nouveau dossier, créez les icônes dans favicons/[longueur du côté de l'icone].png -* Complétez theme.php en fonctions des favicons créées précédemment et des couleurs CSS voulues dans l'interface +* 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 de votre thème] +``` + +Cela nécessitera d'avoir installé [ImageMagick](https://imagemagick.org) et +[pngquant](https://pngquant.org). ## Bibliothèques tierces @@ -61,8 +72,8 @@ Ce code source inclus : [AGPLv3+](https://code.antopie.org/miraty/qr/src/branch/master/LICENSE) -Ce générateur de codes QR 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 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. -Ce générateur de codes QR 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 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 diff --git a/aide.svg b/aide.svg index b6cba09..b57a54f 100755 --- a/aide.svg +++ b/aide.svg @@ -2,8 +2,8 @@ - " stroke-width="2" cx="12" cy="12" r="10"> - "> + " stroke-width="2" cx="12" cy="12" r="10"> + "> diff --git a/options.inc.php b/config.inc.php similarity index 51% rename from options.inc.php rename to config.inc.php index 44386bf..f062654 100755 --- a/options.inc.php +++ b/config.inc.php @@ -1,28 +1,24 @@ getFilename() != "." AND $listeCodesQR->getFilename() != ".." AND $listeCodesQR->getFilename() != "UoD3X0SUSLDF4K8V67igQozAaw7fOTStC8IO5gcMLd3OyW1r0b.png") { + 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 } } } } - - -?> diff --git a/index.php b/index.php index b62e830..1efa567 100755 --- a/index.php +++ b/index.php @@ -1,242 +1,303 @@ - + - + + + Générateur de codes QR - + - - - ' . "\n"; - } ?> + foreach($themeDimensionsIcons as $dimFav) { // Indique toutes les dimensions d'icones + echo ' ' . "\n"; + } ?> - + + +
-

Générateur de codes QR

+ + +
+

LibreQR

+

Générateur de codes QR

+
+
- +
- +
-
- - - - Vous pouvez encoder ce que vous voulez sous forme de texte. - -
- +
+ + - ?>
+
-
- -
- - - - Par combien les dimensions de l'image seront-elles multipliées ? - -
-
- "> -
-
- -
- - - - Nombre de pixels des bandes blanches autour du code QR. - -
-
- "> -
-
- -
- - -
-
- +
-
-
- - + $cheminImage = "temp/" . generateRandomString($fileNameLenght) . ".png"; + QRcode::png($_GET['txt'], $cheminImage, $_GET['redondancy'], $_GET['size'], $_GET['margin'], false, hexdec($_GET['bgColor']), hexdec($_GET['mainColor'])); + ?> + - -

- - + Un code QR contenant "<?php echo htmlspecialchars($_GET["' id="qrCode" src=""/> +
+ + ?> - - if (empty($_GET["texte"])) { // Si rien n'a été recherché ?> +
- Erreur : vous ne pouvez pas générer un code QR vide ! - - - -
- - Vous avez créé un code QR contenant : -
- -
- - -

- - - - - - -
- Qu'est-ce qu'un code QR ?
- Un code QR est une image en 2 dimensions dans laquelle est inscrite en binaire des informations textuelles.
- Un pixel blanc représente un 0 et un pixel noir représente un 1.
- Code QR sur Wikipédia -
- - +
+

Qu'est-ce qu'un code QR ?

+ 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. + Code QR sur Wikipédia +
+
+ LibreQR 1.2.0 est un logiciel libre dont le code source est disponible + selon les termes de l'AGPLv3+. +
+
diff --git a/manifest.php b/manifest.php index 7e78eed..685593a 100755 --- a/manifest.php +++ b/manifest.php @@ -1,33 +1,28 @@ - + { "dir": "ltr", - "lang": "fr-FR", - "name": "Générateur de code QR", - "short_name": "Code QR", - "description": "Générez un code QR rapidement", - "start_url": "", - "scope": "", + "lang": "fr", + "name": "LibreQR", + "short_name": "LibreQR", + "description": "Générer un code QR rapidement", + "start_url": "", + "scope": "", "display": "standalone", - "theme_color": "", - "background_color": "", + "theme_color": "", + "background_color": "", "orientation": "portrait", "icons": [ - - { - "src": "themes//favicons/.png", - "sizes": "x", - "type": "image/png" - }, - - + { - "src": "themes//favicons/.png", - "sizes": "x", + "src": "themes//icons/.png", + "sizes": "x", + "type": "image/png" + }, + + { + "src": "themes//icons/.png", + "sizes": "x", "type": "image/png" } ] diff --git a/opensearch.php b/opensearch.php index 9d9833b..835b020 100755 --- a/opensearch.php +++ b/opensearch.php @@ -1,15 +1,15 @@ - + Générer un code QR Générez des codes QR depuis votre barre de recherche ou d'adresse ' . $cheminInstall . 'themes/' . $theme . '/favicons/' . $dimFav . '.png' . "\n"; + echo ' ' . $instPath . 'themes/' . $theme . '/icons/' . $dimFav . '.png' . "\n"; } ?> fr UTF-8 - - + + diff --git a/phpqrcode.php b/phpqrcode.php index c3afc9d..c2c92f0 100755 --- a/phpqrcode.php +++ b/phpqrcode.php @@ -34,19 +34,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - - -/* - * Version: 1.1.4 - * Build: 2010100721 - */ - - - -//---- qrconst.php ----------------------------- - - - + + +/* + * Version: 1.1.4 + * Build: 2010100721 + */ + + + +//---- qrconst.php ----------------------------- + + + /* @@ -100,14 +100,14 @@ public static function set(&$srctab, $x, $y, $repl, $replLen = false) { $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); } - } - - - -//---- merged_config.php ----------------------------- - - - + } + + + +//---- merged_config.php ----------------------------- + + + /* * PHP QR Code encoder @@ -124,206 +124,206 @@ define('QR_DEFAULT_MASK', 2); // when QR_FIND_BEST_MASK === false define('QR_PNG_MAXIMUM_SIZE', 1024); // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images - - - - -//---- qrtools.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Toolset, handy and debug utilites. - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRtools { - - //---------------------------------------------------------------------- - public static function binarize($frame) - { - $len = count($frame); - foreach ($frame as &$frameLine) { - - for($i=0; $i<$len; $i++) { - $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; - } - } - - return $frame; - } - - //---------------------------------------------------------------------- - public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037') - { - $barcode_array = array(); - - if (!is_array($mode)) - $mode = explode(',', $mode); - - $eccLevel = 'L'; - - if (count($mode) > 1) { - $eccLevel = $mode[1]; - } - - $qrTab = QRcode::text($code, false, $eccLevel); - $size = count($qrTab); - - $barcode_array['num_rows'] = $size; - $barcode_array['num_cols'] = $size; - $barcode_array['bcode'] = array(); - - foreach ($qrTab as $line) { - $arrAdd = array(); - foreach(str_split($line) as $char) - $arrAdd[] = ($char=='1')?1:0; - $barcode_array['bcode'][] = $arrAdd; - } - - return $barcode_array; - } - - //---------------------------------------------------------------------- - public static function clearCache() - { - self::$frames = array(); - } - - //---------------------------------------------------------------------- - public static function buildCache() - { - QRtools::markTime('before_build_cache'); - - $mask = new QRmask(); - for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { - $frame = QRspec::newFrame($a); - if (QR_IMAGE) { - $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; - QRimage::png(self::binarize($frame), $fileName, 1, 0); - } - - $width = count($frame); - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - for ($maskNo=0; $maskNo<8; $maskNo++) - $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); - } - - QRtools::markTime('after_build_cache'); - } - - //---------------------------------------------------------------------- - public static function log($outfile, $err) - { - if (QR_LOG_DIR !== false) { - if ($err != '') { - if ($outfile !== false) { - file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); - } else { - file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); - } - } - } - } - - //---------------------------------------------------------------------- - public static function dumpMask($frame) - { - $width = count($frame); - for($y=0;$y<$width;$y++) { - for($x=0;$x<$width;$x++) { - echo ord($frame[$y][$x]).','; - } - } - } - - //---------------------------------------------------------------------- - public static function markTime($markerId) - { - list($usec, $sec) = explode(" ", microtime()); - $time = ((float)$usec + (float)$sec); - - if (!isset($GLOBALS['qr_time_bench'])) - $GLOBALS['qr_time_bench'] = array(); - - $GLOBALS['qr_time_bench'][$markerId] = $time; - } - - //---------------------------------------------------------------------- - public static function timeBenchmark() - { - self::markTime('finish'); - - $lastTime = 0; - $startTime = 0; - $p = 0; - - echo ' - - '; - - foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { - if ($p > 0) { - echo ''; - } else { - $startTime = $thisTime; - } - - $p++; - $lastTime = $thisTime; - } - - echo ' - - -
BENCHMARK
till '.$markerId.': '.number_format($thisTime-$lastTime, 6).'s
TOTAL: '.number_format($lastTime-$startTime, 6).'s
'; - } - - public static function save($content, $filename_path) - { - try { - $handle = fopen($filename_path, "w"); - fwrite($handle, $content); - fclose($handle); - return true; - } catch (Exception $e) { - echo 'Exception reçue : ', $e->getMessage(), "\n"; - } - - } - - } - - //########################################################################## - - QRtools::markTime('start'); - - - - -//---- qrspec.php ----------------------------- - - - + + + + +//---- qrtools.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Toolset, handy and debug utilites. + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRtools { + + //---------------------------------------------------------------------- + public static function binarize($frame) + { + $len = count($frame); + foreach ($frame as &$frameLine) { + + for($i=0; $i<$len; $i++) { + $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; + } + } + + return $frame; + } + + //---------------------------------------------------------------------- + public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037') + { + $barcode_array = array(); + + if (!is_array($mode)) + $mode = explode(',', $mode); + + $eccLevel = 'L'; + + if (count($mode) > 1) { + $eccLevel = $mode[1]; + } + + $qrTab = QRcode::text($code, false, $eccLevel); + $size = count($qrTab); + + $barcode_array['num_rows'] = $size; + $barcode_array['num_cols'] = $size; + $barcode_array['bcode'] = array(); + + foreach ($qrTab as $line) { + $arrAdd = array(); + foreach(str_split($line) as $char) + $arrAdd[] = ($char=='1')?1:0; + $barcode_array['bcode'][] = $arrAdd; + } + + return $barcode_array; + } + + //---------------------------------------------------------------------- + public static function clearCache() + { + self::$frames = array(); + } + + //---------------------------------------------------------------------- + public static function buildCache() + { + QRtools::markTime('before_build_cache'); + + $mask = new QRmask(); + for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { + $frame = QRspec::newFrame($a); + if (QR_IMAGE) { + $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; + QRimage::png(self::binarize($frame), $fileName, 1, 0); + } + + $width = count($frame); + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + for ($maskNo=0; $maskNo<8; $maskNo++) + $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); + } + + QRtools::markTime('after_build_cache'); + } + + //---------------------------------------------------------------------- + public static function log($outfile, $err) + { + if (QR_LOG_DIR !== false) { + if ($err != '') { + if ($outfile !== false) { + file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } else { + file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } + } + } + } + + //---------------------------------------------------------------------- + public static function dumpMask($frame) + { + $width = count($frame); + for($y=0;$y<$width;$y++) { + for($x=0;$x<$width;$x++) { + echo ord($frame[$y][$x]).','; + } + } + } + + //---------------------------------------------------------------------- + public static function markTime($markerId) + { + list($usec, $sec) = explode(" ", microtime()); + $time = ((float)$usec + (float)$sec); + + if (!isset($GLOBALS['qr_time_bench'])) + $GLOBALS['qr_time_bench'] = array(); + + $GLOBALS['qr_time_bench'][$markerId] = $time; + } + + //---------------------------------------------------------------------- + public static function timeBenchmark() + { + self::markTime('finish'); + + $lastTime = 0; + $startTime = 0; + $p = 0; + + echo ' + + '; + + foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { + if ($p > 0) { + echo ''; + } else { + $startTime = $thisTime; + } + + $p++; + $lastTime = $thisTime; + } + + echo ' + + +
BENCHMARK
till '.$markerId.': '.number_format($thisTime-$lastTime, 6).'s
TOTAL: '.number_format($lastTime-$startTime, 6).'s
'; + } + + public static function save($content, $filename_path) + { + try { + $handle = fopen($filename_path, "w"); + fwrite($handle, $content); + fclose($handle); + return true; + } catch (Exception $e) { + echo 'Exception reçue : ', $e->getMessage(), "\n"; + } + + } + + } + + //########################################################################## + + QRtools::markTime('start'); + + + + +//---- qrspec.php ----------------------------- + + + /* * PHP QR Code encoder @@ -915,129 +915,129 @@ public static function rsDataLength($spec) { return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); } public static function rsEccLength($spec) { return ($spec[0] + $spec[3]) * $spec[2]; } - } - - - -//---- qrimage.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Image output of code using GD2 - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('QR_IMAGE', true); - - class QRimage { - - //---------------------------------------------------------------------- - public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color) - { - $image = self::image($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color); - - if ($filename === false) { - Header("Content-type: image/png"); - ImagePng($image); - } else { - if($saveandprint===TRUE){ - ImagePng($image, $filename); - header("Content-type: image/png"); - ImagePng($image); - }else{ - ImagePng($image, $filename); - } - } - - ImageDestroy($image); - } - - //---------------------------------------------------------------------- - public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85) - { - $image = self::image($frame, $pixelPerPoint, $outerFrame); - - if ($filename === false) { - Header("Content-type: image/jpeg"); - ImageJpeg($image, null, $q); - } else { - ImageJpeg($image, $filename, $q); - } - - ImageDestroy($image); - } - - //---------------------------------------------------------------------- - private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000) - { - $h = count($frame); - $w = strlen($frame[0]); - - $imgW = $w + 2*$outerFrame; - $imgH = $h + 2*$outerFrame; - - $base_image =ImageCreate($imgW, $imgH); - - // convert a hexadecimal color code into decimal format (red = 255 0 0, green = 0 255 0, blue = 0 0 255) - $r1 = round((($fore_color & 0xFF0000) >> 16), 5); - $g1 = round((($fore_color & 0x00FF00) >> 8), 5); - $b1 = round(($fore_color & 0x0000FF), 5); - - // convert a hexadecimal color code into decimal format (red = 255 0 0, green = 0 255 0, blue = 0 0 255) - $r2 = round((($back_color & 0xFF0000) >> 16), 5); - $g2 = round((($back_color & 0x00FF00) >> 8), 5); - $b2 = round(($back_color & 0x0000FF), 5); - - - - $col[0] = ImageColorAllocate($base_image, $r2, $g2, $b2); - $col[1] = ImageColorAllocate($base_image, $r1, $g1, $b1); - - imagefill($base_image, 0, 0, $col[0]); - - for($y=0; $y<$h; $y++) { - for($x=0; $x<$w; $x++) { - if ($frame[$y][$x] == '1') { - ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]); - } - } - } - - $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint); - ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH); - ImageDestroy($base_image); - - return $target_image; - } - } - - - - -//---- qrinput.php ----------------------------- - - - + } + + + +//---- qrimage.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Image output of code using GD2 + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QR_IMAGE', true); + + class QRimage { + + //---------------------------------------------------------------------- + public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color); + + if ($filename === false) { + Header("Content-type: image/png"); + ImagePng($image); + } else { + if($saveandprint===TRUE){ + ImagePng($image, $filename); + header("Content-type: image/png"); + ImagePng($image); + }else{ + ImagePng($image, $filename); + } + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame); + + if ($filename === false) { + Header("Content-type: image/jpeg"); + ImageJpeg($image, null, $q); + } else { + ImageJpeg($image, $filename, $q); + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + $base_image =ImageCreate($imgW, $imgH); + + // convert a hexadecimal color code into decimal format (red = 255 0 0, green = 0 255 0, blue = 0 0 255) + $r1 = round((($fore_color & 0xFF0000) >> 16), 5); + $g1 = round((($fore_color & 0x00FF00) >> 8), 5); + $b1 = round(($fore_color & 0x0000FF), 5); + + // convert a hexadecimal color code into decimal format (red = 255 0 0, green = 0 255 0, blue = 0 0 255) + $r2 = round((($back_color & 0xFF0000) >> 16), 5); + $g2 = round((($back_color & 0x00FF00) >> 8), 5); + $b2 = round(($back_color & 0x0000FF), 5); + + + + $col[0] = ImageColorAllocate($base_image, $r2, $g2, $b2); + $col[1] = ImageColorAllocate($base_image, $r1, $g1, $b1); + + imagefill($base_image, 0, 0, $col[0]); + + for($y=0; $y<$h; $y++) { + for($x=0; $x<$w; $x++) { + if ($frame[$y][$x] == '1') { + ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]); + } + } + } + + $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint); + ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH); + ImageDestroy($base_image); + + return $target_image; + } + } + + + + +//---- qrinput.php ----------------------------- + + + /* * PHP QR Code encoder @@ -1763,14 +1763,14 @@ } - - - - -//---- qrbitstream.php ----------------------------- - - - + + + + +//---- qrbitstream.php ----------------------------- + + + /* * PHP QR Code encoder @@ -1951,14 +1951,14 @@ } } - - - - -//---- qrsplit.php ----------------------------- - - - + + + + +//---- qrsplit.php ----------------------------- + + + /* * PHP QR Code encoder @@ -2269,14 +2269,14 @@ return $split->splitString(); } - } - - - -//---- qrrscode.php ----------------------------- - - - + } + + + +//---- qrrscode.php ----------------------------- + + + /* * PHP QR Code encoder @@ -2486,14 +2486,14 @@ return $rs; } - } - - - -//---- qrmask.php ----------------------------- - - - + } + + + +//---- qrmask.php ----------------------------- + + + /* * PHP QR Code encoder @@ -2822,804 +2822,804 @@ //---------------------------------------------------------------------- } - - - - -//---- qrencode.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Main encoder classes. - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRrsblock { - public $dataLength; - public $data = array(); - public $eccLength; - public $ecc = array(); - - public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs) - { - $rs->encode_rs_char($data, $ecc); - - $this->dataLength = $dl; - $this->data = $data; - $this->eccLength = $el; - $this->ecc = $ecc; - } - }; - - //########################################################################## - - class QRrawcode { - public $version; - public $datacode = array(); - public $ecccode = array(); - public $blocks; - public $rsblocks = array(); //of RSblock - public $count; - public $dataLength; - public $eccLength; - public $b1; - - //---------------------------------------------------------------------- - public function __construct(QRinput $input) - { - $spec = array(0,0,0,0,0); - - $this->datacode = $input->getByteStream(); - if(is_null($this->datacode)) { - throw new Exception('null imput string'); - } - - QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec); - - $this->version = $input->getVersion(); - $this->b1 = QRspec::rsBlockNum1($spec); - $this->dataLength = QRspec::rsDataLength($spec); - $this->eccLength = QRspec::rsEccLength($spec); - $this->ecccode = array_fill(0, $this->eccLength, 0); - $this->blocks = QRspec::rsBlockNum($spec); - - $ret = $this->init($spec); - if($ret < 0) { - throw new Exception('block alloc error'); - return null; - } - - $this->count = 0; - } - - //---------------------------------------------------------------------- - public function init(array $spec) - { - $dl = QRspec::rsDataCodes1($spec); - $el = QRspec::rsEccCodes1($spec); - $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - - - $blockNo = 0; - $dataPos = 0; - $eccPos = 0; - for($i=0; $iecccode,$eccPos); - $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - - if(QRspec::rsBlockNum2($spec) == 0) - return 0; - - $dl = QRspec::rsDataCodes2($spec); - $el = QRspec::rsEccCodes2($spec); - $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - - if($rs == NULL) return -1; - - for($i=0; $iecccode,$eccPos); - $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - - return 0; - } - - //---------------------------------------------------------------------- - public function getCode() - { - $ret; - - if($this->count < $this->dataLength) { - $row = $this->count % $this->blocks; - $col = $this->count / $this->blocks; - if($col >= $this->rsblocks[0]->dataLength) { - $row += $this->b1; - } - $ret = $this->rsblocks[$row]->data[$col]; - } else if($this->count < $this->dataLength + $this->eccLength) { - $row = ($this->count - $this->dataLength) % $this->blocks; - $col = ($this->count - $this->dataLength) / $this->blocks; - $ret = $this->rsblocks[$row]->ecc[$col]; - } else { - return 0; - } - $this->count++; - - return $ret; - } - } - - //########################################################################## - - class QRcode { - - public $version; - public $width; - public $data; - - //---------------------------------------------------------------------- - public function encodeMask(QRinput $input, $mask) - { - if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { - throw new Exception('wrong version'); - } - if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) { - throw new Exception('wrong level'); - } - - $raw = new QRrawcode($input); - - QRtools::markTime('after_raw'); - - $version = $raw->version; - $width = QRspec::getWidth($version); - $frame = QRspec::newFrame($version); - - $filler = new FrameFiller($width, $frame); - if(is_null($filler)) { - return NULL; - } - - // inteleaved data and ecc codes - for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { - $code = $raw->getCode(); - $bit = 0x80; - for($j=0; $j<8; $j++) { - $addr = $filler->next(); - $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); - $bit = $bit >> 1; - } - } - - QRtools::markTime('after_filler'); - - unset($raw); - - // remainder bits - $j = QRspec::getRemainder($version); - for($i=0; $i<$j; $i++) { - $addr = $filler->next(); - $filler->setFrameAt($addr, 0x02); - } - - $frame = $filler->frame; - unset($filler); - - - // masking - $maskObj = new QRmask(); - if($mask < 0) { - - if (QR_FIND_BEST_MASK) { - $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel()); - } else { - $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel()); - } - } else { - $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel()); - } - - if($masked == NULL) { - return NULL; - } - - QRtools::markTime('after_mask'); - - $this->version = $version; - $this->width = $width; - $this->data = $masked; - - return $this; - } - - //---------------------------------------------------------------------- - public function encodeInput(QRinput $input) - { - return $this->encodeMask($input, -1); - } - - //---------------------------------------------------------------------- - public function encodeString8bit($string, $version, $level) - { - if($string == NULL) { - throw new Exception('empty string!'); - return NULL; - } - - $input = new QRinput($version, $level); - if($input == NULL) return NULL; - - $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string)); - if($ret < 0) { - unset($input); - return NULL; - } - return $this->encodeInput($input); - } - - //---------------------------------------------------------------------- - public function encodeString($string, $version, $level, $hint, $casesensitive) - { - - if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) { - throw new Exception('bad hint'); - return NULL; - } - - $input = new QRinput($version, $level); - if($input == NULL) return NULL; - - $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive); - if($ret < 0) { - return NULL; - } - - return $this->encodeInput($input); - } - - //---------------------------------------------------------------------- - public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000) - { - $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color); - return $enc->encodePNG($text, $outfile, $saveandprint=false); - } - - //---------------------------------------------------------------------- - public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encode($text, $outfile); - } - - //---------------------------------------------------------------------- - public static function eps($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) - { - $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color, $cmyk); - return $enc->encodeEPS($text, $outfile, $saveandprint=false); - } - - //---------------------------------------------------------------------- - public static function svg($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000) - { - $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color); - return $enc->encodeSVG($text, $outfile, $saveandprint=false); - } - - //---------------------------------------------------------------------- - public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encodeRAW($text, $outfile); - } - } - - //########################################################################## - - class FrameFiller { - - public $width; - public $frame; - public $x; - public $y; - public $dir; - public $bit; - - //---------------------------------------------------------------------- - public function __construct($width, &$frame) - { - $this->width = $width; - $this->frame = $frame; - $this->x = $width - 1; - $this->y = $width - 1; - $this->dir = -1; - $this->bit = -1; - } - - //---------------------------------------------------------------------- - public function setFrameAt($at, $val) - { - $this->frame[$at['y']][$at['x']] = chr($val); - } - - //---------------------------------------------------------------------- - public function getFrameAt($at) - { - return ord($this->frame[$at['y']][$at['x']]); - } - - //---------------------------------------------------------------------- - public function next() - { - do { - - if($this->bit == -1) { - $this->bit = 0; - return array('x'=>$this->x, 'y'=>$this->y); - } - - $x = $this->x; - $y = $this->y; - $w = $this->width; - - if($this->bit == 0) { - $x--; - $this->bit++; - } else { - $x++; - $y += $this->dir; - $this->bit--; - } - - if($this->dir < 0) { - if($y < 0) { - $y = 0; - $x -= 2; - $this->dir = 1; - if($x == 6) { - $x--; - $y = 9; - } - } - } else { - if($y == $w) { - $y = $w - 1; - $x -= 2; - $this->dir = -1; - if($x == 6) { - $x--; - $y -= 8; - } - } - } - if($x < 0 || $y < 0) return null; - - $this->x = $x; - $this->y = $y; - - } while(ord($this->frame[$y][$x]) & 0x80); - - return array('x'=>$x, 'y'=>$y); - } - - } ; - - //########################################################################## - - class QRencode { - - public $casesensitive = true; - public $eightbit = false; - - public $version = 0; - public $size = 3; - public $margin = 4; - public $back_color = 0xFFFFFF; - public $fore_color = 0x000000; - - public $structured = 0; // not supported yet - - public $level = QR_ECLEVEL_L; - public $hint = QR_MODE_8; - - //---------------------------------------------------------------------- - public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) - { - $enc = new QRencode(); - $enc->size = $size; - $enc->margin = $margin; - $enc->fore_color = $fore_color; - $enc->back_color = $back_color; - $enc->cmyk = $cmyk; - - switch ($level.'') { - case '0': - case '1': - case '2': - case '3': - $enc->level = $level; - break; - case 'l': - case 'L': - $enc->level = QR_ECLEVEL_L; - break; - case 'm': - case 'M': - $enc->level = QR_ECLEVEL_M; - break; - case 'q': - case 'Q': - $enc->level = QR_ECLEVEL_Q; - break; - case 'h': - case 'H': - $enc->level = QR_ECLEVEL_H; - break; - } - - return $enc; - } - - //---------------------------------------------------------------------- - public function encodeRAW($intext, $outfile = false) - { - $code = new QRcode(); - - if($this->eightbit) { - $code->encodeString8bit($intext, $this->version, $this->level); - } else { - $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); - } - - return $code->data; - } - - //---------------------------------------------------------------------- - public function encode($intext, $outfile = false) - { - $code = new QRcode(); - - if($this->eightbit) { - $code->encodeString8bit($intext, $this->version, $this->level); - } else { - $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); - } - - QRtools::markTime('after_encode'); - - if ($outfile!== false) { - file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); - } else { - return QRtools::binarize($code->data); - } - } - - //---------------------------------------------------------------------- - public function encodePNG($intext, $outfile = false,$saveandprint=false) - { - try { - - ob_start(); - $tab = $this->encode($intext); - $err = ob_get_contents(); - ob_end_clean(); - - if ($err != '') - QRtools::log($outfile, $err); - - $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); - - QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color); - - } catch (Exception $e) { - - QRtools::log($outfile, $e->getMessage()); - - } - } - - //---------------------------------------------------------------------- - public function encodeEPS($intext, $outfile = false,$saveandprint=false) - { - try { - - ob_start(); - $tab = $this->encode($intext); - $err = ob_get_contents(); - ob_end_clean(); - - if ($err != '') - QRtools::log($outfile, $err); - - $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); - - QRvect::eps($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color, $this->cmyk); - - } catch (Exception $e) { - - QRtools::log($outfile, $e->getMessage()); - - } - } - - //---------------------------------------------------------------------- - public function encodeSVG($intext, $outfile = false,$saveandprint=false) - { - try { - - ob_start(); - $tab = $this->encode($intext); - $err = ob_get_contents(); - ob_end_clean(); - - if ($err != '') - QRtools::log($outfile, $err); - - $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); - - QRvect::svg($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color); - - } catch (Exception $e) { - - QRtools::log($outfile, $e->getMessage()); - - } - } - } - - - - -//---- qrvect.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Image output of code using GD2 - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('QR_VECT', true); - - class QRvect { - - //---------------------------------------------------------------------- - public static function eps($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) - { - $vect = self::vectEPS($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color, $cmyk); - - if ($filename === false) { - header("Content-Type: application/postscript"); - header('Content-Disposition: filename="qrcode.eps"'); - echo $vect; - } else { - if($saveandprint===TRUE){ - QRtools::save($vect, $filename); - header("Content-Type: application/postscript"); - header('Content-Disposition: filename="qrcode.eps"'); - echo $vect; - }else{ - QRtools::save($vect, $filename); - } - } - } - - - //---------------------------------------------------------------------- - private static function vectEPS($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) - { - $h = count($frame); - $w = strlen($frame[0]); - - $imgW = $w + 2*$outerFrame; - $imgH = $h + 2*$outerFrame; - - if ($cmyk) - { - // convert color value into decimal eps format - $c = round((($fore_color & 0xFF000000) >> 16) / 255, 5); - $m = round((($fore_color & 0x00FF0000) >> 16) / 255, 5); - $y = round((($fore_color & 0x0000FF00) >> 8) / 255, 5); - $k = round(($fore_color & 0x000000FF) / 255, 5); - $fore_color_string = $c.' '.$m.' '.$y.' '.$k.' setcmykcolor'."\n"; - - // convert color value into decimal eps format - $c = round((($back_color & 0xFF000000) >> 16) / 255, 5); - $m = round((($back_color & 0x00FF0000) >> 16) / 255, 5); - $y = round((($back_color & 0x0000FF00) >> 8) / 255, 5); - $k = round(($back_color & 0x000000FF) / 255, 5); - $back_color_string = $c.' '.$m.' '.$y.' '.$k.' setcmykcolor'."\n"; - } - else - { - // convert a hexadecimal color code into decimal eps format (green = 0 1 0, blue = 0 0 1, ...) - $r = round((($fore_color & 0xFF0000) >> 16) / 255, 5); - $b = round((($fore_color & 0x00FF00) >> 8) / 255, 5); - $g = round(($fore_color & 0x0000FF) / 255, 5); - $fore_color_string = $r.' '.$b.' '.$g.' setrgbcolor'."\n"; - - // convert a hexadecimal color code into decimal eps format (green = 0 1 0, blue = 0 0 1, ...) - $r = round((($back_color & 0xFF0000) >> 16) / 255, 5); - $b = round((($back_color & 0x00FF00) >> 8) / 255, 5); - $g = round(($back_color & 0x0000FF) / 255, 5); - $back_color_string = $r.' '.$b.' '.$g.' setrgbcolor'."\n"; - } - - $output = - '%!PS-Adobe EPSF-3.0'."\n". - '%%Creator: PHPQrcodeLib'."\n". - '%%Title: QRcode'."\n". - '%%CreationDate: '.date('Y-m-d')."\n". - '%%DocumentData: Clean7Bit'."\n". - '%%LanguageLevel: 2'."\n". - '%%Pages: 1'."\n". - '%%BoundingBox: 0 0 '.$imgW * $pixelPerPoint.' '.$imgH * $pixelPerPoint."\n"; - - // set the scale - $output .= $pixelPerPoint.' '.$pixelPerPoint.' scale'."\n"; - // position the center of the coordinate system - - $output .= $outerFrame.' '.$outerFrame.' translate'."\n"; - - - - - // redefine the 'rectfill' operator to shorten the syntax - $output .= '/F { rectfill } def'."\n"; - - // set the symbol color - $output .= $back_color_string; - $output .= '-'.$outerFrame.' -'.$outerFrame.' '.($w + 2*$outerFrame).' '.($h + 2*$outerFrame).' F'."\n"; - - - // set the symbol color - $output .= $fore_color_string; - - // Convert the matrix into pixels - - for($i=0; $i<$h; $i++) { - for($j=0; $j<$w; $j++) { - if( $frame[$i][$j] == '1') { - $y = $h - 1 - $i; - $x = $j; - $output .= $x.' '.$y.' 1 1 F'."\n"; - } - } - } - - - $output .='%%EOF'; - - return $output; - } - - //---------------------------------------------------------------------- - public static function svg($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color) - { - $vect = self::vectSVG($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color); - - if ($filename === false) { - header("Content-Type: image/svg+xml"); - //header('Content-Disposition: attachment, filename="qrcode.svg"'); - echo $vect; - } else { - if($saveandprint===TRUE){ - QRtools::save($vect, $filename); - header("Content-Type: image/svg+xml"); - //header('Content-Disposition: filename="'.$filename.'"'); - echo $vect; - }else{ - QRtools::save($vect, $filename); - } - } - } - - - //---------------------------------------------------------------------- - private static function vectSVG($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000) - { - $h = count($frame); - $w = strlen($frame[0]); - - $imgW = $w + 2*$outerFrame; - $imgH = $h + 2*$outerFrame; - - - $output = - ''."\n". - ''."\n". - ''."\n"; - - $output = - ''."\n". - ''."\n". - ''."\n". - ''."\n"; - - if(!empty($back_color)) { - $backgroundcolor = str_pad(dechex($back_color), 6, "0", STR_PAD_LEFT); - $output .= ''."\n"; - } - - $output .= - ''."\n". - ''."\n". - ''."\n". - ''."\n"; - - - // Convert the matrix into pixels - - for($i=0; $i<$h; $i++) { - for($j=0; $j<$w; $j++) { - if( $frame[$i][$j] == '1') { - $y = ($i + $outerFrame) * $pixelPerPoint; - $x = ($j + $outerFrame) * $pixelPerPoint; - $output .= ''."\n"; - } - } - } - $output .= - ''."\n". - ''; - - return $output; - } - } - - - - + + + + +//---- qrencode.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Main encoder classes. + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRrsblock { + public $dataLength; + public $data = array(); + public $eccLength; + public $ecc = array(); + + public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs) + { + $rs->encode_rs_char($data, $ecc); + + $this->dataLength = $dl; + $this->data = $data; + $this->eccLength = $el; + $this->ecc = $ecc; + } + }; + + //########################################################################## + + class QRrawcode { + public $version; + public $datacode = array(); + public $ecccode = array(); + public $blocks; + public $rsblocks = array(); //of RSblock + public $count; + public $dataLength; + public $eccLength; + public $b1; + + //---------------------------------------------------------------------- + public function __construct(QRinput $input) + { + $spec = array(0,0,0,0,0); + + $this->datacode = $input->getByteStream(); + if(is_null($this->datacode)) { + throw new Exception('null imput string'); + } + + QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec); + + $this->version = $input->getVersion(); + $this->b1 = QRspec::rsBlockNum1($spec); + $this->dataLength = QRspec::rsDataLength($spec); + $this->eccLength = QRspec::rsEccLength($spec); + $this->ecccode = array_fill(0, $this->eccLength, 0); + $this->blocks = QRspec::rsBlockNum($spec); + + $ret = $this->init($spec); + if($ret < 0) { + throw new Exception('block alloc error'); + return null; + } + + $this->count = 0; + } + + //---------------------------------------------------------------------- + public function init(array $spec) + { + $dl = QRspec::rsDataCodes1($spec); + $el = QRspec::rsEccCodes1($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + + $blockNo = 0; + $dataPos = 0; + $eccPos = 0; + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + if(QRspec::rsBlockNum2($spec) == 0) + return 0; + + $dl = QRspec::rsDataCodes2($spec); + $el = QRspec::rsEccCodes2($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + if($rs == NULL) return -1; + + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + return 0; + } + + //---------------------------------------------------------------------- + public function getCode() + { + $ret; + + if($this->count < $this->dataLength) { + $row = $this->count % $this->blocks; + $col = $this->count / $this->blocks; + if($col >= $this->rsblocks[0]->dataLength) { + $row += $this->b1; + } + $ret = $this->rsblocks[$row]->data[$col]; + } else if($this->count < $this->dataLength + $this->eccLength) { + $row = ($this->count - $this->dataLength) % $this->blocks; + $col = ($this->count - $this->dataLength) / $this->blocks; + $ret = $this->rsblocks[$row]->ecc[$col]; + } else { + return 0; + } + $this->count++; + + return $ret; + } + } + + //########################################################################## + + class QRcode { + + public $version; + public $width; + public $data; + + //---------------------------------------------------------------------- + public function encodeMask(QRinput $input, $mask) + { + if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { + throw new Exception('wrong version'); + } + if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) { + throw new Exception('wrong level'); + } + + $raw = new QRrawcode($input); + + QRtools::markTime('after_raw'); + + $version = $raw->version; + $width = QRspec::getWidth($version); + $frame = QRspec::newFrame($version); + + $filler = new FrameFiller($width, $frame); + if(is_null($filler)) { + return NULL; + } + + // inteleaved data and ecc codes + for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { + $code = $raw->getCode(); + $bit = 0x80; + for($j=0; $j<8; $j++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); + $bit = $bit >> 1; + } + } + + QRtools::markTime('after_filler'); + + unset($raw); + + // remainder bits + $j = QRspec::getRemainder($version); + for($i=0; $i<$j; $i++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02); + } + + $frame = $filler->frame; + unset($filler); + + + // masking + $maskObj = new QRmask(); + if($mask < 0) { + + if (QR_FIND_BEST_MASK) { + $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel()); + } else { + $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel()); + } + } else { + $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel()); + } + + if($masked == NULL) { + return NULL; + } + + QRtools::markTime('after_mask'); + + $this->version = $version; + $this->width = $width; + $this->data = $masked; + + return $this; + } + + //---------------------------------------------------------------------- + public function encodeInput(QRinput $input) + { + return $this->encodeMask($input, -1); + } + + //---------------------------------------------------------------------- + public function encodeString8bit($string, $version, $level) + { + if($string == NULL) { + throw new Exception('empty string!'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string)); + if($ret < 0) { + unset($input); + return NULL; + } + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public function encodeString($string, $version, $level, $hint, $casesensitive) + { + + if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) { + throw new Exception('bad hint'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive); + if($ret < 0) { + return NULL; + } + + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color); + return $enc->encodePNG($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encode($text, $outfile); + } + + //---------------------------------------------------------------------- + public static function eps($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color, $cmyk); + return $enc->encodeEPS($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function svg($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color); + return $enc->encodeSVG($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encodeRAW($text, $outfile); + } + } + + //########################################################################## + + class FrameFiller { + + public $width; + public $frame; + public $x; + public $y; + public $dir; + public $bit; + + //---------------------------------------------------------------------- + public function __construct($width, &$frame) + { + $this->width = $width; + $this->frame = $frame; + $this->x = $width - 1; + $this->y = $width - 1; + $this->dir = -1; + $this->bit = -1; + } + + //---------------------------------------------------------------------- + public function setFrameAt($at, $val) + { + $this->frame[$at['y']][$at['x']] = chr($val); + } + + //---------------------------------------------------------------------- + public function getFrameAt($at) + { + return ord($this->frame[$at['y']][$at['x']]); + } + + //---------------------------------------------------------------------- + public function next() + { + do { + + if($this->bit == -1) { + $this->bit = 0; + return array('x'=>$this->x, 'y'=>$this->y); + } + + $x = $this->x; + $y = $this->y; + $w = $this->width; + + if($this->bit == 0) { + $x--; + $this->bit++; + } else { + $x++; + $y += $this->dir; + $this->bit--; + } + + if($this->dir < 0) { + if($y < 0) { + $y = 0; + $x -= 2; + $this->dir = 1; + if($x == 6) { + $x--; + $y = 9; + } + } + } else { + if($y == $w) { + $y = $w - 1; + $x -= 2; + $this->dir = -1; + if($x == 6) { + $x--; + $y -= 8; + } + } + } + if($x < 0 || $y < 0) return null; + + $this->x = $x; + $this->y = $y; + + } while(ord($this->frame[$y][$x]) & 0x80); + + return array('x'=>$x, 'y'=>$y); + } + + } ; + + //########################################################################## + + class QRencode { + + public $casesensitive = true; + public $eightbit = false; + + public $version = 0; + public $size = 3; + public $margin = 4; + public $back_color = 0xFFFFFF; + public $fore_color = 0x000000; + + public $structured = 0; // not supported yet + + public $level = QR_ECLEVEL_L; + public $hint = QR_MODE_8; + + //---------------------------------------------------------------------- + public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $enc = new QRencode(); + $enc->size = $size; + $enc->margin = $margin; + $enc->fore_color = $fore_color; + $enc->back_color = $back_color; + $enc->cmyk = $cmyk; + + switch ($level.'') { + case '0': + case '1': + case '2': + case '3': + $enc->level = $level; + break; + case 'l': + case 'L': + $enc->level = QR_ECLEVEL_L; + break; + case 'm': + case 'M': + $enc->level = QR_ECLEVEL_M; + break; + case 'q': + case 'Q': + $enc->level = QR_ECLEVEL_Q; + break; + case 'h': + case 'H': + $enc->level = QR_ECLEVEL_H; + break; + } + + return $enc; + } + + //---------------------------------------------------------------------- + public function encodeRAW($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + return $code->data; + } + + //---------------------------------------------------------------------- + public function encode($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + QRtools::markTime('after_encode'); + + if ($outfile!== false) { + file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); + } else { + return QRtools::binarize($code->data); + } + } + + //---------------------------------------------------------------------- + public function encodePNG($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + + //---------------------------------------------------------------------- + public function encodeEPS($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRvect::eps($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color, $this->cmyk); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + + //---------------------------------------------------------------------- + public function encodeSVG($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRvect::svg($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + } + + + + +//---- qrvect.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Image output of code using GD2 + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QR_VECT', true); + + class QRvect { + + //---------------------------------------------------------------------- + public static function eps($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $vect = self::vectEPS($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color, $cmyk); + + if ($filename === false) { + header("Content-Type: application/postscript"); + header('Content-Disposition: filename="qrcode.eps"'); + echo $vect; + } else { + if($saveandprint===TRUE){ + QRtools::save($vect, $filename); + header("Content-Type: application/postscript"); + header('Content-Disposition: filename="qrcode.eps"'); + echo $vect; + }else{ + QRtools::save($vect, $filename); + } + } + } + + + //---------------------------------------------------------------------- + private static function vectEPS($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + if ($cmyk) + { + // convert color value into decimal eps format + $c = round((($fore_color & 0xFF000000) >> 16) / 255, 5); + $m = round((($fore_color & 0x00FF0000) >> 16) / 255, 5); + $y = round((($fore_color & 0x0000FF00) >> 8) / 255, 5); + $k = round(($fore_color & 0x000000FF) / 255, 5); + $fore_color_string = $c.' '.$m.' '.$y.' '.$k.' setcmykcolor'."\n"; + + // convert color value into decimal eps format + $c = round((($back_color & 0xFF000000) >> 16) / 255, 5); + $m = round((($back_color & 0x00FF0000) >> 16) / 255, 5); + $y = round((($back_color & 0x0000FF00) >> 8) / 255, 5); + $k = round(($back_color & 0x000000FF) / 255, 5); + $back_color_string = $c.' '.$m.' '.$y.' '.$k.' setcmykcolor'."\n"; + } + else + { + // convert a hexadecimal color code into decimal eps format (green = 0 1 0, blue = 0 0 1, ...) + $r = round((($fore_color & 0xFF0000) >> 16) / 255, 5); + $b = round((($fore_color & 0x00FF00) >> 8) / 255, 5); + $g = round(($fore_color & 0x0000FF) / 255, 5); + $fore_color_string = $r.' '.$b.' '.$g.' setrgbcolor'."\n"; + + // convert a hexadecimal color code into decimal eps format (green = 0 1 0, blue = 0 0 1, ...) + $r = round((($back_color & 0xFF0000) >> 16) / 255, 5); + $b = round((($back_color & 0x00FF00) >> 8) / 255, 5); + $g = round(($back_color & 0x0000FF) / 255, 5); + $back_color_string = $r.' '.$b.' '.$g.' setrgbcolor'."\n"; + } + + $output = + '%!PS-Adobe EPSF-3.0'."\n". + '%%Creator: PHPQrcodeLib'."\n". + '%%Title: QRcode'."\n". + '%%CreationDate: '.date('Y-m-d')."\n". + '%%DocumentData: Clean7Bit'."\n". + '%%LanguageLevel: 2'."\n". + '%%Pages: 1'."\n". + '%%BoundingBox: 0 0 '.$imgW * $pixelPerPoint.' '.$imgH * $pixelPerPoint."\n"; + + // set the scale + $output .= $pixelPerPoint.' '.$pixelPerPoint.' scale'."\n"; + // position the center of the coordinate system + + $output .= $outerFrame.' '.$outerFrame.' translate'."\n"; + + + + + // redefine the 'rectfill' operator to shorten the syntax + $output .= '/F { rectfill } def'."\n"; + + // set the symbol color + $output .= $back_color_string; + $output .= '-'.$outerFrame.' -'.$outerFrame.' '.($w + 2*$outerFrame).' '.($h + 2*$outerFrame).' F'."\n"; + + + // set the symbol color + $output .= $fore_color_string; + + // Convert the matrix into pixels + + for($i=0; $i<$h; $i++) { + for($j=0; $j<$w; $j++) { + if( $frame[$i][$j] == '1') { + $y = $h - 1 - $i; + $x = $j; + $output .= $x.' '.$y.' 1 1 F'."\n"; + } + } + } + + + $output .='%%EOF'; + + return $output; + } + + //---------------------------------------------------------------------- + public static function svg($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color) + { + $vect = self::vectSVG($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color); + + if ($filename === false) { + header("Content-Type: image/svg+xml"); + //header('Content-Disposition: attachment, filename="qrcode.svg"'); + echo $vect; + } else { + if($saveandprint===TRUE){ + QRtools::save($vect, $filename); + header("Content-Type: image/svg+xml"); + //header('Content-Disposition: filename="'.$filename.'"'); + echo $vect; + }else{ + QRtools::save($vect, $filename); + } + } + } + + + //---------------------------------------------------------------------- + private static function vectSVG($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + + $output = + ''."\n". + ''."\n". + ''."\n"; + + $output = + ''."\n". + ''."\n". + ''."\n". + ''."\n"; + + if(!empty($back_color)) { + $backgroundcolor = str_pad(dechex($back_color), 6, "0", STR_PAD_LEFT); + $output .= ''."\n"; + } + + $output .= + ''."\n". + ''."\n". + ''."\n". + ''."\n"; + + + // Convert the matrix into pixels + + for($i=0; $i<$h; $i++) { + for($j=0; $j<$w; $j++) { + if( $frame[$i][$j] == '1') { + $y = ($i + $outerFrame) * $pixelPerPoint; + $x = ($j + $outerFrame) * $pixelPerPoint; + $output .= ''."\n"; + } + } + } + $output .= + ''."\n". + ''; + + return $output; + } + } + + + + diff --git a/style.less b/style.less index dc27feb..690fe31 100755 --- a/style.less +++ b/style.less @@ -1,56 +1,84 @@ +/* + +Ce fichier fait partie de 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 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. + + 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 . + +*/ + * { font-family: "Ubuntu", sans-serif; + scrollbar-color: @text @bg; + scrollbar-width: auto; } -h1 { - font-weight: 700; +a { + color: @text; + text-decoration: underline; + + &:hover { + text-decoration: none; + } +} + +#firstWrapper { + display: flex; + flex-direction: row; } #menusDeroulants { text-align: center; + margin-left: 20px; } -#codeQR { - max-width: 500px; -} - -#lienCodeQR { - text-align: center; +#qrCode { + max-width: 480px; } .centrer { text-align: center; } -.topRight { - position: fixed; - top: 5px; - right: 5px; -} - .bouton { padding: 3px 10px 3px 10px; + text-decoration: none; } form { - display: flex; - flex-direction: column; - display: inline; - padding: 0px; - margin: 0px; + display: block; + margin-bottom: 30px; } -html, body { - width: 500px; +.center { + display: flex; + flex-direction: column; + justify-content: center; margin-left: auto; margin-right: auto; - background-color: @fond; - color: @texte; + width: 814px; +} + +body { + margin: 18px; + background-color: @bg; + color: @text; font-weight: normal; - font-size: 1em; + font-size: 20px; & h1 { - color: @texte; + color: @text; text-decoration: none; } @@ -58,36 +86,48 @@ html, body { label { font-size: 20px; - height: 60px; -} - -.topRight { - color: @texteLienCodeSource; - font-size: 12px; - margin-bottom: -20px; - text-align: right; - transition: color 0.2s; - - &:hover { - color: lighten(@texteLienCodeSource, 10%); - } } header { text-align: center; padding: 0px; margin: 0px; - height: 48px; + height: 64px; } -header > a { +#logo { + width: 64px; + height: 64px; +} + +#titres { + margin-left: 20px; +} + +h1, h2, h3, h4, h5, h6 { + margin: 0px; + font-weight: normal; +} + +h1 { + padding: auto; + font-size: 33px; +} + +h2 { + font-size: 22px; +} + +#lienTitres { + text-align: left; + justify-content: center; + text-decoration: none; display: flex; flex-direction: row; } -h1, #logo { - margin: auto; - font-size: 35px; +#showOnlyQR { + margin-top: 30px; } .param { @@ -98,181 +138,272 @@ h1, #logo { margin-right: 0px; } -@media (max-width: 640px) { // Version mobile - - html { - margin: 10px; - width: 100%; - } - - #texte { - width: 90%; - } - - h1 { - font-size: 25px; - } - -} - -#logo { - width: 48px; - height: 48px; -} - .conteneurInputColor { display: flex; flex-direction: row; justify-content: center; - width: 250px; } ::selection { - color: @fond; - background-color: @texte; + color: @bg; + background-color: @text; } -:link { - text-decoration: none; +label[for=txt] { + padding-left: 22px; } -#couleurs { +#colors { display: flex; flex-direction: row; justify-content: space-between; text-align: center; + + & .param { + text-align: center; + display: flex; + justify-content: center; + flex-direction: column; + width: 100%; + } } -.info { - color: grey; - position: absolute; +.metaText { + color: @secondaryText; + text-align: left; + transition: color 0.12s cubic-bezier(0.42, 0.0, 1.0, 1.0); + position: fixed; + width: 400px; + + & a:link { + transition: color 0.12s cubic-bezier(0.42, 0.0, 1.0, 1.0); + color: @secondaryText; + text-decoration: underline; + } + + &:hover, &:hover a:link { + color: @text; + } + +} + +footer { + font-size: 14px; + bottom: 20px; + left: 20px; +} + +#info { + font-size: 16px; bottom: 20px; right: 20px; - width: 300px; + margin: 0px; - & a { - color: grey; + & h3 { + font-size: 20px; + font-weight: normal; + padding-bottom: 10px; } - - &:hover, &:hover a { - color: @texte; - } - } + /* Inputs */ -#redondance, #marge, #texte, #taille, input[type=color], input[type=submit], .bouton { - border: 2px @bordure solid; +#redondancy, #margin, #txt, #size, input[type=color], input[type=submit], .bouton { + border: 2px @border solid; border-radius: 10px; font-size: 20px; padding-left: 10px; font-weight: normal; - color: @texteForm; + color: @text; transition: border 0.1s linear; - background-color: @fondChamp; + background-color: @bgField; margin-top: 8px; &:hover { - border: 2px @bordureHover solid; + border: 2px @borderHover solid; } &:focus { - border: 2px @bordureFocus solid; + border: 2px @borderFocus solid; + outline: none; } } -#redondance, #taille, #marge { - background-color: @fondChamp; +#redondancy, #size, #margin { + background-color: @bgField; width: 250px; height: 40px; } -#texte { - background-color: @fondChampTexte; - color: @texteForm; - padding-top: 6px; +#txt { + background-color: @bgTextField; + color: @text; + padding: 10px; + margin: 10px; width: 500px; + scrollbar-color: @text @bgTextField; + scrollbar-width: auto; } -#redondance:hover, #marge:hover, #texte:hover, #taille:hover, input[type=submit]:hover, .bouton:hover { - +input[type=submit] { + font-size: 28px; + padding: 10px; + padding-left: 14px; + padding-right: 14px; } -#texte:focus, input[type=submit]:focus, .bouton:focus { - -} - -#texte::placeholder { - color: lighten(@fondChampTexte, 40%); +#txt::placeholder { + color: @secondaryText; opacity: 1; - font-family: "Ubuntu"; + font-family: "Ubuntu", sans-serif; font-weight: normal; font-size: 1em; } input[type=color] { - height: 50px; - width: 50px; + height: 60px; + width: 84px; padding: 5px; - background-color: @fondChamp; - border: 2px @bordure solid; -} - -input[type=color]:hover { - border: 2px @bordureHover solid; -} - -input[type=color]:focus { - border: 2px @bordureFocus solid; + border: 2px @border solid; } /* Infobulle */ svg { - width: 18px; - height: 18px; + width: 20px; + height: 20px; + margin-bottom: -3px; + margin-left: 5px; } .boutonAide { - height: 18px; - width: 18px; - color: @texte; + height: 0px; + width: 0px; + color: @text; cursor: help; } -.contenuAide { - max-width: 500px; -} - -.conteneurAide { - color: #ccc; -} - -.conteneurAide:hover, .conteneurAide:focus { - background: rgba(0,0,0,.4); -} - .conteneurAide .contenuAide { position: absolute; transform: scale(0) rotate(-12deg); - color: #FFFFFF; - background: rgba(0,0,0,1); + color: @text; + background: @bgHelp; padding: 15px; - border-radius: 3px; - box-shadow: 0 0 2px rgba(0,0,0,.5); + border-radius: 10px; + box-shadow: 0 0 10px rgba(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) { + width: 300px; + } + } -.conteneurAide:hover .contenuAide, .conteneurAide:focus .contenuAide { +.conteneurAide:hover .contenuAide, .conteneurAide:focus-within .contenuAide { transform: scale(1) rotate(0); opacity: 1; } -.conteneurAide, .conteneurAide:hover { - background-color: @fond; - text-decoration: none; +/* 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; + } + + footer { + margin-top: 50px; + } + + #info { + color: @text; + margin-bottom: 20px; + padding-top: 30px; + + & a:link { + color: @text; + } + } +} + +@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) { // Version mobile + + #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; + } + } diff --git a/style.min.css b/style.min.css new file mode 100644 index 0000000..f412dde --- /dev/null +++ b/style.min.css @@ -0,0 +1 @@ +*{font-family:"Ubuntu", sans-serif;scrollbar-color:#d5f3ff #157097;scrollbar-width:auto;}a{color:#d5f3ff;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:#157097;color:#d5f3ff;font-weight:normal;font-size:20px;}body h1{color:#d5f3ff;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{padding:auto;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;}.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:#157097;background-color:#d5f3ff;}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:#65b7da;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:#65b7da;text-decoration:underline;}.metaText:hover,.metaText:hover a:link{color:#d5f3ff;}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 #48aed9 solid;border-radius:10px;font-size:20px;padding-left:10px;font-weight:normal;color:#d5f3ff;transition:border 0.1s linear;background-color:#2794c2;margin-top:8px;}#redondancy:hover,#margin:hover,#txt:hover,#size:hover,input[type=color]:hover,input[type=submit]:hover,.bouton:hover{border:2px #87d1f1 solid;}#redondancy:focus,#margin:focus,#txt:focus,#size:focus,input[type=color]:focus,input[type=submit]:focus,.bouton:focus{border:2px #e2f6ff solid;outline:none;}#redondancy,#size,#margin{background-color:#2794c2;width:250px;height:40px;}#txt{background-color:#2794c2;color:#d5f3ff;padding:10px;margin:10px;width:500px;scrollbar-color:#d5f3ff #2794c2;scrollbar-width:auto;}input[type=submit]{font-size:28px;padding:10px;padding-left:14px;padding-right:14px;}#txt::placeholder{color:#65b7da;opacity:1;font-family:"Ubuntu", sans-serif;font-weight:normal;font-size:1em;}input[type=color]{height:60px;width:84px;padding:5px;border:2px #48aed9 solid;}svg{width:20px;height:20px;margin-bottom:-3px;margin-left:5px;}.boutonAide{height:0px;width:0px;color:#d5f3ff;cursor:help;}.conteneurAide .contenuAide{position:absolute;transform:scale(0) rotate(-12deg);color:#d5f3ff;background:#118abe;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{width:300px;}}.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;}footer{margin-top:50px;}#info{color:#d5f3ff;margin-bottom:20px;padding-top:30px;}#info a:link{color:#d5f3ff;}}@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;}} \ No newline at end of file diff --git a/temp/.gitkeep b/temp/.gitkeep new file mode 100755 index 0000000..8d1c8b6 --- /dev/null +++ b/temp/.gitkeep @@ -0,0 +1 @@ + diff --git a/temp/6MBFnPdqJOHR6SrkUx5hTlzXLuNkt96TFSTtbmnLkyyuvB8Feu.png b/temp/6MBFnPdqJOHR6SrkUx5hTlzXLuNkt96TFSTtbmnLkyyuvB8Feu.png deleted file mode 100644 index 897d0f4..0000000 Binary files a/temp/6MBFnPdqJOHR6SrkUx5hTlzXLuNkt96TFSTtbmnLkyyuvB8Feu.png and /dev/null differ diff --git a/temp/UoD3X0SUSLDF4K8V67igQozAaw7fOTStC8IO5gcMLd3OyW1r0b.png b/temp/UoD3X0SUSLDF4K8V67igQozAaw7fOTStC8IO5gcMLd3OyW1r0b.png deleted file mode 100755 index adc9aee..0000000 Binary files a/temp/UoD3X0SUSLDF4K8V67igQozAaw7fOTStC8IO5gcMLd3OyW1r0b.png and /dev/null differ diff --git a/themes/dark/icons/128.png b/themes/dark/icons/128.png new file mode 100644 index 0000000..b80ec55 Binary files /dev/null and b/themes/dark/icons/128.png differ diff --git a/themes/dark/icons/16.png b/themes/dark/icons/16.png new file mode 100644 index 0000000..1ee93ea Binary files /dev/null and b/themes/dark/icons/16.png differ diff --git a/themes/dark/icons/192.png b/themes/dark/icons/192.png new file mode 100644 index 0000000..26142a5 Binary files /dev/null and b/themes/dark/icons/192.png differ diff --git a/themes/dark/icons/256.png b/themes/dark/icons/256.png new file mode 100644 index 0000000..5e404f7 Binary files /dev/null and b/themes/dark/icons/256.png differ diff --git a/themes/dark/icons/32.png b/themes/dark/icons/32.png new file mode 100644 index 0000000..b9f5b2d Binary files /dev/null and b/themes/dark/icons/32.png differ diff --git a/themes/dark/icons/384.png b/themes/dark/icons/384.png new file mode 100644 index 0000000..9b80374 Binary files /dev/null and b/themes/dark/icons/384.png differ diff --git a/themes/dark/icons/48.png b/themes/dark/icons/48.png new file mode 100644 index 0000000..1caeb16 Binary files /dev/null and b/themes/dark/icons/48.png differ diff --git a/themes/dark/icons/512.png b/themes/dark/icons/512.png new file mode 100644 index 0000000..dbc8737 Binary files /dev/null and b/themes/dark/icons/512.png differ diff --git a/themes/dark/icons/64.png b/themes/dark/icons/64.png new file mode 100644 index 0000000..c9b8bed Binary files /dev/null and b/themes/dark/icons/64.png differ diff --git a/themes/dark/icons/96.png b/themes/dark/icons/96.png new file mode 100644 index 0000000..a72bf3e Binary files /dev/null and b/themes/dark/icons/96.png differ diff --git a/themes/dark/icons/source.png b/themes/dark/icons/source.png new file mode 100644 index 0000000..8732795 Binary files /dev/null and b/themes/dark/icons/source.png differ diff --git a/themes/dark/theme.php b/themes/dark/theme.php new file mode 100755 index 0000000..1af0f9b --- /dev/null +++ b/themes/dark/theme.php @@ -0,0 +1,17 @@ + "#2a2a2a", + "bgField" => "#31363B", + "bgTextField" => "#232629", + "bgHelp" => "#151616", + "border" => "#5f5f5f", + "borderHover" => "#808080", + "borderFocus" => "white", + "text" => "white", + "secondaryText" => "#868686" +); // Définit les couleurs du thème + +?> diff --git a/themes/defaut/defaut.php b/themes/defaut/defaut.php deleted file mode 100644 index 234c4c3..0000000 --- a/themes/defaut/defaut.php +++ /dev/null @@ -1,17 +0,0 @@ - "#2D2F34", - "fondChamp" => "#31363B", - "fondChampTexte" => "#232629", - "bordure" => "#5f5f5f", - "bordureHover" => "#808080", - "bordureFocus" => "#b6b6b6", - "texte" => "white", - "texteForm" => "white", - "texteLienCodeSource" => "#868686" -); // Définit les couleurs du thème - -?> diff --git a/themes/defaut/favicons/128.png b/themes/defaut/favicons/128.png deleted file mode 100755 index b939267..0000000 Binary files a/themes/defaut/favicons/128.png and /dev/null differ diff --git a/themes/defaut/favicons/16.png b/themes/defaut/favicons/16.png deleted file mode 100755 index 13874e0..0000000 Binary files a/themes/defaut/favicons/16.png and /dev/null differ diff --git a/themes/defaut/favicons/192.png b/themes/defaut/favicons/192.png deleted file mode 100755 index bb0978a..0000000 Binary files a/themes/defaut/favicons/192.png and /dev/null differ diff --git a/themes/defaut/favicons/256.png b/themes/defaut/favicons/256.png deleted file mode 100755 index 32c46e6..0000000 Binary files a/themes/defaut/favicons/256.png and /dev/null differ diff --git a/themes/defaut/favicons/32.png b/themes/defaut/favicons/32.png deleted file mode 100755 index c70d1ce..0000000 Binary files a/themes/defaut/favicons/32.png and /dev/null differ diff --git a/themes/defaut/favicons/384.png b/themes/defaut/favicons/384.png deleted file mode 100755 index d41122f..0000000 Binary files a/themes/defaut/favicons/384.png and /dev/null differ diff --git a/themes/defaut/favicons/48.png b/themes/defaut/favicons/48.png deleted file mode 100755 index 175d909..0000000 Binary files a/themes/defaut/favicons/48.png and /dev/null differ diff --git a/themes/defaut/favicons/512.png b/themes/defaut/favicons/512.png deleted file mode 100755 index 6560bba..0000000 Binary files a/themes/defaut/favicons/512.png and /dev/null differ diff --git a/themes/defaut/favicons/64.png b/themes/defaut/favicons/64.png deleted file mode 100755 index cb015c9..0000000 Binary files a/themes/defaut/favicons/64.png and /dev/null differ diff --git a/themes/defaut/favicons/96.png b/themes/defaut/favicons/96.png deleted file mode 100755 index a075087..0000000 Binary files a/themes/defaut/favicons/96.png and /dev/null differ diff --git a/themes/defaut/theme.php b/themes/defaut/theme.php deleted file mode 100644 index 234c4c3..0000000 --- a/themes/defaut/theme.php +++ /dev/null @@ -1,17 +0,0 @@ - "#2D2F34", - "fondChamp" => "#31363B", - "fondChampTexte" => "#232629", - "bordure" => "#5f5f5f", - "bordureHover" => "#808080", - "bordureFocus" => "#b6b6b6", - "texte" => "white", - "texteForm" => "white", - "texteLienCodeSource" => "#868686" -); // Définit les couleurs du thème - -?> diff --git a/themes/light/icons/128.png b/themes/light/icons/128.png new file mode 100644 index 0000000..fa27539 Binary files /dev/null and b/themes/light/icons/128.png differ diff --git a/themes/light/icons/16.png b/themes/light/icons/16.png new file mode 100644 index 0000000..25d6f37 Binary files /dev/null and b/themes/light/icons/16.png differ diff --git a/themes/light/icons/192.png b/themes/light/icons/192.png new file mode 100644 index 0000000..1663f3d Binary files /dev/null and b/themes/light/icons/192.png differ diff --git a/themes/light/icons/256.png b/themes/light/icons/256.png new file mode 100644 index 0000000..a2a3166 Binary files /dev/null and b/themes/light/icons/256.png differ diff --git a/themes/light/icons/32.png b/themes/light/icons/32.png new file mode 100644 index 0000000..f30300f Binary files /dev/null and b/themes/light/icons/32.png differ diff --git a/themes/light/icons/384.png b/themes/light/icons/384.png new file mode 100644 index 0000000..1771a36 Binary files /dev/null and b/themes/light/icons/384.png differ diff --git a/themes/light/icons/48.png b/themes/light/icons/48.png new file mode 100644 index 0000000..66c39e6 Binary files /dev/null and b/themes/light/icons/48.png differ diff --git a/themes/light/icons/512.png b/themes/light/icons/512.png new file mode 100644 index 0000000..7379b01 Binary files /dev/null and b/themes/light/icons/512.png differ diff --git a/themes/light/icons/64.png b/themes/light/icons/64.png new file mode 100644 index 0000000..e9f77bc Binary files /dev/null and b/themes/light/icons/64.png differ diff --git a/themes/light/icons/96.png b/themes/light/icons/96.png new file mode 100644 index 0000000..4c03902 Binary files /dev/null and b/themes/light/icons/96.png differ diff --git a/themes/light/icons/source.png b/themes/light/icons/source.png new file mode 100644 index 0000000..41c0467 Binary files /dev/null and b/themes/light/icons/source.png differ diff --git a/themes/light/theme.php b/themes/light/theme.php new file mode 100755 index 0000000..0c02911 --- /dev/null +++ b/themes/light/theme.php @@ -0,0 +1,17 @@ + "white", + "bgField" => "#eeeeee", + "bgTextField" => "#e5e5e5", + "bgHelp" => "#ececec", + "border" => "#65666b", + "borderHover" => "#46484e", + "borderFocus" => "#2D2F34", + "text" => "#2D2F34", + "secondaryText" => "#868686" +); // Définit les couleurs du thème + +?> diff --git a/themes/parinux/favicons/128.png b/themes/parinux/favicons/128.png deleted file mode 100755 index 014b9b8..0000000 Binary files a/themes/parinux/favicons/128.png and /dev/null differ diff --git a/themes/parinux/favicons/16.png b/themes/parinux/favicons/16.png deleted file mode 100755 index dc32f1e..0000000 Binary files a/themes/parinux/favicons/16.png and /dev/null differ diff --git a/themes/parinux/favicons/192.png b/themes/parinux/favicons/192.png deleted file mode 100755 index 8abffa4..0000000 Binary files a/themes/parinux/favicons/192.png and /dev/null differ diff --git a/themes/parinux/favicons/256.png b/themes/parinux/favicons/256.png deleted file mode 100755 index e79d81f..0000000 Binary files a/themes/parinux/favicons/256.png and /dev/null differ diff --git a/themes/parinux/favicons/32.png b/themes/parinux/favicons/32.png deleted file mode 100755 index 0d93437..0000000 Binary files a/themes/parinux/favicons/32.png and /dev/null differ diff --git a/themes/parinux/favicons/384.png b/themes/parinux/favicons/384.png deleted file mode 100755 index 5e38b92..0000000 Binary files a/themes/parinux/favicons/384.png and /dev/null differ diff --git a/themes/parinux/favicons/48.png b/themes/parinux/favicons/48.png deleted file mode 100755 index 5b48f00..0000000 Binary files a/themes/parinux/favicons/48.png and /dev/null differ diff --git a/themes/parinux/favicons/512.png b/themes/parinux/favicons/512.png deleted file mode 100755 index 51f9bc7..0000000 Binary files a/themes/parinux/favicons/512.png and /dev/null differ diff --git a/themes/parinux/favicons/64.png b/themes/parinux/favicons/64.png deleted file mode 100755 index 609cd0e..0000000 Binary files a/themes/parinux/favicons/64.png and /dev/null differ diff --git a/themes/parinux/favicons/96.png b/themes/parinux/favicons/96.png deleted file mode 100755 index 63d6244..0000000 Binary files a/themes/parinux/favicons/96.png and /dev/null differ diff --git a/themes/parinux/icons/128.png b/themes/parinux/icons/128.png new file mode 100644 index 0000000..9ebecec Binary files /dev/null and b/themes/parinux/icons/128.png differ diff --git a/themes/parinux/icons/16.png b/themes/parinux/icons/16.png new file mode 100644 index 0000000..815a179 Binary files /dev/null and b/themes/parinux/icons/16.png differ diff --git a/themes/parinux/icons/192.png b/themes/parinux/icons/192.png new file mode 100644 index 0000000..35c72b0 Binary files /dev/null and b/themes/parinux/icons/192.png differ diff --git a/themes/parinux/icons/256.png b/themes/parinux/icons/256.png new file mode 100644 index 0000000..46d3d6c Binary files /dev/null and b/themes/parinux/icons/256.png differ diff --git a/themes/parinux/icons/32.png b/themes/parinux/icons/32.png new file mode 100644 index 0000000..4fd49da Binary files /dev/null and b/themes/parinux/icons/32.png differ diff --git a/themes/parinux/icons/384.png b/themes/parinux/icons/384.png new file mode 100644 index 0000000..26644d6 Binary files /dev/null and b/themes/parinux/icons/384.png differ diff --git a/themes/parinux/icons/48.png b/themes/parinux/icons/48.png new file mode 100644 index 0000000..db4f3e7 Binary files /dev/null and b/themes/parinux/icons/48.png differ diff --git a/themes/parinux/icons/512.png b/themes/parinux/icons/512.png new file mode 100644 index 0000000..b3194e5 Binary files /dev/null and b/themes/parinux/icons/512.png differ diff --git a/themes/parinux/icons/64.png b/themes/parinux/icons/64.png new file mode 100644 index 0000000..f20b500 Binary files /dev/null and b/themes/parinux/icons/64.png differ diff --git a/themes/parinux/icons/96.png b/themes/parinux/icons/96.png new file mode 100644 index 0000000..a1b29dc Binary files /dev/null and b/themes/parinux/icons/96.png differ diff --git a/themes/parinux/icons/source.png b/themes/parinux/icons/source.png new file mode 100644 index 0000000..4da3276 Binary files /dev/null and b/themes/parinux/icons/source.png differ diff --git a/themes/parinux/parinux.php b/themes/parinux/parinux.php deleted file mode 100644 index 6df427f..0000000 --- a/themes/parinux/parinux.php +++ /dev/null @@ -1,17 +0,0 @@ - "#157097", - "fondChamp" => "#2794c2", - "fondChampTexte" => "#2794c2", - "bordure" => "#48aed9", - "bordureHover" => "#87d1f1", - "bordureFocus" => "#e2f6ff", - "texte" => "#d5f3ff", - "texteForm" => "#e2f6ff", - "texteLienCodeSource" => "#3da3cf" -); // Définit les couleurs du thème - -?> diff --git a/themes/parinux/theme.php b/themes/parinux/theme.php old mode 100644 new mode 100755 index 6df427f..9ab93cb --- a/themes/parinux/theme.php +++ b/themes/parinux/theme.php @@ -1,17 +1,17 @@ "#157097", - "fondChamp" => "#2794c2", - "fondChampTexte" => "#2794c2", - "bordure" => "#48aed9", - "bordureHover" => "#87d1f1", - "bordureFocus" => "#e2f6ff", - "texte" => "#d5f3ff", - "texteForm" => "#e2f6ff", - "texteLienCodeSource" => "#3da3cf" + "bg" => "#157097", + "bgField" => "#2794c2", + "bgTextField" => "#2794c2", + "bgHelp" => "#118abe", + "border" => "#48aed9", + "borderHover" => "#87d1f1", + "borderFocus" => "#e2f6ff", + "text" => "#d5f3ff", + "secondaryText" => "#65b7da" ); // Définit les couleurs du thème ?> diff --git a/themes/resize.php b/themes/resize.php new file mode 100755 index 0000000..89a72ba --- /dev/null +++ b/themes/resize.php @@ -0,0 +1,31 @@ +\n"; + } + +} else { + echo "Available only via CLI for security reasons. Use 'php themes/resize.php'"; +} diff --git a/ubuntu/.gitignore b/ubuntu/.gitignore deleted file mode 100755 index ee9cdde..0000000 --- a/ubuntu/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.DS_Store -webify diff --git a/ubuntu/site/.bowerrc b/ubuntu/site/.bowerrc deleted file mode 100755 index 235775b..0000000 --- a/ubuntu/site/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "_build/components" -} diff --git a/ubuntu/site/.gitignore b/ubuntu/site/.gitignore deleted file mode 100755 index 9b7101b..0000000 --- a/ubuntu/site/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -_build -.git -.sass-cache diff --git a/ubuntu/site/_config.yml b/ubuntu/site/_config.yml deleted file mode 100755 index c35160a..0000000 --- a/ubuntu/site/_config.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Site settings -title: Ubuntu Font (Bower project) -email: earaujoassis@gmail.com -description: Ubuntu Font Family Bower-ready -baseurl: "/ubuntu-fontface" -url: "https://earaujoassis.github.io" -creators_website: "http://earaujoassis.com" -twitter_username: earaujoassis -github_username: earaujoassis -github_project: evolve -source: . -destination: ./_build - -# Build settings -exclude: ['Gemfile', 'Gemfile.lock', 'bower.json', 'README.md'] -keep_files: ['components', '.git'] -markdown: kramdown -sass: - style: :compressed - sass_dir: _sass diff --git a/ubuntu/site/_includes/footer.html b/ubuntu/site/_includes/footer.html deleted file mode 100755 index 25c97c6..0000000 --- a/ubuntu/site/_includes/footer.html +++ /dev/null @@ -1,12 +0,0 @@ -
-
-
-

Created and maintained by Ewerton Assis © {{ site.time | date: '%Y' }}

-
-
- - - -
-
- diff --git a/ubuntu/site/_includes/head.html b/ubuntu/site/_includes/head.html deleted file mode 100755 index 6857742..0000000 --- a/ubuntu/site/_includes/head.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} - - - - - - - - - - - diff --git a/ubuntu/site/_includes/header.html b/ubuntu/site/_includes/header.html deleted file mode 100755 index 745318c..0000000 --- a/ubuntu/site/_includes/header.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/ubuntu/site/_layouts/default.html b/ubuntu/site/_layouts/default.html deleted file mode 100755 index 95b71e0..0000000 --- a/ubuntu/site/_layouts/default.html +++ /dev/null @@ -1,13 +0,0 @@ - - - {% include head.html %} - - {% include header.html %} -
-
- {{ content }} -
-
- {% include footer.html %} - - diff --git a/ubuntu/site/_sass/_layout.scss b/ubuntu/site/_sass/_layout.scss deleted file mode 100755 index 7071914..0000000 --- a/ubuntu/site/_sass/_layout.scss +++ /dev/null @@ -1,75 +0,0 @@ -body { - font-family: "Ubuntu", sans-serif; - background: #fff; - color: #444; -} - -h1, h2, h3, h4, h5, h6, p { - font-family: inherit; - color: inherit; - font-weight: 300; -} - -.button, button { - &.github { - margin: 0px; - padding: 0.5rem 1.4rem; - border-radius: 4px; - background: #f3f3f3 none repeat scroll 0% 0%; - box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25); - } -} - -.page-content, .site-footer { - .button, button { - &.button { - background: #dbdbdb none repeat scroll 0% 0%; - color: #777; - box-shadow: none; - } - } -} - -pre, code { - font-family: "Ubuntu Monospace", sans-serif; -} - -.site-header { - text-align: center; - background: #dd4814; - background: -moz-linear-gradient(left, #dd4814 0%, #772953 100%); - background: -webkit-gradient(linear, left top, right top, color-stop(0%,#dd4814), color-stop(100%,#772953)); - background: -webkit-linear-gradient(left, #dd4814 0%,#772953 100%); - background: -o-linear-gradient(left, #dd4814 0%,#772953 100%); - background: -ms-linear-gradient(left, #dd4814 0%,#772953 100%); - background: linear-gradient(to right, #dd4814 0%,#772953 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dd4814', endColorstr='#772953',GradientType=1 ); - box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.25); - - h1 { - margin: 120px 0; - color: #fff; - font-weight: 300; - } -} - -.page-content { - padding: 50px 0 25px; - - blockquote { - margin-left: 30px; - } - - section ~ section { - margin-top: 25px; - } -} - -.site-footer { - padding: 25px 0 50px; - color: #b6b6b6; - - a { - color: #777; - } -} diff --git a/ubuntu/site/_sass/_syntax-highlighting.scss b/ubuntu/site/_sass/_syntax-highlighting.scss deleted file mode 100755 index 7e2530c..0000000 --- a/ubuntu/site/_sass/_syntax-highlighting.scss +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Syntax highlighting styles - */ -.highlight { - background: #fff; - - .c { color: #998; font-style: italic } // Comment - .err { color: #a61717; background-color: #e3d2d2 } // Error - .k { font-weight: 300 } // Keyword - .o { font-weight: 300 } // Operator - .cm { color: #998; font-style: italic } // Comment.Multiline - .cp { color: #999; font-weight: 300 } // Comment.Preproc - .c1 { color: #998; font-style: italic } // Comment.Single - .cs { color: #999; font-weight: 300; font-style: italic } // Comment.Special - .gd { color: #000; background-color: #fdd } // Generic.Deleted - .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific - .ge { font-style: italic } // Generic.Emph - .gr { color: #a00 } // Generic.Error - .gh { color: #999 } // Generic.Heading - .gi { color: #000; background-color: #dfd } // Generic.Inserted - .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific - .go { color: #888 } // Generic.Output - .gp { color: #555 } // Generic.Prompt - .gs { font-weight: 300 } // Generic.Strong - .gu { color: #aaa } // Generic.Subheading - .gt { color: #a00 } // Generic.Traceback - .kc { font-weight: 300 } // Keyword.Constant - .kd { font-weight: 300 } // Keyword.Declaration - .kp { font-weight: 300 } // Keyword.Pseudo - .kr { font-weight: 300 } // Keyword.Reserved - .kt { color: #458; font-weight: 300 } // Keyword.Type - .m { color: #099 } // Literal.Number - .s { color: #d14 } // Literal.String - .na { color: #008080 } // Name.Attribute - .nb { color: #0086B3 } // Name.Builtin - .nc { color: #458; font-weight: 300 } // Name.Class - .no { color: #008080 } // Name.Constant - .ni { color: #800080 } // Name.Entity - .ne { color: #900; font-weight: 300 } // Name.Exception - .nf { color: #900; font-weight: 300 } // Name.Function - .nn { color: #555 } // Name.Namespace - .nt { color: #000080 } // Name.Tag - .nv { color: #008080 } // Name.Variable - .ow { font-weight: 300 } // Operator.Word - .w { color: #bbb } // Text.Whitespace - .mf { color: #099 } // Literal.Number.Float - .mh { color: #099 } // Literal.Number.Hex - .mi { color: #099 } // Literal.Number.Integer - .mo { color: #099 } // Literal.Number.Oct - .sb { color: #d14 } // Literal.String.Backtick - .sc { color: #d14 } // Literal.String.Char - .sd { color: #d14 } // Literal.String.Doc - .s2 { color: #d14 } // Literal.String.Double - .se { color: #d14 } // Literal.String.Escape - .sh { color: #d14 } // Literal.String.Heredoc - .si { color: #d14 } // Literal.String.Interpol - .sx { color: #d14 } // Literal.String.Other - .sr { color: #009926 } // Literal.String.Regex - .s1 { color: #d14 } // Literal.String.Single - .ss { color: #990073 } // Literal.String.Symbol - .bp { color: #999 } // Name.Builtin.Pseudo - .vc { color: #008080 } // Name.Variable.Class - .vg { color: #008080 } // Name.Variable.Global - .vi { color: #008080 } // Name.Variable.Instance - .il { color: #099 } // Literal.Number.Integer.Long -} diff --git a/ubuntu/site/about.md b/ubuntu/site/about.md deleted file mode 100755 index 894d1bd..0000000 --- a/ubuntu/site/about.md +++ /dev/null @@ -1,14 +0,0 @@ -# Ubuntu Font Family - -> Ubuntu Font Family Bower-ready (also SCSS-ready, LESS-ready, and plain CSS-ready) - -**Requirements** - - * Ruby 1.9+ + `$ gem install jekyll` - * Bower (Node.js + NPM) + `$ bower install` - -To test the web page locally, run `$ jekyll serve` and open the browser in http://localhost:400/ubuntu-fontface/. - -## License - -Code under [MIT License](http://earaujoassis.mit-license.org/) © Ewerton Assis diff --git a/ubuntu/site/bower.json b/ubuntu/site/bower.json deleted file mode 100755 index 3f56fbf..0000000 --- a/ubuntu/site/bower.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "ubuntu-fontface/site", - "version": "0.1.13", - "homepage": "https://github.com/earaujoassis/ubuntu-fontface", - "authors": [ - "Ewerton Assis " - ], - "description": "Static website for the ubuntu-fontface project", - "keywords": [ - "ubuntu", - "font", - "fontface", - "css", - "sass", - "less", - "web", - "design" - ], - "main": "none", - "moduleType": [], - "license": "MIT", - "private": true, - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "_build/components", - "test", - "tests" - ], - "dependencies": { - "foundation": "~5.5.2", - "octicons": "~3.1.0", - "ubuntu-fontface": "~0.1.13" - } -} diff --git a/ubuntu/site/css/ubuntu-fontface-site.scss b/ubuntu/site/css/ubuntu-fontface-site.scss deleted file mode 100755 index 862a049..0000000 --- a/ubuntu/site/css/ubuntu-fontface-site.scss +++ /dev/null @@ -1,6 +0,0 @@ ---- -# Only the main Sass file needs front matter (the dashes are enough) ---- -@charset "utf-8"; - -@import "layout", "syntax-highlighting"; diff --git a/ubuntu/site/index.html b/ubuntu/site/index.html deleted file mode 100755 index 0f1ed59..0000000 --- a/ubuntu/site/index.html +++ /dev/null @@ -1,67 +0,0 @@ ---- -layout: default ---- -
-
-
-
-

How to use it

-
-
- - - -
-
-
-
-
    -
  1. -

    Install it from Bower

    -
    -  $ bower install [--save] ubuntu-fontface
    -            
    -
  2. -
  3. -

    Import it on SCSS/LESS/CSS source code. Assuming {BOWER_PATH} is bower_components; - {SUFFIX} options are -base, -condensed and -mono; - {EXTENSION} options are css, less, scss, - depending whether you're using pure CSS, SCSS or LESS. The {SUFFIX} is not available if you're importing the pure CSS file. - A minified file is available for the pure CSS version.

    -
    -  @import "{BOWER_PATH}/ubuntu-fontface/ubuntu{SUFFIX}.{EXTENSION}";
    -            
    -
  4. -
  5. -

    If you need any help (or have found any bug 🐞), please post it on /issues. Thank you!

    -
  6. -
-
-
-
-
-
-

Examples

-
-

Любо́вь сильне́е сме́рти и стра́ха сме́рти. То́лько е́ю, то́лько любо́вью де́ржится и движется жизнь.

-
И.С.Тургенев (1818 – 1883)
-
-
-

θάνατος οὐδὲν διαφέρει τοῦ ζῆν.

-
Θαλῆς (ὁ Μιλήσιος) (c. 624 – c. 546 BC)
-
-
-

Außerordentliche Übel erfordern außerordentliche Mittel

-
Unknown author
-
-
-

Those who make quick decisions are not also safe.

-
Unknown author
-
-
-

Plus ça change, plus c'est la même chose.

- -
-
-
-
diff --git a/ubuntu/ubuntu.min.css b/ubuntu/ubuntu.min.css index 49b00c6..c9cee06 100755 --- a/ubuntu/ubuntu.min.css +++ b/ubuntu/ubuntu.min.css @@ -1,2 +1,2 @@ /* Ubuntu Font Family Bower-ready v0.1.13 */ -@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-light-webfont.eot);src:url(ubuntu/fonts/ubuntu-light-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-light-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-light-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-light-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-light-webfont.svg#ubuntulight) format('svg');font-weight:300;font-style:normal}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-light-italic-webfont.eot);src:url(ubuntu/fonts/ubuntu-light-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-light-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-light-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-light-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-light-italic-webfont.svg#ubuntulight_italic) format('svg');font-weight:300;font-style:italic}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-regular-webfont.eot);src:url(ubuntu/fonts/ubuntu-regular-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-regular-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-regular-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-regular-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-regular-webfont.svg#ubunturegular) format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-regular-italic-webfont.eot);src:url(ubuntu/fonts/ubuntu-regular-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-regular-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-regular-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-regular-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-regular-italic-webfont.svg#ubuntuitalic) format('svg');font-weight:normal;font-style:italic}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-medium-webfont.eot);src:url(ubuntu/fonts/ubuntu-medium-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-medium-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-medium-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-medium-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-medium-webfont.svg#ubuntumedium) format('svg');font-weight:500;font-style:normal}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-medium-italic-webfont.eot);src:url(ubuntu/fonts/ubuntu-medium-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-medium-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-medium-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-medium-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-medium-italic-webfont.svg#ubuntumedium_italic) format('svg');font-weight:500;font-style:italic}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-bold-webfont.eot);src:url(ubuntu/fonts/ubuntu-bold-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-bold-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-bold-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-bold-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-bold-webfont.svg#ubuntubold) format('svg');font-weight:bold;font-style:normal}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-bold-italic-webfont.eot);src:url(ubuntu/fonts/ubuntu-bold-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-bold-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-bold-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-bold-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-bold-italic-webfont.svg#ubuntubold_italic) format('svg');font-weight:bold;font-style:italic}@font-face{font-family:'Ubuntu Condensed';src:url(ubuntu/fonts/ubuntu-condensed-webfont.eot);src:url(ubuntu/fonts/ubuntu-condensed-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-condensed-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-condensed-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-condensed-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-condensed-webfont.svg#ubuntu_condensedregular) format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'Ubuntu Monospace';src:url(ubuntu/fonts/ubuntumono-regular-webfont.eot);src:url(ubuntu/fonts/ubuntumono-regular-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntumono-regular-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntumono-regular-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntumono-regular-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntumono-regular-webfont.svg#ubuntu_monoregular) format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'Ubuntu Monospace';src:url(ubuntu/fonts/ubuntumono-regular-italic-webfont.eot);src:url(ubuntu/fonts/ubuntumono-regular-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntumono-regular-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntumono-regular-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntumono-regular-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntumono-regular-italic-webfont.svg#ubuntu_monoitalic) format('svg');font-weight:normal;font-style:italic}@font-face{font-family:'Ubuntu Monospace';src:url(ubuntu/fonts/ubuntumono-bold-webfont.eot);src:url(ubuntu/fonts/ubuntumono-bold-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntumono-bold-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntumono-bold-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntumono-bold-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntumono-bold-webfont.svg#ubuntu_monobold) format('svg');font-weight:bold;font-style:normal}@font-face{font-family:'Ubuntu Monospace';src:url(ubuntu/fonts/ubuntumono-bold-italic-webfont.eot);src:url(ubuntu/fonts/ubuntumono-bold-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntumono-bold-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntumono-bold-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntumono-bold-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntumono-bold-italic-webfont.svg#ubuntu_monobold_italic) format('svg');font-weight:bold;font-style:italic} +@font-face{font-family:'Ubuntu';src:url(fonts/ubuntu-light-webfont.eot);src:url(fonts/ubuntu-light-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntu-light-webfont.woff2) format('woff2'),url(fonts/ubuntu-light-webfont.woff) format('woff'),url(fonts/ubuntu-light-webfont.ttf) format('truetype'),url(fonts/ubuntu-light-webfont.svg#ubuntulight) format('svg');font-weight:300;font-style:normal}@font-face{font-family:'Ubuntu';src:url(fonts/ubuntu-light-italic-webfont.eot);src:url(fonts/ubuntu-light-italic-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntu-light-italic-webfont.woff2) format('woff2'),url(fonts/ubuntu-light-italic-webfont.woff) format('woff'),url(fonts/ubuntu-light-italic-webfont.ttf) format('truetype'),url(fonts/ubuntu-light-italic-webfont.svg#ubuntulight_italic) format('svg');font-weight:300;font-style:italic}@font-face{font-family:'Ubuntu';src:url(fonts/ubuntu-regular-webfont.eot);src:url(fonts/ubuntu-regular-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntu-regular-webfont.woff2) format('woff2'),url(fonts/ubuntu-regular-webfont.woff) format('woff'),url(fonts/ubuntu-regular-webfont.ttf) format('truetype'),url(fonts/ubuntu-regular-webfont.svg#ubunturegular) format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'Ubuntu';src:url(fonts/ubuntu-regular-italic-webfont.eot);src:url(fonts/ubuntu-regular-italic-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntu-regular-italic-webfont.woff2) format('woff2'),url(fonts/ubuntu-regular-italic-webfont.woff) format('woff'),url(fonts/ubuntu-regular-italic-webfont.ttf) format('truetype'),url(fonts/ubuntu-regular-italic-webfont.svg#ubuntuitalic) format('svg');font-weight:normal;font-style:italic}@font-face{font-family:'Ubuntu';src:url(fonts/ubuntu-medium-webfont.eot);src:url(fonts/ubuntu-medium-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntu-medium-webfont.woff2) format('woff2'),url(fonts/ubuntu-medium-webfont.woff) format('woff'),url(fonts/ubuntu-medium-webfont.ttf) format('truetype'),url(fonts/ubuntu-medium-webfont.svg#ubuntumedium) format('svg');font-weight:500;font-style:normal}@font-face{font-family:'Ubuntu';src:url(fonts/ubuntu-medium-italic-webfont.eot);src:url(fonts/ubuntu-medium-italic-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntu-medium-italic-webfont.woff2) format('woff2'),url(fonts/ubuntu-medium-italic-webfont.woff) format('woff'),url(fonts/ubuntu-medium-italic-webfont.ttf) format('truetype'),url(fonts/ubuntu-medium-italic-webfont.svg#ubuntumedium_italic) format('svg');font-weight:500;font-style:italic}@font-face{font-family:'Ubuntu';src:url(fonts/ubuntu-bold-webfont.eot);src:url(fonts/ubuntu-bold-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntu-bold-webfont.woff2) format('woff2'),url(fonts/ubuntu-bold-webfont.woff) format('woff'),url(fonts/ubuntu-bold-webfont.ttf) format('truetype'),url(fonts/ubuntu-bold-webfont.svg#ubuntubold) format('svg');font-weight:bold;font-style:normal}@font-face{font-family:'Ubuntu';src:url(fonts/ubuntu-bold-italic-webfont.eot);src:url(fonts/ubuntu-bold-italic-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntu-bold-italic-webfont.woff2) format('woff2'),url(fonts/ubuntu-bold-italic-webfont.woff) format('woff'),url(fonts/ubuntu-bold-italic-webfont.ttf) format('truetype'),url(fonts/ubuntu-bold-italic-webfont.svg#ubuntubold_italic) format('svg');font-weight:bold;font-style:italic}@font-face{font-family:'Ubuntu Condensed';src:url(fonts/ubuntu-condensed-webfont.eot);src:url(fonts/ubuntu-condensed-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntu-condensed-webfont.woff2) format('woff2'),url(fonts/ubuntu-condensed-webfont.woff) format('woff'),url(fonts/ubuntu-condensed-webfont.ttf) format('truetype'),url(fonts/ubuntu-condensed-webfont.svg#ubuntu_condensedregular) format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'Ubuntu Monospace';src:url(fonts/ubuntumono-regular-webfont.eot);src:url(fonts/ubuntumono-regular-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntumono-regular-webfont.woff2) format('woff2'),url(fonts/ubuntumono-regular-webfont.woff) format('woff'),url(fonts/ubuntumono-regular-webfont.ttf) format('truetype'),url(fonts/ubuntumono-regular-webfont.svg#ubuntu_monoregular) format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'Ubuntu Monospace';src:url(fonts/ubuntumono-regular-italic-webfont.eot);src:url(fonts/ubuntumono-regular-italic-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntumono-regular-italic-webfont.woff2) format('woff2'),url(fonts/ubuntumono-regular-italic-webfont.woff) format('woff'),url(fonts/ubuntumono-regular-italic-webfont.ttf) format('truetype'),url(fonts/ubuntumono-regular-italic-webfont.svg#ubuntu_monoitalic) format('svg');font-weight:normal;font-style:italic}@font-face{font-family:'Ubuntu Monospace';src:url(fonts/ubuntumono-bold-webfont.eot);src:url(fonts/ubuntumono-bold-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntumono-bold-webfont.woff2) format('woff2'),url(fonts/ubuntumono-bold-webfont.woff) format('woff'),url(fonts/ubuntumono-bold-webfont.ttf) format('truetype'),url(fonts/ubuntumono-bold-webfont.svg#ubuntu_monobold) format('svg');font-weight:bold;font-style:normal}@font-face{font-family:'Ubuntu Monospace';src:url(fonts/ubuntumono-bold-italic-webfont.eot);src:url(fonts/ubuntumono-bold-italic-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/ubuntumono-bold-italic-webfont.woff2) format('woff2'),url(fonts/ubuntumono-bold-italic-webfont.woff) format('woff'),url(fonts/ubuntumono-bold-italic-webfont.ttf) format('truetype'),url(fonts/ubuntumono-bold-italic-webfont.svg#ubuntu_monobold_italic) format('svg');font-weight:bold;font-style:italic}