marquee-content 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/index.html +24 -24
- package/dist/js/marquee-content.min.js +1 -1
- package/package.json +1 -1
- package/src/index.html +24 -24
- package/src/js/index.js +2 -2
- package/src/js/marquee-content.js +145 -160
package/README.md
CHANGED
|
@@ -27,15 +27,15 @@ $ npm i marquee-content
|
|
|
27
27
|
|
|
28
28
|
### Import
|
|
29
29
|
```javascript
|
|
30
|
-
import MarqueeContent from 'marquee-content'
|
|
30
|
+
import { MarqueeContent } from 'marquee-content'
|
|
31
31
|
```
|
|
32
32
|
<br>
|
|
33
33
|
|
|
34
34
|
### Usage
|
|
35
35
|
```HTML
|
|
36
|
-
<marquee-content data-mc-duration="
|
|
36
|
+
<div class="marquee-content" data-mc-duration="30" role="marquee">
|
|
37
37
|
some content
|
|
38
|
-
</
|
|
38
|
+
</div>
|
|
39
39
|
```
|
|
40
40
|
<br>
|
|
41
41
|
|
package/dist/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
12
12
|
<link href="https://fonts.googleapis.com/css2?family=Alkatra:wght@700&family=Anton&family=Lobster&family=PT+Sans+Narrow:wght@700&family=Prompt:wght@500&display=swap" rel="stylesheet">
|
|
13
13
|
<style type="text/css">
|
|
14
|
-
html{font-family: system-ui, -apple-system, "Open Sans", "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-size: 10px}body{margin: 150px 0 400px;font-feature-settings: "kern" 1,"liga" 0;font-size: 1.6rem;font-weight: 400;line-height: 1.5;color: #444}html,body,input,textarea,button{-webkit-font-smoothing: subpixel-antialiased}marquee-content{pointer-events: none;max-width: 100vw;justify-content: center;align-items: center;display: flex;position: relative;overflow: hidden}.font{white-space: nowrap}.alkatra{font-family: 'Alkatra', cursive;font-weight: 700;font-size: 48px}.anton{font-family: 'Anton', sans-serif;font-weight: 700;font-size: 40px}.pt{font-family: 'PT Sans Narrow', sans-serif;font-weight: 400;font-size: 52px}.lobster{font-family: 'Lobster', cursive;font-weight: 400;font-size: 50px}.prompt{font-family: 'Prompt', sans-serif;font-weight: 500;font-size: 48px}ul{list-style: none;margin: 0;padding: 0;display: flex;align-items: center}li{padding: 0 10px;text-align: center}.example-1 li{padding: 0 0 0 66px;background:url("data:image/svg xml,<svg width='26' height='26' viewBox='0 0 26 26' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M15.0527 10.9474L13 0L10.9473 10.9474L0 13L10.9473 15.0526L13 26L15.0527 15.0526L26 13L15.0527 10.9474Z' fill='#444444'/></svg>")center left 20px / 26px 26pxno-repeat}.example-2 li{padding: 0 15px}.example-3 li{position: relative;padding: 0 0 0 56px}.example-3 li::before{content: '';position: absolute;top: 0;right: -33px;bottom: 0;left: auto;margin: auto;width: 7px;height: 7px;transform: translateY(5px);background: #444;border-radius: 100%}.example-4{text-transform: uppercase}.data-code{margin: 80px auto 30px;padding: 0 20px;max-width: 1400px}.data-code strong{display: inline-flex;padding: 5px 12px;border: 1px dotted #ccc}
|
|
14
|
+
html{font-family: system-ui, -apple-system, "Open Sans", "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-size: 10px}body{margin: 150px 0 400px;font-feature-settings: "kern" 1,"liga" 0;font-size: 1.6rem;font-weight: 400;line-height: 1.5;color: #444}html,body,input,textarea,button{-webkit-font-smoothing: subpixel-antialiased}.marquee-content{pointer-events: none;max-width: 100vw;justify-content: center;align-items: center;display: flex;position: relative;overflow: hidden}.font{white-space: nowrap}.alkatra{font-family: 'Alkatra', cursive;font-weight: 700;font-size: 48px}.anton{font-family: 'Anton', sans-serif;font-weight: 700;font-size: 40px}.pt{font-family: 'PT Sans Narrow', sans-serif;font-weight: 400;font-size: 52px}.lobster{font-family: 'Lobster', cursive;font-weight: 400;font-size: 50px}.prompt{font-family: 'Prompt', sans-serif;font-weight: 500;font-size: 48px}ul{list-style: none;margin: 0;padding: 0;display: flex;align-items: center}li{padding: 0 10px;text-align: center}.example-1 li{padding: 0 0 0 66px;background:url("data:image/svg xml,<svg width='26' height='26' viewBox='0 0 26 26' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M15.0527 10.9474L13 0L10.9473 10.9474L0 13L10.9473 15.0526L13 26L15.0527 15.0526L26 13L15.0527 10.9474Z' fill='#444444'/></svg>")center left 20px / 26px 26pxno-repeat}.example-2 li{padding: 0 15px}.example-3 li{position: relative;padding: 0 0 0 56px}.example-3 li::before{content: '';position: absolute;top: 0;right: -33px;bottom: 0;left: auto;margin: auto;width: 7px;height: 7px;transform: translateY(5px);background: #444;border-radius: 100%}.example-4{text-transform: uppercase}.data-code{margin: 80px auto 30px;padding: 0 20px;max-width: 1400px}.data-code strong{display: inline-flex;padding: 5px 12px;border: 1px dotted #ccc}
|
|
15
15
|
</style>
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<p>The basic version, with scrolling content from right to left</p>
|
|
21
21
|
</section>
|
|
22
22
|
<section class="example-1">
|
|
23
|
-
<marquee-content
|
|
23
|
+
<div class="marquee-content"
|
|
24
24
|
data-mc-duration="60"
|
|
25
25
|
role="marquee">
|
|
26
26
|
<ul class="font alkatra">
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
<li>Vomero</li>
|
|
34
34
|
<li>Pegasus</li>
|
|
35
35
|
</ul>
|
|
36
|
-
</
|
|
36
|
+
</div>
|
|
37
37
|
</section>
|
|
38
38
|
<section class="example-7">
|
|
39
|
-
<marquee-content
|
|
39
|
+
<div class="marquee-content"
|
|
40
40
|
data-mc-duration="20"
|
|
41
41
|
role="marquee">
|
|
42
42
|
<ul>
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
<li><img src="//fastly.picsum.photos/id/235/180/100.jpg?hmac=5KlYbDb93R7me0GThn6FFoK_OZ8ziPn-fb98FHIMb5c" alt></li>
|
|
46
46
|
<li><img src="//fastly.picsum.photos/id/1050/180/100.jpg?hmac=f9i0nGYKBetkohJors44GETXmUhSbLcXMUlSvMCluJY" alt></li>
|
|
47
47
|
</ul>
|
|
48
|
-
</
|
|
48
|
+
</div>
|
|
49
49
|
</section>
|
|
50
50
|
<section class="data-code">
|
|
51
51
|
<strong>data-mc-duration="60" data-mc-direction="ltr"</strong>
|
|
52
52
|
<p><code>data-mc-direction="ltr"</code> — changes the scroll direction from left to right</p>
|
|
53
53
|
</section>
|
|
54
54
|
<section class="example-2">
|
|
55
|
-
<marquee-content
|
|
55
|
+
<div class="marquee-content"
|
|
56
56
|
data-mc-duration="60"
|
|
57
57
|
data-mc-direction="ltr"
|
|
58
58
|
role="marquee">
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
<li><span class="font anton">Vomero</span></li>
|
|
68
68
|
<li><span class="font pt">Pegasus</span></li>
|
|
69
69
|
</ul>
|
|
70
|
-
</
|
|
70
|
+
</div>
|
|
71
71
|
</section>
|
|
72
72
|
<section class="data-code">
|
|
73
73
|
<strong>data-mc-duration="60" data-mc-direction="auto"</strong>
|
|
74
74
|
<p><code>data-mc-direction="auto"</code> — automatically changes the scrolling direction of the component when scrolling the page</p>
|
|
75
75
|
</section>
|
|
76
76
|
<section class="example-3">
|
|
77
|
-
<marquee-content
|
|
77
|
+
<div class="marquee-content"
|
|
78
78
|
data-mc-duration="60"
|
|
79
79
|
data-mc-direction="auto"
|
|
80
80
|
role="marquee">
|
|
@@ -89,14 +89,14 @@
|
|
|
89
89
|
<li>Vomero</li>
|
|
90
90
|
<li>Pegasus</li>
|
|
91
91
|
</ul>
|
|
92
|
-
</
|
|
92
|
+
</div>
|
|
93
93
|
</section>
|
|
94
94
|
<section class="data-code">
|
|
95
95
|
<strong>data-mc-duration="60" data-mc-skew="-4"</strong>
|
|
96
96
|
<p><code>data-mc-skew="-4"</code> — transforms the component by tilting it along the Y axis (it is acceptable to use a positive or negative value)</p>
|
|
97
97
|
</section>
|
|
98
98
|
<section class="example-4">
|
|
99
|
-
<marquee-content
|
|
99
|
+
<div class="marquee-content"
|
|
100
100
|
data-mc-duration="60"
|
|
101
101
|
data-mc-skew="-4"
|
|
102
102
|
role="marquee">
|
|
@@ -111,35 +111,35 @@
|
|
|
111
111
|
<li>Vomero</li>
|
|
112
112
|
<li>Pegasus</li>
|
|
113
113
|
</ul>
|
|
114
|
-
</
|
|
114
|
+
</div>
|
|
115
115
|
</section>
|
|
116
116
|
<section class="data-code">
|
|
117
|
-
<strong>data-mc-duration="5" data-mc-
|
|
118
|
-
<p><code>data-mc-
|
|
117
|
+
<strong>data-mc-duration="5" data-mc-max="992"</strong>
|
|
118
|
+
<p><code>data-mc-max="992"</code> — sets the maximum screen width at which the animation will be played (when the breakpoint intersects, the cloned elements will be removed and the component styles will be cleared)</p>
|
|
119
119
|
</section>
|
|
120
|
-
<section class="example-
|
|
121
|
-
<marquee-content
|
|
120
|
+
<section class="example-6">
|
|
121
|
+
<div class="marquee-content"
|
|
122
122
|
data-mc-duration="5"
|
|
123
|
-
data-mc-
|
|
123
|
+
data-mc-max="560"
|
|
124
124
|
role="marquee">
|
|
125
125
|
<ul class="font pt">
|
|
126
126
|
<li>Jordan</li>
|
|
127
127
|
</ul>
|
|
128
|
-
</
|
|
128
|
+
</div>
|
|
129
129
|
</section>
|
|
130
130
|
<section class="data-code">
|
|
131
|
-
<strong>data-mc-duration="5" data-mc-
|
|
132
|
-
<p><code>data-mc-
|
|
131
|
+
<strong>data-mc-duration="5" data-mc-min="992"</strong>
|
|
132
|
+
<p><code>data-mc-min="992"</code> — sets the minimum screen width at which the animation will be played (when the breakpoint intersects, the cloned elements will be removed and the component styles will be cleared)</p>
|
|
133
133
|
</section>
|
|
134
|
-
<section class="example-
|
|
135
|
-
<marquee-content
|
|
134
|
+
<section class="example-5">
|
|
135
|
+
<div class="marquee-content"
|
|
136
136
|
data-mc-duration="5"
|
|
137
|
-
data-mc-
|
|
137
|
+
data-mc-min="560"
|
|
138
138
|
role="marquee">
|
|
139
139
|
<ul class="font pt">
|
|
140
|
-
<li>
|
|
140
|
+
<li>Jordan</li>
|
|
141
141
|
</ul>
|
|
142
|
-
</
|
|
142
|
+
</div>
|
|
143
143
|
</section>
|
|
144
144
|
<script src="js/marquee-content.min.js"></script>
|
|
145
145
|
</body>
|