Skip to content

Commit 0708b75

Browse files
authored
Merge pull request #90 from PropGit/dual_site_buttons
Dual site buttons
2 parents 6c8e7a9 + d570fc0 commit 0708b75

File tree

4 files changed

+71
-28
lines changed

4 files changed

+71
-28
lines changed

index.css

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ body {
1313
background-repeat: no-repeat;
1414
}
1515

16+
/*---------------*/
17+
/* Settings Pane */
18+
/*---------------*/
19+
1620
.tab-selected {
1721
color: #000;
1822
padding-bottom: 5px;
@@ -105,15 +109,23 @@ body {
105109
outline: none;
106110
}
107111

112+
/*----------------*/
113+
/* Browse Buttons */
114+
/*--------------- */
115+
108116
.button-label {
109117
position: absolute;
110118
text-align: center;
111-
left: 325px;
119+
left: 323px;
112120
width: 160px;
113-
font-family: Baloo Bhaina;
121+
font-family: Baloo Bhaina, sans-serif;
114122
font-size: 20px;
115123
}
116124

125+
.button-label-small {
126+
font-size: 14px;
127+
}
128+
117129
.button {
118130
width: 150px;
119131
border: none;
@@ -133,21 +145,23 @@ body {
133145
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
134146
}
135147

136-
.button-blue {
148+
.button-open {
137149
background-color: #4472c4;
138150
}
139151

140-
.button-blue:hover {
152+
.button-open:hover {
141153
background-color: #335b9c;
142154
}
143155

144-
.button-green {
145-
background-color: #4caf50; /* Green */
156+
.button .tooltip {
157+
width: 130px;
158+
/* Vertically position the tip in relation to the button*/
159+
top: 12px;
146160
}
147161

148-
.button-green:hover {
149-
background-color: #339037; /* Green */
150-
}
162+
/*-----------------*/
163+
/* Settings button */
164+
/*-----------------*/
151165

152166
.settings {
153167
width: 40px;
@@ -163,6 +177,14 @@ body {
163177
border: 1px solid #117022;
164178
}
165179

180+
.settings-active:hover {
181+
background-color: #339037; /* Green */
182+
}
183+
184+
/*-------------------*/
185+
/* Connection status */
186+
/*-------------------*/
187+
166188
.status {
167189
word-break: break-all;
168190
padding: 17px 16px;
@@ -178,11 +200,17 @@ body {
178200
.status-clear {
179201
height: 38px;
180202
width: 114px;
181-
background: none; /* Green */
203+
background: none;
182204
color: #ccc;
183205
border:2px solid #ddd;
184206
}
185207

208+
.status-clear .tooltip {
209+
width: 200px;
210+
/* Vertically position the tip in relation to the button*/
211+
top: -7px;
212+
}
213+
186214
.status-green {
187215
height: 31px;
188216
width: 118px;
@@ -192,44 +220,52 @@ body {
192220
border: none;
193221
}
194222

195-
.status-clear .statustiptext {
223+
/*----------*/
224+
/* Tool Tip */
225+
/*----------*/
226+
227+
.tooltip {
196228
visibility: hidden;
197-
width: 200px;
198-
background-color: #4472c4;
229+
width: 100px; /* Default size */
230+
background-color: #117022;
199231
color: #fff;
200232
text-align: center;
201233
border-radius: 6px;
202234
padding-top: 3px;
203235
padding-bottom: 5px;
204236

205-
/* Position the tip (left of status)*/
237+
/* Position the tip (left of button)*/
206238
position: absolute;
207239
z-index: 1;
208-
top: -7px;
240+
top: 10px; /* Default position */
209241
right: 106%;
210242

211243
/* Fade in tip - takes 4/10 second to go from 0% to 100% opacity */
212244
opacity: 0.0;
213245
transition: opacity 0.4s;
214246
}
215247

216-
.status-clear .statustiptext::after {
248+
.tooltip::after {
217249
content: "";
218250
position: absolute;
219251
top: 50%;
220252
left: 100%;
221253
margin-top: -5px;
222254
border-width: 5px;
223255
border-style: solid;
224-
border-color: transparent transparent transparent #4472c4;
256+
border-color: transparent transparent transparent #117022;
225257
}
226258

227-
.status-clear:hover .statustiptext {
259+
*:hover > .tooltip {
228260
visibility: visible;
229261
opacity: 1.0;
230262
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
231263
}
232264

265+
/*-------------*/
266+
/* App version */
267+
/*-------------*/
268+
233269
.version {
234270
color: #999999;
235271
font-size: 11px;

index.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,26 @@
6969
</div>
7070

7171
<div style="top:70px;" class="button-label">
72-
Click:
72+
Open Browser:
7373
</div>
7474
<div style="position:absolute; top:100px; left:325px;">
75-
<button id="open-browser" class="button button-blue">Open Browser</button>
75+
<button id="open-blocklypropsolo" class="button button-open">BlocklyProp Solo<span class="tooltip">No login required</span></button>
7676
</div>
77-
<div style="top:170px;" class="button-label">
77+
<div style="top:142px;" class="button-label button-label-small">
78+
--or--
79+
</div>
80+
<div style="position:absolute; top:162px; left:325px;">
81+
<button id="open-blocklyprop" class="button button-open">BlocklyProp<span class="tooltip">Login required</span></button>
82+
</div>
83+
<div style="top:220px;" class="button-label">
7884
Status:
7985
</div>
80-
<div style="position:absolute; top:200px; left:325px;">
86+
<div style="position:absolute; top:250px; left:325px;">
8187
<div>
8288
<span id="sys-connected" class="status status-green" style="opacity:0.0;">&#10004; Connected</span>
83-
<span id="sys-waiting" class="status status-clear" style="opacity:1.0; position:absolute; top: 0px; left: 0px;">Waiting to<br>connect...<span class="statustiptext">To connect:<br>Open browser to BlocklyProp<br>site, then navigate to<br>View/Edit project code</span></span>
89+
<span id="sys-waiting" class="status status-clear" style="opacity:1.0; position:absolute; top: 0px; left: 0px;">Waiting to<br>connect...<span class="tooltip">To connect:<br>Open browser to desired<br>site, then navigate to<br>View/Edit project code</span></span>
8490
</div>
8591
</div>
86-
<!--
87-
<button id="connect-menu" class="button button-blue" style="position:absolute; top:230px; left:476px; z-index:3; text-align:left; padding-left:5px; height:55px;">&#8942;</button>
88-
-->
8992
<div style="position:absolute; top:380px; left:240px;">
9093
<span id="version-text" class="version">v0.0.0</span>
9194
</div>

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ document.addEventListener('DOMContentLoaded', function() {
152152
sm = sm32bit();
153153
}
154154

155-
$('open-browser').onclick = function() {
155+
$('open-blocklypropsolo').onclick = function() {
156+
chrome.browser.openTab({ url: "https://solo.parallax.com/"});
157+
};
158+
159+
$('open-blocklyprop').onclick = function() {
156160
chrome.browser.openTab({ url: "https://blockly.parallax.com/"});
157161
};
158162

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "BlocklyProp Launcher",
33
"description": "A Chrome application that connects your Propeller-Powered Hardware to the BlocklyProp website.",
4-
"version": "0.10.0",
4+
"version": "0.11.0",
55
"manifest_version": 2,
66
"minimum_chrome_version": "45",
77

0 commit comments

Comments
 (0)