diff --git a/public/education/education.js b/public/education/education.js index 9eeb43d49b9309b58c3c90f23d347d6ef5a4a639..9a7ac5221be5d8cd92a331e54e320d963753a5e4 100644 --- a/public/education/education.js +++ b/public/education/education.js @@ -1,13 +1,11 @@ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ function getServerUrl() { - return `${location.origin}${ - location.origin.charAt(location.origin.length - 1) !== "/" ? "/" : "" - }`; + return `${location.origin}${location.origin.charAt(location.origin.length - 1) !== "/" ? "/" : "" + }`; } module.exports = { getServerUrl, - website_title: "Kuadrado website", build: { protected_dirs: ["assets", "style", "articles"], default_meta_keys: ["title", "description", "image", "open_graph", "json_ld"], diff --git a/public/games/games.js b/public/games/games.js index bad4aa73260eff1630a55c8490d503852da649fa..70c035645b1525ab7af82cb14c437b1a0588c79f 100644 --- a/public/games/games.js +++ b/public/games/games.js @@ -1,13 +1,11 @@ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ function getServerUrl() { - return `${location.origin}${ - location.origin.charAt(location.origin.length - 1) !== "/" ? "/" : "" - }`; + return `${location.origin}${location.origin.charAt(location.origin.length - 1) !== "/" ? "/" : "" + }`; } module.exports = { getServerUrl, - website_title: "Kuadrado website", build: { protected_dirs: ["assets", "style", "articles"], default_meta_keys: ["title", "description", "image", "open_graph", "json_ld"], diff --git a/public/main.js b/public/main.js index f599a14a69a84ecba54b6789c9a6c2e609bab7cf..9df16af29673b91b0374f1faac1960149033fde7 100644 --- a/public/main.js +++ b/public/main.js @@ -1,13 +1,11 @@ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ function getServerUrl() { - return `${location.origin}${ - location.origin.charAt(location.origin.length - 1) !== "/" ? "/" : "" - }`; + return `${location.origin}${location.origin.charAt(location.origin.length - 1) !== "/" ? "/" : "" + }`; } module.exports = { getServerUrl, - website_title: "Kuadrado website", build: { protected_dirs: ["assets", "style", "articles"], default_meta_keys: ["title", "description", "image", "open_graph", "json_ld"], diff --git a/public/software-development/software-development.js b/public/software-development/software-development.js index 6fb19123dd2ef3f0b30bfb60889684937ff80b41..6d902af0c325f9a454a26d36bd49d0c5901d3bd8 100644 --- a/public/software-development/software-development.js +++ b/public/software-development/software-development.js @@ -1,13 +1,11 @@ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ function getServerUrl() { - return `${location.origin}${ - location.origin.charAt(location.origin.length - 1) !== "/" ? "/" : "" - }`; + return `${location.origin}${location.origin.charAt(location.origin.length - 1) !== "/" ? "/" : "" + }`; } module.exports = { getServerUrl, - website_title: "Kuadrado website", build: { protected_dirs: ["assets", "style", "articles"], default_meta_keys: ["title", "description", "image", "open_graph", "json_ld"], diff --git a/public/story-logic-app/index.html b/public/story-logic-app/index.html deleted file mode 100644 index 8faa083852bf2134d85778f6e54992554ae14a9c..0000000000000000000000000000000000000000 --- a/public/story-logic-app/index.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<html lang="fr" prefix="og: https://ogp.me/ns#"> - <head> - <meta charset="utf-8" /> - <title>Kuadrado Software | Story Logic</title> - <meta name="description" content="appli pour faire des jeux old school"/> - <meta name="author" content="Kuadrado Software" /> - <meta name="image" content="https://kuadrado-software.fr/assets/images/brain.png"/> - - <!-- Open Graph Protocol meta data --> - <meta property="og:title" content="Kuadrado Software | Story Logic"/> - <meta property="og:description" content="appli pour faire des jeux old school"/> - <meta property="og:type" content="website" /> - <meta property="og:url" content="https://kuadrado-software.fr/story-logic-app"/> - <meta property="og:image" content="https://kuadrado-software.fr/assets/images/brain.png"/> - <meta property="twitter:image" content="https://kuadrado-software.fr/assets/images/brain.png"/> - <meta property="og:locale" content="fr_FR"/> - <meta property="og:site_name" content="Kuadrado Software" /> - - <!-- English translation not ready yet --> - <!-- <meta property="og:locale:alternate" content="en_GB" /> --> - - <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" /> - <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> - <link href="/style/style.css" rel="stylesheet" /> - <script type="application/ld+json">{"@context":"https://schema.org","type":"WebPage","description":"appli pour faire des jeux old school","image":["https://kuadrado-software.fr/assets/images/brain.svg"],"keywords":"","name":"Kuadrado Software - Story Logic","url":"https://kuadrado-software.fr/story-logic-app/"}</script> - </head> - <!-- The vocab attribute defines the standard vocabulary used for RDFa standard. - The DOM may contain properties such as "typeof" and "property" accordinly to the schema.org vocabulary --> - <body vocab="https://schema.org/"> - <!-- The H1 tag will be never seen but it's necessary for SEO --> - <main><h1 style="visibility: hidden">Kuadrado Software | Story Logic</h1></main> - </body> - <script type="text/javascript" src="./story-logic-app.js"></script> -</html> diff --git a/public/story-logic-app/story-logic-app.js b/public/story-logic-app/story-logic-app.js deleted file mode 100644 index b69681d18bd44b4cec1058a97dab77e1950537ee..0000000000000000000000000000000000000000 --- a/public/story-logic-app/story-logic-app.js +++ /dev/null @@ -1,380 +0,0 @@ -(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ -function getServerUrl() { - return `${location.origin}${ - location.origin.charAt(location.origin.length - 1) !== "/" ? "/" : "" - }`; -} - -module.exports = { - getServerUrl, - website_title: "Kuadrado website", - build: { - protected_dirs: ["assets", "style", "articles"], - default_meta_keys: ["title", "description", "image", "open_graph", "json_ld"], - }, -}; - -},{}],2:[function(require,module,exports){ -const { getServerUrl } = require("./config"); - -module.exports = { - images_url: `${getServerUrl()}assets/images/`, - articles_url: `${getServerUrl()}articles/`, -}; - -},{"./config":1}],3:[function(require,module,exports){ -"use strict"; - -module.exports = { - setRenderCycleRoot(renderCycleRoot) { - this.renderCycleRoot = renderCycleRoot; - }, - objectToHtml: function objectToHtml(obj) { - const { tag } = obj; - - const node = document.createElement(tag); - const excludeKeys = ["tag", "contents", "style_rules", "state"]; - - Object.keys(obj) - .filter(attr => !excludeKeys.includes(attr)) - .forEach(attr => { - if (attr === "class") { - node.classList.add(...obj[attr].split(" ").filter(s => s !== "")); - } else { - node[attr] = obj[attr]; - } - }); - if (obj.contents && typeof obj.contents === "string") { - node.innerHTML = obj.contents; - } else { - obj.contents && - obj.contents.length > 0 && - obj.contents.forEach(el => { - switch (typeof el) { - case "string": - node.innerHTML = el; - break; - case "object": - node.appendChild(objectToHtml(el)); - break; - } - }); - } - - if (obj.style_rules) { - Object.keys(obj.style_rules).forEach(rule => { - node.style[rule] = obj.style_rules[rule]; - }); - } - - return node; - }, - renderCycle: function () { - this.subRender(this.renderCycleRoot.render(), document.getElementsByTagName("main")[0], { - mode: "replace", - }); - }, - subRender(object, htmlNode, options = { mode: "append" }) { - const insert = this.objectToHtml(object); - switch (options.mode) { - case "append": - htmlNode.appendChild(insert); - break; - case "override": - htmlNode.innerHTML = ""; - htmlNode.appendChild(insert); - break; - case "insert-before": - htmlNode.insertBefore(insert, htmlNode.childNodes[options.insertIndex]); - break; - case "adjacent": - /** - * options.insertLocation must be one of: - * - * afterbegin - * afterend - * beforebegin - * beforeend - */ - htmlNode.insertAdjacentHTML(options.insertLocation, insert); - break; - case "replace": - htmlNode.parentNode.replaceChild(insert, htmlNode); - break; - case "remove": - htmlNode.remove(); - break; - } - }, -}; - -},{}],4:[function(require,module,exports){ -"use strict"; - -class WebPage { - constructor(args) { - Object.assign(this, args); - } -} - -module.exports = WebPage; -},{}],5:[function(require,module,exports){ -"use strict"; - -// const { images_url } = require("../../../constants"); -const WebPage = require("../../lib/web-page"); - - -class StoryLogicApp extends WebPage { - render() { - return { - tag: "div", - id: "story-logic-app", - contents: [ - { tag: "strong", contents: "yup" } - ], - }; - } -} - -module.exports = StoryLogicApp; - -},{"../../lib/web-page":4}],6:[function(require,module,exports){ -"use strict"; -const runPage = require("../../run-page"); -const StoryLogicApp = require("./story-logic-app"); -runPage(StoryLogicApp); - -},{"../../run-page":7,"./story-logic-app":5}],7:[function(require,module,exports){ -"use strict"; - -const objectHtmlRenderer = require("object-to-html-renderer") -const Template = require("./template/template"); - -module.exports = function runPage(PageComponent) { - const template = new Template({ page: new PageComponent() }); - objectHtmlRenderer.setRenderCycleRoot(template); - objectHtmlRenderer.renderCycle(); -}; - -},{"./template/template":9,"object-to-html-renderer":3}],8:[function(require,module,exports){ -"use strict"; - -const { images_url } = require("../../../constants"); - -const NAV_MENU_ITEMS = [ - { url: "/games/", text: "Jeux" }, - { - url: "/education/", - text: "Pédagogie", - // submenu: [ - // { url: "/gamedev", text: "Création de jeux vidéo" }, - // ] - }, - { url: "/software-development/", text: "Software" } -]; - -class NavBar { - constructor() { - this.initEventHandlers(); - } - - handleBurgerClick() { - document.getElementById("nav-menu-list").classList.toggle("responsive-show"); - } - - initEventHandlers() { - window.addEventListener("click", event => { - if ( - event.target.id !== "nav-menu-list" && - !event.target.classList.contains("burger") && - !event.target.parentNode.classList.contains("burger") - ) { - document.getElementById("nav-menu-list").classList.remove("responsive-show"); - } - }); - } - - renderHome() { - return { - tag: "div", - class: "home", - contents: [ - { - tag: "a", - href: "/", - contents: [ - { - tag: "img", - alt: "Logo Kuadrado", - src: `${images_url}logo_kuadrado.svg`, - }, - { - tag: "img", - alt: "Kuadrado Software", - class: "logo-text", - src: `${images_url}logo_kuadrado_txt.svg`, - }, - ], - }, - ], - }; - } - - renderMenu(menuItemsArray, isSubmenu = false, parentUrl = "") { - return { - tag: "ul", - id: "nav-menu-list", - class: isSubmenu ? "submenu" : "", - contents: menuItemsArray.map(item => { - const { url, text, submenu } = item; - const href = `${parentUrl}${url}`; - return { - tag: "li", - class: !isSubmenu && window.location.pathname === href ? "active" : "", - contents: [ - { - tag: "a", - href, - contents: text, - }, - ].concat(submenu ? [this.renderMenu(submenu, true, url)] : []), - }; - }), - }; - } - - renderResponsiveBurger() { - return { - tag: "div", - class: "burger", - onclick: this.handleBurgerClick.bind(this), - contents: [{ tag: "span", contents: "···" }], - }; - } - - render() { - return { - tag: "nav", - contents: [ - this.renderHome(), - this.renderResponsiveBurger(), - this.renderMenu(NAV_MENU_ITEMS), - ], - }; - } -} - -module.exports = NavBar; - -},{"../../../constants":2}],9:[function(require,module,exports){ -"use strict"; - -const { in_construction } = require("../../config"); -const { images_url } = require("../../constants"); -const NavBar = require("./components/navbar"); - -class Template { - constructor(props) { - this.props = props; - } - render() { - return { - tag: "main", - contents: [ - { - tag: "header", - contents: [new NavBar().render()], - }, - in_construction && { - tag: "section", - class: "warning-banner", - contents: [ - { - tag: "strong", - class: "page-contents-center", - contents: "Site en construction ...", - }, - ], - }, - { - tag: "section", - id: "page-container", - contents: [this.props.page.render()], - }, - { - tag: "footer", - contents: [ - { - tag: "div", - class: "logo", - contents: [ - { - tag: "img", - alt: `logo Kuadrado`, - src: `${images_url}logo_kuadrado.svg`, - }, - { - tag: "img", - class: "text-logo", - alt: "Kuadrado Software", - src: `${images_url}logo_kuadrado_txt.svg`, - }, - ], - }, - { - tag: "span", - contents: "32 rue Simon Vialet, 07240 Vernoux en Vivarais. Ardèche, France", - }, - { - tag: "div", - contents: [ - { tag: "strong", contents: "<blue>Contact : </blue>" }, - { - tag: "a", - href: "mailto:contact@kuadrado-software.fr", - contents: "contact@kuadrado-software.fr", - }, - ], - }, - { - tag: "div", - class: "social", - contents: [ - { - tag: "strong", - contents: "<blue>Sur les réseaux : </blue>", - }, - { - tag: "a", - href: "https://www.linkedin.com/company/kuadrado-software", - target: "_blank", - contents: "in", - title: "Linkedin", - }, - { - tag: "a", - href: "https://twitter.com/KuadradoSoft", - target: "_blank", - contents: "t", - title: "Twitter", - style_rules: { fontFamily: "serif" }, - }, - ], - }, - { - tag: "span", - contents: `Copyright © ${new Date() - .getFullYear()} Kuadrado Software | - Toutes les images du site ont été réalisées par mes soins et peuvent être réutilisées pour un usage personnel.`, - }, - ], - }, - ], - }; - } -} - -module.exports = Template; - -},{"../../config":1,"../../constants":2,"./components/navbar":8}]},{},[6]); diff --git a/src/pages/story-logic-app/index.js b/src/pages/story-logic-app/index.js deleted file mode 100644 index 8873a8a2081c2e752e80ff1d1073667ae584da26..0000000000000000000000000000000000000000 --- a/src/pages/story-logic-app/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -const runPage = require("../../run-page"); -const StoryLogicApp = require("./story-logic-app"); -runPage(StoryLogicApp); diff --git a/src/pages/story-logic-app/meta.json b/src/pages/story-logic-app/meta.json deleted file mode 100644 index cfbb96579d126cbedce0a6ed980f92b4c62fe4df..0000000000000000000000000000000000000000 --- a/src/pages/story-logic-app/meta.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "Kuadrado Software | Story Logic", - "description": "appli pour faire des jeux old school", - "image": "https://kuadrado-software.fr/assets/images/brain.png", - "open_graph": { - "title": "Kuadrado Software | Story Logic", - "description": "appli pour faire des jeux old school" - }, - "json_ld": { - "@context": "https://schema.org", - "type": "WebPage", - "description": "appli pour faire des jeux old school", - "image": [ - "https://kuadrado-software.fr/assets/images/brain.svg" - ], - "keywords": "", - "name": "Kuadrado Software - Story Logic", - "url": "https://kuadrado-software.fr/story-logic-app/" - } -} \ No newline at end of file diff --git a/src/pages/story-logic-app/story-logic-app.js b/src/pages/story-logic-app/story-logic-app.js deleted file mode 100644 index e2c2c923749d2295e4b2f7cb33c1b9f93aa6fa25..0000000000000000000000000000000000000000 --- a/src/pages/story-logic-app/story-logic-app.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -// const { images_url } = require("../../../constants"); -const WebPage = require("../../lib/web-page"); - - -class StoryLogicApp extends WebPage { - render() { - return { - tag: "div", - id: "story-logic-app", - contents: [ - { tag: "strong", contents: "yup" } - ], - }; - } -} - -module.exports = StoryLogicApp; diff --git a/src/pages/story-logic-app/story-logic-app.scss b/src/pages/story-logic-app/story-logic-app.scss deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000