MediaWiki:Gadget-wix-interactive.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 472:
 
wix.empty( container );
 
// Outer wrapper — single card containing the entire widget
var wrapper = wix.el( 'div', { className: 'wix-eng-wrapper' } );
container.appendChild( wrapper );
 
// Fixed info row
containerwrapper.appendChild( wix.el( 'div', { className: 'wix-eng-fixed' }, [
wix.el( 'div', {}, [ 'Policies: ', wix.el( 'span', { textContent: '10,000' } ) ] ),
wix.el( 'div', {}, [ 'Avg premium: ', wix.el( 'span', { textContent: '\u20AC500' } ) ] ),
Line 482 ⟶ 486:
 
// Scenario strip
containerwrapper.appendChild( wix.el( 'div', { className: 'wix-eng-section-label', textContent: 'Claims scenario' } ) );
 
var scenarios = [
Line 510 ⟶ 514:
} );
 
containerwrapper.appendChild( strip );
 
// Sliders
Line 518 ⟶ 522:
var claimsVal = wix.el( 'div', { className: 'wix-eng-slider-val', textContent: '\u20AC3.20M' } );
 
containerwrapper.appendChild( wix.el( 'div', { className: 'wix-eng-slider-row' }, [
wix.el( 'div', { className: 'wix-eng-slider-label', textContent: 'Actual claims' } ),
claimsSlider,
Line 529 ⟶ 533:
var investVal = wix.el( 'div', { className: 'wix-eng-slider-val', textContent: '3.0%' } );
 
containerwrapper.appendChild( wix.el( 'div', { className: 'wix-eng-slider-row' }, [
wix.el( 'div', { className: 'wix-eng-slider-label', textContent: 'Annual return on float' } ),
investSlider,
Line 536 ⟶ 540:
 
// Divider
containerwrapper.appendChild( wix.el( 'div', { className: 'wix-eng-divider' } ) );
 
// Engine 1: Underwriting
Line 543 ⟶ 547:
var uwBar = wix.el( 'div', { className: 'wix-eng-bar' } );
 
containerwrapper.appendChild( wix.el( 'div', { className: 'wix-eng-card' }, [
wix.el( 'div', { className: 'wix-eng-head' }, [
wix.el( 'div', { className: 'wix-eng-title', textContent: 'Engine 1: underwriting' } ),
Line 556 ⟶ 560:
var crSub = wix.el( 'div', { className: 'wix-eng-cr-sub', textContent: 'Below 100% \u2014 underwriting profit' } );
 
containerwrapper.appendChild( wix.el( 'div', { className: 'wix-eng-cr' }, [
wix.el( 'div', { className: 'wix-eng-cr-label', textContent: 'Combined ratio' } ),
crValEl,
Line 567 ⟶ 571:
var invBar = wix.el( 'div', { className: 'wix-eng-bar' } );
 
containerwrapper.appendChild( wix.el( 'div', { className: 'wix-eng-card' }, [
wix.el( 'div', { className: 'wix-eng-head' }, [
wix.el( 'div', { className: 'wix-eng-title', textContent: 'Engine 2: investment' } ),
Line 577 ⟶ 581:
 
// Divider
containerwrapper.appendChild( wix.el( 'div', { className: 'wix-eng-divider' } ) );
 
// Total profit
Line 583 ⟶ 587:
var totalSub = wix.el( 'div', { className: 'wix-eng-total-sub', textContent: 'Underwriting + investment, before tax' } );
 
containerwrapper.appendChild( wix.el( 'div', { className: 'wix-eng-total' }, [
wix.el( 'div', { className: 'wix-eng-total-head' }, [
wix.el( 'div', { className: 'wix-eng-total-label', textContent: 'Total pre-tax profit' } ),
Line 593 ⟶ 597:
// Callout
var callout = wix.el( 'div', { className: 'wix-eng-callout wix-eng-callout--profit', textContent: 'Both engines are contributing to profit.' } );
containerwrapper.appendChild( callout );