title-switcher 2.1.17 → 2.2.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/LICENSE.md CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 Joshua Heagle
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Joshua Heagle
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,77 +1,77 @@
1
- # [title-switcher-v2](https://www.npmjs.com/package/title-switcher)
2
-
3
- This is the updated title-switcher which takes a simpler approach and improves many deficiencies of the original title-switcher.
4
-
5
- Add typing effect to titles and also switch through several titles.
6
-
7
- This project can be used as a plugin with limited set-up requirements.
8
- No need to change the code in the title-switcher.js file except for
9
- customization.
10
-
11
- Add the titles to the DOM beside each other as child elements of a wrapper element (ex. div). Pass in an identifying attribute for the wrapper such as a class name. The other sample
12
- code such as style can be used to improve how it displays.
13
-
14
- NO need for any additional library, this runs as is. Compatible in modern browsers from IE9+.
15
-
16
- If there are any problems contact me, but set-up should be done based on
17
- the sample code for best results.
18
-
19
- Live example at https://joshuaheagle.com/projects/title-switcher. Enjoy!
20
-
21
- ## Setup Example
22
-
23
- ### Sequential Titles
24
-
25
- ```html
26
- <div class="titles">
27
- <h4 style='color: #be1010; text-align: center;'>I built this <em>superb</em> <strong>plug-in</strong>.</h4>
28
- <h4 style='color: #1414af; text-align: right;'><strong>TitleSwitcher</strong> is great to display <em>company
29
- objectives</em>.</h4>
30
- <h4 style='color: #ff7816; text-align: center; text-decoration: underline;'>Feel free to contribute and use this
31
- plug-in.</h4>
32
- <h4 style='color: #0c710c;'>You can find more projects on <a href='https://github.com/jheagle' target='_blank'>my
33
- <strong>GitHub</strong></a>.</h4>
34
- </div>
35
- ```
36
-
37
- ```javascript
38
- const orderedTitles = new TitleSwitcher('.titles', 'typingEffect')
39
- // the first arguments is to not randomly switch, then the time between switching, and finally the delay of the effect (typing in this case)
40
- orderedTitles.startTitles({ isRandom: false, delaySwitch: 400, delayEffect: 100 })
41
- ```
42
-
43
- ### Random Titles
44
-
45
- ```html
46
- <div class='titles-random'>
47
- <h4>Innovate</h4>
48
- <h4>Create</h4>
49
- <h4>Connect</h4>
50
- <h4>Socialise</h4>
51
- <h4>Collaborate</h4>
52
- <h4>Build</h4>
53
- <h4>Organise</h4>
54
- <h4>Broadcast</h4>
55
- </div>
56
- ```
57
-
58
- ```javascript
59
- const randomTitles = new TitleSwitcher('.titles-random', 'typingEffect')
60
- // set to random title switching, then defaults are 400 and 200 milliseconds for switch/effects
61
- randomTitles.startTitles({ isRandom: true })
62
- ```
63
-
64
- ## Documentation
65
-
66
- The reference for the `TitleSwitcher` class is in [`docs/`](https://joshuaheagle.com/projects/title-switcher/docs/index.html) (or open `docs/index.html` locally), generated from the TypeScript source in `src/main.ts`.
67
-
68
- ## Development
69
-
70
- ```shell
71
- npm install
72
- npm test # the tests
73
- npm run typecheck # the types
74
- npm run build # dist/, browser/ and docs/
75
- npm run docs # only the documentation
76
- ```
77
-
1
+ # [title-switcher](https://www.npmjs.com/package/title-switcher)
2
+
3
+ This is the updated title-switcher which takes a simpler approach and improves many deficiencies of the original title-switcher.
4
+
5
+ Add typing effect to titles and also switch through several titles.
6
+
7
+ This project can be used as a plugin with limited set-up requirements.
8
+ No need to change the code in the title-switcher.js file except for
9
+ customization.
10
+
11
+ Add the titles to the DOM beside each other as child elements of a wrapper element (ex. div). Pass in an identifying attribute for the wrapper such as a class name. The other sample
12
+ code such as style can be used to improve how it displays.
13
+
14
+ NO need for any additional library, this runs as is. Compatible in modern browsers from IE9+.
15
+
16
+ If there are any problems contact me, but set-up should be done based on
17
+ the sample code for best results.
18
+
19
+ Live example at https://joshuaheagle.com/projects/title-switcher. Enjoy!
20
+
21
+ ## Setup Example
22
+
23
+ ### Sequential Titles
24
+
25
+ ```html
26
+ <div class="titles">
27
+ <h4 style='color: #be1010; text-align: center;'>I built this <em>superb</em> <strong>plug-in</strong>.</h4>
28
+ <h4 style='color: #1414af; text-align: right;'><strong>TitleSwitcher</strong> is great to display <em>company
29
+ objectives</em>.</h4>
30
+ <h4 style='color: #ff7816; text-align: center; text-decoration: underline;'>Feel free to contribute and use this
31
+ plug-in.</h4>
32
+ <h4 style='color: #0c710c;'>You can find more projects on <a href='https://github.com/jheagle' target='_blank'>my
33
+ <strong>GitHub</strong></a>.</h4>
34
+ </div>
35
+ ```
36
+
37
+ ```javascript
38
+ const orderedTitles = new TitleSwitcher('.titles', 'typingEffect')
39
+ // the first arguments is to not randomly switch, then the time between switching, and finally the delay of the effect (typing in this case)
40
+ orderedTitles.startTitles({ isRandom: false, delaySwitch: 400, delayEffect: 100 })
41
+ ```
42
+
43
+ ### Random Titles
44
+
45
+ ```html
46
+ <div class='titles-random'>
47
+ <h4>Innovate</h4>
48
+ <h4>Create</h4>
49
+ <h4>Connect</h4>
50
+ <h4>Socialise</h4>
51
+ <h4>Collaborate</h4>
52
+ <h4>Build</h4>
53
+ <h4>Organise</h4>
54
+ <h4>Broadcast</h4>
55
+ </div>
56
+ ```
57
+
58
+ ```javascript
59
+ const randomTitles = new TitleSwitcher('.titles-random', 'typingEffect')
60
+ // set to random title switching, then defaults are 400 and 200 milliseconds for switch/effects
61
+ randomTitles.startTitles({ isRandom: true })
62
+ ```
63
+
64
+ ## Documentation
65
+
66
+ The reference for the `TitleSwitcher` class is in [`docs/`](https://joshuaheagle.com/projects/title-switcher/docs/index.html) (or open `docs/index.html` locally), generated from the TypeScript source in `src/main.ts`.
67
+
68
+ ## Development
69
+
70
+ ```shell
71
+ npm install
72
+ npm test # the tests
73
+ npm run typecheck # the types
74
+ npm run build # dist/, browser/ and docs/
75
+ npm run docs # only the documentation
76
+ ```
77
+