From e618c3f52c1c4ae161650679cda24eecbba579bb Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 4 Dec 2021 10:58:59 +0100 Subject: Code is now more cute! --- htdocs/public/TODO/index.ejs | 1 + htdocs/public/archive/index.ejs | 23 ++-- htdocs/public/index.ejs | 8 +- htdocs/public/legal/index.ejs | 223 ++++++------------------------- htdocs/public/metranslator/api/index.ejs | 33 +++++ htdocs/public/metranslator/index.ejs | 194 +++++++++++++++++++++++++++ htdocs/public/projects/index.ejs | 35 ----- 7 files changed, 283 insertions(+), 234 deletions(-) create mode 100644 htdocs/public/TODO/index.ejs create mode 100644 htdocs/public/metranslator/api/index.ejs create mode 100644 htdocs/public/metranslator/index.ejs delete mode 100644 htdocs/public/projects/index.ejs (limited to 'htdocs/public') diff --git a/htdocs/public/TODO/index.ejs b/htdocs/public/TODO/index.ejs new file mode 100644 index 0000000..2e2dcaa --- /dev/null +++ b/htdocs/public/TODO/index.ejs @@ -0,0 +1 @@ +<%- fs.readFileSync(serverRoot + "/TODO") %> \ No newline at end of file diff --git a/htdocs/public/archive/index.ejs b/htdocs/public/archive/index.ejs index 3fdda40..24af393 100644 --- a/htdocs/public/archive/index.ejs +++ b/htdocs/public/archive/index.ejs @@ -1,37 +1,32 @@ -<% global.title = "Archives"; %> +<% global.title = lang.archives.title; %> <%- include(`${private}/header.ejs`) %> ← Go back home
-

Archives

- - - +

<%- lang.archives.title %>

