From 9852b6cd074cceec0d0b549bb6c9bd7fe50c86f2 Mon Sep 17 00:00:00 2001
From: Minteck <46352972+Minteck@users.noreply.github.com>
Date: Sun, 1 Aug 2021 22:28:15 +0200
Subject: Update
---
blog/_article.php | 8 ++++----
blog/index.php | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
(limited to 'blog')
diff --git a/blog/_article.php b/blog/_article.php
index 1d25467..819d7b1 100644
--- a/blog/_article.php
+++ b/blog/_article.php
@@ -15,18 +15,18 @@ if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i']
$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json"), true);
$article = $_GET['i'];
-$_TITLE = $data["title"];
+$_TITLE = l($data["title"], $data["title.fr"] ?? $data["title"]);
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php";
?>
-
= $data["title"] ?>
-
= l("Published", "Publié") ?> = DateTime::createFromFormat('Y-m-d', explode("@", $article)[0])->format("F jS, Y"); ?>
+
= l($data["title"], $data["title.fr"] ?? $data["title"]) ?>
+
= l("Published", "Publié") ?> = strftime(l("%a %b %e, %Y", "%a %e %b %Y"), (int)DateTime::createFromFormat('Y-m-d', explode("@", $article)[0])->format("U")); ?>
- = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json.html") ?>
+ = l(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json.html"), file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json.fr.html") ? file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json.fr.html") : file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/" . $_GET['i'] . ".json.html")) ?>
diff --git a/blog/index.php b/blog/index.php
index 9e63e02..203e1ba 100644
--- a/blog/index.php
+++ b/blog/index.php
@@ -6,7 +6,7 @@
= l("All blog articles", "Tous les articles du blog") ?>
-
Note : If you want a more generally tech-centric blog that doesn't necessarily talk about me, you should check out
UnchainedTech, that is also accessible
here if you are using the Tor network.
+
Note= l("", " "); ?>: = l("If you want a more generally tech-centric blog that doesn't necessarily talk about me, you should check out", "Si vous voulez un blog plus centré sur la technologie qui ne parle pas nécessairement de moi, vous devriez regarder") ?>
UnchainedTech= l(", ", " (en anglais), ") ?>= l("that is also available", "qui est aussi disponible") ?>
= l("here", "ici"); ?> = l("if you are using the Tor network.", "si vous utilisez le réseau Tor.") ?>
--
cgit