Skip to content

Commit 949ddef

Browse files
Merge pull request #48 from pebble-dev/Gabbro
Add Gabbro Support
2 parents 1afe41f + 2381169 commit 949ddef

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

html/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,12 @@ <h1 id="appinfo-appname"> </h1> <a target="_blank" class="ml-3 small pt-2 nodec"
11031103
role="tab" aria-controls="e-scr-flint"
11041104
aria-selected="false">Flint</a>
11051105
</li>
1106+
<li class="nav-item">
1107+
<a onclick="getEditScreenshotsForPlatform('gabbro')" class="nav-link"
1108+
id="e-scr-gabbro-tab" data-toggle="tab" href="#e-scr-gabbro"
1109+
role="tab" aria-controls="e-scr-Gabbro"
1110+
aria-selected="false">Gabbro</a>
1111+
</li>
11061112
</ul>
11071113
<div class="tab-content" id="editScreenshotTabContent">
11081114
<!-- rendered by html_populateScreenshotTabList -->
@@ -1416,6 +1422,10 @@ <h1 class="lite"> Submit a new app or face </h1>
14161422
<a class="nav-link" id="scr-flint-tab" data-toggle="tab" href="#scr-flint"
14171423
role="tab" aria-controls="scr-flint" aria-selected="false">Flint</a>
14181424
</li>
1425+
<li class="nav-item">
1426+
<a class="nav-link" id="scr-gabbro-tab" data-toggle="tab" href="#scr-gabbro"
1427+
role="tab" aria-controls="scr-gabbro" aria-selected="false">Gabbro</a>
1428+
</li>
14191429
</ul>
14201430
<div class="tab-content" id="submitScreenshotTabContent">
14211431
<!-- rendered by html_populateAddImageTabList -->

html/res/css/devPortal.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,12 @@ input[type="checkbox"] {
349349
width: 180px;
350350
height: 232px;
351351
}
352+
.img-card.gabbro {
353+
max-width: 180px;
354+
max-height: 232px;
355+
width: 180px;
356+
height: 232px;
357+
}
352358
.img-card.emery {
353359
max-width: 200px;
354360
max-height: 280px;
@@ -378,6 +384,14 @@ input[type="checkbox"] {
378384
border-radius: 180px;
379385
object-fit: cover;
380386
}
387+
.card-img-top.gabbro {
388+
width: 180px;
389+
height: 180px;
390+
margin-top: 0px;
391+
margin-left: 0px;
392+
border-radius: 180px;
393+
object-fit: cover;
394+
}
381395
.card-img-top.emery {
382396
width: 200px;
383397
height: 228px;
@@ -592,6 +606,14 @@ img.small {
592606
border-radius: 5px;
593607
object-fit: cover;
594608
}
609+
.image-container.gabbro img {
610+
margin-top: 60px;
611+
margin-left: 24px;
612+
width: 113px;
613+
height: 113px;
614+
border-radius: 55px;
615+
object-fit: cover;
616+
}
595617

596618
.rainbow-text {
597619
background-image: linear-gradient(to left, violet, indigo, blue, green, yellow, orange, red);

html/res/img/screenshotGabbro.png

3.13 KB
Loading

html/res/js/devPortal.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ const PLATFORM_CONFIG = {
5151
"colour": false,
5252
"round": false,
5353
"background_path": "screenshot_slider_background_pebble2.png"
54+
},
55+
"gabbro": {
56+
"width": 260,
57+
"height": 260,
58+
"colour": true,
59+
"round": true,
60+
"background_path": "screenshot_slider_background_time_round_14.png"
5461
}
5562
}
5663

@@ -1623,7 +1630,7 @@ function submitNewApp() {
16231630
//Collect screenshots, store the first valid one for use as largeIcon if we're a watchface
16241631

16251632
//The weird order here is order of preference for largeIcon platform. Basalt looks best
1626-
["basalt","aplite", "diorite", "flint", "chalk", "emery"].forEach(platform => {
1633+
["basalt","aplite", "diorite", "flint", "chalk", "gabbro", "emery"].forEach(platform => {
16271634
var short = platform.substr(0,1);
16281635
for (var i = 1; i < 6; i ++) {
16291636
if ($(`#i-screenshot-${short}-${i}-f`).prop("files")[0] != undefined) {
@@ -2127,7 +2134,8 @@ function getScreenshotPlaceholderImagePath(platform) {
21272134
const default_path = "/res/img/screenshotSquare.png"
21282135
const non_defaults = {
21292136
"c": "/res/img/screenshotRound.png",
2130-
"e": "/res/img/screenshotEmery.png"
2137+
"e": "/res/img/screenshotEmery.png",
2138+
"g": "/res/img/screenshotGabbro.png",
21312139
}
21322140
let placeholder = (non_defaults.hasOwnProperty(platform)) ? non_defaults[platform] : default_path
21332141
return placeholder

0 commit comments

Comments
 (0)