Ajout du shader d'ouverture sur la page d'accueil

This commit is contained in:
2026-08-02 15:31:56 +02:00
parent 36d9ac4230
commit dc2f0013b0
7 changed files with 39 additions and 41 deletions
+6 -8
View File
@@ -1,10 +1,12 @@
import { statusProxy } from './main.js'
import { getDocumentShaderSource } from './cuteTexture.js';
export async function loadStatus(){
let res = await fetch('/status/index.html');
let html_text = await res.text()
let html = new DOMParser().parseFromString(html_text, "text/html");
let shaderSource = getDocumentShaderSource(html);
let target = document.querySelector('#statuSection');
@@ -15,13 +17,7 @@ export async function loadStatus(){
let status = html.querySelector('#lolStatus');
console.log('current status:', status.innerText);
if (status.innerText.includes('ouvert')){
statusProxy.lolStatus = true;
}else{
statusProxy.lolStatus = false;
}
let isOpen = status.innerText.includes('ouvert');
let icon = html.querySelector('link[rel="icon"]');
let style = html.querySelectorAll('link[rel="stylesheet"]')[0];
@@ -31,4 +27,6 @@ export async function loadStatus(){
document.head.append(style);
target.appendChild(status);
return { open: isOpen, shaderSource };
}