changer pages embed, ajout définitions culture g

This commit is contained in:
Tykayn 2025-10-12 18:13:11 +02:00 committed by tykayn
parent 2c95bea01b
commit 737781e9aa
11 changed files with 123 additions and 87 deletions

View file

@ -23,7 +23,7 @@ interface EmbedConfig {
})
export class Embed {
config = signal<EmbedConfig>({
apiUrl: 'https://api.oedb.fr',
apiUrl: 'https://api.openenventdatabase.org',
what: 'culture',
start: '',
end: '',
@ -35,6 +35,9 @@ export class Embed {
generatedCode = signal<string>('');
constructor() {
this.updateConfig();
}
updateConfig() {
const config = this.config();
const code = this.generateEmbedCode(config);
@ -50,8 +53,8 @@ export class Embed {
const queryString = params.toString();
const scriptUrl = `${window.location.origin}/embed.js`;
return `<!-- Intégration OEDB Embed -->
return `<!-- OpenEventDatabase Embed start-->
<div id="oedb-events" style="width: ${config.width}; height: ${config.height}; border: 1px solid #ddd; border-radius: 8px; overflow: hidden;"></div>
<script src="${scriptUrl}"></script>
<script>
@ -63,7 +66,12 @@ export class Embed {
},
theme: '${config.theme}'
});
</script>`;
</script>
<!--OpenEventDatabase Embed end-->
`;
}
copyToClipboard() {