From ea0d1240fa127a03edfaba130b83ee2d68da6324 Mon Sep 17 00:00:00 2001 From: Salif Mehmed Date: Thu, 19 Sep 2024 13:45:04 +0300 Subject: [PATCH] Add more icons --- docs/index.html | 46 +++++++++++++++++++++++++++++-- docs/manifest.json | 64 +++++++++++++++++++++++++++++++++++++++++++ justfile | 19 +++++++++++-- theme/custom.css | 34 ----------------------- theme/fonts/fonts.css | 33 ++++++++++++++++++++++ theme/index.hbs | 7 ++--- 6 files changed, 160 insertions(+), 43 deletions(-) create mode 100644 docs/manifest.json diff --git a/docs/index.html b/docs/index.html index 5109087..ebae485 100644 --- a/docs/index.html +++ b/docs/index.html @@ -34,8 +34,23 @@ "sameAs":["https://bsky.app/profile/globasa.salif.eu"], "url":"https://salif.github.io/gramati-fe-globasa/"} - - + + + + + + + + + + + + + + + + + @@ -90,6 +105,33 @@

Gramati fe Globasa

href="https://salif.github.io/globasa-xwexi-pages/">Xwexi + + diff --git a/docs/manifest.json b/docs/manifest.json new file mode 100644 index 0000000..39b95dc --- /dev/null +++ b/docs/manifest.json @@ -0,0 +1,64 @@ +{ + "name": "Gramati fe Globasa", + "description": "Kompleto Gramati fe Globasa", + "start_url": "./index.html", + "id": "/gramati-fe-globasa/index.html", + "scope": "/gramati-fe-globasa/", + "display": "standalone", + "icons": [ + { + "src": "\/globasa-xwexi-pages\/assets\/icon-36x36.png", + "sizes": "36x36", + "type": "image\/png", + "density": "0.75" + }, + { + "src": "\/globasa-xwexi-pages\/assets\/icon-48x48.png", + "sizes": "48x48", + "type": "image\/png", + "density": "1.0" + }, + { + "src": "\/globasa-xwexi-pages\/assets\/icon-72x72.png", + "sizes": "72x72", + "type": "image\/png", + "density": "1.5" + }, + { + "src": "\/globasa-xwexi-pages\/assets\/icon-96x96.png", + "sizes": "96x96", + "type": "image\/png", + "density": "2.0" + }, + { + "src": "\/globasa-xwexi-pages\/assets\/icon-144x144.png", + "sizes": "144x144", + "type": "image\/png", + "density": "3.0" + }, + { + "src": "\/globasa-xwexi-pages\/assets\/icon-192x192.png", + "sizes": "192x192", + "type": "image\/png", + "density": "4.0" + }, + { + "src": "\/globasa-xwexi-pages\/assets\/icon-512x512.png", + "sizes": "512x512", + "type": "image\/png" + } + ], + "screenshots": [ + { + "src": "\/globasa-xwexi-pages\/assets\/icon-1000x1000.png", + "sizes": "1000x1000", + "type": "image\/png" + }, + { + "src": "\/globasa-xwexi-pages\/assets\/icon-1000x1000.png", + "sizes": "1000x1000", + "type": "image\/png", + "form_factor": "wide" + } + ] +} diff --git a/justfile b/justfile index c6ed0c3..4d9540f 100755 --- a/justfile +++ b/justfile @@ -1,6 +1,9 @@ #!/usr/bin/env -S just -f args := "" +express_path := 'os.homedir()+"/.local/lib/node_modules/express"' +jsdom_path := 'os.homedir()+"/.local/lib/node_modules/jsdom"' +js_beautify_path := '/usr/lib/node_modules/js-beautify' _: @just --list @@ -72,7 +75,17 @@ sync-theme: [doc('Serve')] serve port='8080': - cd docs && python3 -m http.server {{ port }} + #!/usr/bin/env node + const os = require('os'); + const express = require({{ express_path }}); + const path = require('path'); + const app = express(); + const basePath = '/gramati-fe-globasa'; + app.use(basePath, express.static(path.join('.', 'docs'))); + const server = app.listen({{ port }}, () => { + const addr = server.address(); + console.log(`Server is listening on http://localhost:${addr.port}${basePath}`); + }); [confirm] [doc('Publish to GitHub Pages')] @@ -119,8 +132,8 @@ update-book lang="eng" action="update": #!/usr/bin/env node const fs = require("fs") const os = require("os") - const jsdom = require(os.homedir()+"/.local/lib/node_modules/jsdom") - const beautify_html = require("/usr/lib/node_modules/js-beautify").html + const jsdom = require({{ jsdom_path }}) + const beautify_html = require({{ js_beautify_path }}).html const beautify_options = { "indent_size": "1", "indent_char": "\t", "max_preserve_newlines": "-1", "preserve_newlines": false, "end_with_newline": true, "wrap_line_length": 120} diff --git a/theme/custom.css b/theme/custom.css index 3fee080..0131539 100644 --- a/theme/custom.css +++ b/theme/custom.css @@ -1,37 +1,3 @@ -@font-face { - font-family: 'Alegreya'; - font-style: italic; - font-display: swap; - font-weight: 400 900; - src: url('../../fonts/Alegreya-Italic-VariableFont_wght.ttf') format('truetype'); -} - -@font-face { - font-family: 'Alegreya'; - font-style: normal; - font-display: swap; - font-weight: 400 900; - src: url('../../fonts/Alegreya-VariableFont_wght.ttf') format('truetype'); -} - -@font-face { - font-family: 'Open Sans'; - font-style: italic; - font-display: swap; - font-weight: 300 800; - font-stretch: 100%; - src: url('../../fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf') format('truetype'); -} - -@font-face { - font-family: 'Open Sans'; - font-style: normal; - font-display: swap; - font-weight: 300 800; - font-stretch: 100%; - src: url('../../fonts/OpenSans-VariableFont_wdth,wght.ttf') format('truetype'); -} - html { font-family: "Alegreya", serif; } diff --git a/theme/fonts/fonts.css b/theme/fonts/fonts.css index e69de29..f7f85c1 100644 --- a/theme/fonts/fonts.css +++ b/theme/fonts/fonts.css @@ -0,0 +1,33 @@ +@font-face { + font-family: 'Alegreya'; + font-style: italic; + font-display: swap; + font-weight: 400 900; + src: url('../../fonts/Alegreya-Italic-VariableFont_wght.ttf') format('truetype'); +} + +@font-face { + font-family: 'Alegreya'; + font-style: normal; + font-display: swap; + font-weight: 400 900; + src: url('../../fonts/Alegreya-VariableFont_wght.ttf') format('truetype'); +} + +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-display: swap; + font-weight: 300 800; + font-stretch: 100%; + src: url('../../fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf') format('truetype'); +} + +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-display: swap; + font-weight: 300 800; + font-stretch: 100%; + src: url('../../fonts/OpenSans-VariableFont_wdth,wght.ttf') format('truetype'); +} diff --git a/theme/index.hbs b/theme/index.hbs index ef13e56..17d7270 100644 --- a/theme/index.hbs +++ b/theme/index.hbs @@ -13,14 +13,13 @@ {{/if}} + + {{> head}} - - - {{#if favicon_svg}} {{/if}} @@ -37,7 +36,7 @@ {{#if copy_fonts}} - + {{/if}}