synchro du labo (0bf0da65) : app.blade.php, README.md
This commit is contained in:
21
README.md
Normal file
21
README.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# 📖 Wiki
|
||||||
|
|
||||||
|
Le wiki vivant — le lexique ionique et les papers.
|
||||||
|
|
||||||
|
| | |
|
||||||
|
| --- | --- |
|
||||||
|
| id | `wiki` |
|
||||||
|
| fournit | `lexicon` `papers` |
|
||||||
|
| bions qu'il nomme | `jOSApps` `jOSPorts` `jOSWire` `jOSXerPrefs` |
|
||||||
|
| fichiers | `app.blade.php` |
|
||||||
|
| dans le labo | `resources/views/ploxions/wiki/` (dépôt `my_website2`) |
|
||||||
|
|
||||||
|
## Contribuer
|
||||||
|
|
||||||
|
- **Dans le xer** : https://labo.j0bot.ch/px/atelier?ploxion=wiki — prends-le, modifie-le, vois-le tourner, « ⧗ envoyer le tsoin ».
|
||||||
|
- **Dans VS Code** : `xb prendre wiki` (ou l'extension xerboxion › ⇩ Prendre), puis ⧗ Envoyer.
|
||||||
|
- Le chemin complet : https://labo.j0bot.ch/px/contribuer
|
||||||
|
|
||||||
|
Ce dépôt est un **miroir** du labo (synchronisé par `bin/ploxions-forge.mjs`, depuis le commit `0bf0da65`) : une modif se propose par un tsoin ou une branche du labo, pas directement ici.
|
||||||
|
|
||||||
|
© 2026 chill-tekk · ne pas nuire
|
||||||
48
app.blade.php
Normal file
48
app.blade.php
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{{-- PL0XI0N wiki — wrapper iframe (le wiki vivant, /wiki). S'enregistre dans
|
||||||
|
window.jOSApps['wiki'] et monte /wiki en mode embedded.
|
||||||
|
mount(container, ctx) -> { unmount }. 100% client-side, aucune route neuve. --}}
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
function mount(container, ctx) {
|
||||||
|
var url = (ctx && ctx.config && ctx.config.url) ? ctx.config.url : '/wiki';
|
||||||
|
// LE XW (docs/dev/42-lanceurs.md) : un mot du lexique choisi dans le xw arrive en demande {slug} (lue une fois) → sa page
|
||||||
|
try {
|
||||||
|
var XP = window.jOSXerPrefs, d = (XP && typeof XP.params === 'function') ? XP.params('wiki', ctx) : ((ctx && ctx.params) || {});
|
||||||
|
var sl = d && typeof d.slug === 'string' ? d.slug.trim().toLowerCase() : '';
|
||||||
|
if (/^[a-z0-9][a-z0-9_-]*$/.test(sl)) url = (String(url).split(/[?#]/)[0].replace(/\/+$/, '') || '/wiki') + '/' + encodeURIComponent(sl);
|
||||||
|
} catch (e0) {}
|
||||||
|
container.innerHTML = ''; container.style.padding = '0';
|
||||||
|
var f = document.createElement('iframe');
|
||||||
|
f.src = url; f.title = 'Wiki'; f.setAttribute('loading', 'lazy');
|
||||||
|
f.style.cssText = 'width:100%;height:100%;border:0;display:block;background:transparent';
|
||||||
|
container.appendChild(f);
|
||||||
|
|
||||||
|
// IN goto : un terme choisi ailleurs (tree.term / dictionnaire.term routés
|
||||||
|
// par jOSWire) ouvre sa page /wiki/{slug} dans l'iframe. Payload {slug,...}
|
||||||
|
// ou string ; slug wiki only (pas d'URL arbitraire), best-effort.
|
||||||
|
var offGoto = null;
|
||||||
|
if (window.jOSPorts && window.jOSPorts.on) {
|
||||||
|
try {
|
||||||
|
var base = String((ctx && ctx.config && ctx.config.url) ? ctx.config.url : '/wiki').split(/[?#]/)[0].replace(/\/+$/, '') || '/wiki';
|
||||||
|
offGoto = window.jOSPorts.on('ploxion.wiki.goto', function (p) {
|
||||||
|
try {
|
||||||
|
var slug = (typeof p === 'string') ? p : (p && (p.slug || p.term || p.name));
|
||||||
|
if (typeof slug !== 'string') return;
|
||||||
|
slug = slug.trim().toLowerCase();
|
||||||
|
if (!/^[a-z0-9][a-z0-9_-]*$/.test(slug)) return;
|
||||||
|
var next = base + '/' + encodeURIComponent(slug);
|
||||||
|
if (f.getAttribute('src') !== next) f.src = next;
|
||||||
|
} catch (e) {}
|
||||||
|
});
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
return { unmount: function () {
|
||||||
|
try { if (offGoto) offGoto(); } catch (e) {}
|
||||||
|
container.innerHTML = '';
|
||||||
|
} };
|
||||||
|
}
|
||||||
|
window.jOSApps = window.jOSApps || {};
|
||||||
|
window.jOSApps['wiki'] = { manifest: { id: 'wiki', name: 'Wiki', icon: '📖' }, mount: mount };
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user