<iframe src="https://mm-v3.vercel.app/widget?theme=default" width="100%" height="200" frameborder="0" scrolling="no" ></iframe>
<iframe src="https://mm-v3.vercel.app/widget?theme=blue" width="100%" height="200" frameborder="0" scrolling="no" ></iframe>
<iframe src="https://mm-v3.vercel.app/widget?theme=purple" width="100%" height="200" frameborder="0" scrolling="no" ></iframe>
<iframe src="https://mm-v3.vercel.app/widget?theme=orange" width="100%" height="200" frameborder="0" scrolling="no" ></iframe>
<iframe src="https://mm-v3.vercel.app/widget?theme=red" width="100%" height="200" frameborder="0" scrolling="no" ></iframe>
Добавьте параметр ?theme=название_темы к URL виджета. Например: https://mm-v3.vercel.app/widget?theme=blue
// Создание iframe с выбранной темой
function createWidget(theme = 'default') {
const iframe = document.createElement('iframe');
iframe.src = `https://mm-v3.vercel.app/widget?theme=${theme}`;
iframe.width = '100%';
iframe.height = '200';
iframe.frameBorder = '0';
iframe.scrolling = 'no';
// Добавляем в контейнер
document.getElementById('widget-container').appendChild(iframe);
}
// Пример использования
createWidget('blue'); // Синяя тема
createWidget('purple'); // Фиолетовая тема