Newer
Older
(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) !== "/" ? "/" : ""
build: {
protected_dirs: ["assets", "style", "articles"],
default_meta_keys: ["title", "description", "image", "open_graph", "json_ld"],
images_url: `${getServerUrl()}assets/images/`,
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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";
const objectHtmlRenderer = require("object-to-html-renderer")
class ImageCarousel {
constructor(props) {
this.props = props;
this.id = performance.now();
this.state = {
showImageIndex: 0,
};
this.RUN_INTERVAL = 5000;
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
}
run() {
this.runningInterval = setInterval(() => {
let { showImageIndex } = this.state;
const { images } = this.props;
this.state.showImageIndex = showImageIndex < images.length - 1 ? ++showImageIndex : 0;
this.refreshImage();
}, this.RUN_INTERVAL);
}
setImageIndex(i) {
clearInterval(this.runningInterval);
this.state.showImageIndex = i;
this.refreshImage();
}
refreshImage() {
objectHtmlRenderer.subRender(this.render(), document.getElementById(this.id), {
mode: "replace",
});
}
render() {
const { showImageIndex } = this.state;
const { images } = this.props;
return {
tag: "div",
id: this.id,
class: "image-carousel",
contents: [
alt: `image carousel ${images[showImageIndex].replace(/\.[A-Za-z]+/, "")}`,
src: images[showImageIndex],
},
images.length > 1 && {
tag: "div",
class: "carousel-bullets",
contents: images.map((_, i) => {
const active = showImageIndex === i;
return {
tag: "span",
class: `bullet ${active ? "active" : ""}`,
onclick: this.setImageIndex.bind(this, i),
};
}),
},
],
};
}
}
module.exports = ImageCarousel;
},{"object-to-html-renderer":3}],5:[function(require,module,exports){
"use strict";
class KuadradoValues {
render() {
return {
tag: "section",
class: "kuadrado-values",
contents: [
{
tag: "div",
class: "page-contents-center",
contents: [
{
tag: "h2",
contents: "<blue>Éthique</blue>",
},
{
tag: "ul",
class: "values-list",
contents: [
"<emoji>📖</emoji> <blue>Partage des connaissances</blue>",
`Pour sortir de l'élitisme de l'ingénierie, pour sortir de la domination par l'obscurantisme et de la consommation aveugle,
pour aller plus loin ensemble, le partage du savoir est fondamental.`,
],
"<emoji>💻</emoji> <blue>Logiciels libres et open source</blue>",
`Toutes mes productions numériques, jeux vidéo, web, software, sont
<b><a href="https://fr.wikipedia.org/wiki/Logiciel_libre" target="_blank">libres et open source</a></b>.
<br/> ainsi que les outils engagés dans leur fabrication.`,
`Nous vivons une époque ou l'utilisation de la technologie connaît une croissance exponentielle notament
à travers internet.
<br/>Il est primordial de construire le numérique dans une direction de légèreté et d'économie de
ressources.`,
],
].map(v => {
const [title, body] = v;
return {
tag: "li",
contents: [
{ tag: "h3", contents: title },
{ tag: "p", contents: body },
],
};
}),
},
],
},
],
};
}
}
module.exports = KuadradoValues;
},{}],6:[function(require,module,exports){
const objectHtmlRenderer = require("object-to-html-renderer");
const ImageCarousel = require("../generic-components/image-carousel");
const { loadArticles, getArticleDate, getArticleBody } = require("../lib/article-utils");
class NewsArticles {
constructor() {
this.id = performance.now().toString();
this.state = {
loading: true,
articles: [],
showArticleIndex: -1,
};
this.loadArticles();
}
loadArticles() {
this.state.articles = articles;
this.state.showArticleIndex = this.state.articles.length - 1;
this.refresh();
});
}
refresh() {
objectHtmlRenderer.subRender(this.render(), document.getElementById(this.id), {
mode: "replace",
});
}
renderArticle(articleData) {
return {
tag: "article",
class: `${articleData.images ? "grid-2" : "grid-1"}`,
contents: [
{
tag: "time",
property: "datePublished",
contents: getArticleDate(articleData.date),
},
],
},
{
tag: "div",
class: "title",
contents: [
{
tag: "h3",
contents: articleData.title,
},
],
},
{
tag: "div",
class: "subtitle",
contents: [
{
tag: "strong",
contents: articleData.subtitle,
},
],
},
{
tag: "div",
class: "body",
contents: [
{
tag: "p",
articleData.images &&
new ImageCarousel({
images: articleData.images.map(img => `${articleData.path}/images/${img}`),
}).render(),
],
};
}
renderArticlePlaceholder() {
return {
tag: "article",
contents: [
{ tag: "div", class: "date" },
{ tag: "div", class: "title" },
{ tag: "div", class: "subtitle" },
{ tag: "div", class: "body" },
{ tag: "div", class: "image-carousel" },
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
],
};
}
handleChangeArticle(dir) {
let { showArticleIndex, articles } = this.state;
showArticleIndex =
dir === "prev"
? showArticleIndex - 1 >= 0
? showArticleIndex - 1
: 0
: showArticleIndex + 1 <= articles.length - 1
? showArticleIndex + 1
: articles.length - 1;
this.state.showArticleIndex = showArticleIndex;
this.refresh();
}
render() {
const { articles, showArticleIndex } = this.state,
showNext = showArticleIndex < articles.length - 1,
showPrev = showArticleIndex > 0;
return {
tag: "div",
id: this.id,
class: "articles-displayer page-contents-center",
contents:
articles.length > 0
? [
this.renderArticle(articles[showArticleIndex]),
{
tag: "div",
class: "prev-next-buttons",
contents: [
{
tag: "button",
class: `prev-btn ${!showPrev ? "disabled" : "active"}`,
contents: "Précédent",
onclick: this.handleChangeArticle.bind(this, "prev"),
},
{
tag: "button",
class: `next-btn ${!showNext ? "disabled" : "active"}`,
contents: "Suivant",
onclick: this.handleChangeArticle.bind(this, "next"),
},
],
},{"../../constants":2,"../generic-components/image-carousel":4,"../lib/article-utils":10,"object-to-html-renderer":3}],7:[function(require,module,exports){
"use strict";
const { images_url } = require("../../constants");
class ThemeCard {
constructor(props) {
this.props = props;
}
render() {
return {
tag: "a",
class: "theme-card",
href: this.props.href,
contents: [
{
tag: "div",
class: "card-img",
contents: [{ tag: "img", alt:`thematic image ${this.props.img.replace(/\.[A-Za-z]+/, "")}`,src: `${images_url}${this.props.img}` }],
},
{
tag: "div",
class: "card-title",
contents: [{ tag: "h2", class: "section-title", contents: this.props.title }],
},
{
tag: "div",
class: "card-description",
contents: [{ tag: "p", contents: this.props.description }],
},
],
};
}
}
module.exports = ThemeCard;
},{"../../constants":2}],8:[function(require,module,exports){
class WhoAmI {
render() {
return {
tag: "section",
contents: [
{
tag: "div",
class: "page-contents-center",
contents: [
{
tag: "h2",
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
},
{
tag: "div",
class: "presentation-card",
contents: [
{
tag: "div",
class: "header",
contents: [
{
tag: "div",
class: "pic",
contents: [
{
tag: "img",
alt:
"portrait Pierre Jarriges pixel art by Lucie Ventadour",
src: "assets/images/pijar_profile_lt_square.png",
},
],
},
{
tag: "div",
class: "header-text",
contents: [
{
tag: "h3",
contents: "Pierre Jarriges",
},
{
tag: "h4",
contents:
"Artiste, auteur BD, compositeur, développeur informatique",
},
{
tag: "strong",
contents:
"Créateur de <blue>Kuadrado Software</blue> en Février 2021.",
},
],
},
],
},
{
tag: "div",
class: "body",
contents: [
{
tag: "p",
contents: `
“ La création de <b><blue>Kuadrado Software</blue></b> vient de la volonté de développer différents axes ensembles :
<emoji>🎮</emoji> D'une part exprimer une passion en créant des <b>jeux vidéo indépendants</b> sur un modèle léger et artisanal dans
une identité artistique forte, et de les distribuer sans compromission par une logique du marché ;
en effet, partir à la conquête du marché à dos de startup n'est pas l'objectif de Kuadrado Software. Il s'agit
avant tout de se donner les moyens de partager avec le monde une idée de liberté, de partage et de plaisir de
créer des choses simples.
<br /><br />
<emoji>💡</emoji> D'autre part il s'agit aussi de porter un <b>projet pédagogique</b> autour de la création de jeu vidéo, et
plus largement de la vulgarisation numérique. Le partage de connaissances et l'apprentissage collectif étant pour
moi l'instrument le plus efficace de lutte contre l'élitisme, contre le cloisonnement face à la technologie
(et donc à sa surconsommation), et tout simplement un moyen d'ouverture vers les autres.
<br /><br />
À l'heure d'aujourd'hui Kuadrado Software est construit sur un modèle d'auto-entreprise.
<br />
Cependant le but n'est pas de tout développer seul, il s'agit bien de pouvoir à terme rassembler plusieurs énergies
dans le même état d'esprit, former des équipes de travail et de création, et s'inscrire dans un tissu
local de savoir-faire, tout en gardant un modèle d'entreprise basé sur l'indépendance, afin de rester aussi léger, libéral,
et modulaire que possible.”
`,
},
],
},
],
},
],
},
],
};
}
}
module.exports = WhoAmI;
},{}],9:[function(require,module,exports){
const KuadradoValues = require("./home-page-components/kuadrado-values");
const NewsArticles = require("./home-page-components/news-articles");
const ThemeCard = require("./home-page-components/theme-card");
const WhoAmI = require("./home-page-components/whoami");
{
tag: "div",
class: "big-logo page-contents-center",
contents: [
src: `${images_url}logo_kuadrado_txt.svg`,
{ tag: "h1", contents: "Kuadrado Software", class: "page-contents-center" },
{
tag: "p",
class: "page-contents-center",
contents: `Créations numériques, jeux vidéo, pédagogie.`,
contents: ["Simplicité", "Légèreté", "Écologie"].map(word => {
return {
tag: "li",
contents: [{ tag: "span", contents: word }],
};
}),
},
class: "page-contents-center poles",
"Créations vidéoludiques, jeux web et jeux PC, projets en cours.",
description: `S'approprier la technologie par le partage de connaissances.`,
{
title: "Software",
img: "meca_proc.svg",
href: "/software-development/",
description: `R&D, projets expérimentaux, web et outillage logiciel`,
},
class: "page-philo",
contents: [
{
tag: "p",
class: "page-contents-center",
contents: `Travailler pour le plaisir de créer, de maîtriser et de comprendre.`,
class: "page-contents-center",
id:"news",
{ tag: "h2", contents: "Actu", class: "section-title" },
],
};
}
}
module.exports = HomePage;
},{"../constants":2,"./home-page-components/kuadrado-values":5,"./home-page-components/news-articles":6,"./home-page-components/theme-card":7,"./home-page-components/whoami":8,"./lib/web-page":12}],10:[function(require,module,exports){
"use strict";
const { fetchjson, fetchtext } = require("./fetch");
function getArticleBody(text) {
}
function getArticleDate(date) {
return `${date.getDate()}-${date.getMonth() + 1}-${date.getFullYear()}`;
}
function loadArticles(dir_url) {
return new Promise((resolve, reject) => {
fetchjson(`${dir_url}/index.json`)
.then(json => {
Promise.all(
json.articles.map(async artDir => {
const artPath = `${artDir}/${artDir}.json`;
const art = await fetchjson(`${dir_url}/${artPath}`);
const tmpSplit = artPath.split("/");
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
tmpSplit.pop();
const absArtPath = `${dir_url}/${tmpSplit.join("/")}`;
return Object.assign(art, { path: absArtPath });
})
)
.then(articles => {
populateArticles(articles)
.then(completeArticles => resolve(completeArticles))
.catch(e => reject(e));
})
.catch(e => reject(e));
})
.catch(e => console.log(e));
});
}
function populateArticles(articles) {
return new Promise((resolve, reject) => {
Promise.all(
articles.map(async article => {
if (article.body.indexOf("<file>") !== -1) {
const txtPath = article.body.replace("<file>", "");
const textValue = await fetchtext(`${article.path}/${txtPath}`);
article.body = textValue;
article.date = article.date ? new Date(article.date) : undefined;
}
return article;
})
)
.then(completeArticles => resolve(completeArticles.sort((a, b) => a.date - b.date)))
.catch(e => reject(e));
});
}
module.exports = {
loadArticles,
getArticleBody,
getArticleDate,
populateArticles,
};
},{"./fetch":11}],11:[function(require,module,exports){
"use strict";
function fetchjson(url) {
return new Promise((resolve, reject) => {
.then(r => r.json())
.then(r => resolve(r))
.catch(e => reject(e));
});
function fetchtext(url) {
return new Promise((resolve, reject) => {
.then(r => r.text())
.then(r => resolve(r))
.catch(e => reject(e));
});
class WebPage {
constructor(args) {
Object.assign(this, args);
}
}
module.exports = WebPage;
const HomePage = require("./homepage");
const runPage = require("./run-page");
runPage(HomePage);
},{"./homepage":9,"./run-page":14}],14:[function(require,module,exports){
const objectHtmlRenderer = require("object-to-html-renderer")
const template = new Template({ page: new PageComponent() });
objectHtmlRenderer.setRenderCycleRoot(template);
},{"./template/template":16,"object-to-html-renderer":3}],15:[function(require,module,exports){
const { images_url } = require("../../../constants");
{ url: "/games/", text: "Jeux" },
{
url: "/education/",
text: "Pédagogie",
// submenu: [
// { url: "/gamedev", text: "Création de jeux vidéo" },
// ]
},
{ url: "/software-development/", text: "Software" }
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
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",
src: `${images_url}logo_kuadrado_txt.svg`,
renderMenu(menuItemsArray, isSubmenu = false, parentUrl = "") {
contents: menuItemsArray.map(item => {
const { url, text, submenu } = item;
const href = `${parentUrl}${url}`;
return {
tag: "li",
class: !isSubmenu && window.location.pathname === href ? "active" : "",
].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}],16:[function(require,module,exports){
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 ...",
},
],
},
id: "page-container",
contents: [this.props.page.render()],
},
{
tag: "footer",
contents: [
{
tag: "div",
class: "logo",
contents: [
{
tag: "img",
src: `${images_url}logo_kuadrado_txt.svg`,
contents: "32 rue Simon Vialet, 07240 Vernoux en Vivarais. Ardèche, France",
{ tag: "strong", contents: "<blue>Contact : </blue>" },
{
tag: "a",
href: "mailto:contact@kuadrado-software.fr",
contents: "contact@kuadrado-software.fr",
},
],
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
{
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":15}]},{},[13]);