Move site specificities to their respective directory
This commit is contained in:
parent
a42069ffa2
commit
af34f93f38
|
@ -3,4 +3,7 @@ temp/*
|
||||||
mdp.php
|
mdp.php
|
||||||
antopie/css
|
antopie/css
|
||||||
antopie/*.html
|
antopie/*.html
|
||||||
|
!antopie/*.inc.html
|
||||||
/docs
|
/docs
|
||||||
|
/miraty
|
||||||
|
.directory
|
||||||
|
|
25
README.md
25
README.md
|
@ -4,25 +4,14 @@ Ceci est le code source du générateur de sites statiques qui créé le [site w
|
||||||
|
|
||||||
# Utilisation
|
# Utilisation
|
||||||
|
|
||||||
Placer les pages dans `<site>/md/<page>.md`. Le format est principalement du Markdown Extra mais il est aussi possible de rajouter de l'HTML et du PHP. Elles sont ensuite transformées par `compil.php` en pages HTML statiques, placées dans `<site>/<page>.html`
|
`compil.php <chemin du site> <destination> <nom du site>`
|
||||||
|
|
||||||
`compil.php <site> <destination>`
|
Avec `destination` :
|
||||||
|
|
||||||
Avec `site` qui est le dossier contenant le site et pour `destination` :
|
|
||||||
* Pour déployer en DNS en liant vers `page`, utiliser `dns`.
|
* Pour déployer en DNS en liant vers `page`, utiliser `dns`.
|
||||||
* Pour déployer en Onion en liant vert `page`, utiliser `onion`.
|
* Pour déployer en Onion en liant vert `page`, utiliser `onion`.
|
||||||
* Pour déployer en DNS en liant vert `page.html`, ignorer ce dernier argument.
|
* Pour déployer en DNS en liant vert `page.html`, utiliser `local`.
|
||||||
|
|
||||||
Les droits d'écriture sont requis sur `<site>/css` et `temp/` par l'user qui exécute PHP.
|
Exemple pour le site d'Antopie : `compil.php antopie local Antopie`
|
||||||
|
|
||||||
`compil.php` va chercher à utiliser [static-compress](https://github.com/neosmart/static-compress) dans `/usr/local/bin/static-compress` pour compresser les fichiers CSS et HTML créés.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ cargo install static-compress
|
|
||||||
$ sudo mv ~/.cargo/bin/static-compress /usr/local/bin/
|
|
||||||
```
|
|
||||||
|
|
||||||
Exemple de commande pour tester le développement en local après avoir modifié le site : `php compil.php antopie local && python3 -m http.server -b 127.0.0.1 -d antopie`
|
|
||||||
|
|
||||||
# Bibliothèques utilisées
|
# Bibliothèques utilisées
|
||||||
|
|
||||||
|
@ -33,12 +22,6 @@ Le dossier `bibli` contient les dépendances incluses dans le générateur de si
|
||||||
| less.php | Compilateur Less en PHP | https://github.com/wikimedia/less.php |
|
| less.php | Compilateur Less en PHP | https://github.com/wikimedia/less.php |
|
||||||
| parsedown | Compilateur Markdown en PHP | https://parsedown.org |
|
| parsedown | Compilateur Markdown en PHP | https://parsedown.org |
|
||||||
|
|
||||||
Il y a aussi une dépendance spécifique au site d'Antopie :
|
|
||||||
|
|
||||||
| Nom | Description | Source |
|
|
||||||
| --------- | ------------------- | ---------------------------------------- |
|
|
||||||
| fontello | Pack d'icônes | http://fontello.com |
|
|
||||||
|
|
||||||
# Licence
|
# Licence
|
||||||
|
|
||||||
Le générateur de sites web d'Antopie 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.
|
Le générateur de sites web d'Antopie 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.
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
<footer class="antopie">
|
||||||
|
<div class="liensfooter centre">
|
||||||
|
<div class="lienfooter">
|
||||||
|
<a href="<?php formerUrlLocale("contact"); ?>" class="bouton">
|
||||||
|
Me contacter
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (DESTINATION === "onion") { ?>
|
||||||
|
|
||||||
|
<div class="lienfooter">
|
||||||
|
<a href="https://antopie.org/<?= $pathParts['filename'] ?>" class="bouton">
|
||||||
|
Accès <abbr title="Domain Name System">DNS</abbr>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } else { ?>
|
||||||
|
|
||||||
|
<div class="lienfooter">
|
||||||
|
<a href="http://antopieee25qeh4bvllwomq5pzrjmpvldbn2b653okyopkq5h7f7ilad.onion/<?= $pathParts['filename'] ?>" class="bouton">
|
||||||
|
Accès Onion
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="interlude">
|
||||||
|
<div class="traitinterlude">
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="textefooter">
|
||||||
|
Services auto-hébergés avec datalove à Paris.
|
||||||
|
<br>
|
||||||
|
Le <a href="<?php echo clearnetOrOnion("https://code.antopie.org", "http://antcode5h4tntfei362x7eydifyxdjskjisv5pezk2othlh7oho2zhyd.onion"); ?>/miraty/web">code source de ce site</a> est publié sous <abbr title="GNU Affero General Public License version 3 ou toute version ultérieure"><a href="LICENSE.html">AGPLv3</a>+</abbr>.
|
||||||
|
<br>
|
||||||
|
Kopimi · <a href="<?= $pathParts['filename'] ?>.md">Document source</a>
|
||||||
|
</div>
|
||||||
|
</footer>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<link rel="icon" type="image/webp" href="img/icons/16.webp" sizes="16x16">
|
||||||
|
<link rel="icon" type="image/webp" href="img/icons/32.webp" sizes="32x32">
|
||||||
|
<link rel="icon" type="image/webp" href="img/icons/64.webp" sizes="64x64">
|
||||||
|
<link rel="icon" type="image/webp" href="img/icons/128.webp" sizes="128x128">
|
||||||
|
<link rel="icon" type="image/webp" href="img/icons/256.webp" sizes="256x256">
|
||||||
|
<link rel="icon" type="image/webp" href="img/icons/512.webp" sizes="512x512">
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Antopie est hostile à la propagation de contenus droitistes, et est susceptible d'appliquer une modération en conséquence.
|
Antopie est hostile à la propagation de contenus droitistes, et est susceptible d'appliquer une modération en conséquence.
|
||||||
|
|
||||||
Le terme droitiste peut par exemple comprendre *essentialiste*, *spéciste*, *genriste*, *raciste*, *nationaliste*, *autoritariste*, *capitaliste*, *propriétariste*, *productiviste*, *capacitiste*, *socio-normativiste*, *théiste*, *spiritualiste* ou *conspirationniste*.
|
Le terme droitiste peut par exemple comprendre *essentialiste*, *spéciste*, *socionormativiste*, *genriste*, *masculiniste*, *hétérosexualiste*, *raciste*, *nationaliste*, *autoritariste*, *capitaliste*, *propriétariste*, *productiviste*, *théiste*, *spiritualiste* ou *conspirationniste*.
|
||||||
|
|
||||||
Ceci a été exprimé plus dans le but de guider les personnes dans leur choix de service avant leur établissement sur Antopie que de limiter l'expression des personnes qui sont déjà dessus. Aussi, si vous êtes d'accord avec ce qui est dit dans ce manifeste, vous ne devriez pas avoir besoin de vérifier la compatibilité de tout ce que vous dites avec. La modération sur Antopie est faite avec bienveillance et est ouverte à discussion. L'immense majorité des contenus retirés d'Antopie sont du spam ou sont publiés par des personnes n'ayant pas lu ce manifeste.
|
Ceci a été exprimé plus dans le but de guider les personnes dans leur choix de service avant leur établissement sur Antopie que de limiter l'expression des personnes qui sont déjà dessus. Aussi, si vous êtes d'accord avec ce qui est dit dans ce manifeste, vous ne devriez pas avoir besoin de vérifier la compatibilité de tout ce que vous dites avec. La modération sur Antopie est faite avec bienveillance et est ouverte à discussion. L'immense majorité des contenus retirés d'Antopie sont du spam ou sont publiés par des personnes n'ayant pas lu ce manifeste.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,143 @@
|
||||||
|
|
||||||
|
|
||||||
|
.action::before {
|
||||||
|
content: "➡ ";
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||||
|
grid-gap: 30px;
|
||||||
|
|
||||||
|
@media (min-width: 2500px) {
|
||||||
|
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 3000px) {
|
||||||
|
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1500px) {
|
||||||
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1000px) {
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.metaService {
|
||||||
|
margin: 6px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metasService {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 0.7em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logoService {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.elLogoServ {
|
||||||
|
max-width: 150px;
|
||||||
|
max-height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.descService {
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.domService {
|
||||||
|
font-family: monospace;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
margin-top: -6px;
|
||||||
|
font-size: 0.8em;
|
||||||
|
@media @light {
|
||||||
|
color: @darkerColor;
|
||||||
|
}
|
||||||
|
@media @dark {
|
||||||
|
color: @lightlessColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#lienHeader {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 30px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
margin-left: 35px;
|
||||||
|
margin-right: 35px;
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
padding: 0px;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-left: 20px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
footer.antopie {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logofooter {
|
||||||
|
padding-left: 6%;
|
||||||
|
margin-top: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.interlude {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.traitinterlude > hr {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.traitinterlude {
|
||||||
|
border-top: 2px gray dashed;
|
||||||
|
width: 450px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.liensfooter {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lienfooter {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.titreService {
|
||||||
|
font-size: 1.3em;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0px;
|
||||||
|
padding-bottom: 0px;
|
||||||
|
padding-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
|
||||||
|
.basfooter {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logofooter {
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
82
compil.php
82
compil.php
|
@ -1,12 +1,39 @@
|
||||||
|
#!/usr/bin/php
|
||||||
<?php
|
<?php
|
||||||
if (php_sapi_name() === "cli") {
|
if (php_sapi_name() !== "cli")
|
||||||
|
exit("Must be run from CLI");
|
||||||
|
|
||||||
|
define("FIND", "/usr/bin/find");
|
||||||
|
define("GZIP", "/usr/bin/gzip");
|
||||||
|
|
||||||
|
define("ROOT", dirname($_SERVER['SCRIPT_FILENAME']));
|
||||||
define("SITE", $argv[1]);
|
define("SITE", $argv[1]);
|
||||||
|
if (isset($argv[2]))
|
||||||
define("DESTINATION", $argv[2]);
|
define("DESTINATION", $argv[2]);
|
||||||
|
else
|
||||||
|
define("DESTINATION", "local");
|
||||||
|
|
||||||
require "bibli/parsedown/Parsedown.php";
|
if (isset($argv[3]))
|
||||||
require "bibli/parsedown-extra/ParsedownExtra.php";
|
define("SITE_TITLE", $argv[3]);
|
||||||
|
else
|
||||||
|
define("SITE_TITLE", SITE);
|
||||||
|
|
||||||
exec("/usr/bin/find " . SITE . " -name '*.gmi' -o -name '*.md'", $pages);
|
require ROOT . "/bibli/parsedown/Parsedown.php";
|
||||||
|
require ROOT . "/bibli/parsedown-extra/ParsedownExtra.php";
|
||||||
|
|
||||||
|
// Less > CSS
|
||||||
|
require ROOT . "/bibli/less.php/lib/Less/Autoloader.php";
|
||||||
|
Less_Autoloader::register();
|
||||||
|
$options = array('cache_dir' => SITE . '/css', 'compress' => true);
|
||||||
|
|
||||||
|
if (file_exists(SITE . "/style.less"))
|
||||||
|
$lessFiles = array(ROOT . '/style.less' => '', SITE . '/style.less' => '');
|
||||||
|
else
|
||||||
|
$lessFiles = array(ROOT . '/style.less' => '');
|
||||||
|
|
||||||
|
define("CSS_FILENAME", Less_Cache::Get($lessFiles, $options));
|
||||||
|
|
||||||
|
exec(FIND . " " . SITE . " -name '*.gmi' -o -name '*.md'", $pages);
|
||||||
|
|
||||||
require "inc/url.php";
|
require "inc/url.php";
|
||||||
|
|
||||||
|
@ -15,6 +42,7 @@ if (php_sapi_name() === "cli") {
|
||||||
$pathParts = pathinfo($page);
|
$pathParts = pathinfo($page);
|
||||||
|
|
||||||
// Convert Gemtext to Markdown
|
// Convert Gemtext to Markdown
|
||||||
|
if ($pathParts['extension'] === "gmi") {
|
||||||
$gmilines = explode("\n", file_get_contents($page));
|
$gmilines = explode("\n", file_get_contents($page));
|
||||||
|
|
||||||
if (substr($gmilines[0], 0, 2) === "# ")
|
if (substr($gmilines[0], 0, 2) === "# ")
|
||||||
|
@ -26,9 +54,18 @@ if (php_sapi_name() === "cli") {
|
||||||
if (substr($line, 0, 2) === "=>") {
|
if (substr($line, 0, 2) === "=>") {
|
||||||
preg_match("/=> +(.[^ ]+)/", $line, $lnUrl);
|
preg_match("/=> +(.[^ ]+)/", $line, $lnUrl);
|
||||||
preg_match("/=> +.[^ ]+ +(.+)/", $line, $lnTitle);
|
preg_match("/=> +.[^ ]+ +(.+)/", $line, $lnTitle);
|
||||||
|
|
||||||
|
// Escape Markdown special characters
|
||||||
$mdSpecial = array("[", "]", "(", ")");
|
$mdSpecial = array("[", "]", "(", ")");
|
||||||
$htmlEntities = array("[", "]", "(", ")");
|
$htmlEntities = array("[", "]", "(", ")");
|
||||||
$lnUrl[1] = str_replace($mdSpecial, $htmlEntities, $lnUrl[1]);
|
$lnUrl[1] = str_replace($mdSpecial, $htmlEntities, $lnUrl[1]);
|
||||||
|
|
||||||
|
$urlPathParts = pathinfo(parse_url($lnUrl[1], PHP_URL_PATH));
|
||||||
|
|
||||||
|
// .gmi > .md for local links
|
||||||
|
if (!str_contains($lnUrl[1], ":") AND $urlPathParts['extension'] === "gmi") // If it's a local link
|
||||||
|
$lnUrl[1] = $urlPathParts['dirname'] . "/" . $urlPathParts['filename'] . ".md";
|
||||||
|
|
||||||
if (isset($lnTitle[1])) {
|
if (isset($lnTitle[1])) {
|
||||||
$lnTitle[1] = str_replace($mdSpecial, $htmlEntities, $lnTitle[1]);
|
$lnTitle[1] = str_replace($mdSpecial, $htmlEntities, $lnTitle[1]);
|
||||||
$gmilines[$key] = "[" . $lnTitle[1] . "](" . $lnUrl[1] . ")";
|
$gmilines[$key] = "[" . $lnTitle[1] . "](" . $lnUrl[1] . ")";
|
||||||
|
@ -41,24 +78,31 @@ if (php_sapi_name() === "cli") {
|
||||||
foreach ($gmilines as $line) {
|
foreach ($gmilines as $line) {
|
||||||
$code = $code . "\n" . $line;
|
$code = $code . "\n" . $line;
|
||||||
}
|
}
|
||||||
|
file_put_contents($pathParts['dirname'] . "/" . $pathParts['filename'] . ".md", $code);
|
||||||
|
}
|
||||||
|
|
||||||
// pages/exemple.md > temp/exemple.temp
|
|
||||||
// Exécute le PHP vers du HTML
|
// Execute PHP code
|
||||||
ob_start();
|
ob_start();
|
||||||
eval("?>" . $code);
|
eval("?>" . file_get_contents($pathParts['dirname'] . "/" . $pathParts['filename'] . ".md"));
|
||||||
$contenuPage = ob_get_contents();
|
$pageContent = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
// temp/exemple.temp > temp2/exemple.temp2
|
|
||||||
// Compile le Markdown vers du HTML
|
// Compile Markdown to HTML with Parsedown
|
||||||
$Parsedown = new ParsedownExtra;
|
$Parsedown = new ParsedownExtra;
|
||||||
$Parsedown = $Parsedown->setUrlsLinked(false);
|
$Parsedown = $Parsedown->setUrlsLinked(false);
|
||||||
$Parsedown = $Parsedown->setMarkupEscaped(false);
|
$Parsedown = $Parsedown->setMarkupEscaped(false);
|
||||||
$Parsedown = $Parsedown->setBreaksEnabled(true);
|
$Parsedown = $Parsedown->setBreaksEnabled(true);
|
||||||
$contenuPage = $Parsedown->text($contenuPage);
|
$pageContent = $Parsedown->text($pageContent);
|
||||||
|
|
||||||
|
|
||||||
|
// .md > .html for local links
|
||||||
|
$pageContent = preg_replace('#<a href="(?!.*:)(.*)\.md">#', '<a href="$1.html">', $pageContent);
|
||||||
|
|
||||||
|
|
||||||
|
// Add header and footer to HTML
|
||||||
|
|
||||||
// temp2/exemple.temp2 > exemple.html
|
|
||||||
// Ajoute header et footer au HTML
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
require "inc/debut.php";
|
require "inc/debut.php";
|
||||||
|
@ -67,7 +111,7 @@ if (php_sapi_name() === "cli") {
|
||||||
} else {
|
} else {
|
||||||
echo "<article>";
|
echo "<article>";
|
||||||
}
|
}
|
||||||
echo $contenuPage;
|
echo $pageContent;
|
||||||
if ($pathParts['filename'] === "index") {
|
if ($pathParts['filename'] === "index") {
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
} else {
|
} else {
|
||||||
|
@ -77,11 +121,9 @@ if (php_sapi_name() === "cli") {
|
||||||
file_put_contents($pathParts['dirname'] . "/" . $pathParts['filename'] . ".html", ob_get_contents());
|
file_put_contents($pathParts['dirname'] . "/" . $pathParts['filename'] . ".html", ob_get_contents());
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
|
|
||||||
|
// Gzip compression
|
||||||
|
exec(GZIP . " --keep --fast --force " . $pathParts['dirname'] . "/" . $pathParts['filename'] . ".html");
|
||||||
}
|
}
|
||||||
|
|
||||||
// exemple.html > exemple.html.gz
|
exec(GZIP . " --keep --fast --force " . SITE . "/css/" . CSS_FILENAME);
|
||||||
// Compresse les fichiers textes statiques HTML & CSS
|
|
||||||
exec('/usr/local/bin/static-compress -c zopfli "' . SITE . '/*.html" "' . SITE . '/*.js" "' . SITE . '/css/*.css"');
|
|
||||||
} else {
|
|
||||||
exit("Must be run from CLI");
|
|
||||||
}
|
|
||||||
|
|
|
@ -3,59 +3,33 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title><?php
|
<title><?php
|
||||||
if (!is_null($title))
|
if (isset($title) AND !is_null($title))
|
||||||
echo $title . " · Antopie";
|
echo $title . " · " . SITE_TITLE;
|
||||||
else
|
else
|
||||||
echo "Antopie";
|
echo SITE_TITLE;
|
||||||
?></title>
|
?></title>
|
||||||
<meta name="distribution" content="global">
|
<meta name="distribution" content="global">
|
||||||
<meta name="robots" content="index, follow">
|
<meta name="robots" content="index, follow">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link type="text/css" rel="stylesheet" href="/css/<?= CSS_FILENAME ?>">
|
||||||
<?php
|
<?php
|
||||||
require_once 'bibli/less.php/lib/Less/Autoloader.php';
|
if (file_exists(SITE . "/head.inc.html"))
|
||||||
Less_Autoloader::register();
|
echo file_get_contents(SITE . "/head.inc.html");
|
||||||
|
|
||||||
$options = array('cache_dir' => SITE . '/css', 'compress' => true);
|
|
||||||
$lessFiles = array('style.less' => '');
|
|
||||||
$cssFileName = Less_Cache::Get($lessFiles, $options);
|
|
||||||
?>
|
?>
|
||||||
<link type="text/css" rel="stylesheet" href="css/<?= $cssFileName ?>">
|
|
||||||
<?php if (SITE == "antopie") { ?>
|
|
||||||
<link rel="icon" type="image/webp" href="img/icons/16.webp" sizes="16x16">
|
|
||||||
<link rel="icon" type="image/webp" href="img/icons/32.webp" sizes="32x32">
|
|
||||||
<link rel="icon" type="image/webp" href="img/icons/64.webp" sizes="64x64">
|
|
||||||
<link rel="icon" type="image/webp" href="img/icons/128.webp" sizes="128x128">
|
|
||||||
<link rel="icon" type="image/webp" href="img/icons/256.webp" sizes="256x256">
|
|
||||||
<link rel="icon" type="image/webp" href="img/icons/512.webp" sizes="512x512">
|
|
||||||
<?php } ?>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<?php
|
<a id="lienHeader" href="/">
|
||||||
|
|
||||||
if (SITE === "antopie") {
|
|
||||||
|
|
||||||
?>
|
|
||||||
<a id="lienHeader" href=".">
|
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="img/antopiev5-500.webp" width="500" height="94" alt="Antopie" />
|
<?php
|
||||||
|
if (file_exists(SITE . "/img/logo.webp"))
|
||||||
|
echo '<img src="img/logo.webp" ' . getimagesize(SITE . "/img/logo.webp")[3] . ' alt="' . SITE_TITLE . '" />';
|
||||||
|
else
|
||||||
|
echo SITE_TITLE;
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
?>
|
|
||||||
<a id="lienHeader" href=".">
|
|
||||||
<div class="logo"><?= SITE ?></div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
|
|
|
@ -1,55 +1,10 @@
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
<?php if (SITE === "antopie") { ?>
|
|
||||||
<footer class="antopie">
|
|
||||||
<div class="liensfooter centre">
|
|
||||||
<div class="lienfooter">
|
|
||||||
<a href="<?php formerUrlLocale("contact"); ?>" class="bouton">
|
|
||||||
Me contacter
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if (DESTINATION === "onion") { ?>
|
<?php
|
||||||
|
if (file_exists(SITE . "/end.inc.html"))
|
||||||
|
require SITE . "/end.inc.html";
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="lienfooter">
|
|
||||||
<a href="https://antopie.org/<?= $pathParts['filename'] ?>" class="bouton">
|
|
||||||
Accès <abbr title="Domain Name System">DNS</abbr>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php } else { ?>
|
|
||||||
|
|
||||||
<div class="lienfooter">
|
|
||||||
<a href="http://antopieee25qeh4bvllwomq5pzrjmpvldbn2b653okyopkq5h7f7ilad.onion/<?= $pathParts['filename'] ?>" class="bouton">
|
|
||||||
Accès Onion
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="interlude">
|
|
||||||
<div class="traitinterlude">
|
|
||||||
<hr>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="textefooter">
|
|
||||||
Services auto-hébergés avec datalove à Paris.
|
|
||||||
<br>
|
|
||||||
Le <a href="<?php echo clearnetOrOnion("https://code.antopie.org", "http://antcode5h4tntfei362x7eydifyxdjskjisv5pezk2othlh7oho2zhyd.onion"); ?>/miraty/web">code source de ce site</a> est publié sous <abbr title="GNU Affero General Public License version 3 ou toute version ultérieure"><a href="LICENSE.html">AGPLv3</a>+</abbr>.
|
|
||||||
<br>
|
|
||||||
Kopimi · <a href="<?= $pathParts['filename'] ?>.md">Document source</a>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
<?php } else if (SITE === "docs") { ?>
|
|
||||||
<footer>
|
|
||||||
Site créé avec Base Antopie
|
|
||||||
<br>
|
|
||||||
Documentation sous <abbr title="Creative Commons Attribution et Partage dans les mêmes conditions">CC BY-SA</abbr>.
|
|
||||||
<br>
|
|
||||||
<a href="<?= $pathParts['filename'] ?>.md">Source du contenu</a> | Kopimi
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
145
style.less
145
style.less
|
@ -216,77 +216,6 @@ p {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action::before {
|
|
||||||
content: "➡ ";
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
||||||
grid-gap: 30px;
|
|
||||||
|
|
||||||
@media (min-width: 2500px) {
|
|
||||||
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 3000px) {
|
|
||||||
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1500px) {
|
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1000px) {
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.metaService {
|
|
||||||
margin: 6px;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.metasService {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 0.7em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logoService {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.elLogoServ {
|
|
||||||
max-width: 150px;
|
|
||||||
max-height: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.descService {
|
|
||||||
padding-top: 5px;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.domService {
|
|
||||||
font-family: monospace;
|
|
||||||
overflow-wrap: anywhere;
|
|
||||||
margin-top: -6px;
|
|
||||||
font-size: 0.8em;
|
|
||||||
@media @light {
|
|
||||||
color: @darkerColor;
|
|
||||||
}
|
|
||||||
@media @dark {
|
|
||||||
color: @lightlessColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.centre {
|
.centre {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -315,75 +244,23 @@ article {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.interlude {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.traitinterlude > hr {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.traitinterlude {
|
|
||||||
border-top: 2px gray dashed;
|
|
||||||
width: 450px;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer.antopie {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logofooter {
|
|
||||||
padding-left: 6%;
|
|
||||||
margin-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.liensfooter {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lienfooter {
|
|
||||||
margin: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------- HEADER ------------------------ */
|
|
||||||
|
|
||||||
#lienHeader {
|
|
||||||
margin: 0px;
|
|
||||||
padding: 30px;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
margin-left: 35px;
|
|
||||||
margin-right: 35px;
|
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
|
||||||
padding: 0px;
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-left: 20px;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----- TITRES -----
|
// ----- TITLES -----
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 100%;
|
line-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1:not(.titreService) {
|
h1 {
|
||||||
font-size: 250%;
|
font-size: 250%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
@ -391,12 +268,6 @@ h1:not(.titreService) {
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1.titreService {
|
|
||||||
font-size: 1.3em;
|
|
||||||
text-align: center;
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 200%;
|
font-size: 200%;
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
|
@ -422,15 +293,3 @@ h5 {
|
||||||
h6 {
|
h6 {
|
||||||
font-size: 107%;
|
font-size: 107%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 800px) {
|
|
||||||
|
|
||||||
.basfooter {
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logofooter {
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
Reference in New Issue