Commit 48c66f8e authored by Boris's avatar Boris
Browse files

Moved to Github

parent 9ef01d0e
.htaccess
.idea
## Il faut et y a plus qu'à
## Il faut avant la publication
## Ce serait encore mieux et y'a plus qu'à
* Demander aux ayant-droit l'autorisation d'utiliser les images
* [Footer] Rendre à propos traductible et éditer fichiers menu.po
* Supprimer class="text-box"
* Rendre la développeurs traductible (fichier .html ?)
* [Tutoriel] Cleaner un peu tuto.php (substr en doublon, $subpage, etc.)
* [Tutoriel] Equilibrer les tableaux en 50/50 (classe 2cols ?)
* [Download] chercher les SVG qui correspondent aux PNG utilisés
* [Download] passer les <img /> en background-image
* Rédiger un lead magnet pour les développeurs, genre :
"Offre d'emploi : développeur client blockchain"
* [Google Play Store] Faire des captures d'écran plus intéressantes (avec légende) d'après page Fonctionnalités
## Ce serait encore mieux mais faut y réfléchir
* Faire un fichier POT pour les traducteurs
* [config.php] chercher un meilleur moyen pour déterminer $rootURL
* [Funding] Rendre traductible (fichiers funding.po ? ou html ?)
* [Home] Servir de images à la bonne taille (srcset="")
* Changer l'affichage du système qui gère le changement de langue (utiliser un menu déroulant)
* Essayer de rendre le .htaccess désactivable :
- Checker chemins tuto.php
* [Tutoriel] Ajouter un fil d'Ariane
* [Tutoriel] Ajouter la navigation par page précédente et page suivante
* [Home] Gérer la galerie (ajouter une lightbox genre celle de dfactory)
* [Features] Permettre le clic (ouvrir une lightbox)
* Aller jeter un oeil à la mise en page :
1. des pages "documentation" d'autres sites (cf swipe file : Contact Form 7 par exemple)
2. des pages "fonctionnalités" d'autres sites (cf swipe file)
* [Accueil] Voir
https://stackoverflow.com/questions/18070154/get-operating-system-info
pour la détection du système d'exploitation (et donc la MàJ de la version)
* Réfléchir à traduire la fichiers .po (avec un master.po qui trauit les fichiers ?) => c'est casse-gueule si on change un original
* revoir le routeur de index.php éventuellement
## Ce serait encore mieux mais faut attendre
* [HEAD] intégrer la version SVG du logo quand DiG me l'aura envoyée
## Problèmes à résoudre
## Problèmes
* /es/creer-compte-cesium-g1 sert la page française (au lieu de rediriger sur l'accueil ?)
* En même temps, il n'y a juste pas moyen de savoir si la chaîne a été traduite ou pas
* FontAwesome : l'histoire des chemins
* [Features] image scanner de QR code trop haute
## Après la publication
* Commenter tuto Conlang Gnu Text : https://blogs.gnome.org/tthurman/2010/01/20/introduction-to-software-localisation-for-conlangers/
# CesiumWebsite
## Documentation en français
Si vous avez besoin d'aide pour aider, venez poser vos questions sur [le chat #cesium.app:matrix.org](https://riot.im/app/#/room/#cesium.app:matrix.org).
* [Restrictions à votre liberté d'expression](doc/fr/restrictions-liberte-d-expression.md)
* [Comment tester installer le site sur son ordinateur ?](doc/fr/installation.md)
* [Comment traduire le site](doc/fr/comment-traduire-le-site.md)
* [Comment mettre à jour les liens de téléchargement au changement de version](doc/fr/comment-mettre-a-jour-les-liens-de-telechargement.md)
* [Licences](docs/fr/licences.md)
## Documentation in English
If you need help to contribute, come ask questions on [the chat at #cesium.app:matrix.org](https://riot.im/app/#/room/#cesium.app:matrix.org).
* [How to install Cesium website on your computer](doc/en/install.md)
* [How to translate the website](doc/en/how-to-translate-the-website.md)
* [Licences](doc/en/licences.md)
[Projet migré vers Github](https://github.com/Monnaies-Libres/cesium_website)
[Project moved to Github](https://github.com/Monnaies-Libres/cesium_website)
<?php
$cesiumDownloads =
[
'android' => [
'title' => 'Android',
'url' => 'https://play.google.com/store/apps/details?id=fr.duniter.cesium',
'img' => 'android.svg',
'desc' => _('Disponible directement sur le Play Store'),
'extra' => sprintf(_('(ou <a href="%s">télécharger le fichier .apk</a>)'), 'https://github.com/duniter/cesium/releases/download/v'. $cesiumVersions['android'] .'/cesium-v'. $cesiumVersions['android'] .'-android.apk')
],
'iphone' => [
'title' => 'iPhone',
'url' => 'https://apps.apple.com/app/cesium-%C4%9F1/id1471028018',
'img' => 'apple.svg',
'desc' => _('Disponible sur l\'App Store'),
'extra' => ''
],
'firefox' => [
'title' => _('Firefox'),
//'url' => sprintf('https://github.com/duniter/cesium/releases/download/v%s/cesium-v%s-extension-firefox.xpi', $cesiumVersions['firefox'], $cesiumVersions['firefox']),
'url' => 'https://addons.mozilla.org/fr/firefox/addon/cesium/',
'img' => 'firefox2019.png',
'desc' => _('Module complémentaire pour Firefox'),
'extra' => ''
],
'chromium' => [
'title' => _('Chromium&nbsp;/&nbsp;Chrome'),
'url' => 'https://chrome.google.com/webstore/detail/cesium/ocbhjemiokgibfojkkjapfealnbmgoek',
'img' => 'chrome.svg',
'desc' => _('Extension pour Chromium&nbsp;/&nbsp;Chrome'),
'extra' => ''
],
'safari' => [
'title' => _('Safari'),
'url' => 'https://apps.apple.com/us/app/cesium-%C4%9F1-for-safari/id1551461335',
'img' => 'safari.png',
'desc' => _('Extension pour Safari'),
'extra' => ''
],
'brave' => [
'title' => _('Brave'),
'url' => 'https://chrome.google.com/webstore/detail/cesium/ocbhjemiokgibfojkkjapfealnbmgoek',
'img' => 'brave_lion.svg',
'desc' => _('Extension pour Brave'),
'extra' => ''
],
'debian' => [
'title' => 'Ubuntu&nbsp;/ Debian',
'url' => sprintf('https://github.com/duniter/cesium/releases/download/v%s/cesium-desktop-v%s-linux-x64.deb', $cesiumVersions['debian'], $cesiumVersions['debian']),
'img' => 'cof_orange_hex.svg',
'desc' => _('Paquet .deb pour Debian et ses dérivés (Ubuntu, Linux Mint, etc.)'),
'extra' => _('En cas de problème&nbsp;:') . '<br /><code>sudo apt-get install -y libgconf-2-4</code>'
],
'arch' => [
'title' => 'Arch Linux (et dérivés)',
'url' => sprintf('https://aur.archlinux.org/packages/cesium-desktop-deb'),
'img' => 'arch.svg',
'desc' => _('A installer via AUR'),
'extra' => _('<code>yaourt -S cesium-desktop-deb</code>')
],
'windows' => [
'title' => 'Windows',
'url' => sprintf('https://github.com/duniter/cesium/releases/download/v%s/cesium-desktop-v%s-windows-x64.exe', $cesiumVersions['windows'], $cesiumVersions['windows']),
'img' => 'windows.svg',
'desc' => _('Installateur .exe pour Windows'),
'extra' => _('Lancez le .exe et suivez les instructions à l\'écran')
],
'web' => [
'title' => 'Web',
'url' => sprintf('https://github.com/duniter/cesium/releases/download/v%s/cesium-v%s-web.zip', $cesiumVersions['web'], $cesiumVersions['web']),
'img' => '1024px-Applications-internet.png',
'desc' => _('Pour une installation sur un serveur web'),
'extra' => ''
],
'yunohost' => [
'title' => 'Yunohost',
'url' => 'https://github.com/duniter/cesium_ynh',
'img' => 'yunohost.svg',
'desc' => _('Paquet pour Yunohost'),
'extra' => ''
],
'livrables' => [
'title' => _('Livrables'),
'url' => 'https://github.com/duniter/cesium/releases',
'img' => 'github.svg',
'desc' => _('Toutes versions disponibles sur GitHub'),
'extra' => ''
],
];
<?php
$cesiumVersions = [
'home' => '1.6.12',
'android' => '1.6.12',
'debian' => '1.6.12',
'arch' => '1.6.1',
'windows' => '1.6.12',
'web' => '1.6.12'
];
#!/bin/bash
lessc lib/style.less lib/style.css
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "25737d43de99fb5d718029bd29d5374e",
"packages": [
{
"name": "composer/ca-bundle",
"version": "1.2.4",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "10bb96592168a0f8e8f6dcde3532d9fa50b0b527"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/10bb96592168a0f8e8f6dcde3532d9fa50b0b527",
"reference": "10bb96592168a0f8e8f6dcde3532d9fa50b0b527",
"shasum": ""
},
"require": {
"ext-openssl": "*",
"ext-pcre": "*",
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
"psr/log": "^1.0",
"symfony/process": "^2.5 || ^3.0 || ^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\CaBundle\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
"keywords": [
"cabundle",
"cacert",
"certificate",
"ssl",
"tls"
],
"time": "2019-08-30T08:44:50+00:00"
},
{
"name": "geoip2/geoip2",
"version": "v2.9.0",
"source": {
"type": "git",
"url": "https://github.com/maxmind/GeoIP2-php.git",
"reference": "a807fbf65212eef5d8d2db1a1b31082b53633d77"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/a807fbf65212eef5d8d2db1a1b31082b53633d77",
"reference": "a807fbf65212eef5d8d2db1a1b31082b53633d77",
"shasum": ""
},
"require": {
"maxmind-db/reader": "~1.0",
"maxmind/web-service-common": "~0.5",
"php": ">=5.4"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.*",
"phpunit/phpunit": "4.*",
"squizlabs/php_codesniffer": "3.*"
},
"type": "library",
"autoload": {
"psr-4": {
"GeoIp2\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Gregory J. Oschwald",
"email": "goschwald@maxmind.com",
"homepage": "http://www.maxmind.com/"
}
],
"description": "MaxMind GeoIP2 PHP API",
"homepage": "https://github.com/maxmind/GeoIP2-php",
"keywords": [
"IP",
"geoip",
"geoip2",
"geolocation",
"maxmind"
],
"time": "2018-04-10T15:32:59+00:00"
},
{
"name": "maxmind-db/reader",
"version": "v1.5.0",
"source": {
"type": "git",
"url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
"reference": "bd436094fc0a9b0558a899fb80b0ae34fe1808a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/bd436094fc0a9b0558a899fb80b0ae34fe1808a0",
"reference": "bd436094fc0a9b0558a899fb80b0ae34fe1808a0",
"shasum": ""
},
"require": {
"php": ">=5.6"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.*",
"php-coveralls/php-coveralls": "^2.1",
"phpunit/phpcov": "^3.0",
"phpunit/phpunit": "5.*",
"squizlabs/php_codesniffer": "3.*"
},
"suggest": {
"ext-bcmath": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",
"ext-gmp": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",
"ext-maxminddb": "A C-based database decoder that provides significantly faster lookups"
},
"type": "library",
"autoload": {
"psr-4": {
"MaxMind\\Db\\": "src/MaxMind/Db"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Gregory J. Oschwald",
"email": "goschwald@maxmind.com",
"homepage": "https://www.maxmind.com/"
}
],
"description": "MaxMind DB Reader API",
"homepage": "https://github.com/maxmind/MaxMind-DB-Reader-php",
"keywords": [
"database",
"geoip",
"geoip2",
"geolocation",
"maxmind"
],
"time": "2019-09-30T22:56:38+00:00"
},
{
"name": "maxmind/web-service-common",
"version": "v0.5.0",
"source": {
"type": "git",
"url": "https://github.com/maxmind/web-service-common-php.git",
"reference": "61a9836fa3bb1743ab89752bae5005d71e78c73b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/61a9836fa3bb1743ab89752bae5005d71e78c73b",
"reference": "61a9836fa3bb1743ab89752bae5005d71e78c73b",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0.3",
"ext-curl": "*",
"ext-json": "*",
"php": ">=5.4"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.*",
"phpunit/phpunit": "4.*",
"squizlabs/php_codesniffer": "3.*"
},
"type": "library",
"autoload": {
"psr-4": {
"MaxMind\\Exception\\": "src/Exception",
"MaxMind\\WebService\\": "src/WebService"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Gregory Oschwald",
"email": "goschwald@maxmind.com"
}
],
"description": "Internal MaxMind Web Service API",
"homepage": "https://github.com/maxmind/web-service-common-php",
"time": "2018-02-12T22:31:54+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
<?php
include('cesiumVersions.php');
define('FUNDING_PUBKEY', '78ZwwgpgdH5uLZLbThUQH7LKwPgjMunYfLiCfUCySkM8');
// Duniter : 78ZwwgpgdH5uLZLbThUQH7LKwPgjMunYfLiCfUCySkM8
// Cesium : CitdnuQgZ45tNFCagay7Wh12gwwHM8VLej1sWmfHWnQX
define('FUNDING_TARGET', 20*60+230);
$legalNotice =
[
'editor' => 'Axiom-Team',
'publisher' => 'Axiom-Team',
'host' => 'p2p.legal'
];
if ($_SERVER['SERVER_NAME'] == 'localhost') {
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
}
// Trouver une façon de définir $rootURL sans faire ça :
if ($_SERVER['SERVER_NAME'] == 'localhost') {
// Adaptez la ligne suivante à votre configuration (sans slash à la fin)
$rootURL = '/cesium_website';
} else {
$rootURL = '';
}
/* ====== i18n ====== */
function checkAvailableLanguages ($langList) {
foreach ($langList as $isoCode => $l) {
$loc = setlocale(LC_ALL, $l['folder'], ($l['folder'] . '.utf8'));
if ($loc === false) {
unset($langList[$isoCode]);
} else {
$langList[$isoCode]['localeCode'] = $loc;
}
}
return $langList;
}
$languagesList =
[
'fr' => [
'name' => 'français',
'folder' => 'fr_FR'
],
'en' => [
'name' => 'english',
'folder' => 'en_GB'
],
'es' => [
'name' => 'español',
'folder' => 'es_ES'
],
'eo' => [
'name' => 'esperanto',
'folder' => 'eo'
],
/*
'it' => [
'name' => 'italiano',
'folder' => 'it_IT'
],
*/
];
$availableLanguages = checkAvailableLanguages($languagesList);
//echo '<pre>'; print_r($availableLanguages); echo '</pre>';
define('DEFAULT_LANG', 'fr');
define('WEBSITE_GIT_URL', 'https://git.duniter.org/websites/cesium_website');
define('WEBSITE_COMMUNICATION_URL', 'https://chat.axiom-team.fr/channel/cesium-website');
include('inc/lang.php');
$textDomains =
[
'menu',
'home',
'features',
'download',
'tuto'
];
bindTextDomains($textDomains);
/* ====== /i18n ====== */
include('inc/functions.php');
include('inc/display.php');
define('MOD_REWRITE', 'on');
define('FUNDING_ALT', (date('d/m') == '01/04'));
How to translate the website
===
## How to translate the main contents
For pages such as:
- Home
- Features
- Download
..and header and footer menus,
the changes take place in *.po files.
You will find those files in folders such as `i18n/fr_FR/LC_MESSAGES/` .
Such files can be edited with softwares such as [PoEdit](https://poedit.net/).
## How to translate the tutorial
To translate the tutorial, you will find .html files in folders such as `i18n/fr_FR/contents/tuto/`, where `fr_FR` is the language code for the French (fr) variant that is spoken in France (FR).
How to install Cesium website on your computer
===
## How to install the web server le serveur web
To run Cesium website on your computer, you will need install a web server, and PHP ; the later converts the source code contained in *.php files into HTML the browser can understand.
Linux users will need two packages:
- apache2
- php
For instance, Debian-like (Ubuntu, Linux Mint, etc.) users will have to run:
```
sudo apt install apache2 php
```
Windows users can use [WAMP Serveur](https://www.wampserver.com/).
## .htaccess
Create a .htaccess in cesium_website directory, with the following text :
```
<IfModule mod_rewrite.c>
RewriteEngine On
# Adaptez la ligne suivante à votre configuration (avec un slash à la fin)
RewriteBase /cesium-website-project/cesium_website/
RewriteOptions InheritDown
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*\.php - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/(.*)$ index.php?lang=$1&page=/$2 [L]
</IfModule>
```
Edit RewriteBase directive to match your own setup.