<% - const monthNames = ["January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December" - ]; + const monthNames = lang.archives.months; archives = []; - for (let archive of fs.readdirSync(serverRoot + "/archives")) { + for (let archive of fs.readdirSync(serverRoot + "/data/archives")) { data = {}; if (archive.endsWith(".json")) { - json = JSON.parse(fs.readFileSync(serverRoot + "/archives/" + archive).toString()) + json = JSON.parse(fs.readFileSync(serverRoot + "/data/archives/" + archive).toString()) data.id = archive.substr(0, archive.length - 5); data.name = json.title; - data.description = json.description.en; + data.description = json.description[slang] ?? json.description.en; data.date = (json.date.substr(3) + json.date.substr(0, 2)) - 1 + 1; if (json.unreleased) { let date = new Date(json.date.substr(3) + "-" + json.date.substr(0, 2) + "-01"); - data.info = "Never released · " + monthNames[date.getMonth()] + " " + date.getFullYear(); + data.info = "" + lang.archives.never + " · " + monthNames[date.getMonth()] + " " + date.getFullYear(); } else { let date = new Date(json.date.substr(3) + "-" + json.date.substr(0, 2) + "-01"); - data.info = "Officially released · " + monthNames[date.getMonth()] + " " + date.getFullYear(); + data.info = lang.archives.released + " · " + monthNames[date.getMonth()] + " " + date.getFullYear(); } archives.push(data); @@ -49,7 +44,7 @@ Download + class="big-button big-button-bg3"><%- lang.archives.download %>

<%- archive.info %>

diff --git a/htdocs/public/index.ejs b/htdocs/public/index.ejs index 59b21cd..a004f52 100644 --- a/htdocs/public/index.ejs +++ b/htdocs/public/index.ejs @@ -1,6 +1,8 @@ <% global.title = lang.main.page; %> <%- include(`${private}/header.ejs`) %> +TODO +
@@ -28,7 +30,7 @@

<%- lang.main.elements.projects.title %>

<%- lang.main.elements.projects.description %>

- <%- lang.main.elements.projects.action %> → + <%- lang.main.elements.projects.action %> →
@@ -44,7 +46,7 @@
- <%- lang.main.elements.projects.action %> → + <%- lang.main.elements.projects.action %> →
<%- lang.main.elements.contact.action %> ↓ @@ -210,7 +212,7 @@

<%- lang.main.about.archives.title %>

<%- lang.main.about.archives.description %>

- <%- lang.main.about.archives.action %> → + <%- lang.main.about.archives.action %> →

<%- lang.main.about.general.title %>

diff --git a/htdocs/public/legal/index.ejs b/htdocs/public/legal/index.ejs index db9c215..6888391 100644 --- a/htdocs/public/legal/index.ejs +++ b/htdocs/public/legal/index.ejs @@ -1,20 +1,19 @@ -<% global.title = "Legal portal"; %> +<% global.title = lang.legal.page; %> <%- include(`${private}/header.ejs`) %> -← Go back home +← <%- lang.global.back %>
-

Legal Portal

-

This is the page where all legal documents are posted. All the content is signed using a GPG key, it's very important - that you check for the validity of the legal content you see on this website, as it may have been compromised.

+

<%- lang.legal.intro.title %>

+

<%- lang.legal.intro.description %>

- Click here to view my GPG public key (also get it from: Git, <%- lang.legal.intro.pubkey.text %> (<%- lang.legal.intro.pubkey.other %> Git, CDN) - Fingerprint: AEA7 73DB 0620 C57C FFB0 7A91 EFBD C684 35A5 + <%- lang.legal.intro.pubkey.fingerprint %> AEA7 73DB 0620 C57C FFB0 7A91 EFBD C684 35A5 74B7
 -----BEGIN PGP PUBLIC KEY BLOCK-----
@@ -94,11 +93,11 @@ t57Xl7Bb4NLwkD8v+gZillka+3NaYKbaQc9arUMiOWVrKKbAL+60YzlQKe2uHArX
 
 
-

Legal Notices

-

This website is developed, managed and hosted by:

+

<%- lang.legal.notices.title %>

+

<%- lang.legal.notices.content.intro %>

    -
  • Developed and edited by Minteck
  • -
  • Server managed by Minteck +
  • <%- lang.legal.notices.content.developer %>
  • +
  • <%- lang.legal.notices.content.management %>
    • Loiret
      Centre Val-de-Loire
      @@ -106,7 +105,7 @@ t57Xl7Bb4NLwkD8v+gZillka+3NaYKbaQc9arUMiOWVrKKbAL+60YzlQKe2uHArX
  • -
  • Internet access managed by Orange SAS (RCS Nanterre 380 129 866) +
  • <%- lang.legal.notices.content.isp %> Orange SAS (RCS Nanterre 380 129 866)
    • 111, quai du Président Roosevelt
      92130 ISSY-LES-MOULINEAUX
      @@ -119,184 +118,45 @@ t57Xl7Bb4NLwkD8v+gZillka+3NaYKbaQc9arUMiOWVrKKbAL+60YzlQKe2uHArX
    -
    - GPG signed: Legal Notices -
    ------BEGIN PGP SIGNED MESSAGE-----
    -Hash: SHA256
    -
    -Minteck.org Legal Notices
    -=========================
    -
    -This website is developed, managed and hosted by:
    -
    -* Developed and edited by Minteck
    -* Server managed by Minteck
    -    * Loiret
    -      Centre Val-de-Loire
    -      France
    -* Internet access managed by Orange SAS (RCS Nanterre 380 129 866)
    -    * 111, quai du Président Roosevelt
    -      92130 ISSY-LES-MOULINEAUX
    -      and domiciled for the purposes hereof
    -      1 avenue Nelson Mandela
    -      94745 ARCUEIL
    -    * +33 1 44 44 22 22
    -
    -This message is signed using a GPG key of which you can find the public key on:
    -https://minteck.org/legal/#/pubkey
    ------BEGIN PGP SIGNATURE-----
    -
    -iQGzBAEBCAAdFiEErqdz2wYgxXz/sHqR773GhDWldLcFAmF+1I4ACgkQ773GhDWl
    -dLfi/QwApgJnlscqUbYDeolQjVC++RHlhjYvELHLLCku0S0O20McbRTTMvo+ZRxB
    -ubk5S8zr9Q9/1wBQ4CCqUpRzTLSioIu3tdN7uJp4WVF6YkWofCAih+tRF4NwVNDp
    -pSi7MTzrRH226GRfyb/G6YXcuRXJniJPibt7P7GST2BKyv+lLhIQUaMSwcwWZKzu
    -3i1Hc9tD1r0wLaZdaQivTaO4aLXYpKNW76qCH2hXerKsGArB+SEkC3Ul+AztiQkJ
    -S9BGoVgHUaAA2FUzaw/mFWVeQNu3N1dWw+p+tsnrDulsQwf29601Y1G6scc2A/El
    -GWq3hwWXvJYHG+WXqrw3i3pJN9EGAozV8lc9PicahNd3m/5h2PHdxrRtz+bzeKc0
    -SIwfdsypoMkW1zKMtSki/MAvucg6X6tpLQdGova59bK/1UaKuA0KCVFTIuFc9HA4
    -fQXxQ1KPZBrw0vJ2nTjnOCZOVIt0ikUhHHkvLZ3tsU8cSXOJOwCvacNV42wckCLt
    -SajcnPKI
    -=osNf
    ------END PGP SIGNATURE-----
    -    
    -
    -
    -

    Terms and Conditions

    -

    The following Terms and Conditions apply to the following services:

    +

    <%- lang.legal.tos.title %>

    +

    <%- lang.legal.tos.content[0] %>

      -
    • Minteck Account
    • +
    • <%- lang.legal.tos.content[1] %>
    • Minteck Trunk
    • Kartik Online
    • -
    • UnchainedTech Comments
    • +
    • <%- lang.legal.tos.content[2] %>
    -

    The Minteck services are made of an online authentication service delivered by Minteck that can extend the features - of their - projects (such as Kartik Online). The Minteck Account service is submitted to the following terms of use:

    +

    <%- lang.legal.tos.content[3] %>

    -

    You must not use Minteck Account and any connected application for the following purposes:

    +

    <%- lang.legal.tos.content[4] %>

      -
    • activity that is illegal in France
    • -
    • prevent other users from accessing parts of the service or all the service
    • -
    • try to circumvent security systems and escalate privileges
    • -
    • publish private information of another user
    • -
    • achieve a commercial or professional goal
    • +
    • <%- lang.legal.tos.content[5] %>
    • +
    • <%- lang.legal.tos.content[6] %>
    • +
    • <%- lang.legal.tos.content[7] %>
    • +
    • <%- lang.legal.tos.content[8] %>
    • +
    • <%- lang.legal.tos.content[9] %>
    -
    - GPG signed: Terms and Conditions -
    ------BEGIN PGP SIGNED MESSAGE-----
    -Hash: SHA256
    -
    -Minteck.org Terms and Conditions
    -================================
    -
    -The following Terms and Conditions apply to the following services:
    -
    -* Minteck Account
    -* Minteck Trunk
    -* Kartik Online
    -* UnchainedTech Comments
    -
    -The Minteck services are made of an online authentication service
    -delivered by Minteck that can extend the features of their
    -projects (such as Kartik Online). The Minteck Account service is
    -submitted to the following terms of use:
    -
    -You must not use Minteck Account and any connected application for the
    -following purposes:
    -
    -* activity that is illegal in France
    -* prevent other users from accessing parts of the service or all the service
    -* try to circumvent security systems and escalate privileges
    -* publish private information of another user
    -* achieve a commercial or professional goal
    -
    -This message is signed using a GPG key of which you can find the public key on:
    -https://minteck.org/legal/#/pubkey
    ------BEGIN PGP SIGNATURE-----
    -
    -iQGzBAEBCAAdFiEErqdz2wYgxXz/sHqR773GhDWldLcFAmF+1t4ACgkQ773GhDWl
    -dLdYJgwAnyt2y9B0Wm4MOvRKlalS1BGyvCS3mxVOTLiOoatZn6ZVZjzzi2e3hm/k
    -lWU1p3W2j3ZthWoI3oF+6Jvx4TTfIrRbN22162faBw6HB+KUKyZvOZen32tel/yX
    -+w3Hrre1UsO7C2TnIp2Z/t4NPY21P8a+NFYDHwDVRrneC6hjwi1URkn+2H5q4jdw
    -aYPHeg+ewxHNMedW6+hfb5b1Jsx9xMYu0qA4ObOQhtpKoeTtfYh2IsoNSomTIuTg
    -ZRlcDVmbZ+BS+f2J0LmcNPkSf51q8JtcM3Ksd7iCY3OqvV7LVjqXLYd8mPRbjBIa
    -6IMc0f+IKsmxiKvp8I3FRyCLwgW3pW8i5yitlK35YtyJ+SyTnerGtwNjYlkYCZyu
    -KKCIQ92+FrET1tBccDA0wM9Z/CBEdGOrtl01vmlKCjCnhQXN0YwhFaGRil0rrxXZ
    -BnFt6reXJbSS3hTpwtVbWJ/Ygjp9JpVofssXuVhVatWd8gVo3V9YOur7ye0Zuo6H
    -2Qr15MLe
    -=dBYz
    ------END PGP SIGNATURE-----
    -    
    -
    -
    -

    Privacy Policy

    -

    We don't use your data other than to strictly provide the service you want. Period.

    -

    The data we collect is only the data you explicitly give us access to (e.g. via a registration form) is kept for as - long as you choose to keep the data on our servers. Upon deletion by the user, we ensure this data is - removed from all of our servers.

    -

    To enforce laws, we may collect additional data (IP address, URL, timestamps, operating system, browser version) upon - identification of suspicious activity. This data is deleted every year near January. You can require early deletion - of this data if we think there hasn't been any dangerous activity by sending an email to legal@minteck.org

    - -
    - GPG signed: Privacy Policy -
    ------BEGIN PGP SIGNED MESSAGE-----
    -Hash: SHA256
    -
    -Minteck.org Privacy Policy
    -==========================
    -
    -We don't use your data other than to strictly provide the service you want. Period.
    -
    -The data we collect is only the data you explicitly give us access to (e.g. via a
    -registration form) is kept for as long as you choose to keep the data on our
    -servers. Upon deletion by the user, we ensure this data is removed from all of our
    -servers.
    -
    -To enforce laws, we may collect additional data (IP address, URL, timestamps,
    -operating system, browser version) upon identification of suspicious activity. This
    -data is deleted every year near January. You can require early deletion of this data
    -if we think there hasn't been any dangerous activity by sending an email to:
    -legal@minteck.org
    ------BEGIN PGP SIGNATURE-----
    -
    -iQGzBAEBCAAdFiEErqdz2wYgxXz/sHqR773GhDWldLcFAmF+9UsACgkQ773GhDWl
    -dLfjvgv/Q5ZvxcnPfQ6Hr/CTD2BgLq8yd2zRn8/f/zuloNZWNuuUqV9kgbe3GVT5
    -7Bj8nP/XvHW8i7KQOt2ZuMPUEZDpQDrdOjEP79GnGYvq+YpkATk+rKOgS/656GMr
    -mT5o78CFdVptscKqmyq+O4B82W2RmvovTNe4yyDmDeRDNno3XuAuBiS6OK4QMf7d
    -/K4W4LkHmxBaMypimHAqO7UCalTjeRBPPgC/h7/c7c9a/7F+PzAZbtuU8LGNKC4n
    -mzZZhn12Vc8L80DWFPIrXw/FhR9MFqFd8FZ9xVC/g5ann6PUqp+DqXOTTt+rW6BK
    -C9p5lidQBb5Tsb3mn3RZQIpumbuy5WkTQp2goUn/3DQXGj/wLP15oGMcExKoK73J
    -xePZ60AAypxIy01bIxZ6OP5n2evJsqMs2QY+RPbBzZmhtUMFwWMporzfwcCHB6Qx
    -j5jQhAxfCvrbS9RJbN8AQ//Gs+CgW4pIlTn8f0QCYvNS+L3vususfokLRxeTYQFC
    -LjxKOq2a
    -=HIPo
    ------END PGP SIGNATURE-----
    -    
    -
    +

    <%- lang.legal.privacy.title %>

    +

    <%- lang.legal.privacy.content[0] %>

    +

    <%- lang.legal.privacy.content[1] %>

    +

    <%- lang.legal.privacy.content[2].replace("%1", "").replace("%2", "") %>


    -

    Warrant Canary

    -
    - Show warrant canary -
    +

    <%- lang.legal.warrant.title %>

    +
     -----BEGIN PGP SIGNED MESSAGE-----
     Hash: SHA256
     
     Minteck.org Warrant Canary
     ==========================
     
    -As of 2021-11-01, Minteck (minteck.org) <legal@minteck.org>
    +As of 2021-12-01, Minteck (minteck.org) <legal@minteck.org>
     has received no requests from any government agencies.
     
     This message is updated every month between the 1st and 7th
    @@ -306,18 +166,17 @@ This message is signed using a GPG key of which you can find the public key on:
     https://minteck.org/legal/#/pubkey
     -----BEGIN PGP SIGNATURE-----
     
    -iQGzBAEBCAAdFiEErqdz2wYgxXz/sHqR773GhDWldLcFAmF+3J4ACgkQ773GhDWl
    -dLe5Mwv9Exai8UC9N8/6c6yylch2AF6qC1uVDsk1vrzemuIgpbSKffh53p9tdy5E
    -wh6OQr51+F/8c6DW45RkmjR1q6W07n9HIMnYOp/LdhVR+iemRopJ5DF5ppmkIR9T
    -uU++XZ8Sxo/TVdjUo2rCIhk/55Dgg+ZtdR96XqeE4y5VBgYTuQzcjYNHDvVEEiNB
    -k2WmxtUU1aLPrR1E5e+Nt335Kkr3yUTWj2nK793gmAjr2haHC6Xqm3tSTcUBo9qc
    -1Vv7sjoPGgTcd/sDwQPzW7RQXlh5ipuPvnmDY5CGLEvlalME4JDeOQF5IFCDqsh6
    -RWO118Pp/YLjBFh5lpwkwwePIfPnakNA1QlnfVw/25w63es3JZ8TQ6j7W2iGJCjZ
    -SY/iwxOdxypfDQzL8d1mtK1QHPUqwgJSGZdDoXHHpsMwFAvPhgB9T6pFHFGNombK
    -RsSq7z80WAXn2SAZCYLO1tvdUdfxBSOvZadAcjP/PX4Mvy5Lokr0uRp92iCImxLZ
    -9Try1VLC
    -=+ld4
    +iQGzBAEBCAAdFiEErqdz2wYgxXz/sHqR773GhDWldLcFAmGn6UoACgkQ773GhDWl
    +dLfQJwv+NJhVqG/76EQEukj1i/roC4FCXWEYnQEWpS09NjnE9sFXF6F69TLpilJU
    +iJO8P8gSRlMAxFXYNrW/vscGqNfCru+DQyzaqYAijTk+aY429hZgm6t6R+c28Mn3
    +jjRE+wBHisE3cvWUqUt5rxKdgMmzTK/aVDUsoYp6IxDCmtpRajhVaylgHZ9iSVgh
    +DxfpYCEWD4kTKMcUUJz5ytIMHphQHDA9/L0D4ixQrqil/38nbrjFrNP0i7puXxMg
    +sZ0FXd+gsvg03BHWzJzJNuLJJ1+kv1gt3Ng7X36uF0gtzF4xUvv8SU4o6Jsv6xjy
    +Vs38e+c9DWn4BPlZH7Y2z1i1/tZPEADJysC3yCRnbYZ461mehGtbQkAsIpWyG0n2
    +kOmxOAB18MKNzdcxbssLgJge5l4bu3NnFYw08+Wm4YPJEU85uQJ/b9rlYY35qq8+
    +iQJ0/WHIR7vyMlizI75E+rEoJ3UvpbUgKD4qDlynD46SiMMawv1gNZ6Vh3B6Hdo3
    +ADIB0mxm
    +=CJH7
     -----END PGP SIGNATURE-----
     
    -
    <%- include(`${private}/footer.ejs`) %> \ No newline at end of file diff --git a/htdocs/public/metranslator/api/index.ejs b/htdocs/public/metranslator/api/index.ejs new file mode 100644 index 0000000..47800bd --- /dev/null +++ b/htdocs/public/metranslator/api/index.ejs @@ -0,0 +1,33 @@ +<% + + res.writeHead(200, {'Content-Type': "application/json"}); + + if (get['t']) { + if (get['t'] === "en") { + target = "en"; + } else { + target = "mt"; + } + } else { + res.end(); + } + + if (get['u']) { + text = get['u']; + + if (text.length > 500) { + res.end(); + } + + text = text.split("\"").join("''"); + } else { + res.end(); + } + + aw = JSON.parse(child_process.execSync(`cd /mnt/metranslator-api && node index.js api ${target} "${text}"`).toString()); + last = child_process.execSync("cd /mnt/metranslator-api && git log -1 --pretty=format:'%an'") + aw["system"]["version"] = aw["system"]["version"] + "-" + fs.readFileSync("/mnt/metranslator-api/.git/refs/heads/trunk").toString().substr(0, 8); + aw["system"]["last_author"] = last; + aw["call"] = "cd /mnt/metranslator-api && node index.js api {$target} \"{$text}\""; + + %><%- JSON.stringify(aw); %> \ No newline at end of file diff --git a/htdocs/public/metranslator/index.ejs b/htdocs/public/metranslator/index.ejs new file mode 100644 index 0000000..943d772 --- /dev/null +++ b/htdocs/public/metranslator/index.ejs @@ -0,0 +1,194 @@ +<% global.title = "MeTranslator"; %> +<%- include(`${private}/header.ejs`) %> + +← <%- lang.global.back %> + +
    + +
    + + +

    Metroz Translate

    +

    💡 Click one of the languages to invert

    +
    +
    +

    + English

    + + +
    +
    +

    + Metroz

    +
    + +
    +
    +
    + No facts available about this text +
    + +
    + Translator Insights +
      +
    • Database Name: n/a
    • +
    • Database Version: n/a
    • +
    • Database Size: n/a
    • +
    • Processing Time: n/a
    • +
    +
    +
    + + +<%- include(`${private}/footer.ejs`) %> \ No newline at end of file diff --git a/htdocs/public/projects/index.ejs b/htdocs/public/projects/index.ejs deleted file mode 100644 index 88749f9..0000000 --- a/htdocs/public/projects/index.ejs +++ /dev/null @@ -1,35 +0,0 @@ -<% global.title = "Projects"; %> -<%- include(`${private}/header.ejs`) %> - -← Go back home - -
    - -

    Projects

    -

    This is the page where all my active projects are, it is regularly updated from the projects I created on source.minteck.org. For projects I don't maintain - anymore, refer to the Archives page.

    - -
    - <% for (let project of JSON.parse(fs.readFileSync(serverRoot + "/global/gitea.json").toString()).sort((a, b) => a.update - b.update).reverse()) { %> -
    - "> -

    <%- project.name %>

    -

    <%- project.description %>

    -

    - <% if (project.website !== null) { %> - Website - View - <% } else { %> - View - <% } %> -

    -
    - <% } %> -
    - -<%- include(`${private}/footer.ejs`) %> \ No newline at end of file -- cgit