2024-11-24 21:39:11 +07:00
|
|
|
# hotline.mjs
|
|
|
|
Module for creating "hot lines"
|
|
|
|
|
|
|
|
## Example
|
2024-12-14 19:42:44 +07:00
|
|
|
```html
|
2024-12-14 19:43:31 +07:00
|
|
|
<section id="wrap_articles" style="display: flex">
|
2024-12-14 19:42:44 +07:00
|
|
|
<!-- First element -->
|
|
|
|
<article>
|
|
|
|
<h3>Place</h3>
|
|
|
|
</article>
|
|
|
|
|
|
|
|
<!-- Second element -->
|
|
|
|
<div>
|
|
|
|
<p>here</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Third element -->
|
|
|
|
<a>anything</a>
|
|
|
|
</section>
|
|
|
|
```
|
2024-12-14 19:23:17 +07:00
|
|
|
```js
|
2024-11-24 21:39:11 +07:00
|
|
|
// Initializing an instance of hotline manually
|
|
|
|
const instance = new hotline(
|
|
|
|
'articles',
|
|
|
|
document.getElementById('wrap_articles')
|
|
|
|
);
|
|
|
|
|
|
|
|
// Initializing settings of the hotline instance
|
|
|
|
instance.move = false;
|
|
|
|
instance.wheel = true;
|
|
|
|
instance.delta = 15;
|
|
|
|
|
|
|
|
// Starting the hotline instance
|
|
|
|
instance.start();
|
|
|
|
```
|
|
|
|
|
|
|
|
## Preview
|
2024-12-14 19:23:17 +07:00
|
|
|
### Site of Svoboda anarchist organization [svoboda/works](https://git.mirzaev.sexy/svoboda/works)
|
2024-12-15 01:14:26 +07:00
|
|
|
![svoboda.works preview](preview/24.gif)<br><br>
|
2024-11-25 09:34:56 +07:00
|
|
|
### Telegram chat-robot market [mirzaev/arming](https://git.mirzaev.sexy/mirzaev/arming)
|
2024-12-15 01:14:26 +07:00
|
|
|
![ARMING preview](preview/5.gif)<br><br>
|
2024-11-25 09:34:56 +07:00
|
|
|
### Large project, marketplace system [mirzaev/skillparts](https://git.mirzaev.sexy/mirzaev/skillparts)
|
|
|
|
but the example is taken from another project that was copied and corrupted by another programmer<br><br>
|
2024-12-15 01:14:26 +07:00
|
|
|
![SkillParts preview](preview/8.gif)<br><br>
|
2024-11-25 09:34:56 +07:00
|
|
|
### Pen in the [CodePen](https://codepen.io/mirzaev-sexy/pen/gOzBZOP)<br><br>
|
2024-12-15 01:14:26 +07:00
|
|
|
![CodePen preview](preview/2024-11-27%2021_48_32-hotline.mjs.png)
|
|
|
|
![CodePen preview](preview/17.gif)
|
|
|
|
![CodePen preview](preview/6.gif)
|