Skip to content

Commit 7fa532f

Browse files
author
KHOUBZA Younes
committed
add more examples
1 parent de41c6e commit 7fa532f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+239
-121
lines changed

_data/entrypoints.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"entrypoints": {
33
"homepage": {
44
"js": [
5-
"/dist/runtime.0b8eec46.js",
6-
"/dist/homepage.82551349.js"
5+
"/dist/runtime.f5a6adf5.js",
6+
"/dist/homepage.11d1d76a.js"
77
],
88
"css": [
99
"/dist/857.11f63fec.css",
@@ -12,54 +12,54 @@
1212
},
1313
"main": {
1414
"js": [
15-
"/dist/runtime.0b8eec46.js",
16-
"/dist/245.6246929d.js",
17-
"/dist/814.5539bce7.js",
18-
"/dist/main.dda4463f.js"
15+
"/dist/runtime.f5a6adf5.js",
16+
"/dist/245.f9644c9e.js",
17+
"/dist/814.47265ca3.js",
18+
"/dist/main.4d297cb4.js"
1919
],
2020
"css": [
2121
"/dist/857.11f63fec.css",
22-
"/dist/main.94bbbeaa.css"
22+
"/dist/main.35f80290.css"
2323
]
2424
},
2525
"adapter-flasher": {
2626
"js": [
27-
"/dist/runtime.0b8eec46.js",
28-
"/dist/adapter-flasher.74de58f6.js"
27+
"/dist/runtime.f5a6adf5.js",
28+
"/dist/adapter-flasher.9e83994a.js"
2929
]
3030
},
3131
"adapter-noty": {
3232
"js": [
33-
"/dist/runtime.0b8eec46.js",
34-
"/dist/814.5539bce7.js",
35-
"/dist/adapter-noty.c2b3da74.js"
33+
"/dist/runtime.f5a6adf5.js",
34+
"/dist/814.47265ca3.js",
35+
"/dist/adapter-noty.6ec70878.js"
3636
]
3737
},
3838
"adapter-notyf": {
3939
"js": [
40-
"/dist/runtime.0b8eec46.js",
41-
"/dist/adapter-notyf.d8339f0e.js"
40+
"/dist/runtime.f5a6adf5.js",
41+
"/dist/adapter-notyf.db901ffb.js"
4242
]
4343
},
4444
"adapter-pnotify": {
4545
"js": [
46-
"/dist/runtime.0b8eec46.js",
47-
"/dist/874.c656c5a9.js",
48-
"/dist/adapter-pnotify.16eed3a8.js"
46+
"/dist/runtime.f5a6adf5.js",
47+
"/dist/874.ec7ba3fe.js",
48+
"/dist/adapter-pnotify.ade98c1e.js"
4949
]
5050
},
5151
"adapter-sweetalert": {
5252
"js": [
53-
"/dist/runtime.0b8eec46.js",
54-
"/dist/383.7c120f2f.js",
55-
"/dist/adapter-sweetalert.95ed9cf1.js"
53+
"/dist/runtime.f5a6adf5.js",
54+
"/dist/383.ff0df984.js",
55+
"/dist/adapter-sweetalert.c601ab6b.js"
5656
]
5757
},
5858
"adapter-toastr": {
5959
"js": [
60-
"/dist/runtime.0b8eec46.js",
61-
"/dist/245.6246929d.js",
62-
"/dist/adapter-toastr.2bb263be.js"
60+
"/dist/runtime.f5a6adf5.js",
61+
"/dist/245.f9644c9e.js",
62+
"/dist/adapter-toastr.076c47e6.js"
6363
]
6464
}
6565
}

_data/manifest.yml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
{
22
"dist/homepage.css": "/dist/homepage.daa70971.css",
3-
"dist/homepage.js": "/dist/homepage.82551349.js",
4-
"dist/main.css": "/dist/main.94bbbeaa.css",
5-
"dist/main.js": "/dist/main.dda4463f.js",
6-
"dist/adapter-flasher.js": "/dist/adapter-flasher.74de58f6.js",
7-
"dist/adapter-noty.js": "/dist/adapter-noty.c2b3da74.js",
8-
"dist/adapter-notyf.js": "/dist/adapter-notyf.d8339f0e.js",
9-
"dist/adapter-pnotify.js": "/dist/adapter-pnotify.16eed3a8.js",
10-
"dist/adapter-sweetalert.js": "/dist/adapter-sweetalert.95ed9cf1.js",
11-
"dist/adapter-toastr.js": "/dist/adapter-toastr.2bb263be.js",
12-
"dist/runtime.js": "/dist/runtime.0b8eec46.js",
3+
"dist/homepage.js": "/dist/homepage.11d1d76a.js",
4+
"dist/main.css": "/dist/main.35f80290.css",
5+
"dist/main.js": "/dist/main.4d297cb4.js",
6+
"dist/adapter-flasher.js": "/dist/adapter-flasher.9e83994a.js",
7+
"dist/adapter-noty.js": "/dist/adapter-noty.6ec70878.js",
8+
"dist/adapter-notyf.js": "/dist/adapter-notyf.db901ffb.js",
9+
"dist/adapter-pnotify.js": "/dist/adapter-pnotify.ade98c1e.js",
10+
"dist/adapter-sweetalert.js": "/dist/adapter-sweetalert.c601ab6b.js",
11+
"dist/adapter-toastr.js": "/dist/adapter-toastr.076c47e6.js",
12+
"dist/runtime.js": "/dist/runtime.f5a6adf5.js",
1313
"dist/443.11112420.css": "/dist/443.11112420.css",
14-
"dist/443.88bd6db7.js": "/dist/443.88bd6db7.js",
14+
"dist/443.4d91a537.js": "/dist/443.4d91a537.js",
1515
"dist/117.554a2dcd.css": "/dist/117.554a2dcd.css",
16-
"dist/117.b91dd237.js": "/dist/117.b91dd237.js",
16+
"dist/117.298dad94.js": "/dist/117.298dad94.js",
1717
"dist/47.c0be7378.css": "/dist/47.c0be7378.css",
18-
"dist/47.aab10a5a.js": "/dist/47.aab10a5a.js",
18+
"dist/47.a923ff01.js": "/dist/47.a923ff01.js",
1919
"dist/587.9523a7ff.css": "/dist/587.9523a7ff.css",
20-
"dist/587.c23105cc.js": "/dist/587.c23105cc.js",
20+
"dist/587.a8ef3c1b.js": "/dist/587.a8ef3c1b.js",
2121
"dist/282.6a2ea759.css": "/dist/282.6a2ea759.css",
22-
"dist/282.16a3116e.js": "/dist/282.16a3116e.js",
23-
"dist/245.6246929d.js": "/dist/245.6246929d.js",
24-
"dist/814.5539bce7.js": "/dist/814.5539bce7.js",
25-
"dist/383.7c120f2f.js": "/dist/383.7c120f2f.js",
26-
"dist/874.c656c5a9.js": "/dist/874.c656c5a9.js",
22+
"dist/282.057ed601.js": "/dist/282.057ed601.js",
23+
"dist/245.f9644c9e.js": "/dist/245.f9644c9e.js",
24+
"dist/814.47265ca3.js": "/dist/814.47265ca3.js",
25+
"dist/383.ff0df984.js": "/dist/383.ff0df984.js",
26+
"dist/874.ec7ba3fe.js": "/dist/874.ec7ba3fe.js",
2727
"dist/857.11f63fec.css": "/dist/857.11f63fec.css",
2828
"dist/fonts/fa-duotone-900.ttf": "/dist/fonts/fa-duotone-900.7aaed888.ttf",
2929
"dist/fonts/fa-thin-100.ttf": "/dist/fonts/fa-thin-100.e979819d.ttf",
3030
"dist/fonts/fa-light-300.ttf": "/dist/fonts/fa-light-300.c92b45dd.ttf",
3131
"dist/fonts/fa-regular-400.ttf": "/dist/fonts/fa-regular-400.ea55734f.ttf",
3232
"dist/fonts/fa-solid-900.ttf": "/dist/fonts/fa-solid-900.cd4538f7.ttf",
33+
"dist/sounds/notification.wav": "/dist/sounds/notification.wav",
3334
"dist/images/flasher-usage.png": "/dist/images/flasher-usage.png",
3435
"dist/fonts/fa-thin-100.woff2": "/dist/fonts/fa-thin-100.6d7129de.woff2",
3536
"dist/fonts/fa-duotone-900.woff2": "/dist/fonts/fa-duotone-900.0f4932ef.woff2",

_includes/head.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@
2525
<script defer src="{{ link }}"></script>
2626
{% endfor %}
2727

28-
{% if site.data.flasher contains page.url %}
29-
{% assign adapter = site.data.flasher[page.url] %}
30-
{% for link in site.data.entrypoints['entrypoints'][adapter]['css'] %}
31-
<link href="{{ link }}" rel="stylesheet"/>
32-
{% endfor %}
33-
34-
{% for link in site.data.entrypoints['entrypoints'][adapter]['js'] %}
35-
{% unless link contains '/dist/runtime.' %}
36-
<script defer src="{{ link }}"></script>
37-
{% endunless %}
38-
{% endfor %}
39-
{% endif %}
28+
{% unless site.data.dev.dev_mode %}
4029

30+
{% if site.data.flasher contains page.url %}
31+
{% assign adapter = site.data.flasher[page.url] %}
32+
{% for link in site.data.entrypoints['entrypoints'][adapter]['css'] %}
33+
<link href="{{ link }}" rel="stylesheet"/>
34+
{% endfor %}
35+
36+
{% for link in site.data.entrypoints['entrypoints'][adapter]['js'] %}
37+
{% unless link contains '/dist/runtime.' %}
38+
<script defer src="{{ link }}"></script>
39+
{% endunless %}
40+
{% endfor %}
41+
{% endif %}
4142

42-
{% unless site.data.dev.dev_mode %}
4343
<script src="https://cdn.counter.dev/script.js" data-id="3772fc72-0949-47c9-b4e3-6e1da76a2095" data-utcoffset="1"></script>
4444
<script async src="https://www.googletagmanager.com/gtag/js?id=G-T4D78SM7TC"></script>
4545
<script defer>

assets/css/main.pcss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ article blockquote :last-child {
7777
}
7878

7979
code {
80-
background: #f5f2f0;
81-
color: #333;
82-
border-radius: 0.3rem;
80+
@apply text-indigo-500;
8381
}
8482

8583
#main-navigation li a.text-white i {

assets/js/_tryit.js

Lines changed: 58 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ const examples = {
8484
flasher.info(getRandomMessageByType("info"));
8585
},
8686
"# notification builder with toastr": function () {
87-
toastr.success('The action was completed successfully.', 'Great!', {
87+
toastr.success("The action was completed successfully.", "Great!", {
8888
timeOut: 10000,
8989
});
9090
},
9191
"# example with type": function () {
92-
flasher.error('An error has occurred please try again later.');
92+
flasher.error("An error has occurred please try again later.");
9393
},
9494
"# success type with title": function () {
95-
flasher.success(getRandomMessageByType("success"), 'Congratulations!');
95+
flasher.success(getRandomMessageByType("success"), "Congratulations!");
9696
},
9797
"# error message": function () {
9898
flasher.error("This may take some time. Do not refresh the page.");
@@ -134,16 +134,19 @@ const examples = {
134134
flasher.success("Entity saved successfully", "Entity saved");
135135
},
136136
"# arabic translation": function () {
137-
flasher.success('تم إرسال طلبك بنجاح.', 'نجاح', {rtl: true});
138-
flasher.error('حدث خطأ أثناء إرسال طلبك.', 'خطأ', {rtl: true});
139-
flasher.warning('يجب إكمال جميع الحقول الإلزامية قبل إرسال النموذج', 'تحذير', {rtl: true});
140-
flasher.info('سيتم تحديث هذه الصفحة في غضون 10 دقائق.', 'معلومة', {rtl: true});
137+
flasher.success("تم إرسال طلبك بنجاح.", "نجاح", { rtl: true });
138+
flasher.error("حدث خطأ أثناء إرسال طلبك.", "خطأ", { rtl: true });
139+
flasher.warning("يجب إكمال جميع الحقول الإلزامية قبل إرسال النموذج", "تحذير", { rtl: true });
140+
flasher.info("سيتم تحديث هذه الصفحة في غضون 10 دقائق.", "معلومة", { rtl: true });
141141
},
142142
"# french translation": function () {
143-
flasher.success('Votre demande a été envoyée avec succès.', 'Succès');
144-
flasher.error('Une erreur s\'est produite lors de l\'envoi de votre demande.', 'Erreur');
145-
flasher.warning('Vous devez remplir tous les champs obligatoires avant de soumettre le formulaire.', 'Avertissement');
146-
flasher.info('Cette page sera mise à jour dans 10 minutes.', 'Information');
143+
flasher.success("Votre demande a été envoyée avec succès.", "Succès");
144+
flasher.error("Une erreur s'est produite lors de l'envoi de votre demande.", "Erreur");
145+
flasher.warning(
146+
"Vous devez remplir tous les champs obligatoires avant de soumettre le formulaire.",
147+
"Avertissement"
148+
);
149+
flasher.info("Cette page sera mise à jour dans 10 minutes.", "Information");
147150
},
148151
"# noty": function () {
149152
noty.success("The book has been added to the library successfully!");
@@ -152,57 +155,76 @@ const examples = {
152155
noty.error("Oops, something went wrong.");
153156
},
154157
"# noty alert": function () {
155-
noty.flash("alert", "This may take a while. Do not refresh the page.")
158+
noty.flash("alert", "This may take a while. Do not refresh the page.");
156159
},
157160
"# noty layout": function () {
158161
noty.success("The action was completed successfully.", {
159162
layout: "topCenter",
160163
});
161164
},
162165
"# noty theme mint": function () {
163-
noty.success('Your request was successfully sent.', {theme: "mint"});
164-
noty.error('An error occurred while sending your request.', {theme: "mint"});
165-
noty.warning('You must fill out all required fields before submitting the form.', {theme: "mint"});
166-
noty.info('This page will be updated in 10 minutes.', {theme: "mint"});
166+
noty.success("Your request was successfully sent.", { theme: "mint" });
167+
noty.error("An error occurred while sending your request.", { theme: "mint" });
168+
noty.warning("You must fill out all required fields before submitting the form.", { theme: "mint" });
169+
noty.info("This page will be updated in 10 minutes.", { theme: "mint" });
167170
},
168171
"# noty theme relax": function () {
169172
import("noty/lib/themes/relax.css").then(function () {
170-
noty.success('Your request was successfully sent.', {theme: "relax"});
171-
noty.error('An error occurred while sending your request.', {theme: "relax"});
172-
noty.warning('You must fill out all required fields before submitting the form.', {theme: "relax"});
173-
noty.info('This page will be updated in 10 minutes.', {theme: "relax"});
173+
noty.success("Your request was successfully sent.", { theme: "relax" });
174+
noty.error("An error occurred while sending your request.", { theme: "relax" });
175+
noty.warning("You must fill out all required fields before submitting the form.", { theme: "relax" });
176+
noty.info("This page will be updated in 10 minutes.", { theme: "relax" });
174177
});
175178
},
176179
"# noty theme metroui": function () {
177180
import("noty/lib/themes/metroui.css").then(function () {
178-
noty.success('Your request was successfully sent.', {theme: "metroui"});
179-
noty.error('An error occurred while sending your request.', {theme: "metroui"});
180-
noty.warning('You must fill out all required fields before submitting the form.', {theme: "metroui"});
181-
noty.info('This page will be updated in 10 minutes.', {theme: "metroui"});
181+
noty.success("Your request was successfully sent.", { theme: "metroui" });
182+
noty.error("An error occurred while sending your request.", { theme: "metroui" });
183+
noty.warning("You must fill out all required fields before submitting the form.", { theme: "metroui" });
184+
noty.info("This page will be updated in 10 minutes.", { theme: "metroui" });
182185
});
183186
},
184187
"# noty theme light": function () {
185188
import("noty/lib/themes/light.css").then(function () {
186-
noty.success('Your request was successfully sent.', {theme: "light"});
187-
noty.error('An error occurred while sending your request.', {theme: "light"});
188-
noty.warning('You must fill out all required fields before submitting the form.', {theme: "light"});
189-
noty.info('This page will be updated in 10 minutes.', {theme: "light"});
189+
noty.success("Your request was successfully sent.", { theme: "light" });
190+
noty.error("An error occurred while sending your request.", { theme: "light" });
191+
noty.warning("You must fill out all required fields before submitting the form.", { theme: "light" });
192+
noty.info("This page will be updated in 10 minutes.", { theme: "light" });
190193
});
191194
},
192195
"# noty theme nest": function () {
193196
import("noty/lib/themes/nest.css").then(function () {
194-
noty.success('Your request was successfully sent.', {theme: "nest"});
195-
noty.error('An error occurred while sending your request.', {theme: "nest"});
196-
noty.warning('You must fill out all required fields before submitting the form.', {theme: "nest"});
197-
noty.info('This page will be updated in 10 minutes.', {theme: "nest"});
197+
noty.success("Your request was successfully sent.", { theme: "nest" });
198+
noty.error("An error occurred while sending your request.", { theme: "nest" });
199+
noty.warning("You must fill out all required fields before submitting the form.", { theme: "nest" });
200+
noty.info("This page will be updated in 10 minutes.", { theme: "nest" });
198201
});
199202
},
200203
"# noty theme sunset": function () {
201204
import("noty/lib/themes/sunset.css").then(function () {
202-
noty.success('Your request was successfully sent.', {theme: "sunset"});
203-
noty.error('An error occurred while sending your request.', {theme: "sunset"});
204-
noty.warning('You must fill out all required fields before submitting the form.', {theme: "sunset"});
205-
noty.info('This page will be updated in 10 minutes.', {theme: "sunset"});
205+
noty.success("Your request was successfully sent.", { theme: "sunset" });
206+
noty.error("An error occurred while sending your request.", { theme: "sunset" });
207+
noty.warning("You must fill out all required fields before submitting the form.", { theme: "sunset" });
208+
noty.info("This page will be updated in 10 minutes.", { theme: "sunset" });
209+
});
210+
},
211+
"# noty timeout": function () {
212+
noty.success("The action was completed successfully.", { timeout: 2000 });
213+
},
214+
"# noty progressBar": function () {
215+
noty.success("The action was completed successfully.", { progressBar: false });
216+
},
217+
"# noty closeWith": function () {
218+
noty.error("An error occurred while sending your request.", { closeWith: ["click", "button"] });
219+
},
220+
"# noty animation": function () {
221+
noty.info("This may take some time. Do not refresh the page.", { animation: null });
222+
},
223+
"# noty sounds": function () {
224+
noty.success("The operation completed successfully.", {
225+
sources: ["/dist/sounds/notification.wav"],
226+
volume: 0.3,
227+
conditions: ["docVisible", "docHidden"],
206228
});
207229
},
208230
};

assets/sounds/notification.wav

840 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[117],{117:function(e,s,u){u.r(s)}}]);
1+
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[117],{3117:function(e,s,u){u.r(s)}}]);

dist/245.6246929d.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/245.f9644c9e.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[282],{282:function(e,s,u){u.r(s)}}]);
1+
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[282],{1282:function(e,s,u){u.r(s)}}]);

dist/383.7c120f2f.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/383.ff0df984.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[443],{443:function(e,s,u){u.r(s)}}]);
1+
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[443],{6443:function(e,s,u){u.r(s)}}]);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[47],{47:function(e,s,u){u.r(s)}}]);
1+
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[47],{4047:function(e,s,u){u.r(s)}}]);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[587],{587:function(e,s,u){u.r(s)}}]);
1+
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[587],{4587:function(e,s,u){u.r(s)}}]);

dist/814.47265ca3.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/814.5539bce7.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/874.c656c5a9.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/874.ec7ba3fe.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/adapter-flasher.74de58f6.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/adapter-noty.c2b3da74.js renamed to dist/adapter-flasher.9e83994a.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/adapter-noty.6ec70878.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/adapter-notyf.d8339f0e.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/adapter-notyf.db901ffb.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/adapter-pnotify.16eed3a8.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/adapter-pnotify.ade98c1e.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/adapter-sweetalert.95ed9cf1.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)