From 9eba329603133cd25e724efd3f248f719599ebdb Mon Sep 17 00:00:00 2001 From: Herwin Bozet Date: Sun, 30 Mar 2025 16:56:43 +0200 Subject: [PATCH] Added basic opengraph support to project and tools pages Update excel-password-remover.yml, iban-generator.yml, and 9 more files... --- data/strings/en/excel-password-remover.yml | 6 ++++- data/strings/en/iban-generator.yml | 4 ++++ data/strings/en/uuid-generator.yml | 1 + data/strings/fr/excel-password-remover.yml | 4 ++++ data/strings/fr/iban-generator.yml | 4 ++++ data/strings/fr/uuid-generator.yml | 1 + data/tools/excel-password-remover.yml | 4 ++-- data/tools/iban-generator.yml | 4 ++-- templates/base_www.jinja | 5 ++++- templates/pages/tools_page.jinja | 26 ++++++++++++++++++++++ templates/projects/_project.jinja | 26 ++++++++++++++++++++++ 11 files changed, 79 insertions(+), 6 deletions(-) diff --git a/data/strings/en/excel-password-remover.yml b/data/strings/en/excel-password-remover.yml index e0b17d6..f3ab0dd 100644 --- a/data/strings/en/excel-password-remover.yml +++ b/data/strings/en/excel-password-remover.yml @@ -2,9 +2,13 @@ meta.title: Excel Password Remover meta.description: >- - Small web page from which you can easily remove a password from an Excel + Small web application from which you can easily remove a password from an Excel worksheet. It works by leaving the task of editing the XML files on an Excel document to your browser instead to keep everything local. +meta.description.light: >- + Small web application from which you can easily remove a password from an Excel + worksheet directly in your browser. + #article.subtitle: >- # +The IBANs are generated completely randomly and may contain a 'BankID' that has not yet been assigned by the +national bank of the respective country." +meta.description.light: "Web application that allows you to generate IBANs in bulk for the 89 countries that support them." country.label: "Country" diff --git a/data/strings/en/uuid-generator.yml b/data/strings/en/uuid-generator.yml index a8e9688..902b7e5 100644 --- a/data/strings/en/uuid-generator.yml +++ b/data/strings/en/uuid-generator.yml @@ -1,6 +1,7 @@ # EN - UUID Generator meta.title: "UUID Generator" +meta.description: "Web application that allows you to generate UUIDs in bulk for all your unique identifier needs." type.label: "UUID Type" diff --git a/data/strings/fr/excel-password-remover.yml b/data/strings/fr/excel-password-remover.yml index 2ed5496..122b658 100644 --- a/data/strings/fr/excel-password-remover.yml +++ b/data/strings/fr/excel-password-remover.yml @@ -6,6 +6,10 @@ meta.description: >- feuille de calcul Excel depuis votre navigateur web sans avoir à uploader le fichier sur internet. Cette application laisse votre navigateur modifier les fichiers XML du fichier Excel afin de tout garder en local. +meta.description.light: >- + Application web qui permet de facilement retirer le mot de passe d'un ficher Excel depuis + votre navigateur web sans avoir à uploader le fichier sur internet. + #article.subtitle: >- # +Les IBANs sont générés complètement aléatoirement et risquent de contenir un 'BankID' qui n'est pas encore attribué +par la banque nationale du pays concerné." +meta.description.light: "Application web qui vous permet de générer des IBANs en masse pour les 89 pays qui les supportent." country.label: "Pays" diff --git a/data/strings/fr/uuid-generator.yml b/data/strings/fr/uuid-generator.yml index 4764856..f27d35d 100644 --- a/data/strings/fr/uuid-generator.yml +++ b/data/strings/fr/uuid-generator.yml @@ -1,6 +1,7 @@ # FR - UUID Generator meta.title: "Générateur d'UUID" +meta.description: "Application web qui vous permet de générer des UUID en masse pour tout vos besoins en identifiants uniques." type.label: "Type d'UUID" diff --git a/data/tools/excel-password-remover.yml b/data/tools/excel-password-remover.yml index 13c9874..41b4a11 100644 --- a/data/tools/excel-password-remover.yml +++ b/data/tools/excel-password-remover.yml @@ -5,10 +5,10 @@ tools: metadata: head: title_key: "meta.title" - description_key: "meta.description" + description_key: "meta.description.light" opengraph: title_key: "meta.title" - description_key: "meta.description" + description_key: "meta.description.light" type: null url: null image_url: "/resources/NibblePoker/images/tools/excel-password-remover/main.png" diff --git a/data/tools/iban-generator.yml b/data/tools/iban-generator.yml index c1f0342..8c6324d 100644 --- a/data/tools/iban-generator.yml +++ b/data/tools/iban-generator.yml @@ -5,10 +5,10 @@ tools: metadata: head: title_key: "meta.title" - description_key: "meta.description" + description_key: "meta.description.light" opengraph: title_key: "meta.title" - description_key: "meta.description" + description_key: "meta.description.light" type: null url: null image_url: "/resources/NibblePoker/images/tools/iban-generator/main.png" diff --git a/templates/base_www.jinja b/templates/base_www.jinja index 162bc48..788a498 100644 --- a/templates/base_www.jinja +++ b/templates/base_www.jinja @@ -21,7 +21,6 @@ {% block extra_preloads %}{% endblock %} - @@ -34,6 +33,10 @@ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> {% block head_title %}{% endblock %} + + {% block opengraph_tags %}{% endblock %} + + {% block extra_head_tags %}{% endblock %} diff --git a/templates/pages/tools_page.jinja b/templates/pages/tools_page.jinja index f3b86bc..2614b53 100644 --- a/templates/pages/tools_page.jinja +++ b/templates/pages/tools_page.jinja @@ -23,6 +23,32 @@ {% endif %} {% endblock %} +{% block opengraph_tags %} + + + + + + + {% if tool_data.metadata.opengraph.image_url is not none %} + + {% if tool_data.metadata.opengraph.image_type is not none %} + + {% endif %} + {% endif %} +{% endblock %} + +{% block extra_head_tags %} + + +{% endblock %} + {% block main_content %} {% if not is_standalone %} {{ render_h1( diff --git a/templates/projects/_project.jinja b/templates/projects/_project.jinja index 85b87c4..a720d79 100644 --- a/templates/projects/_project.jinja +++ b/templates/projects/_project.jinja @@ -13,6 +13,32 @@ {{ l10n(project_data.metadata.general.title_key, project_id, user_lang) }} {% endblock %} +{% block opengraph_tags %} + + + + + + + {% if project_data.metadata.opengraph.image_url is not none %} + + {% if project_data.metadata.opengraph.image_type is not none %} + + {% endif %} + {% endif %} +{% endblock %} + +{% block extra_head_tags %} + + +{% endblock %} + {% block main_content %} {{ render_h1( '' +