Skip to content

Commit dab374e

Browse files
committed
Merge branch 'earthlapse-menu' into earthlapse-stories
2 parents 2467d93 + d39d66b commit dab374e

File tree

2 files changed

+54
-29
lines changed

2 files changed

+54
-29
lines changed

earthlapse-hci/modes-menu.css

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
.earthlapse-modes-menu-container {
22
text-align: left;
3-
padding: 0 0 0 20%;
3+
padding: 0 20%;
44
}
55

66
.earthlapse-modes-menu-container h1 {
7-
margin: 2em 0 1em 0;
7+
margin: 1.6em 0 0.8em 0;
88
line-height: 1;
9+
font-size: 84px;
910
text-shadow: 5px 5px 15px rgba(0,0,0,0.65);
1011
}
1112

1213
.earthlapse-modes-menu-container h2 {
13-
margin: 0 0 0.5em -100px;
14+
margin: 0 0 0.6em -60px;
1415
font-weight: 400;
15-
padding: 0 0 0 100px;
16-
font-size: 60px;
16+
padding: 0 0 0 60px;
17+
font-size: 48px;
18+
line-height: 1;
1719
text-shadow: 5px 5px 15px rgba(0,0,0,0.65);
1820
}
1921

2022
.earthlapse-modes-menu-section {
21-
margin: 5em 0;
22-
padding: 0 0 0 80px;
23+
margin: 3.4em 0;
24+
padding: 0 0 0 60px;
2325
position: relative;
2426
}
2527

@@ -30,59 +32,72 @@
3032
top: 0;
3133
background: url(menu-section-arrow.png) no-repeat left;
3234
background-size: contain;
33-
height: 80px;
34-
width: 80px;
35+
height: 64px;
36+
width: 56px;
3537
}
3638

3739
.earthlapse-modes-menu-section-stories::before {
38-
background-position: 0 7px;
40+
background-position: 0 0;
3941
}
4042

4143
.earthlapse-modes-menu-section-explore::before {
42-
background-position: 0 23px;
44+
background-position: 0 16px;
4345
}
4446

4547
/* Stories Section
4648
-------------------------------------------------- */
4749

48-
.earthlapse-modes-menu-container div.img {
49-
margin: 0 30px 30px 0;
50+
.earthlapse-stories-gallery {
51+
display: inline-block;
52+
}
53+
54+
.earthlapse-modes-menu-item {
55+
margin: 0 15px 15px 0;
5056
float: left;
5157
position: relative;
58+
box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
5259
}
5360

54-
.earthlapse-modes-menu-container div.img img {
61+
.earthlapse-modes-menu-item img {
5562
display: block;
63+
width: 242px;
64+
height: 187px;
5665
}
5766

58-
.earthlapse-modes-menu-container div.desc {
59-
padding: 15px;
67+
.earthlapse-modes-menu-item .desc {
68+
padding: 8px;
6069
text-align: center;
6170
font-weight: 300;
62-
font-size: 1.8em;
71+
font-size: 22px;
6372
position: absolute;
6473
bottom: 0;
6574
left: 0;
6675
right: 0;
6776
background: rgba(0,0,0,0.65);
68-
padding: 10px;
77+
transition-duration: 0.2s;
78+
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
79+
}
80+
81+
.earthlapse-modes-menu-item.hasfocus .desc {
82+
background: #ffffff;
83+
color: #000000;
6984
}
7085

7186
/* Explore Section
7287
-------------------------------------------------- */
7388

74-
.earthlapse-modes-menu-container .earthlapse-modes-menu-explore::before {
89+
.earthlapse-modes-menu-explore::before {
7590
font-size: 36px;
7691
display: block;
7792
margin: 36px;
7893
}
7994

80-
.earthlapse-modes-menu-container .earthlapse-modes-menu-explorebutton {
95+
.earthlapse-modes-menu-explorebutton {
8196
font: inherit;
82-
font-size: 48px;
97+
font-size: 36px;
8398
background: none;
84-
padding: 20px 30px;
85-
border: 5px solid #ffffff;
99+
padding: 15px 25px;
100+
border: 4px solid #ffffff;
86101
box-shadow: 5px 5px 15px rgba(0,0,0,0.50), 5px 5px 15px rgba(0,0,0,0.50) inset;
87102
text-shadow: 5px 5px 15px rgba(0,0,0,0.65);
88103
color: #ffffff;

earthlapse-hci/modes-menu.html

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
EarthlapseUI.bind("loadedscreen", function (e) {
33
if (e.mode !== "menu") { return; }
44

5+
var $screen = $(".earthlapse-modes-menu-container");
6+
7+
// Enable focus style
8+
$screen.on("mousedown", ".earthlapse-modes-menu-item, .earthlapse-modes-menu-explorebutton", function () {
9+
$(this).addClass("hasfocus");
10+
});
11+
512
// On selection of any tile, initiate the story
6-
$(".earthlapse-modes-menu-container").on("click", ".earthlapse-modes-menu-item", function (e) {
7-
var $item = $(this);
8-
var storyId = $item.data("storyId");
13+
$screen.on("mouseup", ".earthlapse-modes-menu-item", function (e) {
14+
var $this = $(this);
15+
16+
// If this button had focus, then we should execute an action
17+
if (!$this.hasClass("hasfocus")) { return; }
18+
$this.removeClass("hasfocus");
19+
20+
var storyId = $this.data("storyId");
921

1022
// Make sure the story is ready to be played
1123
if (typeof storyId === "undefined" || storyId === null) {
@@ -18,9 +30,7 @@
1830
});
1931

2032
// On selection of explore button, initiate exploration mode
21-
$(".earthlapse-modes-menu-container").on("mousedown", ".earthlapse-modes-menu-explorebutton", function (e) {
22-
$(this).addClass("hasfocus");
23-
}).on("mouseup", ".earthlapse-modes-menu-explorebutton", function (e) {
33+
$screen.on("mouseup", ".earthlapse-modes-menu-explorebutton", function (e) {
2434
var $this = $(this);
2535

2636
// If this button had focus, then we should execute an action

0 commit comments

Comments
 (0)