apostrophecms-plugin-all-in-one-accessibility 1.0.6 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +195 -163
- package/app/config.js +134 -0
- package/app/helpers.js +62 -0
- package/app/skynet-widget.js +509 -0
- package/assets/css/banners.css +77 -0
- package/assets/css/base.css +50 -0
- package/assets/css/components.css +91 -0
- package/assets/css/paid.css +53 -0
- package/assets/css/responsive.css +70 -0
- package/assets/css/score.css +42 -0
- package/assets/css/settings.css +154 -0
- package/assets/css/tabs.css +52 -0
- package/assets/css/tokens.css +53 -0
- package/assets/images/icons/aioa-icon-type-1.svg +1 -0
- package/assets/images/icons/aioa-icon-type-10.svg +1 -0
- package/assets/images/icons/aioa-icon-type-11.svg +1 -0
- package/assets/images/icons/aioa-icon-type-12.svg +1 -0
- package/assets/images/icons/aioa-icon-type-13.svg +1 -0
- package/assets/images/icons/aioa-icon-type-14.svg +29 -0
- package/assets/images/icons/aioa-icon-type-15.svg +26 -0
- package/assets/images/icons/aioa-icon-type-16.svg +17 -0
- package/assets/images/icons/aioa-icon-type-17.svg +24 -0
- package/assets/images/icons/aioa-icon-type-18.svg +20 -0
- package/assets/images/icons/aioa-icon-type-19.svg +25 -0
- package/assets/images/icons/aioa-icon-type-2.svg +1 -0
- package/assets/images/icons/aioa-icon-type-20.svg +24 -0
- package/assets/images/icons/aioa-icon-type-21.svg +28 -0
- package/assets/images/icons/aioa-icon-type-22.svg +21 -0
- package/assets/images/icons/aioa-icon-type-23.svg +21 -0
- package/assets/images/icons/aioa-icon-type-24.svg +21 -0
- package/assets/images/icons/aioa-icon-type-25.svg +15 -0
- package/assets/images/icons/aioa-icon-type-26.svg +23 -0
- package/assets/images/icons/aioa-icon-type-27.svg +21 -0
- package/assets/images/icons/aioa-icon-type-28.svg +27 -0
- package/assets/images/icons/aioa-icon-type-29.svg +25 -0
- package/assets/images/icons/aioa-icon-type-3.svg +1 -0
- package/assets/images/icons/aioa-icon-type-4.svg +16 -0
- package/assets/images/icons/aioa-icon-type-5.svg +1 -0
- package/assets/images/icons/aioa-icon-type-6.svg +1 -0
- package/assets/images/icons/aioa-icon-type-7.svg +1 -0
- package/assets/images/icons/aioa-icon-type-8.svg +1 -0
- package/assets/images/icons/aioa-icon-type-9.svg +1 -0
- package/assets/js/app.js +152 -0
- package/assets/js/core.js +249 -0
- package/assets/js/dashboard.js +97 -0
- package/assets/js/paid-features.js +237 -0
- package/assets/js/plan.js +65 -0
- package/assets/js/save.js +35 -0
- package/assets/js/score.js +130 -0
- package/assets/js/settings-form.js +371 -0
- package/assets/js/tabs.js +108 -0
- package/assets/js/ui.js +90 -0
- package/index.js +301 -15
- package/package.json +19 -9
- package/ui/apos/components/AllInOneAccessibilitySettings.vue +126 -679
- package/views/layout.ejs +97 -0
- package/views/partials/accessibility-score.ejs +37 -0
- package/views/partials/header.ejs +13 -0
- package/views/partials/lock.ejs +20 -0
- package/views/partials/paid/links.ejs +33 -0
- package/views/partials/paid/mobile-position.ejs +80 -0
- package/views/partials/paid/toggles.ejs +20 -0
- package/views/partials/paid-banner.ejs +19 -0
- package/views/partials/paid-features.ejs +14 -0
- package/views/partials/score/card.ejs +61 -0
- package/views/partials/settings/color.ejs +37 -0
- package/views/partials/settings/icon-size.ejs +43 -0
- package/views/partials/settings/icon-type.ejs +24 -0
- package/views/partials/settings/position.ejs +70 -0
- package/views/partials/settings/save-bar.ejs +9 -0
- package/views/partials/settings/widget-size.ejs +38 -0
- package/views/partials/settings-form.ejs +39 -0
- package/views/partials/site-strip.ejs +5 -0
- package/views/partials/status.ejs +16 -0
- package/views/partials/tabs.ejs +32 -0
- package/views/partials/upgrade-banner.ejs +34 -0
- package/views/scriptTag.html +7 -1
- package/ui/apos/apps/AllInOneAccessibilitySettings.js +0 -8
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<%#
|
|
2
|
+
Tabs + widget settings form. Each Appearance Design section lives in
|
|
3
|
+
views/partials/settings/, the paid tabs in paid-features.ejs and accessibility-score.ejs.
|
|
4
|
+
The form is read and filled by assets/js/settings-form.js (+ paid-features.js)
|
|
5
|
+
and saved by assets/js/save.js. The save bar shows on Appearance Design, and on Paid Features
|
|
6
|
+
on a paid plan (assets/js/tabs.js).
|
|
7
|
+
-%>
|
|
8
|
+
<%- include('tabs') %>
|
|
9
|
+
|
|
10
|
+
<form id="widget-form" name="widget-form" class="aioa-form" novalidate>
|
|
11
|
+
|
|
12
|
+
<!-- Appearance Design -->
|
|
13
|
+
<div class="aioa-tabpanel" role="tabpanel" id="panel-appearance" aria-labelledby="tab-appearance" tabindex="0">
|
|
14
|
+
<div class="aioa-columns">
|
|
15
|
+
<%- include('settings/color') %>
|
|
16
|
+
<%- include('settings/widget-size') %>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<%- include('settings/position') %>
|
|
20
|
+
<%- include('settings/icon-type') %>
|
|
21
|
+
<%- include('settings/icon-size') %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<!-- Paid Features -->
|
|
25
|
+
<div class="aioa-tabpanel" role="tabpanel" id="panel-paid" aria-labelledby="tab-paid" tabindex="0" hidden>
|
|
26
|
+
<%- include('paid-features') %>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<!-- Accessibility Score -->
|
|
30
|
+
<div class="aioa-tabpanel" role="tabpanel" id="panel-score" aria-labelledby="tab-score" tabindex="0" hidden>
|
|
31
|
+
<%- include('accessibility-score') %>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- Save bar (Appearance Design, and Paid Features on a paid plan); stays at the bottom of the screen while scrolling -->
|
|
35
|
+
<div id="save-area">
|
|
36
|
+
<%- include('settings/save-bar') %>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
</form>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<%#
|
|
2
|
+
Loading and error states. Only one of #load, #error_block and
|
|
3
|
+
#settings_block is visible at a time (AIOA.ui.setView in assets/js/ui.js).
|
|
4
|
+
%>
|
|
5
|
+
<!-- Loading -->
|
|
6
|
+
<div id="load" class="aioa-loading" role="status">
|
|
7
|
+
<span class="aioa-spinner" aria-hidden="true"></span>
|
|
8
|
+
<span>Loading your widget settings…</span>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<!-- Error (settings could not be loaded); title and text set by assets/js/app.js -->
|
|
12
|
+
<section id="error_block" class="aioa-card aioa-error-card" hidden>
|
|
13
|
+
<h2 id="error-title">We couldn't load your widget settings</h2>
|
|
14
|
+
<p id="error-message">Please check your connection and try again.</p>
|
|
15
|
+
<button type="button" class="aioa-btn aioa-btn-primary" id="retry-btn">Try again</button>
|
|
16
|
+
</section>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<%#
|
|
2
|
+
Tabs above the settings (assets/js/tabs.js):
|
|
3
|
+
Appearance Design - color, widget size, position, icon type and icon size
|
|
4
|
+
Paid Features - widget position for mobile, links, widget behavior
|
|
5
|
+
Accessibility Score - scan results of the website
|
|
6
|
+
Printed in the free plan order; on a paid plan AIOA.tabs.setPlan moves them to
|
|
7
|
+
Accessibility Score, Paid Features, Appearance Design.
|
|
8
|
+
The last two show a lock while the website is not on a paid plan.
|
|
9
|
+
-%>
|
|
10
|
+
<%
|
|
11
|
+
// [id, label, locked on the free plan]
|
|
12
|
+
const tabs = [
|
|
13
|
+
['appearance', 'Appearance Design', false],
|
|
14
|
+
['paid', 'Paid Features', true],
|
|
15
|
+
['score', 'Accessibility Score', true],
|
|
16
|
+
];
|
|
17
|
+
-%>
|
|
18
|
+
<div class="aioa-tabs" role="tablist" aria-label="Settings">
|
|
19
|
+
<% tabs.forEach((tab, i) => { %>
|
|
20
|
+
<button type="button" role="tab" class="aioa-tab" id="tab-<%= tab[0] %>" data-tab="<%= tab[0] %>"
|
|
21
|
+
aria-controls="panel-<%= tab[0] %>" aria-selected="<%= i === 0 ? 'true' : 'false' %>" tabindex="<%= i === 0 ? '0' : '-1' %>">
|
|
22
|
+
<span class="aioa-tab-label"><%= tab[1] %></span>
|
|
23
|
+
<% if (tab[2]) { %>
|
|
24
|
+
<!-- Lock: shown while the website is not on a paid plan (AIOA.tabs.setPlan) -->
|
|
25
|
+
<span class="aioa-tab-lock" data-tab-lock hidden>
|
|
26
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><rect x="5" y="11" width="14" height="10" rx="2" /><path d="M8 11V8a4 4 0 0 1 8 0v3" /></svg>
|
|
27
|
+
<span class="visually-hidden">(paid plan)</span>
|
|
28
|
+
</span>
|
|
29
|
+
<% } %>
|
|
30
|
+
</button>
|
|
31
|
+
<% }); %>
|
|
32
|
+
</div>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<%#
|
|
2
|
+
Free plan: purple "Upgrade to Paid Plan" banner.
|
|
3
|
+
Shown when the registered website is on the free widget (is_free_widget = 1).
|
|
4
|
+
%>
|
|
5
|
+
<section id="free_plan_upgrade_block" class="aioa-upgrade" aria-labelledby="upgrade-title" hidden>
|
|
6
|
+
<!-- Large faded accessibility figure in the top right corner -->
|
|
7
|
+
<svg class="aioa-upgrade-watermark" viewBox="0 0 69 69" fill="#fff" aria-hidden="true" focusable="false"><path d="<%= cfg.AIOA_LOGO_PATH %>" /></svg>
|
|
8
|
+
|
|
9
|
+
<!-- Title, what the paid plan adds, call to action -->
|
|
10
|
+
<div class="aioa-upgrade-head">
|
|
11
|
+
<div class="aioa-upgrade-intro">
|
|
12
|
+
<p class="aioa-upgrade-tag"><i aria-hidden="true"></i>Free plan active</p>
|
|
13
|
+
<h2 id="upgrade-title">With 24 Features</h2>
|
|
14
|
+
<p>Upgrade to unlock <strong>100+ Premium Accessibility Features</strong> and make your website even more inclusive.</p>
|
|
15
|
+
<ul class="aioa-upgrade-points">
|
|
16
|
+
<li>190+ Supported languages</li>
|
|
17
|
+
<li>12 Accessibility Profiles</li>
|
|
18
|
+
</ul>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="aioa-upgrade-cta">
|
|
21
|
+
<a href="<%= cfg.AIOA_UPGRADE_URL %>" data-upgrade-link target="_blank" rel="noopener" class="aioa-btn-white">
|
|
22
|
+
Upgrade to Paid Plan
|
|
23
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6" /></svg>
|
|
24
|
+
<span class="visually-hidden">(opens in a new tab)</span>
|
|
25
|
+
</a>
|
|
26
|
+
<small>10-day free trial · Cancel anytime</small>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- Note -->
|
|
31
|
+
<p class="aioa-upgrade-note">
|
|
32
|
+
<b>NOTE:</b> Currently, All in One Accessibility is dedicated to enhancing accessibility specifically for websites and online stores.
|
|
33
|
+
</p>
|
|
34
|
+
</section>
|
package/views/scriptTag.html
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
{#
|
|
2
|
+
All in One Accessibility widget script, appended to <head> on every page (index.js -> scriptTag).
|
|
3
|
+
The widget loads the settings saved for the website by itself.
|
|
4
|
+
#}
|
|
5
|
+
{% if data.scriptUrl %}
|
|
6
|
+
<script id="{{ data.scriptId }}" src="{{ data.scriptUrl }}" defer></script>
|
|
7
|
+
{% endif %}
|