diff --git a/Dockerfile b/Dockerfile index 2d1550e..097a79d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM python:alpine WORKDIR /www ADD ./ ./ -RUN apk add --no-cache cargo +#RUN apk add --no-cache cargo RUN pip install -r requirements.txt RUN pip install gunicorn -ENTRYPOINT ["top", "-b"] +ENTRYPOINT ["python", "-u", "/www/app.py"] diff --git a/app.py b/app.py index a5775e8..b473719 100644 --- a/app.py +++ b/app.py @@ -176,6 +176,7 @@ def route_root(lang: Optional[str]): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, )).replace("> <", "><") @@ -191,6 +192,7 @@ def route_contact(lang: Optional[str]): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, )).replace("> <", "><") @@ -211,6 +213,7 @@ def route_content(lang: Optional[str]): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, requested_tags=requested_tags, )).replace("> <", "><") @@ -237,6 +240,7 @@ def route_content_project(lang: Optional[str], project_id: str): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, error_key=error_key, error_code=error_code, )).replace("> <", "><"), error_code @@ -247,6 +251,7 @@ def route_content_project(lang: Optional[str], project_id: str): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, project_data=get_projects().get(project_id), project_id=project_id, )).replace("> <", "><") @@ -269,6 +274,7 @@ def route_tools_index(lang: Optional[str]): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, requested_tags=requested_tags, )).replace("> <", "><") @@ -295,6 +301,7 @@ def route_tools_page(lang: Optional[str], tool_id: str): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, error_key=error_key, error_code=error_code, )).replace("> <", "><"), error_code @@ -305,6 +312,7 @@ def route_tools_page(lang: Optional[str], tool_id: str): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, tool_data=get_tools().get(tool_id), tool_id=tool_id, applet_data=get_applets().get(get_tools().get(tool_id).applet_id), @@ -322,6 +330,7 @@ def route_about(lang: Optional[str]): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, )).replace("> <", "><") @@ -336,6 +345,7 @@ def route_privacy(lang: Optional[str]): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, )).replace("> <", "><") @@ -350,6 +360,7 @@ def route_links(lang: Optional[str]): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, )).replace("> <", "><") @@ -364,6 +375,7 @@ def route_debug(lang: Optional[str]): raw_lang=lang, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, )).replace("> <", "><") @@ -383,6 +395,7 @@ def handle_exception(e: Exception): raw_lang=DEFAULT_LANG, request_path=request.path, is_standalone="standalone" in request.args, + is_brandless="brandless" in request.args, error_key=str(e.code), error_code=e.code, )).replace("> <", "><"), error_code @@ -398,12 +411,12 @@ if __name__ == '__main__': if os.environ.get('NP_FLASK_WAITRESS', "0") == "1": print("Serving app using waitress.") from waitress import serve - serve(app, host='0.0.0.0', port=5000, threads=64) + serve(app, host='0.0.0.0', port=int(os.environ.get('NP_FLASK_PORT', "5000")), threads=64) else: print("Serving app using default development server.") app.run( host="0.0.0.0", - port=5000, + port=int(os.environ.get('NP_FLASK_PORT', "5000")), debug=True, # debug=False, load_dotenv=False diff --git a/data/projects/web-usb-test.yml b/data/projects/.web-usb-test.yml similarity index 100% rename from data/projects/web-usb-test.yml rename to data/projects/.web-usb-test.yml diff --git a/data/sidebar.yml b/data/sidebar.yml index b1bca51..3b2357a 100644 --- a/data/sidebar.yml +++ b/data/sidebar.yml @@ -6,13 +6,13 @@ - -- title_key: text.articles - abs_href: "/articles/" - icon: fad fa-newspaper - active_id: articles - has_new_until_utc: 0 - -- +#- title_key: text.articles +# abs_href: "/articles/" +# icon: fad fa-newspaper +# active_id: articles +# has_new_until_utc: 0 +# +#- - title_key: text.applications abs_href: "/content/?tags=application;web" diff --git a/data/sitemap.yml b/data/sitemap.yml index 15a665b..92ffc3a 100644 --- a/data/sitemap.yml +++ b/data/sitemap.yml @@ -1,10 +1,16 @@ -# ??? +# Sitemap definition - "/" - "/about/" -- "/articles/" +#- "/articles/" - "/contact/" - "/content/" - "/content/circuitpython-ebyte-e32/" +- "/content/docker-mini-cctv-nvr/" +- "/content/lscom-cli-dotnet/" - "/links/" - "/privacy/" +- "/tools/" +- "/tools/iban-generator/" +- "/tools/excel-password-remover/" +- "/tools/uuid-generator/" diff --git a/data/strings/en/excel-password-remover.yml b/data/strings/en/excel-password-remover.yml index f9cefda..e0b17d6 100644 --- a/data/strings/en/excel-password-remover.yml +++ b/data/strings/en/excel-password-remover.yml @@ -1,6 +1,6 @@ # EN - Excel Password Remover -meta.title: Excel Worksheet Password Remover +meta.title: Excel Password Remover meta.description: >- Small web page from which you can easily remove a password from an Excel worksheet. It works by leaving the task of editing the XML files on an Excel diff --git a/data/strings/fr/contact.json b/data/strings/fr/contact.json deleted file mode 100644 index 346713e..0000000 --- a/data/strings/fr/contact.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "contact.head.title": "Contact - NibblePoker", - "contact.head.description": "TODO: description", - "contact.og.title": "NibblePoker - Contact", - "contact.og.description": "TODO: description", - "contact.header.title": "Contact", - - "contact.email.title": "Courriel", - "contact.email.compose": "Envoyer un courriel à herwin.bozet@gmail.com", - - "contact.twitter.title": "Twitter", - "contact.twitter.compose": "Composer un message privé pour @NibblePoker sur Twitter" - -} \ No newline at end of file diff --git a/data/strings/fr/excel-password-remover.yml b/data/strings/fr/excel-password-remover.yml index 1a7d663..2ed5496 100644 --- a/data/strings/fr/excel-password-remover.yml +++ b/data/strings/fr/excel-password-remover.yml @@ -1,6 +1,6 @@ # FR - Excel Password Remover -_meta.title: '' +meta.title: Excel Password Remover meta.description: >- Petite application web qui permet de facilement retirer le mot de passe d'une feuille de calcul Excel depuis votre navigateur web sans avoir à uploader le diff --git a/data/tools/ico-maker.yml b/data/tools/.ico-maker.yml similarity index 100% rename from data/tools/ico-maker.yml rename to data/tools/.ico-maker.yml diff --git a/data/tools/png-chunk-analyser.yml b/data/tools/.png-chunk-analyser.yml similarity index 100% rename from data/tools/png-chunk-analyser.yml rename to data/tools/.png-chunk-analyser.yml diff --git a/data/tools/png-optimizer.yml b/data/tools/.png-optimizer.yml similarity index 100% rename from data/tools/png-optimizer.yml rename to data/tools/.png-optimizer.yml diff --git a/data/tools/excel-password-remover.yml b/data/tools/excel-password-remover.yml index 412e44f..2af196a 100644 --- a/data/tools/excel-password-remover.yml +++ b/data/tools/excel-password-remover.yml @@ -11,7 +11,7 @@ tools: description_key: "meta.description" type: null url: null - image_url: "/resources/NibblePoker/images/tools/excel-password-remover/excel-password-remover.png" + image_url: "/resources/NibblePoker/images/tools/excel-password-remover/main.png" image_type: null twitter: title_key: "meta.title" @@ -21,11 +21,12 @@ tools: enable: true title_key: "meta.title" preamble_key: "meta.description" - image_url: "/resources/NibblePoker/images/tools/excel-password-remover/excel-password-remover.png" + image_url: "/resources/NibblePoker/images/tools/excel-password-remover/main.png" image_alt_key: "" general: icon: "fad fa-table-cells-column-unlock" title_key: "meta.title" subtitle_key: "article.subtitle" tags: - - "undefined" + - "office" + - "utility" diff --git a/data/tools/iban-generator.yml b/data/tools/iban-generator.yml index c7d281c..aaa0e28 100644 --- a/data/tools/iban-generator.yml +++ b/data/tools/iban-generator.yml @@ -28,4 +28,5 @@ tools: title_key: "meta.title" subtitle_key: "article.subtitle" tags: - - "undefined" + - "generator" + - "finance" diff --git a/data/tools/uuid-generator.yml b/data/tools/uuid-generator.yml index b1fa463..5fc7567 100644 --- a/data/tools/uuid-generator.yml +++ b/data/tools/uuid-generator.yml @@ -11,7 +11,7 @@ tools: description_key: "meta.description" type: null url: null - image_url: "/resources/NibblePoker/images/tools/excel-password-remover/excel-password-remover.png" + image_url: "/resources/NibblePoker/images/tools/uuid-generator/main.png" image_type: null twitter: title_key: "meta.title" @@ -21,11 +21,11 @@ tools: enable: true title_key: "meta.title" preamble_key: "meta.description" - image_url: "/resources/NibblePoker/images/tools/excel-password-remover/excel-password-remover.png" + image_url: "/resources/NibblePoker/images/tools/uuid-generator/main.png" image_alt_key: "" general: icon: "fab fa-python" title_key: "meta.title" subtitle_key: "article.subtitle" tags: - - "undefined" + - "generator" diff --git a/docker-compose.yml b/docker-compose.yml index 886751b..12ee019 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,17 @@ services: www_nibblepoker_lu: container_name: www-nibblepoker-python - #image: python:alpine build: context: . ports: - 5001:5000 - volumes: - - ./app/:/app:ro - tty: true + environment: + - TZ=Europe/Brussels + - NP_HTML_POST_PROCESS=MINIFY + - NP_FLASK_WAITRESS=1 + - NP_FLASK_PORT=80 + #volumes: + # - ./app/:/app:ro restart: unless-stopped stop_grace_period: 1s labels: @@ -17,4 +20,3 @@ services: driver: "json-file" options: max-size: "16m" - #command: ["/bin/sh", "-c", "/app/MainWebsite"] diff --git a/readme.md b/readme.md index 6d68818..c7b9b7e 100644 --- a/readme.md +++ b/readme.md @@ -13,24 +13,26 @@ TODO ## Local Setup Follow these steps to setup a local version of this website: 1. Install Python 3.13 -2. Install Node JS v? +2. Install Node JS 20+ 3. Install Python Modules \ `pip install --upgrade -r requirements.txt` 4. Install NPM modules \ `.\scripts\nodejs-setup.cmd` 5. Compile the `.mjs` files into `.js` and `.min.js` \ `.\scripts\compile-js-site.cmd` -6. [Install static files] +6. [TODO: Install static files] 7. Setup environment variables: ```batch :: Batch set NP_HTML_POST_PROCESS=MINIFY set NP_FLASK_WAITRESS=1 + set NP_FLASK_PORT=80 ``` ```bash # Bash NP_HTML_POST_PROCESS=MINIFY NP_FLASK_WAITRESS=1 + NP_FLASK_PORT=80 ``` 8. Run [app.py](app.py) \ `python ./app.py` diff --git a/static/resources/NibblePoker/css/extra.css b/static/resources/NibblePoker/css/extra.css index c1abcd1..fa76559 100644 --- a/static/resources/NibblePoker/css/extra.css +++ b/static/resources/NibblePoker/css/extra.css @@ -1,3 +1,4 @@ +/* File inputs with drop thingy */ .np-file-input-drop-container { position: relative; } @@ -13,3 +14,34 @@ input[type=file].np-file-input-drop { opacity: 0; cursor: pointer; } + +/* Nicer checkboxes, move to CSS 8 */ +input[type=checkbox] { + text-align: center; + padding: 0; + + &:before { + content: "✘"; + } + + &:checked { + &:before { + content: "✔"; + } + } +} + +/* Top margin trimmer for heading renderer */ + + +/* Copy of the m*-xs classes */ +/* Accommodates the paragraph renderer that has a hard-coded .mt-xs */ +.content-spacer { + margin: calc(1rem* 0.5); + /*margin-bottom: 0;*/ +} + +.content-spacer-vertical { + margin-top: calc(1rem* 0.5); + margin-bottom: calc(1rem* 0.5); +} diff --git a/static/resources/NibblePoker/images/content/background.png b/static/resources/NibblePoker/images/content/background.png index afabad7..c0964c9 100644 Binary files a/static/resources/NibblePoker/images/content/background.png and b/static/resources/NibblePoker/images/content/background.png differ diff --git a/static/resources/NibblePoker/images/content/docker-mini-cctv-nvr/home.png b/static/resources/NibblePoker/images/content/docker-mini-cctv-nvr/home.png index c78e369..6a831c1 100644 Binary files a/static/resources/NibblePoker/images/content/docker-mini-cctv-nvr/home.png and b/static/resources/NibblePoker/images/content/docker-mini-cctv-nvr/home.png differ diff --git a/static/resources/NibblePoker/images/content/docker-mini-cctv-nvr/main.png b/static/resources/NibblePoker/images/content/docker-mini-cctv-nvr/main.png new file mode 100644 index 0000000..3783fa5 Binary files /dev/null and b/static/resources/NibblePoker/images/content/docker-mini-cctv-nvr/main.png differ diff --git a/static/resources/NibblePoker/images/projects/circuitpython-custom-fs/cpy_02.PNG b/static/resources/NibblePoker/images/projects/circuitpython-custom-fs/cpy_02.PNG index 42bb17c..4dc5226 100644 Binary files a/static/resources/NibblePoker/images/projects/circuitpython-custom-fs/cpy_02.PNG and b/static/resources/NibblePoker/images/projects/circuitpython-custom-fs/cpy_02.PNG differ diff --git a/static/resources/NibblePoker/images/tools/excel-password-remover/excel-password-remover.png b/static/resources/NibblePoker/images/tools/excel-password-remover/main-legacy.png similarity index 100% rename from static/resources/NibblePoker/images/tools/excel-password-remover/excel-password-remover.png rename to static/resources/NibblePoker/images/tools/excel-password-remover/main-legacy.png diff --git a/static/resources/NibblePoker/images/tools/excel-password-remover/main.png b/static/resources/NibblePoker/images/tools/excel-password-remover/main.png new file mode 100644 index 0000000..64ff783 Binary files /dev/null and b/static/resources/NibblePoker/images/tools/excel-password-remover/main.png differ diff --git a/static/resources/NibblePoker/images/tools/iban-generator/main.png b/static/resources/NibblePoker/images/tools/iban-generator/main.png new file mode 100644 index 0000000..cca70b0 Binary files /dev/null and b/static/resources/NibblePoker/images/tools/iban-generator/main.png differ diff --git a/static/resources/NibblePoker/images/tools/uuid-generator/main-meh.png b/static/resources/NibblePoker/images/tools/uuid-generator/main-meh.png new file mode 100644 index 0000000..a793b46 Binary files /dev/null and b/static/resources/NibblePoker/images/tools/uuid-generator/main-meh.png differ diff --git a/static/resources/NibblePoker/images/tools/uuid-generator/main.png b/static/resources/NibblePoker/images/tools/uuid-generator/main.png new file mode 100644 index 0000000..78dbf33 Binary files /dev/null and b/static/resources/NibblePoker/images/tools/uuid-generator/main.png differ diff --git a/templates/base_standalone.jinja b/templates/base_standalone.jinja index 3670cfb..a79dea9 100644 --- a/templates/base_standalone.jinja +++ b/templates/base_standalone.jinja @@ -39,11 +39,15 @@ {% block extra_scripts %}{% endblock %} diff --git a/templates/elements/code.jinja b/templates/elements/code.jinja index 702f3b1..7085a8c 100644 --- a/templates/elements/code.jinja +++ b/templates/elements/code.jinja @@ -1,7 +1,7 @@ {% if code_language is none %} - + {% else %} - + {% endif %} {% for code_line in code_lines %} {{ code_line }}
diff --git a/templates/pages/privacy.jinja b/templates/pages/privacy.jinja index 1b38f97..35e1783 100644 --- a/templates/pages/privacy.jinja +++ b/templates/pages/privacy.jinja @@ -13,170 +13,177 @@ {% block main_content %} - {{ render_h1(l10n("introduction.title", "privacy", user_lang), "fad fa-info") }} - {{ render_paragraph(l10n("introduction.text.1", "privacy", user_lang)) }} - {{ render_paragraph(l10n("introduction.text.2", "privacy", user_lang) + - '
- https://gdpr.eu/
- - https://eur-lex.europa.eu/')}} +
+ {{ render_h1(l10n("introduction.title", "privacy", user_lang), "fad fa-info") }} +
+ {{ render_paragraph(l10n("introduction.text.1", "privacy", user_lang)) }} + {{ render_paragraph(l10n("introduction.text.2", "privacy", user_lang) + + '
+ https://gdpr.eu/
+ + https://eur-lex.europa.eu/')}} +
+
- {{ render_h1(l10n("v2.data.title", "privacy", user_lang), "fad fa-database") }} - {{ render_paragraph(l10n("v2.data.intro.1", "privacy", user_lang) + - '
' + l10n("v2.data.intro.2", "privacy", user_lang)) }} - {{ render_paragraph(l10n('v2.data.private.1', "privacy", user_lang) + - render_list_ul([ - l10n('v2.data.private_list.1', "privacy", user_lang), - l10n('v2.data.private_list.2', "privacy", user_lang), - ]) - ) }} - {{ render_paragraph(l10n('v2.data.non_private.1', "privacy", user_lang) + - '
  • ' + l10n('v2.data.non_private_list.1', "privacy", user_lang) + - '
  • ' + l10n('v2.data.non_private_list.2', "privacy", user_lang) + - '
') }} - {{ render_paragraph(l10n("v2.data.end.1", "privacy", user_lang)) }} - {{ render_paragraph(l10n("v2.data.end.2", "privacy", user_lang) + - '
' + l10n("v2.data.end.3", "privacy", user_lang)) }} - {{ render_paragraph(l10n("v2.data.end.4", "privacy", user_lang)) }} - {{ render_paragraph(l10n("v2.data.end.5", "privacy", user_lang) + - '
' + l10n("v2.data.end.6", "privacy", user_lang)) }} +
+ {{ render_h1(l10n("v2.data.title", "privacy", user_lang), "fad fa-database") }} +
+ {{ render_paragraph(l10n("v2.data.intro.1", "privacy", user_lang) + + '
' + l10n("v2.data.intro.2", "privacy", user_lang)) }} + {{ render_paragraph(l10n('v2.data.private.1', "privacy", user_lang) + + render_list_ul([ + l10n('v2.data.private_list.1', "privacy", user_lang), + l10n('v2.data.private_list.2', "privacy", user_lang), + ]) + ) }} + {{ render_paragraph(l10n('v2.data.non_private.1', "privacy", user_lang) + + '
  • ' + l10n('v2.data.non_private_list.1', "privacy", user_lang) + + '
  • ' + l10n('v2.data.non_private_list.2', "privacy", user_lang) + + '
') }} + {{ render_paragraph(l10n("v2.data.end.1", "privacy", user_lang)) }} + {{ render_paragraph(l10n("v2.data.end.2", "privacy", user_lang) + + '
' + l10n("v2.data.end.3", "privacy", user_lang)) }} + {{ render_paragraph(l10n("v2.data.end.4", "privacy", user_lang)) }} + {{ render_paragraph(l10n("v2.data.end.5", "privacy", user_lang) + + '
' + l10n("v2.data.end.6", "privacy", user_lang)) }} +
+
- {{ render_h1(l10n("v2.data_dns.title", "privacy", user_lang), "fad fa-database") }} - {{ render_paragraph(l10n("v2.data_dns.intro.1", "privacy", user_lang) + - '
' + l10n("v2.data_dns.intro.2", "privacy", user_lang)) }} - {{ render_paragraph(l10n('v2.data_dns.private.1', "privacy", user_lang) + - '
  • ' + l10n('v2.data_dns.private_list.1', "privacy", user_lang) + - '
') }} - {{ render_paragraph(l10n('v2.data_dns.non_private.1', "privacy", user_lang) + - '
  • ' + l10n('v2.data_dns.non_private_list.1', "privacy", user_lang) + - '
  • ' + l10n('v2.data_dns.non_private_list.2', "privacy", user_lang) + - '
') }} - {{ render_paragraph(l10n("v2.data_dns.end.1", "privacy", user_lang)) }} +
+ {{ render_h1(l10n("v2.data_dns.title", "privacy", user_lang), "fad fa-database") }} +
+ {{ render_paragraph(l10n("v2.data_dns.intro.1", "privacy", user_lang) + + '
' + l10n("v2.data_dns.intro.2", "privacy", user_lang)) }} + + {{ render_paragraph(l10n('v2.data_dns.private.1', "privacy", user_lang)) }} + {{ render_list_ul([ + l10n('v2.data_dns.private_list.1', "privacy", user_lang) + ]) }} + + {{ render_paragraph(l10n('v2.data_dns.non_private.1', "privacy", user_lang)) }} + {{ render_list_ul([ + l10n('v2.data_dns.non_private_list.1', "privacy", user_lang), + l10n('v2.data_dns.non_private_list.2', "privacy", user_lang) + ]) }} + + {{ render_paragraph(l10n("v2.data_dns.end.1", "privacy", user_lang)) }} +
+
- {{ render_h1(l10n("v2.third.title", "privacy", user_lang), "fad fa-handshake") }} - {{ render_paragraph(l10n("v2.third.intro.1", "privacy", user_lang) + - '
' + l10n("v2.third.intro.2", "privacy", user_lang)) }} - {{ render_paragraph(l10n("v2.third.intro.3", "privacy", user_lang)) }} - {{ render_paragraph(l10n('v2.third.intro.4', "privacy", user_lang) + - '
IONOS' + - '' + - l10n('french', "langs", user_lang) + '' + - '' + - l10n('english', "langs", user_lang) + '' + - '
ChicagoVPS' + - '' + - l10n('english', "langs", user_lang) + '') }} +
+ {{ render_h1(l10n("v2.third.title", "privacy", user_lang), "fad fa-handshake") }} +
+ {{ render_paragraph(l10n("v2.third.intro.1", "privacy", user_lang) + + '
' + l10n("v2.third.intro.2", "privacy", user_lang)) }} + {{ render_paragraph(l10n("v2.third.intro.3", "privacy", user_lang)) }} + {{ render_paragraph(l10n('v2.third.intro.4', "privacy", user_lang) + + '
IONOS' + + '' + + l10n('french', "langs", user_lang) + '' + + '' + + l10n('english', "langs", user_lang) + '' + + '
ChicagoVPS' + + '' + + l10n('english', "langs", user_lang) + '') }} +
+
- {{ render_h1(l10n("v2.cookies.title", "privacy", user_lang), "fad fa-cookie-bite") }} - {{ render_paragraph(l10n("v2.cookies.intro.1", "privacy", user_lang)) }} - - - - {{ render_h1(l10n("v2.update.title", "privacy", user_lang), "fad fa-sync-alt") }} - {{ render_paragraph(l10n("v2.update.intro.1", "privacy", user_lang)) }} - {{ render_paragraph('' + l10n("v2.update.history.1.date", "privacy", user_lang) + - '' + - l10n('english', "langs", user_lang) + '' + - '' + - l10n('french', "langs", user_lang) + '' + - '
    ' + - '
  • ' + l10n('v2.update.history.1.desc.1', "privacy", user_lang) + '
  • ' + - '
' )}} - {{ render_paragraph('' + l10n("v2.update.history.2.date", "privacy", user_lang) + - '' + - l10n('english', "langs", user_lang) + '' + - '' + - l10n('french', "langs", user_lang) + '' + - '
    ' + - '
  • ' + l10n('v2.update.history.2.desc.1', "privacy", user_lang) + '
  • ' + - '
  • ' + l10n('v2.update.history.2.desc.2', "privacy", user_lang) + '
  • ' + - '
  • ' + l10n('v2.update.history.2.desc.3', "privacy", user_lang) + '
  • ' + - '
' )}} - {{ render_paragraph('' + l10n("v2.update.history.3.date", "privacy", user_lang) + - '' + - l10n('english', "langs", user_lang) + '' + - '' + - l10n('french', "langs", user_lang) + '' + - '
    ' + - '
  • ' + l10n('v2.update.history.3.desc.1', "privacy", user_lang) + '
  • ' + - '
    • ' + - '
    • ' + l10n('v2.update.history.3.desc.1.1', "privacy", user_lang) + '
    • ' + - '
    • ' + l10n('v2.update.history.3.desc.1.2', "privacy", user_lang) + '
    • ' + - '
  • ' + - '
  • ' + l10n('v2.update.history.3.desc.2', "privacy", user_lang) + '
  • ' + - '
' )}} - {{ render_paragraph('' + l10n("v2.update.history.4.date", "privacy", user_lang) + - '' + - l10n('english', "langs", user_lang) + '' + - '' + - l10n('french', "langs", user_lang) + '' + - '
    ' + - '
  • ' + l10n('v2.update.history.4.desc.1', "privacy", user_lang) + '
  • ' + - '
    • ' + - '
    • ' + l10n('v2.update.history.4.desc.1.1', "privacy", user_lang) + '
    • ' + - '
  • ' + - '
  • ' + l10n('v2.update.history.4.desc.2', "privacy", user_lang) + '
  • ' + - '
' )}} - {{ render_paragraph('' + l10n("v2.update.history.5.date", "privacy", user_lang) + - '' + - l10n('english', "langs", user_lang) + '' + - '' + - l10n('french', "langs", user_lang) + '' + - '
    ' + - '
  • ' + l10n('v2.update.history.5.desc.1', "privacy", user_lang) + '
  • ' + - '
  • ' + l10n('v2.update.history.5.desc.2', "privacy", user_lang) + '
  • ' + - '
' )}} - {{ render_paragraph(l10n("v2.update.end.2", "privacy", user_lang)) }} +
+ {{ render_h1(l10n("v2.cookies.title", "privacy", user_lang), "fad fa-cookie-bite") }} +
+ {{ render_paragraph(l10n("v2.cookies.intro.1", "privacy", user_lang)) }} +
+
- {{ render_h1(l10n("contact.title", "privacy", user_lang), "fad fa-mailbox") }} - {{ render_paragraph(l10n("contact.text.1", "privacy", user_lang) + - '
herwin.bozet@gmail.com') }} +
+ {{ render_h1(l10n("v2.update.title", "privacy", user_lang), "fad fa-sync-alt") }} +
+ {{ render_paragraph(l10n("v2.update.intro.1", "privacy", user_lang)) }} + {{ render_paragraph('' + l10n("v2.update.history.1.date", "privacy", user_lang) + + '' + + l10n('english', "langs", user_lang) + '' + + '' + + l10n('french', "langs", user_lang) + '' )}} + {{ render_list_ul([ + l10n('v2.update.history.1.desc.1', "privacy", user_lang) + ]) }} + + {{ render_paragraph('' + l10n("v2.update.history.2.date", "privacy", user_lang) + + '' + + l10n('english', "langs", user_lang) + '' + + '' + + l10n('french', "langs", user_lang) + '' )}} + {{ render_list_ul([ + l10n('v2.update.history.2.desc.1', "privacy", user_lang), + l10n('v2.update.history.2.desc.2', "privacy", user_lang), + l10n('v2.update.history.2.desc.3', "privacy", user_lang) + ]) }} + + {{ render_paragraph('' + l10n("v2.update.history.3.date", "privacy", user_lang) + + '' + + l10n('english', "langs", user_lang) + '' + + '' + + l10n('french', "langs", user_lang) + '' )}} + {{ render_list_ul([ + l10n('v2.update.history.3.desc.1', "privacy", user_lang), + l10n('v2.update.history.3.desc.1.1', "privacy", user_lang), + l10n('v2.update.history.3.desc.1.2', "privacy", user_lang), + l10n('v2.update.history.3.desc.2', "privacy", user_lang) + ]) }} + + {{ render_paragraph('' + l10n("v2.update.history.4.date", "privacy", user_lang) + + '' + + l10n('english', "langs", user_lang) + '' + + '' + + l10n('french', "langs", user_lang) + '' )}} + {{ render_list_ul([ + l10n('v2.update.history.4.desc.1', "privacy", user_lang), + l10n('v2.update.history.4.desc.1.1', "privacy", user_lang), + l10n('v2.update.history.4.desc.2', "privacy", user_lang) + ]) }} + + {{ render_paragraph('' + l10n("v2.update.history.5.date", "privacy", user_lang) + + '' + + l10n('english', "langs", user_lang) + '' + + '' + + l10n('french', "langs", user_lang) + '' )}} + {{ render_list_ul([ + l10n('v2.update.history.5.desc.1', "privacy", user_lang), + l10n('v2.update.history.5.desc.2', "privacy", user_lang) + ]) }} + + {{ render_paragraph(l10n("v2.update.end.2", "privacy", user_lang)) }} +
+
- {{ render_h1(l10n("complaint.title", "privacy", user_lang), "fad fa-gavel") }} - {{ render_paragraph(l10n("complaint.text.1", "privacy", user_lang)) }} - {{ render_paragraph(l10n('complaint.text.2', "privacy", user_lang) + - '
' + - 'https://ec.europa.eu/' + - '(' + l10n('english', "langs", user_lang) + ')' + - '
' + - 'https://gegevensbeschermingsautoriteit.be/' + - '(' + l10n('french', "langs", user_lang) + ')' ) }} +
+ {{ render_h1(l10n("contact.title", "privacy", user_lang), "fad fa-mailbox") }} +
+ {{ render_paragraph(l10n("contact.text.1", "privacy", user_lang) + + '
herwin.bozet@gmail.com') }} +
+
+ + +
+ {{ render_h1(l10n("complaint.title", "privacy", user_lang), "fad fa-gavel") }} +
+ {{ render_paragraph(l10n("complaint.text.1", "privacy", user_lang)) }} + {{ render_paragraph(l10n('complaint.text.2', "privacy", user_lang) + + '
' + + 'https://ec.europa.eu/' + + '(' + l10n('english', "langs", user_lang) + ')' + + '
' + + 'https://gegevensbeschermingsautoriteit.be/' + + '(' + l10n('french', "langs", user_lang) + ')' ) }} +
+
{% endblock %} diff --git a/templates/pages/tools_page.jinja b/templates/pages/tools_page.jinja index 2c90f2a..f3b86bc 100644 --- a/templates/pages/tools_page.jinja +++ b/templates/pages/tools_page.jinja @@ -16,7 +16,10 @@ {{ l10n("header.root", "projects", user_lang) }} {{ l10n(tool_data.metadata.general.title_key, tool_id, user_lang) }} {% else %} - NibblePoker{{ l10n(tool_data.metadata.general.title_key, tool_id, user_lang) }} + {% if not is_brandless %} + NibblePoker + {% endif %} + {{ l10n(tool_data.metadata.general.title_key, tool_id, user_lang) }} {% endif %} {% endblock %} diff --git a/templates/projects/circuitpython-ebyte-e32.jinja b/templates/projects/circuitpython-ebyte-e32.jinja index 7714ffd..bf543f8 100644 --- a/templates/projects/circuitpython-ebyte-e32.jinja +++ b/templates/projects/circuitpython-ebyte-e32.jinja @@ -1,198 +1,234 @@ {% extends "projects/_project.jinja" %} {% block project_content %} - {{ render_h2(l10n("intro.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("intro.p1", project_id, user_lang)) }} +
+ {{ render_h2(l10n("intro.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("intro.p1", project_id, user_lang)) }} +
+
- {{ render_h2(l10n("features.title", project_id, user_lang)) }} - {{ render_list_ul([ - l10n("features.1", project_id, user_lang), - l10n("features.2", project_id, user_lang), - [ - l10n("features.2.1", project_id, user_lang), - l10n("features.2.2", project_id, user_lang), - l10n("features.2.3", project_id, user_lang), - ], - l10n("features.3", project_id, user_lang), - [ - l10n("features.3.1", project_id, user_lang), - l10n("features.3.2", project_id, user_lang), - ], - ]) }} +
+ {{ render_h2(l10n("features.title", project_id, user_lang)) }} +
+ {{ render_list_ul([ + l10n("features.1", project_id, user_lang), + l10n("features.2", project_id, user_lang), + [ + l10n("features.2.1", project_id, user_lang), + l10n("features.2.2", project_id, user_lang), + l10n("features.2.3", project_id, user_lang), + ], + l10n("features.3", project_id, user_lang), + [ + l10n("features.3.1", project_id, user_lang), + l10n("features.3.2", project_id, user_lang), + ], + ]) }} +
+
- {{ render_h2(l10n("limitations.title", project_id, user_lang)) }} - {{ render_list_ul([ - l10n("limitations.1", project_id, user_lang), - [ - l10n("limitations.2.1", project_id, user_lang), - l10n("limitations.2.2", project_id, user_lang), - ], - l10n("limitations.2", project_id, user_lang), - [ - l10n("limitations.2.1", project_id, user_lang), - l10n("limitations.2.2", project_id, user_lang), - ], - l10n("limitations.3", project_id, user_lang), - [ - l10n("limitations.3.1", project_id, user_lang), - ], - ]) }} +
+ {{ render_h2(l10n("limitations.title", project_id, user_lang)) }} +
+ {{ render_list_ul([ + l10n("limitations.1", project_id, user_lang), + [ + l10n("limitations.2.1", project_id, user_lang), + l10n("limitations.2.2", project_id, user_lang), + ], + l10n("limitations.2", project_id, user_lang), + [ + l10n("limitations.2.1", project_id, user_lang), + l10n("limitations.2.2", project_id, user_lang), + ], + l10n("limitations.3", project_id, user_lang), + [ + l10n("limitations.3.1", project_id, user_lang), + ], + ]) }} +
+
- {{ render_h2(l10n("doc.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("doc.p1", project_id, user_lang)) }} +
+ {{ render_h2(l10n("doc.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("doc.p1", project_id, user_lang)) }} +
+
- {{ render_h2(l10n("usage.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("usage.p1", project_id, user_lang)) }} - {{ render_paragraph(l10n("usage.p2", project_id, user_lang)) }} - {{ - render_code_block([ - "import board", - "import time", - "", - "import ebyte_e32", - "", - "PIN_M0 = board.IO13", - "PIN_M1 = board.IO12", - "PIN_RXD = board.IO11 # Pin marked as RX on the module", - "PIN_TXD = board.IO10 # Pin marked as TX on the module", - "PIN_AUX = board.IO9", - "", - "e32 = ebyte_e32.E32Device(PIN_M0, PIN_M1, PIN_AUX, PIN_TXD, PIN_RXD, address=0xBEEF, channel=4)", - "", - "# Switching to fixed transmission mode.", - "e32.tx_mode = ebyte_e32.TransmissionMode.TRANSMISSION_FIXED", - "", - "# Switching to mode 0. (Normal mode)", - "e32.mode = ebyte_e32.Modes.MODE_NORMAL", - "", - "# Message content:", - "# * Receiver's address: 0x1337 (b'\\13\\x37')", - "# * Receiver's channel: 4 (b'\\x04')", - "# * Message: b'Hello World !'", - "message = b'\\x13\\x37\\x04Hello World !'", - "", - "# Sending message with helper method", - "e32.send(message)", - "", - "# The message may be truncated at specific lengths depending on the frequencies used.", - "# Please check the documentation for more information !" - ], "python") - }} +
+ {{ render_h2(l10n("usage.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("usage.p1", project_id, user_lang)) }} + {{ render_paragraph(l10n("usage.p2", project_id, user_lang)) }} + {{ + render_code_block([ + "import board", + "import time", + "", + "import ebyte_e32", + "", + "PIN_M0 = board.IO13", + "PIN_M1 = board.IO12", + "PIN_RXD = board.IO11 # Pin marked as RX on the module", + "PIN_TXD = board.IO10 # Pin marked as TX on the module", + "PIN_AUX = board.IO9", + "", + "e32 = ebyte_e32.E32Device(PIN_M0, PIN_M1, PIN_AUX, PIN_TXD, PIN_RXD, address=0xBEEF, channel=4)", + "", + "# Switching to fixed transmission mode.", + "e32.tx_mode = ebyte_e32.TransmissionMode.TRANSMISSION_FIXED", + "", + "# Switching to mode 0. (Normal mode)", + "e32.mode = ebyte_e32.Modes.MODE_NORMAL", + "", + "# Message content:", + "# * Receiver's address: 0x1337 (b'\\13\\x37')", + "# * Receiver's channel: 4 (b'\\x04')", + "# * Message: b'Hello World !'", + "message = b'\\x13\\x37\\x04Hello World !'", + "", + "# Sending message with helper method", + "e32.send(message)", + "", + "# The message may be truncated at specific lengths depending on the frequencies used.", + "# Please check the documentation for more information !" + ], "python") + }} +
+
- {{ render_h2(l10n("demo.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("demo.p1", project_id, user_lang)) }} - {{ render_paragraph(l10n("demo.p3", project_id, user_lang)) }} - {{ render_paragraph(l10n("demo.p4", project_id, user_lang)) }} - {{ render_splide([ - '', - '', - '', - '', - ]) }} +
+ {{ render_h2(l10n("demo.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("demo.p1", project_id, user_lang)) }} + {{ render_paragraph(l10n("demo.p3", project_id, user_lang)) }} + {{ render_paragraph(l10n("demo.p4", project_id, user_lang)) }} + {{ render_splide([ + '', + '', + '', + '', + ]) }} +
+
- {{ render_h2(l10n("downloads.title", project_id, user_lang)) }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ l10n("version", "commons", user_lang) }}.py.min.py
v0.8.0 - - {{ render_button( - "10.42 KiB", - False, None, "btn-primary") - }} - - - - {{ render_button( - "4.79 KiB", - False, None, "btn-primary") - }} - -
v0.7.0 - - {{ render_button( - "10.51 KiB", - False, None) - }} - - - - {{ render_button( - "4.79 KiB", - False, None) - }} - -
v0.6.0 - - {{ render_button( - "10.39 KiB", - False, None) - }} - - - - {{ render_button( - "4.62 KiB", - False, None) - }} - -
v0.4.0 - - {{ render_button( - "19.96 KiB", - False, None) - }} - - - - {{ render_button( - "4.18 KiB", - False, None) - }} - -
+
+ {{ render_h2(l10n("downloads.title", project_id, user_lang)) }} + +
- {{ render_h2(l10n("license.title", project_id, user_lang)) }} - {{ render_paragraph( - "" + - l10n("license.mit.single", "commons", user_lang)) + - "" - }} +
+ {{ render_h2(l10n("license.title", project_id, user_lang)) }} + +
- {{ render_h2(l10n("links.title", project_id, user_lang)) }} - {{ render_list_ul([ - "" + - l10n("github", "commons", user_lang) + "", +
+ {{ render_h2(l10n("links.title", project_id, user_lang)) }} + +
{% endblock %} diff --git a/templates/projects/docker-mini-cctv-nvr.jinja b/templates/projects/docker-mini-cctv-nvr.jinja index 04ed1ce..b2d715a 100644 --- a/templates/projects/docker-mini-cctv-nvr.jinja +++ b/templates/projects/docker-mini-cctv-nvr.jinja @@ -1,137 +1,181 @@ {% extends "projects/_project.jinja" %} {% block project_content %} - {{ render_h2(l10n("intro.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("intro.1", project_id, user_lang)) }} - {{ render_paragraph(l10n("intro.2", project_id, user_lang)) }} +
+ {{ render_h2(l10n("intro.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("intro.1", project_id, user_lang)) }} + {{ render_paragraph(l10n("intro.2", project_id, user_lang)) }} +
+
- {{ render_h2(l10n("preamble.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("preamble.1", project_id, user_lang)) }} - {{ render_paragraph(l10n("preamble.2", project_id, user_lang)) }} +
+ {{ render_h2(l10n("preamble.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("preamble.1", project_id, user_lang)) }} + {{ render_paragraph(l10n("preamble.2", project_id, user_lang)) }} +
+
- {{ render_h2(l10n("setup.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("setup.1", project_id, user_lang)) }} - {{ render_paragraph(l10n("setup.2", project_id, user_lang)) }} +
+ {{ render_h2(l10n("setup.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("setup.1", project_id, user_lang)) }} + {{ render_paragraph(l10n("setup.2", project_id, user_lang)) }} +
+
- {{ render_h3(l10n("setup.camera.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("setup.camera.1", project_id, user_lang)) }} - {{ render_paragraph(l10n("setup.camera.2", project_id, user_lang)) }} - {{ render_h4(l10n("commons.example", project_id, user_lang)) }} - {{ - render_code_block([ - "nvr_stack:", - " cctv_recorder_cam1:", - " container_name: cctv-recorder-cam1", - " build:", - " context: .", - " dockerfile: Dockerfile_recorder", - " environment:", - " - TZ=Europe/Brussels", - " - \"NP_CCTV_URL=rtsp://user:password@address:554/sub-path\"", - " volumes:", - " - ./recordings/cam1:/data", - " restart: unless-stopped", - ], "yaml") - }} - {{ render_paragraph(l10n("setup.camera.3", project_id, user_lang)) }} +
+ {{ render_h3(l10n("setup.camera.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("setup.camera.1", project_id, user_lang)) }} + {{ render_paragraph(l10n("setup.camera.2", project_id, user_lang)) }} + {{ render_h4(l10n("commons.example", project_id, user_lang)) }} + {{ + render_code_block([ + "nvr_stack:", + " cctv_recorder_cam1:", + " container_name: cctv-recorder-cam1", + " build:", + " context: .", + " dockerfile: Dockerfile_recorder", + " environment:", + " - TZ=Europe/Brussels", + " - \"NP_CCTV_URL=rtsp://user:password@address:554/sub-path\"", + " volumes:", + " - ./recordings/cam1:/data", + " restart: unless-stopped", + ], "yaml") + }} + {{ render_paragraph(l10n("setup.camera.3", project_id, user_lang)) }} +
+
- {{ render_h3(l10n("setup.cleaner.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("setup.cleaner.1", project_id, user_lang)) }} - {{ render_paragraph(l10n("setup.cleaner.2", project_id, user_lang)) }} - {{ render_h4(l10n("commons.example", project_id, user_lang)) }} - {{ - render_code_block([ - "nvr_stack:", - " cctv_cleaner:", - " container_name: cctv-cleaner", - " build:", - " context: .", - " dockerfile: Dockerfile_cleaner", - " environment:", - " - TZ=Europe/Brussels", - " - \"NP_MAX_FILE_AGE_HOURS=72\"", - " volumes:", - " - ./recordings:/data", - " - ./cleaner.py:/app/app.py:ro", - " restart: unless-stopped", - ], "yaml") - }} +
+ {{ render_h3(l10n("setup.cleaner.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("setup.cleaner.1", project_id, user_lang)) }} + {{ render_paragraph(l10n("setup.cleaner.2", project_id, user_lang)) }} + {{ render_h4(l10n("commons.example", project_id, user_lang)) }} + {{ + render_code_block([ + "nvr_stack:", + " cctv_cleaner:", + " container_name: cctv-cleaner", + " build:", + " context: .", + " dockerfile: Dockerfile_cleaner", + " environment:", + " - TZ=Europe/Brussels", + " - \"NP_MAX_FILE_AGE_HOURS=72\"", + " volumes:", + " - ./recordings:/data", + " - ./cleaner.py:/app/app.py:ro", + " restart: unless-stopped", + ], "yaml") + }} +
+
- {{ render_h3(l10n("setup.web.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("setup.web.1", project_id, user_lang)) }} - {{ render_paragraph(l10n("setup.web.2", project_id, user_lang)) }} - {{ render_paragraph(l10n("setup.web.3", project_id, user_lang)) }} - {{ render_h4(l10n("commons.web.vars.title", project_id, user_lang)) }} - {{ render_h4(l10n("commons.example", project_id, user_lang)) }} - {{ - render_code_block([ - "nvr_stack:", - " cctv_web:", - " container_name: cctv-web", - " image: php:apache", - " ports:", - " - 26880:80", - " environment:", - " - TZ=Europe/Brussels", - " - \"NP_CAM_cam1=Camera #1\"", - " - \"NP_CAM_cam2=Camera #2\"", - " - \"NP_TITLE=NibblePoker's Mini CCTV NVR\"", - " - \"NP_FOOTER=Made by BOZET Herwin\"", - " volumes:", - " - ./htdocs:/var/www/html # Cannot be \":ro\" since the recordings are mounted into it.", - " - ./apache2.conf:/etc/apache2/apache2.conf:ro", - " - ./recordings:/var/www/html/data:ro", - " restart: unless-stopped", - ], "yaml") - }} +
+ {{ render_h3(l10n("setup.web.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("setup.web.1", project_id, user_lang)) }} + {{ render_paragraph(l10n("setup.web.2", project_id, user_lang)) }} + {{ render_paragraph(l10n("setup.web.3", project_id, user_lang)) }} + {{ render_h4(l10n("commons.web.vars.title", project_id, user_lang)) }} + {{ render_h4(l10n("commons.example", project_id, user_lang)) }} + {{ + render_code_block([ + "nvr_stack:", + " cctv_web:", + " container_name: cctv-web", + " image: php:apache", + " ports:", + " - 26880:80", + " environment:", + " - TZ=Europe/Brussels", + " - \"NP_CAM_cam1=Camera #1\"", + " - \"NP_CAM_cam2=Camera #2\"", + " - \"NP_TITLE=NibblePoker's Mini CCTV NVR\"", + " - \"NP_FOOTER=Made by BOZET Herwin\"", + " volumes:", + " - ./htdocs:/var/www/html # Cannot be \":ro\" since the recordings are mounted into it.", + " - ./apache2.conf:/etc/apache2/apache2.conf:ro", + " - ./recordings:/var/www/html/data:ro", + " restart: unless-stopped", + ], "yaml") + }} +
+
- {{ render_h2(l10n("startup.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("startup.1", project_id, user_lang)) }} - {{ - render_code_block([ - "docker-compose up --build -d", - ], "bash") - }} +
+ {{ render_h2(l10n("startup.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("startup.1", project_id, user_lang)) }} + {{ + render_code_block([ + "docker-compose up --build -d", + ], "bash") + }} +
+
- {{ render_h2(l10n("screenshots.title", project_id, user_lang)) }} - {{ render_splide([ - '', - '', - ]) }} +
+ {{ render_h2(l10n("screenshots.title", project_id, user_lang)) }} +
+ {{ render_splide([ + '', + '', + ]) }} +
+
- {{ render_h2(l10n("statistics.title", project_id, user_lang)) }} - {{ render_list_ul([ - l10n("statistics.1", project_id, user_lang), - [ - l10n("statistics.1.1", project_id, user_lang), - ], - l10n("statistics.2", project_id, user_lang), - [ - l10n("statistics.2.1", project_id, user_lang), - l10n("statistics.2.2", project_id, user_lang), - [ - l10n("statistics.2.2.1", project_id, user_lang), - ], - ], - l10n("statistics.3", project_id, user_lang), - [ - l10n("statistics.3.1", project_id, user_lang), - l10n("statistics.3.2", project_id, user_lang), - l10n("statistics.3.3", project_id, user_lang), - ], - l10n("statistics.4", project_id, user_lang), - [ - l10n("statistics.4.1", project_id, user_lang), - l10n("statistics.4.2", project_id, user_lang), - ], - ]) }} +
+ {{ render_h2(l10n("statistics.title", project_id, user_lang)) }} +
+ {{ render_list_ul([ + l10n("statistics.1", project_id, user_lang), + [ + l10n("statistics.1.1", project_id, user_lang), + ], + l10n("statistics.2", project_id, user_lang), + [ + l10n("statistics.2.1", project_id, user_lang), + l10n("statistics.2.2", project_id, user_lang), + [ + l10n("statistics.2.2.1", project_id, user_lang), + ], + ], + l10n("statistics.3", project_id, user_lang), + [ + l10n("statistics.3.1", project_id, user_lang), + l10n("statistics.3.2", project_id, user_lang), + l10n("statistics.3.3", project_id, user_lang), + ], + l10n("statistics.4", project_id, user_lang), + [ + l10n("statistics.4.1", project_id, user_lang), + l10n("statistics.4.2", project_id, user_lang), + ], + ]) }} +
+
- {{ render_h2(l10n("license.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("license.1", project_id, user_lang)) }} +
+ {{ render_h2(l10n("license.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("license.1", project_id, user_lang)) }} +
+
- {{ render_h2(l10n("links.title", project_id, user_lang)) }} - {{ render_list_ul([ - "" + - l10n("github", "commons", user_lang) + "", - ]) }} +
+ {{ render_h2(l10n("links.title", project_id, user_lang)) }} +
+ {{ render_list_ul([ + "" + + l10n("github", "commons", user_lang) + "", + ]) }} +
+
{% endblock %} diff --git a/templates/projects/lscom-cli-dotnet.jinja b/templates/projects/lscom-cli-dotnet.jinja index 818fb49..722b08a 100644 --- a/templates/projects/lscom-cli-dotnet.jinja +++ b/templates/projects/lscom-cli-dotnet.jinja @@ -1,169 +1,209 @@ {% extends "projects/_project.jinja" %} {% block project_content %} - {{ render_h2(l10n("intro.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("intro.p1", project_id, user_lang)) }} - {{ render_paragraph(l10n("intro.p2", project_id, user_lang)) }} - {{ render_paragraph(l10n("intro.p3", project_id, user_lang)) }} +
+ {{ render_h2(l10n("intro.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("intro.p1", project_id, user_lang)) }} + {{ render_paragraph(l10n("intro.p2", project_id, user_lang)) }} + {{ render_paragraph(l10n("intro.p3", project_id, user_lang)) }} +
+
- {{ render_h2(l10n("requirements.title", project_id, user_lang)) }} - {{ render_list_ul([ - l10n("requirements.1", project_id, user_lang), - [ - l10n("requirements.2", project_id, user_lang), - ], - l10n("requirements.3", project_id, user_lang), - [ - l10n("requirements.4", project_id, user_lang), - ], - ]) }} +
+ {{ render_h2(l10n("requirements.title", project_id, user_lang)) }} +
+ {{ render_list_ul([ + l10n("requirements.1", project_id, user_lang), + [ + l10n("requirements.2", project_id, user_lang), + ], + l10n("requirements.3", project_id, user_lang), + [ + l10n("requirements.4", project_id, user_lang), + ], + ]) }} +
+
- {{ render_h2(l10n("improvements.title", project_id, user_lang)) }} - {{ render_list_ul([ - l10n("improvements.1", project_id, user_lang), - l10n("improvements.2", project_id, user_lang), - l10n("improvements.3", project_id, user_lang), - l10n("improvements.4", project_id, user_lang), - l10n("improvements.5", project_id, user_lang), - ]) }} +
+ {{ render_h2(l10n("improvements.title", project_id, user_lang)) }} +
+ {{ render_list_ul([ + l10n("improvements.1", project_id, user_lang), + l10n("improvements.2", project_id, user_lang), + l10n("improvements.3", project_id, user_lang), + l10n("improvements.4", project_id, user_lang), + l10n("improvements.5", project_id, user_lang), + ]) }} +
+
- {{ render_h2(l10n("screenshots.title", project_id, user_lang)) }} - {{ render_splide([ - '', - '', - '', - ]) }} +
+ {{ render_h2(l10n("screenshots.title", project_id, user_lang)) }} +
+ {{ render_splide([ + '', + '', + '', + ]) }} +
+
- {{ render_h2(l10n("usage.title", project_id, user_lang)) }} - {{ - render_code_block([ - "lscom.exe [-a|--show-all] [-d|--show-device] [-D |--divider ] [-f|--show-friendly]", - " [-h|--help] [-H|--short-help] [-n|--show-name-raw] [-P|--no-pretty] [-s|--sort]", - " [-S|--sort-reverse] [-t|--tab-padding] [-v|--version] [-V|--version-only]", - "", - "Launch arguments:", - " -a, --show-all Display the complete port's name (Equal to '-dfn')", - " -d, --show-device Displays the port's device name", - " -D , --divider Uses the given string or char as a separator (Can be empty string !)", - " -f, --show-friendly Displays the port's friendly name", - " -h, --help Display this help text", - " -H, --short-help Display the short help text", - " -n, --show-name-raw Displays the port's raw name (See remarks section)", - " -P, --no-pretty Disables the pretty printing format (Equal to -D \" \")", - " -s, --sort Sorts the port based on their raw names in an ascending order", - " -S, --sort-reverse Sorts the port based on their raw names in a descending order", - " -t, --tab-padding Use tabs for padding between the types of names (Overrides '-D')", - " -v, --version Shows the utility's version number and other info", - " -V, --version-only Shows the utility's version number only (Overrides '-v')" - ], None) - }} +
+ {{ render_h2(l10n("usage.title", project_id, user_lang)) }} +
+ {{ + render_code_block([ + "lscom.exe [-a|--show-all] [-d|--show-device] [-D |--divider ] [-f|--show-friendly]", + " [-h|--help] [-H|--short-help] [-n|--show-name-raw] [-P|--no-pretty] [-s|--sort]", + " [-S|--sort-reverse] [-t|--tab-padding] [-v|--version] [-V|--version-only]", + "", + "Launch arguments:", + " -a, --show-all Display the complete port's name (Equal to '-dfn')", + " -d, --show-device Displays the port's device name", + " -D , --divider Uses the given string or char as a separator (Can be empty string !)", + " -f, --show-friendly Displays the port's friendly name", + " -h, --help Display this help text", + " -H, --short-help Display the short help text", + " -n, --show-name-raw Displays the port's raw name (See remarks section)", + " -P, --no-pretty Disables the pretty printing format (Equal to -D \" \")", + " -s, --sort Sorts the port based on their raw names in an ascending order", + " -S, --sort-reverse Sorts the port based on their raw names in a descending order", + " -t, --tab-padding Use tabs for padding between the types of names (Overrides '-D')", + " -v, --version Shows the utility's version number and other info", + " -V, --version-only Shows the utility's version number only (Overrides '-v')" + ], None) + }} +
+
- {{ render_h2(l10n("formatting.title", project_id, user_lang)) }} - {{ - render_code_block([ - " *┬> No launch arguments:", - " └──> ${Raw name} => COM1", - " *┬> '-d' or '-f'", - " ├──> ${Device name} => \\Device\\Serial1", - " └──> ${Friendly name} => Communications Port", - " *┬> '-d' and '-f'", - " └──> ${Friendly name} [${Device name}] => Communications Port [\\Device\\Serial1]", - " *┬> '-n' and '-d'", - " └──> ${Raw name} [$DeviceName] => COM1 [\\Device\\Serial1]", - " *┬> '-n' and '-f'", - " └──> ${Raw name} - ${Friendly name} => COM1 - Communications Port", - " *┬> '-ndf' or '-a'", - " └──> ${Raw name} - ${Friendly name} [${Device name}] => COM1 - Communications Port [\\Device\\Serial1]", - " *┬> '-ndfp' or '-ap'", - " └──> ${Raw name} ${Friendly name} ${Device name} => COM1 Communications Port \\Device\\Serial1", - " *┬> '-ndfD \";\"' or '-aD \";\"'", - " └──> ${Raw name};${Friendly name};${Device name} => COM1;Communications Port;\\Device\\Serial1" - ], None) - }} +
+ {{ render_h2(l10n("formatting.title", project_id, user_lang)) }} +
+ {{ + render_code_block([ + " *┬> No launch arguments:", + " └──> ${Raw name} => COM1", + " *┬> '-d' or '-f'", + " ├──> ${Device name} => \\Device\\Serial1", + " └──> ${Friendly name} => Communications Port", + " *┬> '-d' and '-f'", + " └──> ${Friendly name} [${Device name}] => Communications Port [\\Device\\Serial1]", + " *┬> '-n' and '-d'", + " └──> ${Raw name} [$DeviceName] => COM1 [\\Device\\Serial1]", + " *┬> '-n' and '-f'", + " └──> ${Raw name} - ${Friendly name} => COM1 - Communications Port", + " *┬> '-ndf' or '-a'", + " └──> ${Raw name} - ${Friendly name} [${Device name}] => COM1 - Communications Port [\\Device\\Serial1]", + " *┬> '-ndfp' or '-ap'", + " └──> ${Raw name} ${Friendly name} ${Device name} => COM1 Communications Port \\Device\\Serial1", + " *┬> '-ndfD \";\"' or '-aD \";\"'", + " └──> ${Raw name};${Friendly name};${Device name} => COM1;Communications Port;\\Device\\Serial1" + ], None) + }} +
+
- {{ render_h2(l10n("packages.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("packages.single.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("packages.single.1", project_id, user_lang)) }} - {{ render_paragraph(l10n("packages.self.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("packages.self.1", project_id, user_lang)) }} - {{ render_paragraph(l10n("packages.msi.title", project_id, user_lang)) }} - {{ render_paragraph(l10n("packages.msi.1", project_id, user_lang)) }} +
+ {{ render_h2(l10n("packages.title", project_id, user_lang)) }} +
+ {{ render_paragraph(l10n("packages.single.title", project_id, user_lang)) }} + {{ render_paragraph(l10n("packages.single.1", project_id, user_lang)) }} + {{ render_paragraph(l10n("packages.self.title", project_id, user_lang)) }} + {{ render_paragraph(l10n("packages.self.1", project_id, user_lang)) }} + {{ render_paragraph(l10n("packages.msi.title", project_id, user_lang)) }} + {{ render_paragraph(l10n("packages.msi.1", project_id, user_lang)) }} +
+
- {{ render_h2(l10n("version.current", "commons", user_lang)) }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ l10n("cpu.architecture", "commons", user_lang) }}{{ l10n("requirements", "commons", user_lang) }}{{ l10n("download.multiple", "commons", user_lang) }}
{{ l10n("cpu.any", "commons", user_lang) }}{{ l10n("requirements.text.dotnet", project_id, user_lang) }}...
{{ l10n("cpu.x64", "commons", user_lang) }}{{ l10n("requirements.text.dotnet", project_id, user_lang) }}...
{{ l10n("none.fs", "commons", user_lang) }}...
{{ l10n("cpu.x86", "commons", user_lang) }}{{ l10n("requirements.text.dotnet", project_id, user_lang) }}...
{{ l10n("none.fs", "commons", user_lang) }}...
{{ l10n("cpu.arm64", "commons", user_lang) }}{{ l10n("requirements.text.dotnet", project_id, user_lang) }}...
{{ l10n("none.fs", "commons", user_lang) }}...
{{ l10n("cpu.arm32", "commons", user_lang) }}{{ l10n("requirements.text.dotnet", project_id, user_lang) }}...
{{ l10n("none.fs", "commons", user_lang) }}...
+
+ {{ render_h2(l10n("version.current", "commons", user_lang)) }} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ l10n("cpu.architecture", "commons", user_lang) }}{{ l10n("requirements", "commons", user_lang) }}{{ l10n("download.multiple", "commons", user_lang) }}
{{ l10n("cpu.any", "commons", user_lang) }}{{ l10n("requirements.text.dotnet", project_id, user_lang) }}...
{{ l10n("cpu.x64", "commons", user_lang) }}{{ l10n("requirements.text.dotnet", project_id, user_lang) }}...
{{ l10n("none.fs", "commons", user_lang) }}...
{{ l10n("cpu.x86", "commons", user_lang) }}{{ l10n("requirements.text.dotnet", project_id, user_lang) }}...
{{ l10n("none.fs", "commons", user_lang) }}...
{{ l10n("cpu.arm64", "commons", user_lang) }}{{ l10n("requirements.text.dotnet", project_id, user_lang) }}...
{{ l10n("none.fs", "commons", user_lang) }}...
{{ l10n("cpu.arm32", "commons", user_lang) }}{{ l10n("requirements.text.dotnet", project_id, user_lang) }}...
{{ l10n("none.fs", "commons", user_lang) }}...
+
+
- {{ render_h2(l10n("source.code", "commons", user_lang)) }} - - - - - - - - - - - - - -
{{ l10n("version", "commons", user_lang) }}{{ l10n("download.multiple", "commons", user_lang) }}
v3.0.0...
+
+ {{ render_h2(l10n("source.code", "commons", user_lang)) }} +
+ + + + + + + + + + + + + +
{{ l10n("version", "commons", user_lang) }}{{ l10n("download.multiple", "commons", user_lang) }}
v3.0.0...
+
+
- {{ render_h2(l10n("links.title", project_id, user_lang)) }} - {{ render_list_ul([ - "" + - l10n("github", "commons", user_lang) + - "", - ]) }} +
+ {{ render_h2(l10n("links.title", project_id, user_lang)) }} +
+ {{ render_list_ul([ + "" + + l10n("github", "commons", user_lang) + + "", + ]) }} +
+
{% endblock %} diff --git a/website/renderers/standalone.py b/website/renderers/standalone.py index fe21f56..22eb324 100644 --- a/website/renderers/standalone.py +++ b/website/renderers/standalone.py @@ -3,4 +3,6 @@ def get_standalone_common_headers() -> str: _html = "" with open("./static/resources/Standalone/nibblepoker.min.css", encoding='utf-8') as f: _html += "" + with open("./static/resources/NibblePoker/css/extra.css", encoding='utf-8') as f: + _html += "" return _html diff --git a/website/sitemap.py b/website/sitemap.py index d939fd4..91d2cc1 100644 --- a/website/sitemap.py +++ b/website/sitemap.py @@ -13,11 +13,15 @@ def reload_sitemap_entries(definition_file: str) -> None: with open(definition_file, 'r') as f: raw_sitemap_entries = yaml.safe_load(f) - for sitemap_entry in raw_sitemap_entries: - __SITEMAP_ENTRIES.append(sitemap_entry) - - for allowed_lang in ALLOWED_LANGS: - __SITEMAP_ENTRIES.append(("/" + allowed_lang + "/" + sitemap_entry).replace("//", "/")) + for allowed_lang in [""] + ALLOWED_LANGS: + for sitemap_entry in raw_sitemap_entries: + __SITEMAP_ENTRIES.append( + ("/" + str(allowed_lang) + "/" + str(sitemap_entry)) + .replace("//", "/") + .replace("//", "/") + ) + # __SITEMAP_ENTRIES.append(sitemap_entry) + # for allowed_lang in ALLOWED_LANGS: def get_sitemap_entries() -> list[str]: