This is the github repo for the official TMD widgets and user instructions
This widget allows users to incorporate summary statistics charts into their own websites. Any changes in the TMD will then be reflected automatically on the users website.
Add the following code snippets to your own website:
Insert the below snippet where on the website you want the widget to be:
<div class="tmd-widget" id="tmd-widget-container"></div>
Place this code snippet in the bottom or top of your code:
<script src="https://elixir-europe-training.github.io/Training-Metrics-Database-widget/widget.js"></script>
<script>
TMDWidget({
container: '#tmd-widget-container',
questions: [<question_slug>, <question_slug>],
}).catch((error) => {
console.error('TMDWidget failed to initialise', error);
});
</script>
The following parameters are customizable for the widget:
Either questionSets can be set, or questions, not both. In case of both being defined, questionSets take precedence. If neither questionSets nor questions are defined, all questionSets will be returned.
A very simple example usage of the widget script can be seen in example.html and it can be previewed at https://elixir-europe-training.github.io/Training-Metrics-Database-widget/example.html