Skip to content

Commit 5f93f7e

Browse files
author
KHOUBZA Younes
committed
refactor examples code
1 parent 2dac2ad commit 5f93f7e

25 files changed

+715
-695
lines changed

_data/entrypoints.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"entrypoints": {
33
"homepage": {
44
"js": [
5-
"/dist/runtime.f5a6adf5.js",
5+
"/dist/runtime.0df8328d.js",
66
"/dist/homepage.11d1d76a.js"
77
],
88
"css": [
@@ -12,10 +12,11 @@
1212
},
1313
"main": {
1414
"js": [
15-
"/dist/runtime.f5a6adf5.js",
15+
"/dist/runtime.0df8328d.js",
1616
"/dist/245.f9644c9e.js",
17+
"/dist/383.82e9b159.js",
1718
"/dist/814.47265ca3.js",
18-
"/dist/main.334b8e8e.js"
19+
"/dist/main.0bdf574c.js"
1920
],
2021
"css": [
2122
"/dist/857.a99f72a3.css",
@@ -24,40 +25,40 @@
2425
},
2526
"adapter-flasher": {
2627
"js": [
27-
"/dist/runtime.f5a6adf5.js",
28+
"/dist/runtime.0df8328d.js",
2829
"/dist/adapter-flasher.9e83994a.js"
2930
]
3031
},
3132
"adapter-noty": {
3233
"js": [
33-
"/dist/runtime.f5a6adf5.js",
34+
"/dist/runtime.0df8328d.js",
3435
"/dist/814.47265ca3.js",
3536
"/dist/adapter-noty.6ec70878.js"
3637
]
3738
},
3839
"adapter-notyf": {
3940
"js": [
40-
"/dist/runtime.f5a6adf5.js",
41+
"/dist/runtime.0df8328d.js",
4142
"/dist/adapter-notyf.db901ffb.js"
4243
]
4344
},
4445
"adapter-pnotify": {
4546
"js": [
46-
"/dist/runtime.f5a6adf5.js",
47+
"/dist/runtime.0df8328d.js",
4748
"/dist/874.ec7ba3fe.js",
4849
"/dist/adapter-pnotify.ade98c1e.js"
4950
]
5051
},
5152
"adapter-sweetalert": {
5253
"js": [
53-
"/dist/runtime.f5a6adf5.js",
54-
"/dist/383.ff0df984.js",
55-
"/dist/adapter-sweetalert.c601ab6b.js"
54+
"/dist/runtime.0df8328d.js",
55+
"/dist/383.82e9b159.js",
56+
"/dist/adapter-sweetalert.d0dd243e.js"
5657
]
5758
},
5859
"adapter-toastr": {
5960
"js": [
60-
"/dist/runtime.f5a6adf5.js",
61+
"/dist/runtime.0df8328d.js",
6162
"/dist/245.f9644c9e.js",
6263
"/dist/adapter-toastr.076c47e6.js"
6364
]

_data/manifest.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,35 @@
22
"dist/homepage.css": "/dist/homepage.daa70971.css",
33
"dist/homepage.js": "/dist/homepage.11d1d76a.js",
44
"dist/main.css": "/dist/main.35f80290.css",
5-
"dist/main.js": "/dist/main.334b8e8e.js",
5+
"dist/main.js": "/dist/main.0bdf574c.js",
66
"dist/adapter-flasher.js": "/dist/adapter-flasher.9e83994a.js",
77
"dist/adapter-noty.js": "/dist/adapter-noty.6ec70878.js",
88
"dist/adapter-notyf.js": "/dist/adapter-notyf.db901ffb.js",
99
"dist/adapter-pnotify.js": "/dist/adapter-pnotify.ade98c1e.js",
10-
"dist/adapter-sweetalert.js": "/dist/adapter-sweetalert.c601ab6b.js",
10+
"dist/adapter-sweetalert.js": "/dist/adapter-sweetalert.d0dd243e.js",
1111
"dist/adapter-toastr.js": "/dist/adapter-toastr.076c47e6.js",
12-
"dist/runtime.js": "/dist/runtime.f5a6adf5.js",
13-
"dist/443.11112420.css": "/dist/443.11112420.css",
14-
"dist/443.4d91a537.js": "/dist/443.4d91a537.js",
15-
"dist/117.554a2dcd.css": "/dist/117.554a2dcd.css",
16-
"dist/117.298dad94.js": "/dist/117.298dad94.js",
12+
"dist/runtime.js": "/dist/runtime.0df8328d.js",
13+
"dist/184.3a7b4474.css": "/dist/184.3a7b4474.css",
14+
"dist/184.962d025c.js": "/dist/184.962d025c.js",
15+
"dist/226.29cd993e.css": "/dist/226.29cd993e.css",
16+
"dist/226.6c5a901b.js": "/dist/226.6c5a901b.js",
1717
"dist/47.c0be7378.css": "/dist/47.c0be7378.css",
1818
"dist/47.a923ff01.js": "/dist/47.a923ff01.js",
19+
"dist/117.554a2dcd.css": "/dist/117.554a2dcd.css",
20+
"dist/117.298dad94.js": "/dist/117.298dad94.js",
21+
"dist/103.465b1369.css": "/dist/103.465b1369.css",
22+
"dist/103.325a1733.js": "/dist/103.325a1733.js",
1923
"dist/587.9523a7ff.css": "/dist/587.9523a7ff.css",
2024
"dist/587.a8ef3c1b.js": "/dist/587.a8ef3c1b.js",
25+
"dist/443.11112420.css": "/dist/443.11112420.css",
26+
"dist/443.4d91a537.js": "/dist/443.4d91a537.js",
27+
"dist/529.699ba66f.css": "/dist/529.699ba66f.css",
28+
"dist/529.f963974a.js": "/dist/529.f963974a.js",
2129
"dist/282.6a2ea759.css": "/dist/282.6a2ea759.css",
2230
"dist/282.057ed601.js": "/dist/282.057ed601.js",
2331
"dist/245.f9644c9e.js": "/dist/245.f9644c9e.js",
32+
"dist/383.82e9b159.js": "/dist/383.82e9b159.js",
2433
"dist/814.47265ca3.js": "/dist/814.47265ca3.js",
25-
"dist/383.ff0df984.js": "/dist/383.ff0df984.js",
2634
"dist/874.ec7ba3fe.js": "/dist/874.ec7ba3fe.js",
2735
"dist/857.a99f72a3.css": "/dist/857.a99f72a3.css",
2836
"dist/fonts/fa-duotone-900.ttf": "/dist/fonts/fa-duotone-900.7aaed888.ttf",

_data/messages.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
types:
2+
- success
3+
- error
4+
- warning
5+
- info
6+
17
success:
28
- "Operation completed successfully."
39
- "Task completed successfully."
@@ -93,7 +99,7 @@ error:
9399
- "Sorry, something went wrong."
94100
- "Oops, something went wrong."
95101
- "An error has occurred."
96-
- "We're sorry, but an error occurred."
102+
- "Were sorry, but an error occurred."
97103
- "An unexpected error occurred."
98104
- "An error occurred while creating your account."
99105
- "There was a problem resetting your password."

_includes/example.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% assign defaultId = 'PHPFlasher' %}
2+
{% assign defaultHandler = 'flasher' %}
3+
{% assign defaultType = site.data.messages.types | sample %}
4+
{% assign defaultMessage = site.data.messages[type] | sample %}
5+
{% assign defaultOptions = '{}' %}
6+
7+
<script type="text/javascript">
8+
messages["{{ id | default: defaultId }}"] = {
9+
handler: "{{ page.handler | defaultHandler }}",
10+
type: "{{ type | default: defaultType }}",
11+
message: "{{ message | default: defaultMessage }}",
12+
title: "{{ title }}",
13+
options: JSON.parse('{{ options | default: defaultOptions }}'),
14+
};
15+
</script>

_includes/head.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@
5757
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism.min.css">
5858
<script defer src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/prism.min.js"></script>
5959
<script defer src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
60+
61+
<script>
62+
var messages = {};
63+
</script>

0 commit comments

Comments
 (0)