Skip to content

Commit 7c6dece

Browse files
authored
New release (#234)
* Updated the demo * Update github actions * Bump packages Bump esbuild and esbuild-sass-plugin Bump mini-css-extract-plugin from 2.7.7 to 2.8.0 Bump postcss from 8.4.33 to 8.4.35 Bump puppeteer from 21.9.0 to 22.0.0 Update demo slider images
1 parent 67c649c commit 7c6dece

14 files changed

+709
-394
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
jquery: true,
66
},
77
root: true,
8-
extends: ['eslint:recommended'],
8+
extends: ['jquery', 'eslint:recommended'],
99
globals: {
1010
Atomics: 'readonly',
1111
SharedArrayBuffer: 'readonly',

.github/workflows/npm-publish-github-packages.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v2
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v3
1616
with:
1717
node-version: 20
1818
- run: npm ci
@@ -25,8 +25,8 @@ jobs:
2525
contents: read
2626
packages: write
2727
steps:
28-
- uses: actions/checkout@v2
29-
- uses: actions/setup-node@v2
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-node@v3
3030
with:
3131
node-version: 20
3232
registry-url: https://npm.pkg.github.com/

.github/workflows/npm-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-node@v2
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v3
1313
with:
1414
node-version: 20
1515
- run: npm ci
@@ -20,8 +20,8 @@ jobs:
2020
needs: build
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v2
24-
- uses: actions/setup-node@v2
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-node@v4
2525
with:
2626
node-version: 20
2727
registry-url: https://registry.npmjs.org/
-60.8 KB
Binary file not shown.
13 KB
Loading
-61.3 KB
Binary file not shown.
14.6 KB
Loading

demo/index.css

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -24,73 +24,6 @@ p {
2424
margin-bottom: 20px;
2525
}
2626

27-
#hero {
28-
position: relative;
29-
width: 100%;
30-
min-height: 50vw;
31-
overflow: hidden;
32-
}
33-
34-
.layer {
35-
position: absolute;
36-
width: 100%;
37-
min-height: 55vw;
38-
overflow: hidden;
39-
}
40-
41-
.layer .content-wrap {
42-
position: absolute;
43-
width: 100%;
44-
min-height: 55vw;
45-
}
46-
47-
.bottom {
48-
z-index: 5;
49-
}
50-
51-
.top {
52-
z-index: 10;
53-
width: 50%;
54-
}
55-
56-
.layer img {
57-
width: 100vw;
58-
transform: translateX(-38px);
59-
}
60-
61-
.handle {
62-
position: absolute;
63-
bottom: 0;
64-
left: 50%;
65-
top: 0%;
66-
transform: translateX(-50%);
67-
width: 40px;
68-
height: 100%;
69-
z-index: 13;
70-
cursor: pointer;
71-
}
72-
73-
.handle .line {
74-
position: absolute;
75-
top: 50%;
76-
left: 50%;
77-
width: 2px;
78-
height: 100%;
79-
background-color: rgba(25, 155, 187, 0.3);
80-
transform: translate(-50%, -50%);
81-
}
82-
83-
.handle .arrows {
84-
position: absolute;
85-
top: 50%;
86-
left: 50%;
87-
width: 30px;
88-
height: 30px;
89-
transform: translate(-50%, -50%);
90-
background-color: rgba(25, 155, 187, 0.3);
91-
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
92-
}
93-
9427
div.footer {
9528
padding: 20px 0;
9629
}

demo/index.html

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<title>jQuery Timed Dialog UI - Default functionality</title>
88
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.css" />
9+
<link rel="stylesheet" href="https://esm.sh/@armino-dev/comparing-slider/dist/comparing-slider.min.css" />
910
<link rel="stylesheet" href="index.css?v=4b9b7fec8e7e576e559d5203298a48ad">
1011
</head>
1112

@@ -21,20 +22,7 @@ <h1>Demo for jQuery Timed Dialog Plugin</h1>
2122
It also supports <strong>light/dark</strong> theming based on your device settings.</p>
2223
</section>
2324
<section id="hero">
24-
<div class="layer bottom">
25-
<div class="content-wrap">
26-
<img src="images/jquery-timed-dialog-ui-dark.png" alt="jQuery timed dialog dark" />
27-
</div>
28-
</div>
29-
<div class="layer top">
30-
<div class="content-wrap">
31-
<img src="images/jquery-timed-dialog-ui-light.png" alt="jQuery timed dialog light" />
32-
</div>
33-
</div>
34-
<div class="handle">
35-
<div class="line"></div>
36-
<div class="arrows"></div>
37-
</div>
25+
<div id="hero-container"></div>
3826
</section>
3927
<main>
4028
<div class="container">
@@ -134,7 +122,7 @@ <h3>2.3. Complex confirmation modal</h3>
134122
</main>
135123
<footer>
136124
<div class="footer">
137-
Copyright &copy; 2019 - 2023 Armino.
125+
Copyright &copy; 2019 - 2024 Armino.
138126
</div>
139127
</footer>
140128
</body>
@@ -144,7 +132,8 @@ <h3>2.3. Complex confirmation modal</h3>
144132
crossorigin="anonymous"></script>
145133
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
146134
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
147-
<script src="../src/timed-dialog.js?v=5638c4a78dc820db339e2b8026cf0472"></script>
135+
<script src="../dist/timed-dialog.min.js?v=5638c4a78dc820db339e2b8026cf0472"></script>
136+
<script type="module" src="https://esm.sh/@armino-dev/comparing-slider/dist/comparing-slider.min.js"></script>
148137
<script type="text/javascript">
149138
$(document).on('click', 'button[id^="my-button-"]', function(evt) {
150139
var options = {};
@@ -223,18 +212,19 @@ <h3>2.3. Complex confirmation modal</h3>
223212
});
224213

225214
window.addEventListener('load', () => {
226-
const hero = document.getElementById('hero');
227-
const topLayer = hero.querySelector('.top');
228-
const bottomLayer = hero.querySelector('.bottom');
229-
const handle = hero.querySelector('.handle');
230-
let delta = 0;
215+
const options = {
216+
containerId: 'hero-container',
217+
left: {
218+
image: 'images/jquery-timed-dialog-ui-light.webp',
219+
alt: 'light theme ui'
220+
},
221+
right: {
222+
image: 'images/jquery-timed-dialog-ui-dark.webp',
223+
alt: 'dark theme ui'
224+
}
225+
};
231226

232-
hero.addEventListener('mousemove', (e) => {
233-
delta = (e.clientX - window.innerWidth / 2) * 0.5;
234-
handle.style.left = `${e.clientX + delta}px`;
235-
topLayer.style.width = `${e.clientX + delta}px`;
236-
});
227+
createComparingSlider(options);
237228
});
238229
</script>
239-
240230
</html>

dist/timed-dialog.min.js

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)