Skip to content

Commit f6a4a6d

Browse files
Merge pull request #69 from technote-space/feature/#11
feat: add demo page (#11)
2 parents 7466278 + 61428ba commit f6a4a6d

File tree

8 files changed

+191
-5
lines changed

8 files changed

+191
-5
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
node_modules/
22
coverage/
33
.idea/
4-
jquery.marker-animation.min.js
4+
/jquery.marker-animation.min.js
5+
/travis-ci
6+
/gh-pages
7+
.work/
8+
composer.lock
9+
!/bin

.npmignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
src/
44
__tests__/
55
node_modules/
6-
marker-animation.gif
7-
stripe.png
86
_config.yml
97
jest.config.js
108
jest.setup.js
11-
yarn.lock
9+
yarn.lock
10+
composer.json

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,23 @@ jobs:
8383
secure: E2n0AGDW4zKOhf0vfEjI+2L9tPw4SuW3vknG4DDYbkLCLZXRi0XZ16qhIuZShKtXhTDVgTYcM9SCcsdv5PU3FMcMpg3rftzjXIER+pZktPhQoMncrbIY43G7rDInsUSyOfETWcXXEVDSs6/l50YXYwPeKn7fxgom6g16di5tzfKC7U0Ud39BvZXl7LJYUwb+pDtJ4gATJkd8GhyZ+fyZ+nVvSWdEvFBf2tru/2YbnH8U2Y8J2lcWl2RjHpwz8xKYTmak6BRmN9WLrpNeSUAzzus9TCe4c7l+pY4Na4uGBnC1c/8VR46eNHkIRGEgNoxwWMlbv60iSTqnMH2//2l3Rj55HBaHzzlNsRPWteKSPoj13hN9yp1/LqJsDBW3ga+p+7hjt+JEgQYh1y+sa/GlvMYsX7vyYwipOBtSw9zSUmOj/b8NGLqb+sL6a3Pjr0ObKcjojrE6US8FPTLwukRdLxYXF8wYN5EWOo50UXdImFYqmeKfdE/Vluq2/pyZA3MozsffBY6rv4/lNjuIS29dIt2lm+I79Zr/Q4VZjS7Sm4Cckd/c156HQX7uPZLKfHmFOoyZxSvLiJTh5fiSiHVbVl6jqO3yC6qx9FdJvLQKXboSgj00GXZWtebUuua6HW6Bf2XKDW+WN7cXSp2wu5TMLoXGLnVFDrfKBFDKzrMzCn0=
8484
on:
8585
tags: true
86+
87+
- stage: deploy
88+
language: node_js
89+
node_js: '11'
90+
dist: trusty
91+
env:
92+
- GH_PAGES_TITLE="jQuery Marker Animation"
93+
- GH_PAGES_TRACKING_ID=UA-78163306-3
94+
script: skip
95+
before_deploy:
96+
- source tests/bin/deploy/env.sh
97+
- bash tests/bin/deploy/gh-pages.sh
98+
deploy:
99+
provider: pages
100+
skip_cleanup: true
101+
github_token: ${GITHUB_TOKEN}
102+
keep_history: true
103+
local_dir: ${GH_PAGES_DIR}
104+
on:
105+
branch: master

_config.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

bin/gh-pages/plugin.js

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import $ from 'jquery';
2+
import './jquery.marker-animation.min';
3+
import './plugin.scss';
4+
5+
$( () => {
6+
$( '#app' ).html( `
7+
<div>
8+
<div class="">
9+
This page is demonstration of <a href="https://github.com/technote-space/jquery.marker-animation">jQuery Marker Animation</a>.
10+
</div>
11+
<div class="blank-box">
12+
<p>
13+
Hello, Dolly
14+
</p>
15+
<p>
16+
<span class="marker-animation" data-ma_repeat="true">Well, hello, Dolly</span>
17+
</p>
18+
<p>
19+
It's so nice to have you back where you belong
20+
</p>
21+
<p>
22+
You're lookin' swell, Dolly
23+
</p>
24+
<p>
25+
I can tell, Dolly
26+
</p>
27+
<p>
28+
<span class="marker-animation" data-ma_color="blue">You're still glowin', you're still crowin'</span>
29+
</p>
30+
<p>
31+
You're still goin' strong
32+
</p>
33+
<p>
34+
I feel the room swayin'
35+
</p>
36+
<p>
37+
While the band's playin'
38+
</p>
39+
<p>
40+
One of our old favorite songs from way back when
41+
</p>
42+
<p>
43+
<span class="marker-animation" data-ma_color="red">So, take her wrap, fellas<br>Dolly, never go away again</span>
44+
</p>
45+
<p>
46+
Hello, Dolly
47+
</p>
48+
<p>
49+
Well, hello, Dolly
50+
</p>
51+
<p>
52+
It's so nice to have you back where you belong
53+
</p>
54+
<p>
55+
<span class="marker-animation" data-ma_font_weight="null"> You're lookin' swell, Dolly<br>I can tell, Dolly<br>You're still glowin'</span>, you're still crowin'
56+
</p>
57+
<p>
58+
You're still goin' strong
59+
</p>
60+
<p>
61+
I feel the room swayin'
62+
</p>
63+
<p>
64+
<span class="marker-animation" data-ma_duration="6s">While the band's playin'<br>One of our old favorite songs from way back when</span>
65+
</p>
66+
<p>
67+
So, golly, gee, fellas
68+
</p>
69+
<p>
70+
<span class="marker-animation" data-ma_stripe="true" data-ma_color="#00ffcc">Have a little faith in me, fellas<br>Dolly, never go away</span>
71+
</p>
72+
<p>
73+
Promise, you'll never go away
74+
</p>
75+
<p>
76+
Dolly'll never go away again
77+
</p>
78+
79+
<p>
80+
<a class="btn btn-light-blue reset-animation">Reset</a>
81+
</p>
82+
</div>
83+
</div>` );
84+
85+
$( '#app .marker-animation' ).markerAnimation();
86+
$( '#app .reset-animation' ).on( 'click', () => {
87+
$( '#app .marker-animation' ).markerAnimation( 'refresh' );
88+
} );
89+
} );

bin/gh-pages/plugin.scss

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#app {
2+
max-width: 600px;
3+
margin: 0 auto;
4+
}
5+
6+
.blank-box {
7+
border: 3px solid #949495;
8+
padding: 1.2em 1em;
9+
margin: 1em 2%;
10+
border-radius: 4px;
11+
}
12+
13+
.reset-animation {
14+
color: #fff;
15+
font-weight: bold;
16+
border-radius: 4px;
17+
display: inline-block;
18+
cursor: pointer;
19+
line-height: normal;
20+
padding: 10px 16px;
21+
text-decoration: none;
22+
text-align: center;
23+
font-size: 14px;
24+
border: 2px solid transparent;
25+
position: relative;
26+
background-color: #2ca9e1;
27+
}

