feat: VivesPOS landing on Winter CMS 1.2 — theme + plugin + Dockerfile
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
- Base: wintercms/winter branch 1.2 (full framework) - Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS - Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication - Partials: hero (offline-first), features, modes (offline/nube toggle), screenshots, pricing (3 planes), comparison, FAQ, CTA - Plugin VivesPOS.Site with ContactForm - Dockerfile: PHP 8.2 Apache, port 80, healthcheck - Added winter/wn-pages, blog, sitemap, seo plugins - Active theme set to vivespos
This commit is contained in:
90
modules/system/assets/ui/js/loader.cursor.js
Normal file
90
modules/system/assets/ui/js/loader.cursor.js
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* The loading indicator for the mouse cursor.
|
||||
*
|
||||
* Displays the animated loading indicator following the mouse cursor.
|
||||
*
|
||||
* JavaScript API:
|
||||
* $.wn.cursorLoadIndicator.show(event)
|
||||
* $.wn.cursorLoadIndicator.hide()
|
||||
*
|
||||
* By default if the show() method has been called several times, the hide() method should be
|
||||
* called the same number of times in order to hide the cursor. Use hide(true) to hide the
|
||||
* indicator forcibly.
|
||||
*
|
||||
* The event parameter in the show() method is optional. If it is passed, the initial cursor position
|
||||
* will be loaded from it.
|
||||
*
|
||||
* Require:
|
||||
* - modernizr/modernizr
|
||||
*/
|
||||
+function ($) { "use strict";
|
||||
if ($.wn === undefined)
|
||||
$.wn = {}
|
||||
if ($.oc === undefined)
|
||||
$.oc = $.wn
|
||||
|
||||
var CursorLoadIndicator = function () {
|
||||
if (Modernizr.touchevents)
|
||||
return
|
||||
|
||||
this.counter = 0
|
||||
this.indicator = $('<div/>').addClass('cursor-loading-indicator').addClass('hide')
|
||||
$(document.body).append(this.indicator)
|
||||
}
|
||||
|
||||
CursorLoadIndicator.prototype.show = function(event) {
|
||||
if (Modernizr.touchevents)
|
||||
return
|
||||
|
||||
this.counter++
|
||||
|
||||
if (this.counter > 1)
|
||||
return
|
||||
|
||||
var self = this;
|
||||
|
||||
if (event !== undefined && event.clientY !== undefined) {
|
||||
self.indicator.css({
|
||||
left: event.clientX + 15,
|
||||
top: event.clientY + 15
|
||||
})
|
||||
}
|
||||
|
||||
this.indicator.removeClass('hide')
|
||||
$(window).on('mousemove.cursorLoadIndicator', function(e){
|
||||
self.indicator.css({
|
||||
left: e.clientX + 15,
|
||||
top: e.clientY + 15,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
CursorLoadIndicator.prototype.hide = function(force) {
|
||||
if (Modernizr.touchevents)
|
||||
return
|
||||
|
||||
this.counter--
|
||||
if (force !== undefined && force)
|
||||
this.counter = 0
|
||||
|
||||
if (this.counter <= 0) {
|
||||
this.indicator.addClass('hide')
|
||||
$(window).off('.cursorLoadIndicator');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$.wn.cursorLoadIndicator = new CursorLoadIndicator();
|
||||
})
|
||||
|
||||
// CURSORLOADINDICATOR DATA-API
|
||||
// ==============
|
||||
|
||||
$(document)
|
||||
.on('ajaxPromise', '[data-cursor-load-indicator]', function() {
|
||||
$.wn.cursorLoadIndicator.show()
|
||||
}).on('ajaxFail ajaxDone ajaxRedirected', '[data-cursor-load-indicator]', function() {
|
||||
$.wn.cursorLoadIndicator.hide()
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
Reference in New Issue
Block a user