mirror of
https://github.com/luxfi/markets.git
synced 2026-10-30 16:19:55 +00:00
- Dashboard, token list, token detail, DEX pairs pages - REST API at /api/v1/markets/* (dashboard, tokens, pairs, health) - White-label tenant resolution from hostname - Embeddable widgets via /embed/ with <2KB loader script - CoinGecko free API integration with in-memory cache - Lux DEX pairs (stub for indexer integration) - Tailwind dark theme, lightweight-charts for price data
16 lines
691 B
JavaScript
16 lines
691 B
JavaScript
(function(){
|
|
var els = document.querySelectorAll('[data-lux-widget]');
|
|
for (var i = 0; i < els.length; i++) {
|
|
var el = els[i];
|
|
var widget = el.getAttribute('data-lux-widget');
|
|
var key = el.getAttribute('data-api-key') || '';
|
|
var symbol = el.getAttribute('data-symbol') || '';
|
|
var theme = el.getAttribute('data-theme') || 'dark';
|
|
var base = el.getAttribute('data-base-url') || 'https://markets.lux.network';
|
|
var iframe = document.createElement('iframe');
|
|
iframe.src = base + '/embed/' + widget + '?key=' + key + '&symbol=' + symbol + '&theme=' + theme;
|
|
iframe.style.cssText = 'border:none;width:100%;height:100%';
|
|
el.appendChild(iframe);
|
|
}
|
|
})();
|