bin/gh-pages/pre_install.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [[ $# -lt 1 ]]; then
6+
exit 1
7+
fi
8+
9+
current=$(cd $(dirname $0);
10+
pwd)
11+
12+
SCRIPT_DIR=${1}
13+
source ${SCRIPT_DIR}/variables.sh
14+
15+
yarn --cwd ${TRAVIS_BUILD_DIR} build
16+
17+
cp -f ${current}/plugin.js ${GH_WORK_DIR}/
18+
cp -f ${current}/plugin.scss ${GH_WORK_DIR}/
19+
cp -f ${TRAVIS_BUILD_DIR}/jquery.marker-animation.min.js ${GH_WORK_DIR}/
20+
21+
yarn --cwd ${GH_WORK_DIR} add jquery

composer.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "technote-space/jquery.marker-animation",
3+
"description": "jQuery Marker Animation",
4+
"type": "library",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Technote",
9+
"email": "technote.space@gmail.com",
10+
"homepage": "https://technote.space"
11+
}
12+
],
13+
"scripts": {
14+
"bin:download": [
15+
"mkdir -p ./travis-ci/.git",
16+
"chmod -R +w ./travis-ci/.git && rm -rdf ./travis-ci",
17+
"rm -f ./tests/bootstrap.php ./.coveralls.yml ./phpcs.xml ./phpmd.xml phpunit.xml",
18+
"git clone --depth=1 https://github.com/wp-content-framework/travis-ci.git travis-ci"
19+
],
20+
"bin:update": [
21+
"TRAVIS_BUILD_DIR=$(cd $(dirname $0); pwd) bash bin/update/package.sh",
22+
"TRAVIS_BUILD_DIR=$(cd $(dirname $0); pwd) bash bin/update/commit.sh"
23+
],
24+
"bin:gh-pages": "TRAVIS_BUILD_DIR=$(cd $(dirname $0); pwd) GH_PAGES_TITLE='jQuery Marker Animation' TRACKING_ID='UA-78163306-3' bash ./travis-ci/bin/deploy/gh-pages.sh"
25+
}
26+
}

0 commit comments

Comments
 (0)