diff --git a/docker-compose.yml b/docker-compose.yml index fe086bd5a21c5d46949849e06df4159b55b49a98..f0b4c2a685c94dda7e55fb727f9bf5afdb0d4041 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,11 +12,11 @@ services: - ./data/nginx:/etc/nginx/conf.d - ./data/certbot/conf:/etc/letsencrypt - ./data/certbot/www:/var/www/certbot - command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"''' + command: /bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"' certbot: image: certbot/certbot restart: unless-stopped volumes: - - ./data/certbot/conf:/etc/letsencrypt - - ./data/certbot/www:/var/www/certbot - entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" + - ./data/certbot/conf:/etc/letsencrypt + - ./data/certbot/www:/var/www/certbot + entrypoint: /bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;' diff --git a/public/articles/software/index.json b/public/articles/software/index.json index 62342bec242ba5597c7e857abf93d7e93341e41c..cac11b23b91fed1f84290688c8159f814d8f270a 100755 --- a/public/articles/software/index.json +++ b/public/articles/software/index.json @@ -2,7 +2,6 @@ "articles": [ "mentalo", "object-to-html-renderer", - "make_frames", - "watergun" + "make_frames" ] } \ No newline at end of file diff --git a/public/articles/software/make_frames/make_frames.json b/public/articles/software/make_frames/make_frames.json index fa49568c44a988f6c6b129d731acc7cb6e4fa4dc..8042256640b056f288dcd552cea9907f4ac10692 100644 --- a/public/articles/software/make_frames/make_frames.json +++ b/public/articles/software/make_frames/make_frames.json @@ -3,18 +3,28 @@ "date": "2021/02/21", "subtitle": "Outil en ligne de commande de manipulation d'animation", "body": "<file>make_frames.txt", - "technical": { - "stack": ["Rust"], - "license": "GNU-GPL v3", - "repository": "https://gitlab.com/kuadrado-software/make_frames", - "version": "0.1.1" - }, - "images": ["screen_make_frames.png"], + "details": [ + { + "label": "Stack", + "value": "Rust" + }, + { + "label": "License", + "value": "GNU-GPL v3" + }, + { + "label": "Source", + "value": "<a href='https://gitlab.com/kuadrado-software/make_frames' target='_blank'>gitlab.com/kuadrado-software/make_frames</a>" + } + ], + "images": [ + "screen_make_frames.png" + ], "releases": [ { "version": "0.1.1", "platform": "Debian/Ubuntu - amd64", "download": "make_frames_0.1.1_amd64.deb" } - ] -} + ] +} \ No newline at end of file diff --git a/public/articles/software/mentalo/mentalo.json b/public/articles/software/mentalo/mentalo.json index 45d5bd5ebee6284ceb01816c6ab3e0e5c58a0bbc..0da65fbd195d4afeb38a67c65f19e7adff10979f 100755 --- a/public/articles/software/mentalo/mentalo.json +++ b/public/articles/software/mentalo/mentalo.json @@ -1,18 +1,30 @@ { "title": "Mentalo", "date": "2021/07/18", - "subtitle": "Une application pour créer des jeux simples", + "subtitle": "Une application pour développer la logique en créant des jeux.", "body": "<file>mentalo.txt", - "technical": { - "stack": [ - "Javascript", - "Nodejs", - "Sass" - ], - "license": "GNU GPL v3", - "repository": "https://gitlab.com/kuadrado-software/mentalo-app", - "version": "0.1.2" - }, + "details": [ + { + "label": "Stack", + "value": "Javascript, Rust, MongoDb" + }, + { + "label": "License", + "value": "GNU GPL v3 / LGPL" + }, + { + "label": "Source app", + "value": "<a href='https://gitlab.com/kuadrado-software/mentalo-app' target='_blank'>gitlab.com/kuadrado-software/mentalo-app</a>" + }, + { + "label": "Source API", + "value": "<a href='https://gitlab.com/kuadrado-software/mentalo_api' target='_blank'>gitlab.com/kuadrado-software/mentalo_api</a>" + }, + { + "label": "Source applet dessin", + "value": "<a href='https://gitlab.com/kuadrado-software/mentalo-drawing-tool' target='_blank'>gitlab.com/kuadrado-software/mentalo-drawing-tool</a>" + } + ], "images": [ "mental-eau.png" ] diff --git a/public/articles/software/mentalo/mentalo.txt b/public/articles/software/mentalo/mentalo.txt index 1e33e08448d4c3d0e0545819ceb0ec85aebd39ac..c7f0ff2441d63c776ec80fc5569b0ce64bf4bb80 100755 --- a/public/articles/software/mentalo/mentalo.txt +++ b/public/articles/software/mentalo/mentalo.txt @@ -1,2 +1,2 @@ Mentalo est une application éducative qui permet de construire un raisonnement logique à travers la création de jeux simples basés sur des écrans statiques et des choix texte. -Sortie d'une version beta prévue pour Septembre 2021. \ No newline at end of file +Sortie d'une version beta prévue pour Novembre 2021. \ No newline at end of file diff --git a/public/articles/software/object-to-html-renderer/object-to-html-renderer.json b/public/articles/software/object-to-html-renderer/object-to-html-renderer.json index 6ba1fd6f2641fc18da5f6ad838e786722a8193c6..25246b528dfcf507ff7ef33abd3eca5b1db4b29b 100755 --- a/public/articles/software/object-to-html-renderer/object-to-html-renderer.json +++ b/public/articles/software/object-to-html-renderer/object-to-html-renderer.json @@ -3,15 +3,20 @@ "date": "2021/07/18", "subtitle": "Un moteur de rendu web dynamique", "body": "<file>object-to-html-renderer.txt", - "technical": { - "stack": [ - "Javascript", - "Nodejs" - ], - "license": "LGPL-3.0", - "repository": "https://gitlab.com/kuadrado-software/object-to-html-renderer", - "version": "1.0.3" - }, + "details": [ + { + "label": "Stack", + "value": "Javascript, NodeJs" + }, + { + "label": "License", + "value": "LGPL-3.0" + }, + { + "label": "Source", + "value": "<a href='https://gitlab.com/kuadrado-software/object-to-html-renderer' target='_blank'>gitlab.com/kuadrado-software/object-to-html-renderer</a>" + } + ], "images": [ "obj-to-html-logo.png" ] diff --git a/public/articles/software/watergun/images/watergun-overview-light.jpg b/public/articles/software/watergun/images/watergun-overview-light.jpg deleted file mode 100755 index c1a2b7d00ce8e88d0a296f92fc8f305079b837ff..0000000000000000000000000000000000000000 Binary files a/public/articles/software/watergun/images/watergun-overview-light.jpg and /dev/null differ diff --git a/public/articles/software/watergun/watergun.json b/public/articles/software/watergun/watergun.json deleted file mode 100755 index 6bc4d584a8a47cd66515d924a550552c8b1ba0da..0000000000000000000000000000000000000000 --- a/public/articles/software/watergun/watergun.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "title": "Watergun", - "date": "2021/01/23", - "subtitle": "Un éditeur de site web ultra-light", - "body": "<file>watergun.txt", - "technical": { - "stack": ["Javascript", "Node.js", "Electron"], - "license": "Gnu gpl v3", - "repository": "https://gitlab.com/kuadrado-software/watergun-web-editor", - "version": "0.0.1" - }, - "images": ["watergun-overview-light.jpg"] -} diff --git a/public/articles/software/watergun/watergun.txt b/public/articles/software/watergun/watergun.txt deleted file mode 100755 index 99c4098a832c7dfa834c25127809f3617ba075a2..0000000000000000000000000000000000000000 --- a/public/articles/software/watergun/watergun.txt +++ /dev/null @@ -1 +0,0 @@ -Projet expérimental de logiciel de création web fonctionnant entièrement hors ligne et permettant de générer facilement un site web statique très léger, de le déployer en ligne et de le modifier. \ No newline at end of file diff --git a/public/software-development/software-development.js b/public/software-development/software-development.js index ae6fabd073b2df620386cedb93112d55a35a35ff..1d3de9acc5b9e712669044c8abaf8e5d9f5e0ca9 100644 --- a/public/software-development/software-development.js +++ b/public/software-development/software-development.js @@ -109,76 +109,6 @@ module.exports = { },{}],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; - this.props.images.length > 1 && this.run(); - } - - 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: [ - { - tag: "img", - property: "image", - 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"; - const { fetchjson, fetchtext } = require("./fetch"); function getArticleBody(text) { @@ -239,7 +169,7 @@ module.exports = { populateArticles, }; -},{"./fetch":6}],6:[function(require,module,exports){ +},{"./fetch":5}],5:[function(require,module,exports){ "use strict"; function fetchjson(url) { @@ -265,7 +195,7 @@ module.exports = { fetchtext, }; -},{}],7:[function(require,module,exports){ +},{}],6:[function(require,module,exports){ "use strict"; class WebPage { @@ -275,11 +205,10 @@ class WebPage { } module.exports = WebPage; -},{}],8:[function(require,module,exports){ +},{}],7:[function(require,module,exports){ "use strict"; const { articles_url } = require("../../../../constants"); -const ImageCarousel = require("../../../generic-components/image-carousel"); const { loadArticles, getArticleBody, getArticleDate } = require("../../../lib/article-utils"); const objectHtmlRenderer = require("object-to-html-renderer") @@ -289,7 +218,8 @@ class SoftwareArticle { } render() { - const { title, date, body, subtitle, images, path, technical, releases } = this.props; + const { title, body, subtitle, images, path, details = [], releases } = this.props; + return { tag: "article", class: "software-article", @@ -333,74 +263,19 @@ class SoftwareArticle { { tag: "ul", class: "technical-details", - contents: [ - { - tag: "li", - class: "detail", - contents: [ - { tag: "label", contents: "Stack" }, - { - tag: "div", - contents: [ - { - tag: "ul", - contents: technical.stack.map(tech => { - return { - tag: "li", - contents: tech, - property: "about", - }; - }), - }, - ], - }, - ], - }, - { - tag: "li", - class: "detail", - contents: [ - { tag: "label", contents: "Version actuelle" }, - { - tag: "div", - contents: technical.version, - property: "version", - }, - ], - }, - { + contents: details.map(detail => { + return { tag: "li", class: "detail", contents: [ - { tag: "label", contents: "License" }, + { tag: "label", contents: detail.label }, { tag: "div", - contents: technical.license, - property: "license", - }, - ], - }, - { - tag: "li", - class: "detail", - contents: [ - { - tag: "label", - contents: "Code source", - }, - { - tag: "a", - href: technical.repository, - target: "_blank", - contents: technical.repository.replace( - /https?:\/\/(www\.)?/g, - "" - ), - property: "url", + contents: detail.value }, ], - }, - ], + }; + }), }, releases && { tag: "h2", @@ -519,7 +394,7 @@ class SoftwareArticles { module.exports = SoftwareArticles; -},{"../../../../constants":2,"../../../generic-components/image-carousel":4,"../../../lib/article-utils":5,"object-to-html-renderer":3}],9:[function(require,module,exports){ +},{"../../../../constants":2,"../../../lib/article-utils":4,"object-to-html-renderer":3}],8:[function(require,module,exports){ "use strict"; const { images_url } = require("../../../constants"); @@ -568,7 +443,7 @@ class SoftwareDevelopment extends WebPage { module.exports = SoftwareDevelopment; -},{"../../../constants":2,"../../lib/web-page":7,"./components/software-articles":8}],10:[function(require,module,exports){ +},{"../../../constants":2,"../../lib/web-page":6,"./components/software-articles":7}],9:[function(require,module,exports){ "use strict"; "use strict"; @@ -576,7 +451,7 @@ const runPage = require("../../run-page"); const SoftwareDevelopment = require("./software-development"); runPage(SoftwareDevelopment); -},{"../../run-page":11,"./software-development":9}],11:[function(require,module,exports){ +},{"../../run-page":10,"./software-development":8}],10:[function(require,module,exports){ "use strict"; const objectHtmlRenderer = require("object-to-html-renderer") @@ -588,7 +463,7 @@ module.exports = function runPage(PageComponent) { objectHtmlRenderer.renderCycle(); }; -},{"./template/template":13,"object-to-html-renderer":3}],12:[function(require,module,exports){ +},{"./template/template":12,"object-to-html-renderer":3}],11:[function(require,module,exports){ "use strict"; const { images_url } = require("../../../constants"); @@ -698,7 +573,7 @@ class NavBar { module.exports = NavBar; -},{"../../../constants":2}],13:[function(require,module,exports){ +},{"../../../constants":2}],12:[function(require,module,exports){ "use strict"; const { in_construction } = require("../../config"); @@ -800,4 +675,4 @@ class Template { module.exports = Template; -},{"../../config":1,"../../constants":2,"./components/navbar":12}]},{},[10]); +},{"../../config":1,"../../constants":2,"./components/navbar":11}]},{},[9]); diff --git a/src/pages/software-development/components/software-articles.js b/src/pages/software-development/components/software-articles.js index 5ef3c6f61d7249570a5d2adb04bd6c5d7f07b7f9..5be340e2f580bb12593b63ceb0581393f8c79d5d 100644 --- a/src/pages/software-development/components/software-articles.js +++ b/src/pages/software-development/components/software-articles.js @@ -1,7 +1,6 @@ "use strict"; const { articles_url } = require("../../../../constants"); -const ImageCarousel = require("../../../generic-components/image-carousel"); const { loadArticles, getArticleBody, getArticleDate } = require("../../../lib/article-utils"); const objectHtmlRenderer = require("object-to-html-renderer") @@ -11,7 +10,8 @@ class SoftwareArticle { } render() { - const { title, date, body, subtitle, images, path, technical, releases } = this.props; + const { title, body, subtitle, images, path, details = [], releases } = this.props; + return { tag: "article", class: "software-article", @@ -55,74 +55,19 @@ class SoftwareArticle { { tag: "ul", class: "technical-details", - contents: [ - { + contents: details.map(detail => { + return { tag: "li", class: "detail", contents: [ - { tag: "label", contents: "Stack" }, + { tag: "label", contents: detail.label }, { tag: "div", - contents: [ - { - tag: "ul", - contents: technical.stack.map(tech => { - return { - tag: "li", - contents: tech, - property: "about", - }; - }), - }, - ], + contents: detail.value }, ], - }, - { - tag: "li", - class: "detail", - contents: [ - { tag: "label", contents: "Version actuelle" }, - { - tag: "div", - contents: technical.version, - property: "version", - }, - ], - }, - { - tag: "li", - class: "detail", - contents: [ - { tag: "label", contents: "License" }, - { - tag: "div", - contents: technical.license, - property: "license", - }, - ], - }, - { - tag: "li", - class: "detail", - contents: [ - { - tag: "label", - contents: "Code source", - }, - { - tag: "a", - href: technical.repository, - target: "_blank", - contents: technical.repository.replace( - /https?:\/\/(www\.)?/g, - "" - ), - property: "url", - }, - ], - }, - ], + }; + }), }, releases && { tag: "h2",