diff --git a/config.js b/config.js index 6f9f8c6e67e605fb50966548ac9d8a14850daa05..17760e7c9b4d2fc31a156bfc72a559efb9d56b74 100644 --- a/config.js +++ b/config.js @@ -1,12 +1,10 @@ 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 template", build: { protected_dirs: ["assets", "style", "articles"], default_meta_keys: ["title", "description", "image", "open_graph", "json_ld"], diff --git a/public/assets/images/learning_theme_linux.png b/public/assets/images/learning_theme_linux.png index dd16fa85266a9c4433576ed6eef7d46e53be1f85..cebfbf120831c2e66bc217158db173a4443cba84 100755 Binary files a/public/assets/images/learning_theme_linux.png and b/public/assets/images/learning_theme_linux.png differ diff --git a/public/education/education.js b/public/education/education.js index c32aa7968e09d26b0338e6d52c4bca8b7d0aea00..9eeb43d49b9309b58c3c90f23d347d6ef5a4a639 100644 --- a/public/education/education.js +++ b/public/education/education.js @@ -7,7 +7,7 @@ function getServerUrl() { module.exports = { getServerUrl, - website_title: "Kuadrado website template", + website_title: "Kuadrado website", build: { protected_dirs: ["assets", "style", "articles"], default_meta_keys: ["title", "description", "image", "open_graph", "json_ld"], @@ -146,7 +146,7 @@ const EDU_THEMES = [ // pageUrl: "2d", }, { - title: "Maths et physiques", + title: "Maths et physique", description: "Abordez les notions fondamentales de façon décontractée pour le plaisir de comprendre.", image: "learning_theme_math.png", // pageUrl: "math", @@ -162,6 +162,13 @@ const EDU_THEMES = [ description: "Perdu avec votre ordinateur ou votre smartphone, les logiciels, internet ? Je vous aide pas à pas à comprendre les fondamentaux et à utiliser sereinement la technologie.", image: "learning_theme_pc.png", // pageUrl: "popularization" + }, + { + title: "Stage GNU/Linux", + description: `<b>Passez le cap du libre ! </b><br/> + Stage de 4 séances pour installer Linux, faire ses premiers pas avec les logiciels libres et acquérir une autonomie suffisante pour une utilisation basique. + `, + image: "learning_theme_linux.png" } ]; @@ -249,7 +256,7 @@ class EducationPage extends WebPage { tag: "p", class: "info-body", contents: `Les ateliers sont accessibles aux adultes comme aux enfants, plutôt à partir de 12 ans.<br/> - Les séances ont lieu en groupes mixtes. + Les séances ont lieu en groupes mixtes. Capacité limitée à 5 personnes. ` } ] @@ -332,7 +339,7 @@ class EducationPage extends WebPage { tag: "li", contents: [ { tag: "span", contents: "Inscription au mois" }, - { tag: "span", contents: "50€" }, + { tag: "span", contents: "50€, accès à toutes les plages horaires." }, ] }, { @@ -348,6 +355,13 @@ class EducationPage extends WebPage { { tag: "span", contents: "Cours particuliers" }, { tag: "span", contents: "30€/h, sur place ou en visio. Horaires à définir." }, ] + }, + { + tag: "li", + contents: [ + { tag: "span", contents: "Stage 4 séances de 2h" }, + { tag: "span", contents: "40€ par personne, horaires et dates à définir selon la demande." }, + ] } ] } diff --git a/public/games/games.js b/public/games/games.js index f7a742b6b7a7465517360af3195754e4580cbc4d..bad4aa73260eff1630a55c8490d503852da649fa 100644 --- a/public/games/games.js +++ b/public/games/games.js @@ -7,7 +7,7 @@ function getServerUrl() { module.exports = { getServerUrl, - website_title: "Kuadrado website template", + 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 cdb3d0f91d12bf86ded10382cdaaa1b3b85d0bf4..f599a14a69a84ecba54b6789c9a6c2e609bab7cf 100644 --- a/public/main.js +++ b/public/main.js @@ -7,7 +7,7 @@ function getServerUrl() { module.exports = { getServerUrl, - website_title: "Kuadrado website template", + 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 c78fd15fb7381a4d87c21900e1e5d970d9a62d75..6fb19123dd2ef3f0b30bfb60889684937ff80b41 100644 --- a/public/software-development/software-development.js +++ b/public/software-development/software-development.js @@ -7,7 +7,7 @@ function getServerUrl() { module.exports = { getServerUrl, - website_title: "Kuadrado website template", + 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 new file mode 100644 index 0000000000000000000000000000000000000000..8faa083852bf2134d85778f6e54992554ae14a9c --- /dev/null +++ b/public/story-logic-app/index.html @@ -0,0 +1,35 @@ +<!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 new file mode 100644 index 0000000000000000000000000000000000000000..b69681d18bd44b4cec1058a97dab77e1950537ee --- /dev/null +++ b/public/story-logic-app/story-logic-app.js @@ -0,0 +1,380 @@ +(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/public/style/pages/story-logic-app/story-logic-app.css b/public/style/pages/story-logic-app/story-logic-app.css new file mode 100644 index 0000000000000000000000000000000000000000..23d770b3730d719695e5294d4062d406bfa3f9d7 --- /dev/null +++ b/public/style/pages/story-logic-app/story-logic-app.css @@ -0,0 +1,3 @@ + + +/*# sourceMappingURL=story-logic-app.css.map */ diff --git a/public/style/style.css b/public/style/style.css index abc4eaea95f7cd775060e00351dab1466dc2650b..f50842c09183b9676cad9d6baad8869c4654eee6 100644 --- a/public/style/style.css +++ b/public/style/style.css @@ -854,7 +854,7 @@ main #page-container #education-page .edu-themes .edu-theme h3 { color: #00ff00; grid-row: 1; margin: 0; - padding: 0 10px; + padding: 10px; display: flex; align-items: center; border-width: 0 0 0 1px; diff --git a/src/pages/education/education.js b/src/pages/education/education.js index 53c9ac3da0b8b2194d6422a95d9bce3066b6c695..8fe9161cad1b151ce99f03818fd1f1e502d65b5d 100644 --- a/src/pages/education/education.js +++ b/src/pages/education/education.js @@ -25,7 +25,7 @@ const EDU_THEMES = [ // pageUrl: "2d", }, { - title: "Maths et physiques", + title: "Maths et physique", description: "Abordez les notions fondamentales de façon décontractée pour le plaisir de comprendre.", image: "learning_theme_math.png", // pageUrl: "math", @@ -41,6 +41,13 @@ const EDU_THEMES = [ description: "Perdu avec votre ordinateur ou votre smartphone, les logiciels, internet ? Je vous aide pas à pas à comprendre les fondamentaux et à utiliser sereinement la technologie.", image: "learning_theme_pc.png", // pageUrl: "popularization" + }, + { + title: "Stage GNU/Linux", + description: `<b>Passez le cap du libre ! </b><br/> + Stage de 4 séances pour installer Linux, faire ses premiers pas avec les logiciels libres et acquérir une autonomie suffisante pour une utilisation basique. + `, + image: "learning_theme_linux.png" } ]; @@ -128,7 +135,7 @@ class EducationPage extends WebPage { tag: "p", class: "info-body", contents: `Les ateliers sont accessibles aux adultes comme aux enfants, plutôt à partir de 12 ans.<br/> - Les séances ont lieu en groupes mixtes. + Les séances ont lieu en groupes mixtes. Capacité limitée à 5 personnes. ` } ] @@ -211,7 +218,7 @@ class EducationPage extends WebPage { tag: "li", contents: [ { tag: "span", contents: "Inscription au mois" }, - { tag: "span", contents: "50€" }, + { tag: "span", contents: "50€, accès à toutes les plages horaires." }, ] }, { @@ -227,6 +234,13 @@ class EducationPage extends WebPage { { tag: "span", contents: "Cours particuliers" }, { tag: "span", contents: "30€/h, sur place ou en visio. Horaires à définir." }, ] + }, + { + tag: "li", + contents: [ + { tag: "span", contents: "Stage 4 séances de 2h" }, + { tag: "span", contents: "40€ par personne, horaires et dates à définir selon la demande." }, + ] } ] } diff --git a/src/pages/education/education.scss b/src/pages/education/education.scss index c18b3b33638ede8bd16239c340d1a1edcdb6395b..d284dfc40d3e47226193841d2862e08ecfb48887 100644 --- a/src/pages/education/education.scss +++ b/src/pages/education/education.scss @@ -54,7 +54,7 @@ color: $green; grid-row: 1; margin: 0; - padding: 0 10px; + padding: 10px; display: flex; align-items: center; border-width: 0 0 0 1px; diff --git a/src/pages/story-logic-app/index.js b/src/pages/story-logic-app/index.js new file mode 100644 index 0000000000000000000000000000000000000000..8873a8a2081c2e752e80ff1d1073667ae584da26 --- /dev/null +++ b/src/pages/story-logic-app/index.js @@ -0,0 +1,4 @@ +"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 new file mode 100644 index 0000000000000000000000000000000000000000..cfbb96579d126cbedce0a6ed980f92b4c62fe4df --- /dev/null +++ b/src/pages/story-logic-app/meta.json @@ -0,0 +1,20 @@ +{ + "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 new file mode 100644 index 0000000000000000000000000000000000000000..e2c2c923749d2295e4b2f7cb33c1b9f93aa6fa25 --- /dev/null +++ b/src/pages/story-logic-app/story-logic-app.js @@ -0,0 +1,19 @@ +"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 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391