Skip to content

Commit f6029c5

Browse files
committed
Merge branch 'develop'
2 parents 6449e30 + cf1237d commit f6029c5

6 files changed

Lines changed: 50 additions & 20 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cli-plugin",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Command line interface plugin for web applications.",
55
"homepage": "https://github.com/g1eb/cli-plugin#readme",
66
"authors": [

dist/cli-plugin.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cli-plugin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cli-plugin",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Command line interface plugin for web applications.",
55
"homepage": "https://github.com/g1eb/cli-plugin#readme",
66
"author": "g1eb",

src/cli-plugin.css

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
.cli-plugin {
55
display: block;
6-
position: absolute;
6+
position: fixed;
77
top: 50px;
88
left: 50px;
99
bottom: 50px;
@@ -89,39 +89,60 @@
8989
top: 0;
9090
right: 0;
9191
bottom: 0;
92+
opacity: 1;
9293
background-color: black;
9394

94-
-webkit-animation: blink 1.5s ease-in-out 0s infinite;
95-
-moz-animation: blink 1.5s ease-in-out 0s infinite;
96-
-ms-animation: blink 1.5s ease-in-out 0s infinite;
97-
-o-animation: blink 1.5s ease-in-out 0s infinite;
98-
animation: blink 1.5s ease-in-out 0s infinite;
95+
-webkit-animation: blink 1.5s linear 0s infinite;
96+
-moz-animation: blink 1.5s linear 0s infinite;
97+
-ms-animation: blink 1.5s linear 0s infinite;
98+
-o-animation: blink 1.5s linear 0s infinite;
99+
animation: blink 1.5s linear 0s infinite;
99100
}
100101
.cli-plugin .input.active .cursor {
101102
display: none;
102103
}
103104

104105
@-webkit-keyframes blink {
105-
40% { background-color: transparent; }
106-
60% { background-color: transparent; }
106+
0% { opacity: 0; }
107+
30% { opacity: 0; }
108+
35% { opacity: 1; }
109+
65% { opacity: 1; }
110+
70% { opacity: 0; }
111+
100% { opacity: 0; }
107112
}
108113

109114
@-moz-keyframes blink {
110-
40% { background-color: transparent; }
111-
60% { background-color: transparent; }
115+
0% { opacity: 0; }
116+
30% { opacity: 0; }
117+
35% { opacity: 1; }
118+
65% { opacity: 1; }
119+
70% { opacity: 0; }
120+
100% { opacity: 0; }
112121
}
113122

114123
@-ms-keyframes blink {
115-
40% { background-color: transparent; }
116-
60% { background-color: transparent; }
124+
0% { opacity: 0; }
125+
30% { opacity: 0; }
126+
35% { opacity: 1; }
127+
65% { opacity: 1; }
128+
70% { opacity: 0; }
129+
100% { opacity: 0; }
117130
}
118131

119132
@-o-keyframes blink {
120-
40% { background-color: transparent; }
121-
60% { background-color: transparent; }
133+
0% { opacity: 0; }
134+
30% { opacity: 0; }
135+
35% { opacity: 1; }
136+
65% { opacity: 1; }
137+
70% { opacity: 0; }
138+
100% { opacity: 0; }
122139
}
123140

124141
@keyframes blink {
125-
40% { background-color: transparent; }
126-
60% { background-color: transparent; }
142+
0% { opacity: 0; }
143+
30% { opacity: 0; }
144+
35% { opacity: 1; }
145+
65% { opacity: 1; }
146+
70% { opacity: 0; }
147+
100% { opacity: 0; }
127148
}

src/cli-plugin.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ var cliPlugin = {
5757
cliPlugin.inputElement.setAttribute('spellcheck', 'false');
5858
cliPlugin.containerElement.appendChild(cliPlugin.inputElement);
5959

60+
cliPlugin.addCursor();
61+
},
62+
63+
/**
64+
* Add blinking cursor to input element
65+
*/
66+
addCursor: function () {
6067
cliPlugin.cursorElement = document.createElement('div');
6168
cliPlugin.cursorElement.setAttribute('class', 'cursor');
6269
cliPlugin.cursorElement.setAttribute('style', 'background:'+cliPlugin.settings.cursorColor);
@@ -127,6 +134,7 @@ var cliPlugin = {
127134
cmd = cliPlugin.history[--cliPlugin.index];
128135
}
129136
cliPlugin.inputElement.innerHTML = cmd;
137+
cliPlugin.addCursor();
130138
},
131139

132140
/**
@@ -138,6 +146,7 @@ var cliPlugin = {
138146
cmd = cliPlugin.history[++cliPlugin.index] || '';
139147
}
140148
cliPlugin.inputElement.innerHTML = cmd;
149+
cliPlugin.addCursor();
141150
},
142151

143152
/**

0 commit comments

Comments
 (0)