2023-04-06 01:55:01 +03:00
|
|
|
"use strict";
|
|
|
|
|
2023-11-30 20:07:32 +02:00
|
|
|
const BLOG_SITE = "https://blog.ari.lt/";
|
|
|
|
const COMMENT_SITE = "https://user.ari.lt/";
|
2023-04-06 01:55:01 +03:00
|
|
|
|
|
|
|
const FETCH_BLOG_POSTS = () =>
|
2023-11-30 20:07:32 +02:00
|
|
|
fetch("https://blog.ari.lt/recents.json").then((r) => r.json());
|
2023-04-06 01:55:01 +03:00
|
|
|
|
|
|
|
const FETCH_COMMENTS = () => {
|
2023-11-30 20:07:32 +02:00
|
|
|
return fetch("https://server.ari.lt/total")
|
2023-04-06 01:55:01 +03:00
|
|
|
.then((r) => r.text())
|
|
|
|
.then((t) => {
|
|
|
|
let total = parseInt(t);
|
|
|
|
|
2023-04-06 02:24:07 +03:00
|
|
|
let fetch_from = total - 14;
|
2023-04-06 01:55:01 +03:00
|
|
|
if (fetch_from < 0) fetch_from = total;
|
|
|
|
|
|
|
|
return fetch(
|
2023-11-30 20:07:32 +02:00
|
|
|
`https://server.ari.lt/${fetch_from}/${total}`
|
2023-04-06 01:55:01 +03:00
|
|
|
).then((r) => r.json());
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
const FETCH_PAGES = () => fetch("/api/pages.json").then((r) => r.json());
|
|
|
|
|
|
|
|
// let dt = new Date();
|
|
|
|
// const BIRTHDAY = new Date(dt.getFullYear() - 2, dt.getMonth(), dt.getDate(), 0, 0, 0, 0);
|
|
|
|
const BIRTHDAY = new Date(2020, 9, 17, 0, 0, 0, 0); // ari-web start : 2020/10/17
|
|
|
|
const NUMERICS = ["st", "nd", "rd", "th"];
|
|
|
|
const SITE_NAME = "ari-web";
|
2023-04-06 02:17:56 +03:00
|
|
|
|
|
|
|
const EXTRA_PAGES = [
|
|
|
|
"/mr",
|
|
|
|
"/etc",
|
|
|
|
"/page/blog",
|
|
|
|
"/data",
|
|
|
|
"/gh",
|
|
|
|
"/overlay",
|
|
|
|
"/dotfiles",
|
|
|
|
"/tdotfiles",
|
|
|
|
"/git",
|
|
|
|
"/user",
|
2023-08-31 10:58:43 +03:00
|
|
|
"/btc",
|
2023-04-06 02:17:56 +03:00
|
|
|
];
|
2023-04-06 02:55:07 +03:00
|
|
|
|
|
|
|
const DO_FETCH = true;
|