Skip to content

Commit

Permalink
add more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
KHOUBZA Younes committed Jan 2, 2023
1 parent de41c6e commit 7fa532f
Show file tree
Hide file tree
Showing 42 changed files with 239 additions and 121 deletions.
46 changes: 23 additions & 23 deletions _data/entrypoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"entrypoints": {
"homepage": {
"js": [
"/dist/runtime.0b8eec46.js",
"/dist/homepage.82551349.js"
"/dist/runtime.f5a6adf5.js",
"/dist/homepage.11d1d76a.js"
],
"css": [
"/dist/857.11f63fec.css",
Expand All @@ -12,54 +12,54 @@
},
"main": {
"js": [
"/dist/runtime.0b8eec46.js",
"/dist/245.6246929d.js",
"/dist/814.5539bce7.js",
"/dist/main.dda4463f.js"
"/dist/runtime.f5a6adf5.js",
"/dist/245.f9644c9e.js",
"/dist/814.47265ca3.js",
"/dist/main.4d297cb4.js"
],
"css": [
"/dist/857.11f63fec.css",
"/dist/main.94bbbeaa.css"
"/dist/main.35f80290.css"
]
},
"adapter-flasher": {
"js": [
"/dist/runtime.0b8eec46.js",
"/dist/adapter-flasher.74de58f6.js"
"/dist/runtime.f5a6adf5.js",
"/dist/adapter-flasher.9e83994a.js"
]
},
"adapter-noty": {
"js": [
"/dist/runtime.0b8eec46.js",
"/dist/814.5539bce7.js",
"/dist/adapter-noty.c2b3da74.js"
"/dist/runtime.f5a6adf5.js",
"/dist/814.47265ca3.js",
"/dist/adapter-noty.6ec70878.js"
]
},
"adapter-notyf": {
"js": [
"/dist/runtime.0b8eec46.js",
"/dist/adapter-notyf.d8339f0e.js"
"/dist/runtime.f5a6adf5.js",
"/dist/adapter-notyf.db901ffb.js"
]
},
"adapter-pnotify": {
"js": [
"/dist/runtime.0b8eec46.js",
"/dist/874.c656c5a9.js",
"/dist/adapter-pnotify.16eed3a8.js"
"/dist/runtime.f5a6adf5.js",
"/dist/874.ec7ba3fe.js",
"/dist/adapter-pnotify.ade98c1e.js"
]
},
"adapter-sweetalert": {
"js": [
"/dist/runtime.0b8eec46.js",
"/dist/383.7c120f2f.js",
"/dist/adapter-sweetalert.95ed9cf1.js"
"/dist/runtime.f5a6adf5.js",
"/dist/383.ff0df984.js",
"/dist/adapter-sweetalert.c601ab6b.js"
]
},
"adapter-toastr": {
"js": [
"/dist/runtime.0b8eec46.js",
"/dist/245.6246929d.js",
"/dist/adapter-toastr.2bb263be.js"
"/dist/runtime.f5a6adf5.js",
"/dist/245.f9644c9e.js",
"/dist/adapter-toastr.076c47e6.js"
]
}
}
Expand Down
39 changes: 20 additions & 19 deletions _data/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
{
"dist/homepage.css": "/dist/homepage.daa70971.css",
"dist/homepage.js": "/dist/homepage.82551349.js",
"dist/main.css": "/dist/main.94bbbeaa.css",
"dist/main.js": "/dist/main.dda4463f.js",
"dist/adapter-flasher.js": "/dist/adapter-flasher.74de58f6.js",
"dist/adapter-noty.js": "/dist/adapter-noty.c2b3da74.js",
"dist/adapter-notyf.js": "/dist/adapter-notyf.d8339f0e.js",
"dist/adapter-pnotify.js": "/dist/adapter-pnotify.16eed3a8.js",
"dist/adapter-sweetalert.js": "/dist/adapter-sweetalert.95ed9cf1.js",
"dist/adapter-toastr.js": "/dist/adapter-toastr.2bb263be.js",
"dist/runtime.js": "/dist/runtime.0b8eec46.js",
"dist/homepage.js": "/dist/homepage.11d1d76a.js",
"dist/main.css": "/dist/main.35f80290.css",
"dist/main.js": "/dist/main.4d297cb4.js",
"dist/adapter-flasher.js": "/dist/adapter-flasher.9e83994a.js",
"dist/adapter-noty.js": "/dist/adapter-noty.6ec70878.js",
"dist/adapter-notyf.js": "/dist/adapter-notyf.db901ffb.js",
"dist/adapter-pnotify.js": "/dist/adapter-pnotify.ade98c1e.js",
"dist/adapter-sweetalert.js": "/dist/adapter-sweetalert.c601ab6b.js",
"dist/adapter-toastr.js": "/dist/adapter-toastr.076c47e6.js",
"dist/runtime.js": "/dist/runtime.f5a6adf5.js",
"dist/443.11112420.css": "/dist/443.11112420.css",
"dist/443.88bd6db7.js": "/dist/443.88bd6db7.js",
"dist/443.4d91a537.js": "/dist/443.4d91a537.js",
"dist/117.554a2dcd.css": "/dist/117.554a2dcd.css",
"dist/117.b91dd237.js": "/dist/117.b91dd237.js",
"dist/117.298dad94.js": "/dist/117.298dad94.js",
"dist/47.c0be7378.css": "/dist/47.c0be7378.css",
"dist/47.aab10a5a.js": "/dist/47.aab10a5a.js",
"dist/47.a923ff01.js": "/dist/47.a923ff01.js",
"dist/587.9523a7ff.css": "/dist/587.9523a7ff.css",
"dist/587.c23105cc.js": "/dist/587.c23105cc.js",
"dist/587.a8ef3c1b.js": "/dist/587.a8ef3c1b.js",
"dist/282.6a2ea759.css": "/dist/282.6a2ea759.css",
"dist/282.16a3116e.js": "/dist/282.16a3116e.js",
"dist/245.6246929d.js": "/dist/245.6246929d.js",
"dist/814.5539bce7.js": "/dist/814.5539bce7.js",
"dist/383.7c120f2f.js": "/dist/383.7c120f2f.js",
"dist/874.c656c5a9.js": "/dist/874.c656c5a9.js",
"dist/282.057ed601.js": "/dist/282.057ed601.js",
"dist/245.f9644c9e.js": "/dist/245.f9644c9e.js",
"dist/814.47265ca3.js": "/dist/814.47265ca3.js",
"dist/383.ff0df984.js": "/dist/383.ff0df984.js",
"dist/874.ec7ba3fe.js": "/dist/874.ec7ba3fe.js",
"dist/857.11f63fec.css": "/dist/857.11f63fec.css",
"dist/fonts/fa-duotone-900.ttf": "/dist/fonts/fa-duotone-900.7aaed888.ttf",
"dist/fonts/fa-thin-100.ttf": "/dist/fonts/fa-thin-100.e979819d.ttf",
"dist/fonts/fa-light-300.ttf": "/dist/fonts/fa-light-300.c92b45dd.ttf",
"dist/fonts/fa-regular-400.ttf": "/dist/fonts/fa-regular-400.ea55734f.ttf",
"dist/fonts/fa-solid-900.ttf": "/dist/fonts/fa-solid-900.cd4538f7.ttf",
"dist/sounds/notification.wav": "/dist/sounds/notification.wav",
"dist/images/flasher-usage.png": "/dist/images/flasher-usage.png",
"dist/fonts/fa-thin-100.woff2": "/dist/fonts/fa-thin-100.6d7129de.woff2",
"dist/fonts/fa-duotone-900.woff2": "/dist/fonts/fa-duotone-900.0f4932ef.woff2",
Expand Down
26 changes: 13 additions & 13 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@
<script defer src="{{ link }}"></script>
{% endfor %}

{% if site.data.flasher contains page.url %}
{% assign adapter = site.data.flasher[page.url] %}
{% for link in site.data.entrypoints['entrypoints'][adapter]['css'] %}
<link href="{{ link }}" rel="stylesheet"/>
{% endfor %}

{% for link in site.data.entrypoints['entrypoints'][adapter]['js'] %}
{% unless link contains '/dist/runtime.' %}
<script defer src="{{ link }}"></script>
{% endunless %}
{% endfor %}
{% endif %}
{% unless site.data.dev.dev_mode %}

{% if site.data.flasher contains page.url %}
{% assign adapter = site.data.flasher[page.url] %}
{% for link in site.data.entrypoints['entrypoints'][adapter]['css'] %}
<link href="{{ link }}" rel="stylesheet"/>
{% endfor %}

{% for link in site.data.entrypoints['entrypoints'][adapter]['js'] %}
{% unless link contains '/dist/runtime.' %}
<script defer src="{{ link }}"></script>
{% endunless %}
{% endfor %}
{% endif %}

{% unless site.data.dev.dev_mode %}
<script src="https://cdn.counter.dev/script.js" data-id="3772fc72-0949-47c9-b4e3-6e1da76a2095" data-utcoffset="1"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-T4D78SM7TC"></script>
<script defer>
Expand Down
4 changes: 1 addition & 3 deletions assets/css/main.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ article blockquote :last-child {
}

code {
background: #f5f2f0;
color: #333;
border-radius: 0.3rem;
@apply text-indigo-500;
}

#main-navigation li a.text-white i {
Expand Down
94 changes: 58 additions & 36 deletions assets/js/_tryit.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ const examples = {
flasher.info(getRandomMessageByType("info"));
},
"# notification builder with toastr": function () {
toastr.success('The action was completed successfully.', 'Great!', {
toastr.success("The action was completed successfully.", "Great!", {
timeOut: 10000,
});
},
"# example with type": function () {
flasher.error('An error has occurred please try again later.');
flasher.error("An error has occurred please try again later.");
},
"# success type with title": function () {
flasher.success(getRandomMessageByType("success"), 'Congratulations!');
flasher.success(getRandomMessageByType("success"), "Congratulations!");
},
"# error message": function () {
flasher.error("This may take some time. Do not refresh the page.");
Expand Down Expand Up @@ -134,16 +134,19 @@ const examples = {
flasher.success("Entity saved successfully", "Entity saved");
},
"# arabic translation": function () {
flasher.success('تم إرسال طلبك بنجاح.', 'نجاح', {rtl: true});
flasher.error('حدث خطأ أثناء إرسال طلبك.', 'خطأ', {rtl: true});
flasher.warning('يجب إكمال جميع الحقول الإلزامية قبل إرسال النموذج', 'تحذير', {rtl: true});
flasher.info('سيتم تحديث هذه الصفحة في غضون 10 دقائق.', 'معلومة', {rtl: true});
flasher.success("تم إرسال طلبك بنجاح.", "نجاح", { rtl: true });
flasher.error("حدث خطأ أثناء إرسال طلبك.", "خطأ", { rtl: true });
flasher.warning("يجب إكمال جميع الحقول الإلزامية قبل إرسال النموذج", "تحذير", { rtl: true });
flasher.info("سيتم تحديث هذه الصفحة في غضون 10 دقائق.", "معلومة", { rtl: true });
},
"# french translation": function () {
flasher.success('Votre demande a été envoyée avec succès.', 'Succès');
flasher.error('Une erreur s\'est produite lors de l\'envoi de votre demande.', 'Erreur');
flasher.warning('Vous devez remplir tous les champs obligatoires avant de soumettre le formulaire.', 'Avertissement');
flasher.info('Cette page sera mise à jour dans 10 minutes.', 'Information');
flasher.success("Votre demande a été envoyée avec succès.", "Succès");
flasher.error("Une erreur s'est produite lors de l'envoi de votre demande.", "Erreur");
flasher.warning(
"Vous devez remplir tous les champs obligatoires avant de soumettre le formulaire.",
"Avertissement"
);
flasher.info("Cette page sera mise à jour dans 10 minutes.", "Information");
},
"# noty": function () {
noty.success("The book has been added to the library successfully!");
Expand All @@ -152,57 +155,76 @@ const examples = {
noty.error("Oops, something went wrong.");
},
"# noty alert": function () {
noty.flash("alert", "This may take a while. Do not refresh the page.")
noty.flash("alert", "This may take a while. Do not refresh the page.");
},
"# noty layout": function () {
noty.success("The action was completed successfully.", {
layout: "topCenter",
});
},
"# noty theme mint": function () {
noty.success('Your request was successfully sent.', {theme: "mint"});
noty.error('An error occurred while sending your request.', {theme: "mint"});
noty.warning('You must fill out all required fields before submitting the form.', {theme: "mint"});
noty.info('This page will be updated in 10 minutes.', {theme: "mint"});
noty.success("Your request was successfully sent.", { theme: "mint" });
noty.error("An error occurred while sending your request.", { theme: "mint" });
noty.warning("You must fill out all required fields before submitting the form.", { theme: "mint" });
noty.info("This page will be updated in 10 minutes.", { theme: "mint" });
},
"# noty theme relax": function () {
import("noty/lib/themes/relax.css").then(function () {
noty.success('Your request was successfully sent.', {theme: "relax"});
noty.error('An error occurred while sending your request.', {theme: "relax"});
noty.warning('You must fill out all required fields before submitting the form.', {theme: "relax"});
noty.info('This page will be updated in 10 minutes.', {theme: "relax"});
noty.success("Your request was successfully sent.", { theme: "relax" });
noty.error("An error occurred while sending your request.", { theme: "relax" });
noty.warning("You must fill out all required fields before submitting the form.", { theme: "relax" });
noty.info("This page will be updated in 10 minutes.", { theme: "relax" });
});
},
"# noty theme metroui": function () {
import("noty/lib/themes/metroui.css").then(function () {
noty.success('Your request was successfully sent.', {theme: "metroui"});
noty.error('An error occurred while sending your request.', {theme: "metroui"});
noty.warning('You must fill out all required fields before submitting the form.', {theme: "metroui"});
noty.info('This page will be updated in 10 minutes.', {theme: "metroui"});
noty.success("Your request was successfully sent.", { theme: "metroui" });
noty.error("An error occurred while sending your request.", { theme: "metroui" });
noty.warning("You must fill out all required fields before submitting the form.", { theme: "metroui" });
noty.info("This page will be updated in 10 minutes.", { theme: "metroui" });
});
},
"# noty theme light": function () {
import("noty/lib/themes/light.css").then(function () {
noty.success('Your request was successfully sent.', {theme: "light"});
noty.error('An error occurred while sending your request.', {theme: "light"});
noty.warning('You must fill out all required fields before submitting the form.', {theme: "light"});
noty.info('This page will be updated in 10 minutes.', {theme: "light"});
noty.success("Your request was successfully sent.", { theme: "light" });
noty.error("An error occurred while sending your request.", { theme: "light" });
noty.warning("You must fill out all required fields before submitting the form.", { theme: "light" });
noty.info("This page will be updated in 10 minutes.", { theme: "light" });
});
},
"# noty theme nest": function () {
import("noty/lib/themes/nest.css").then(function () {
noty.success('Your request was successfully sent.', {theme: "nest"});
noty.error('An error occurred while sending your request.', {theme: "nest"});
noty.warning('You must fill out all required fields before submitting the form.', {theme: "nest"});
noty.info('This page will be updated in 10 minutes.', {theme: "nest"});
noty.success("Your request was successfully sent.", { theme: "nest" });
noty.error("An error occurred while sending your request.", { theme: "nest" });
noty.warning("You must fill out all required fields before submitting the form.", { theme: "nest" });
noty.info("This page will be updated in 10 minutes.", { theme: "nest" });
});
},
"# noty theme sunset": function () {
import("noty/lib/themes/sunset.css").then(function () {
noty.success('Your request was successfully sent.', {theme: "sunset"});
noty.error('An error occurred while sending your request.', {theme: "sunset"});
noty.warning('You must fill out all required fields before submitting the form.', {theme: "sunset"});
noty.info('This page will be updated in 10 minutes.', {theme: "sunset"});
noty.success("Your request was successfully sent.", { theme: "sunset" });
noty.error("An error occurred while sending your request.", { theme: "sunset" });
noty.warning("You must fill out all required fields before submitting the form.", { theme: "sunset" });
noty.info("This page will be updated in 10 minutes.", { theme: "sunset" });
});
},
"# noty timeout": function () {
noty.success("The action was completed successfully.", { timeout: 2000 });
},
"# noty progressBar": function () {
noty.success("The action was completed successfully.", { progressBar: false });
},
"# noty closeWith": function () {
noty.error("An error occurred while sending your request.", { closeWith: ["click", "button"] });
},
"# noty animation": function () {
noty.info("This may take some time. Do not refresh the page.", { animation: null });
},
"# noty sounds": function () {
noty.success("The operation completed successfully.", {
sources: ["/dist/sounds/notification.wav"],
volume: 0.3,
conditions: ["docVisible", "docHidden"],
});
},
};
Expand Down
Binary file added assets/sounds/notification.wav
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/117.b91dd237.js → dist/117.298dad94.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[117],{117:function(e,s,u){u.r(s)}}]);
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[117],{3117:function(e,s,u){u.r(s)}}]);
2 changes: 0 additions & 2 deletions dist/245.6246929d.js

This file was deleted.

2 changes: 2 additions & 0 deletions dist/245.f9644c9e.js

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 1 addition & 1 deletion dist/282.16a3116e.js → dist/282.057ed601.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[282],{282:function(e,s,u){u.r(s)}}]);
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[282],{1282:function(e,s,u){u.r(s)}}]);
1 change: 0 additions & 1 deletion dist/383.7c120f2f.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/383.ff0df984.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/443.88bd6db7.js → dist/443.4d91a537.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[443],{443:function(e,s,u){u.r(s)}}]);
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[443],{6443:function(e,s,u){u.r(s)}}]);
2 changes: 1 addition & 1 deletion dist/47.aab10a5a.js → dist/47.a923ff01.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[47],{47:function(e,s,u){u.r(s)}}]);
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[47],{4047:function(e,s,u){u.r(s)}}]);
2 changes: 1 addition & 1 deletion dist/587.c23105cc.js → dist/587.a8ef3c1b.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[587],{587:function(e,s,u){u.r(s)}}]);
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[587],{4587:function(e,s,u){u.r(s)}}]);
1 change: 1 addition & 0 deletions dist/814.47265ca3.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/814.5539bce7.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/874.c656c5a9.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/874.ec7ba3fe.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/adapter-flasher.74de58f6.js

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/adapter-noty.6ec70878.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/adapter-notyf.d8339f0e.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/adapter-notyf.db901ffb.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/adapter-pnotify.16eed3a8.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/adapter-pnotify.ade98c1e.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion dist/adapter-sweetalert.95ed9cf1.js

This file was deleted.

Loading

0 comments on commit 7fa532f

Please sign in to comment.