Add feature animations and update styles for kiosks and about pages
- Introduced `featuresAnim` option in editor and index files to enable feature ticker animations. - Updated rendering logic to include feature animations in the about section. - Added new JavaScript files for handling animations on the about page and kiosks page. - Adjusted CSS classes to accommodate new animations and ensure proper visual representation. - Changed primary color in theme defaults for a more cohesive design.
This commit is contained in:
@@ -608,6 +608,7 @@
|
||||
cloudAnim: { type: 'boolean', default: false },
|
||||
bundleAnim: { type: 'boolean', default: false },
|
||||
demoAnim: { type: 'boolean', default: false },
|
||||
featuresAnim: { type: 'boolean', default: false },
|
||||
imgId: { type: 'number', default: 0 },
|
||||
imgUrl: { type: 'string', default: '' },
|
||||
imgAlt: { type: 'string', default: '' },
|
||||
@@ -651,7 +652,8 @@
|
||||
el(TG, { label: 'Reversed layout', checked: a.reversed, onChange: function (v) { s({ reversed: v }); } }),
|
||||
el(TG, { label: 'Cloud Server Animation', checked: a.cloudAnim, onChange: function (v) { s({ cloudAnim: v }); } }),
|
||||
el(TG, { label: 'Player + Display Bundle Animation', checked: !!a.bundleAnim, onChange: function (v) { s({ bundleAnim: v }); } }),
|
||||
el(TG, { label: 'Command Center Demo Animation', checked: !!a.demoAnim, onChange: function (v) { s({ demoAnim: v }); } })
|
||||
el(TG, { label: 'Command Center Demo Animation', checked: !!a.demoAnim, onChange: function (v) { s({ demoAnim: v }); } }),
|
||||
el(TG, { label: 'Feature Ticker Animation', checked: !!a.featuresAnim, onChange: function (v) { s({ featuresAnim: v }); } })
|
||||
),
|
||||
el(PB, { title: 'Visual Image', initialOpen: false },
|
||||
el(MUC, null,
|
||||
@@ -685,7 +687,7 @@
|
||||
el(RT, { tagName: 'h2', style: { marginBottom: '1.5rem' }, value: a.heading, onChange: function (v) { s({ heading: v }); }, placeholder: 'Heading...' }),
|
||||
el(RT, { tagName: 'p', className: 'lead', value: a.description, onChange: function (v) { s({ description: v }); }, placeholder: 'Description...' })
|
||||
),
|
||||
el('div', { className: 'about-intro-visual' + (a.cloudAnim ? ' has-cloud-anim' : (a.bundleAnim ? ' has-pkg-anim' : (a.demoAnim ? ' has-demo-anim' : (a.imgUrl ? ' has-img' : '')))), style: a.reversed ? { direction: 'ltr' } : {} }, visualContent)
|
||||
el('div', { className: 'about-intro-visual' + (a.cloudAnim ? ' has-cloud-anim' : (a.bundleAnim ? ' has-pkg-anim' : (a.demoAnim ? ' has-demo-anim' : (a.featuresAnim ? ' has-features-anim' : (a.imgUrl ? ' has-img' : ''))))), style: a.reversed ? { direction: 'ltr' } : {} }, visualContent)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -342,6 +342,7 @@ add_action('init', function () {
|
||||
'cloudAnim' => ['type' => 'boolean', 'default' => false],
|
||||
'bundleAnim' => ['type' => 'boolean', 'default' => false],
|
||||
'demoAnim' => ['type' => 'boolean', 'default' => false],
|
||||
'featuresAnim' => ['type' => 'boolean', 'default' => false],
|
||||
'imgId' => ['type' => 'number', 'default' => 0],
|
||||
'imgUrl' => ['type' => 'string', 'default' => ''],
|
||||
'imgAlt' => ['type' => 'string', 'default' => ''],
|
||||
@@ -615,6 +616,8 @@ add_action('init', function () {
|
||||
'whitelabelAnim' => ['type' => 'boolean', 'default' => false],
|
||||
'resellerAnim' => ['type' => 'boolean', 'default' => false],
|
||||
'apiAnim' => ['type' => 'boolean', 'default' => false],
|
||||
'selfCheckInAnim' => ['type' => 'boolean', 'default' => false],
|
||||
'selfOrderAnim' => ['type' => 'boolean', 'default' => false],
|
||||
'galleryIds' => ['type' => 'array', 'default' => [], 'items' => ['type' => 'number']],
|
||||
],
|
||||
'supports' => $block_supports,
|
||||
@@ -1012,7 +1015,7 @@ function oribi_render_intro_section($a)
|
||||
<h2 style="margin-bottom:1.5rem;"><?php echo wp_kses_post($a['heading']); ?></h2>
|
||||
<p class="lead"><?php echo wp_kses_post($a['description']); ?></p>
|
||||
</div>
|
||||
<div class="about-intro-visual<?php if (!empty($a['cloudAnim'])) echo ' has-cloud-anim'; elseif (!empty($a['bundleAnim'])) echo ' has-pkg-anim'; elseif (!empty($a['demoAnim'])) echo ' has-demo-anim'; ?>"<?php echo $ltr; ?>>
|
||||
<div class="about-intro-visual<?php if (!empty($a['cloudAnim'])) echo ' has-cloud-anim'; elseif (!empty($a['bundleAnim'])) echo ' has-pkg-anim'; elseif (!empty($a['demoAnim'])) echo ' has-demo-anim'; elseif (!empty($a['featuresAnim'])) echo ' has-features-anim'; ?>"<?php echo $ltr; ?>>
|
||||
<?php
|
||||
if (!empty($a['cloudAnim'])) {
|
||||
echo '<div class="ds-anim-container">';
|
||||
@@ -1093,6 +1096,15 @@ function oribi_render_intro_section($a)
|
||||
$cc .= '</div>'; // .cc-stage
|
||||
echo $cc;
|
||||
}
|
||||
elseif (!empty($a['featuresAnim'])) {
|
||||
$feat = '<div class="features-stage" aria-hidden="true">';
|
||||
$feat .= '<div class="feat-item"><span class="feat-icon"><i class="fas fa-cloud" aria-hidden="true"></i></span><span class="feat-label">Cloud Content Management</span><span class="feat-check"><i class="fas fa-check" aria-hidden="true"></i></span></div>';
|
||||
$feat .= '<div class="feat-item"><span class="feat-icon"><i class="fas fa-calendar-alt" aria-hidden="true"></i></span><span class="feat-label">Intelligent Scheduling</span><span class="feat-check"><i class="fas fa-check" aria-hidden="true"></i></span></div>';
|
||||
$feat .= '<div class="feat-item"><span class="feat-icon"><i class="fas fa-chart-line" aria-hidden="true"></i></span><span class="feat-label">Live Data Integration</span><span class="feat-check"><i class="fas fa-check" aria-hidden="true"></i></span></div>';
|
||||
$feat .= '<div class="feat-item"><span class="feat-icon"><i class="fas fa-star" aria-hidden="true"></i></span><span class="feat-label">Outstanding on Screen</span><span class="feat-check"><i class="fas fa-check" aria-hidden="true"></i></span></div>';
|
||||
$feat .= '</div>';
|
||||
echo $feat;
|
||||
}
|
||||
else {
|
||||
echo wp_kses_post($a['visual']);
|
||||
}
|
||||
@@ -3634,6 +3646,61 @@ function oribi_render_platform_row($a)
|
||||
$visual_html = $ap;
|
||||
$visual_cls = 'platform-visual has-api';
|
||||
}
|
||||
elseif (!empty($a['selfCheckInAnim'])) {
|
||||
/* ── Self Check-In Kiosk ── */
|
||||
$sc = '<div class="checkin-stage" aria-hidden="true">';
|
||||
$sc .= '<div class="checkin-kiosk">';
|
||||
$sc .= '<div class="checkin-kiosk__hdr"><span class="checkin-hdr__title">Visitor Check-In</span><span class="checkin-hdr__badge">Touch to Start</span></div>';
|
||||
$sc .= '<div class="checkin-scenes">';
|
||||
/* Scene 1: name lookup */
|
||||
$sc .= '<div class="checkin-scene checkin-scene--lookup">';
|
||||
$sc .= '<div class="checkin-search"><span class="checkin-search__icon">🔍</span><span class="checkin-search__text">Enter your name...</span></div>';
|
||||
$sc .= '<div class="checkin-result"><div class="checkin-result__row"><span class="checkin-result__name">James Wilson</span><span class="checkin-result__detail">10:30 · Meeting Room C</span></div><div class="checkin-result__row"><span class="checkin-result__name">Sarah Chen</span><span class="checkin-result__detail">11:00 · Board Room</span></div><div class="checkin-result__row"><span class="checkin-result__name">Marcus Lee</span><span class="checkin-result__detail">11:15 · Desk 4B</span></div></div>';
|
||||
$sc .= '</div>'; /* scene lookup */
|
||||
/* Scene 2: confirmation */
|
||||
$sc .= '<div class="checkin-scene checkin-scene--confirm">';
|
||||
$sc .= '<div class="checkin-confirm"><div class="checkin-confirm__avatar">JW</div><div class="checkin-confirm__name">James Wilson</div><div class="checkin-confirm__appt">10:30 · Meeting Room C · Level 2</div><div class="checkin-confirm__host">Host: Emma Turner</div></div>';
|
||||
$sc .= '<button class="checkin-btn">✓ Check In</button>';
|
||||
$sc .= '</div>'; /* scene confirm */
|
||||
/* Scene 3: queue ticket */
|
||||
$sc .= '<div class="checkin-scene checkin-scene--ticket">';
|
||||
$sc .= '<div class="checkin-ticket"><div class="checkin-ticket__label">You're Checked In</div><div class="checkin-ticket__number">Q-047</div><div class="checkin-ticket__detail">Head to Meeting Room C, Level 2</div><div class="checkin-ticket__status">● Emma Turner has been notified</div></div>';
|
||||
$sc .= '</div>'; /* scene ticket */
|
||||
$sc .= '</div>'; /* checkin-scenes */
|
||||
$sc .= '</div>'; /* checkin-kiosk */
|
||||
$sc .= '</div>'; /* checkin-stage */
|
||||
$visual_html = $sc;
|
||||
$visual_cls = 'platform-visual has-checkin';
|
||||
}
|
||||
elseif (!empty($a['selfOrderAnim'])) {
|
||||
/* ── Product Lookup & Self-Ordering Kiosk ── */
|
||||
$so = '<div class="selforder-stage" aria-hidden="true">';
|
||||
$so .= '<div class="selforder-kiosk">';
|
||||
$so .= '<div class="selforder-kiosk__hdr"><span class="selforder-hdr__title">Browse & Order</span><span class="selforder-hdr__basket">🛒 0</span></div>';
|
||||
$so .= '<div class="selforder-body">';
|
||||
$so .= '<div class="selforder-cats">';
|
||||
$so .= '<div class="selforder-cat selforder-cat--electronics" data-so-cat="electronics">Electronics</div>';
|
||||
$so .= '<div class="selforder-cat selforder-cat--clothing" data-so-cat="clothing">Clothing</div>';
|
||||
$so .= '<div class="selforder-cat selforder-cat--food" data-so-cat="food">Food & Drink</div>';
|
||||
$so .= '<div class="selforder-cat selforder-cat--home" data-so-cat="home">Home</div>';
|
||||
$so .= '</div>';
|
||||
$so .= '<div class="selforder-products">';
|
||||
$so .= '<div class="selforder-product" data-so-cat="electronics"><span class="selforder-product__name">Wireless Headphones</span><span class="selforder-product__price">£49.99</span><span class="selforder-product__stock">In Stock</span></div>';
|
||||
$so .= '<div class="selforder-product" data-so-cat="electronics"><span class="selforder-product__name">USB-C Hub</span><span class="selforder-product__price">£29.99</span><span class="selforder-product__stock">In Stock</span></div>';
|
||||
$so .= '<div class="selforder-product" data-so-cat="clothing"><span class="selforder-product__name">Merino Pullover</span><span class="selforder-product__price">£64.00</span><span class="selforder-product__stock">In Stock</span></div>';
|
||||
$so .= '<div class="selforder-product" data-so-cat="clothing"><span class="selforder-product__name">Slim Chinos</span><span class="selforder-product__price">£44.00</span><span class="selforder-product__stock">Low Stock</span></div>';
|
||||
$so .= '<div class="selforder-product" data-so-cat="food"><span class="selforder-product__name">Cold Brew Coffee</span><span class="selforder-product__price">£3.50</span><span class="selforder-product__stock">Available</span></div>';
|
||||
$so .= '<div class="selforder-product" data-so-cat="food"><span class="selforder-product__name">Smoked Salmon Bagel</span><span class="selforder-product__price">£7.25</span><span class="selforder-product__stock">Available</span></div>';
|
||||
$so .= '<div class="selforder-product" data-so-cat="home"><span class="selforder-product__name">Desk Lamp</span><span class="selforder-product__price">£34.99</span><span class="selforder-product__stock">In Stock</span></div>';
|
||||
$so .= '<div class="selforder-product" data-so-cat="home"><span class="selforder-product__name">Storage Basket</span><span class="selforder-product__price">£18.00</span><span class="selforder-product__stock">In Stock</span></div>';
|
||||
$so .= '</div>'; /* selforder-products */
|
||||
$so .= '</div>'; /* selforder-body */
|
||||
$so .= '<button class="selforder-add" disabled>+ Add to Order</button>';
|
||||
$so .= '</div>'; /* selforder-kiosk */
|
||||
$so .= '</div>'; /* selforder-stage */
|
||||
$visual_html = $so;
|
||||
$visual_cls = 'platform-visual has-selforder';
|
||||
}
|
||||
else {
|
||||
$visual_html = oribi_render_icon($a['visual'] ?? '');
|
||||
$visual_cls = 'platform-visual';
|
||||
|
||||
Reference in New Issue
Block a user