changer pages embed, ajout définitions culture g
This commit is contained in:
parent
2c95bea01b
commit
737781e9aa
11 changed files with 123 additions and 87 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue