Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
template.js 4.77 KiB
Newer Older
peter_rabbit's avatar
peter_rabbit committed
"use strict";

peter_rabbit's avatar
peter_rabbit committed
const { in_construction } = require("../../config");
peter_rabbit's avatar
peter_rabbit committed
const { images_url } = require("../../constants");
const NavBar = require("./components/navbar");
Pierre Jarriges's avatar
Pierre Jarriges committed
const translator = require("ks-cheap-translator");
const t = translator.trad.bind(translator)
peter_rabbit's avatar
peter_rabbit committed

peter_rabbit's avatar
peter_rabbit committed
class Template {
    constructor(props) {
        this.props = props;
    }
    render() {
        return {
            tag: "main",
            contents: [
                {
                    tag: "header",
                    contents: [new NavBar().render()],
peter_rabbit's avatar
peter_rabbit committed
                },
peter_rabbit's avatar
peter_rabbit committed
                in_construction && {
                    tag: "section",
                    class: "warning-banner",
                    contents: [
                        {
                            tag: "strong",
                            class: "page-contents-center",
Pierre Jarriges's avatar
Pierre Jarriges committed
                            contents: t("Site en construction ..."),
peter_rabbit's avatar
peter_rabbit committed
                        },
                    ],
                },
peter_rabbit's avatar
peter_rabbit committed
                {
peter_rabbit's avatar
peter_rabbit committed
                    tag: "section",
peter_rabbit's avatar
peter_rabbit committed
                    id: "page-container",
                    contents: [this.props.page.render()],
                },
                {
                    tag: "footer",
                    contents: [
peter_rabbit's avatar
peter_rabbit committed
                        {
                            tag: "div",
                            class: "logo",
                            contents: [
                                {
                                    tag: "img",
peter_rabbit's avatar
peter_rabbit committed
                                    alt: `logo Kuadrado`,
                                    src: `${images_url}/logo_kuadrado.svg`,
peter_rabbit's avatar
peter_rabbit committed
                                },
                                {
                                    tag: "img",
peter_rabbit's avatar
peter_rabbit committed
                                    class: "text-logo",
peter_rabbit's avatar
peter_rabbit committed
                                    alt: "Kuadrado Software",
                                    src: `${images_url}/logo_kuadrado_txt.svg`,
peter_rabbit's avatar
peter_rabbit committed
                                },
                            ],
                        },
peter_rabbit's avatar
peter_rabbit committed
                        {
peter_rabbit's avatar
peter_rabbit committed
                            tag: "span",
                            contents: "32 rue Simon Vialet, 07240 Vernoux en Vivarais. Ardèche, France",
peter_rabbit's avatar
peter_rabbit committed
                        },
                        {
                            tag: "div",
                            contents: [
                                { tag: "strong", contents: "<blue>Contact : </blue>" },
peter_rabbit's avatar
peter_rabbit committed
                                {
                                    tag: "a",
                                    href: "mailto:contact@kuadrado-software.fr",
                                    contents: "contact@kuadrado-software.fr",
                                },
                            ],
peter_rabbit's avatar
peter_rabbit committed
                        },
peter_rabbit's avatar
peter_rabbit committed
                        {
                            tag: "div",
                            class: "social",
                            contents: [
                                {
                                    tag: "strong",
Pierre Jarriges's avatar
Pierre Jarriges committed
                                    contents: `<blue>${t("Sur les réseaux")} : </blue>`,
peter_rabbit's avatar
peter_rabbit committed
                                },
                                {
                                    tag: "a",
                                    href: "https://www.linkedin.com/company/kuadrado-software",
                                    target: "_blank",
                                    contents: "in",
                                    title: "Linkedin",
                                },
Pierre Jarriges's avatar
Pierre Jarriges committed
                                {
                                    tag: "a",
                                    href: "https://mastodon.gamedev.place/@kuadrado_software",
                                    target: "_blank",
                                    contents: "m",
                                    title: "Mastodon",
                                }
peter_rabbit's avatar
peter_rabbit committed
                            ],
                        },
                        {
                            tag: "span",
                            contents: `Copyleft 🄯 ${new Date()
peter_rabbit's avatar
peter_rabbit committed
                                .getFullYear()} Kuadrado Software | 
Pierre Jarriges's avatar
Pierre Jarriges committed
                                ${t("kuadrado-footer-copyleft")}`,
peter_rabbit's avatar
peter_rabbit committed
                        },
                        {
                            tag: "div", contents: [
Pierre Jarriges's avatar
Pierre Jarriges committed
                                { tag: "span", contents: t("Ce site web est") + " " },
                                {
                                    tag: "a", target: "_blank",
                                    style_rules: { fontWeight: "bold" },
                                    href: "https://gitlab.com/kuadrado-software/kuadrado-website/-/blob/master/README.md",
                                    contents: "OPEN SOURCE"
                                }
                            ]
                        }
peter_rabbit's avatar
peter_rabbit committed
                    ],
                },
            ],
        };
    }
}

module.exports = Template;