Skip to content

Commit 1bddcfb

Browse files
committed
moved stuff from homeStyles.html into mountain.html
1 parent 43c188a commit 1bddcfb

File tree

9 files changed

+248
-246
lines changed

9 files changed

+248
-246
lines changed

main/home/homeStyles.scss

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,3 @@ $darkBlue: #406BB2;
2929
transform: translate(-50%);
3030
}
3131
}
32-
.home-bottom {
33-
width: 150px;
34-
height: 70px;
35-
font-weight: bold;
36-
text-align: center;
37-
color: #FFF;
38-
background: $darkBlue;
39-
border-radius: 5px;
40-
display: flex;
41-
align-items: center;
42-
span {
43-
margin: 20px;
44-
}
45-
}

main/home/homeTemplate.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,4 @@
66
<mountain-directive></mountain-directive>
77

88

9-
<a ui-sref="lessons">
10-
<div class="home-bottom">
11-
<span>
12-
Start your journey!
13-
</span>
14-
</div>
15-
</a>
16-
179
</div>

main/mountain/mountainStyles.scss

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,55 @@
1-
$darkBlue: #406BB2;
2-
3-
/////////////////////////////
1+
$darkBlue: #406BB2; /////////////////////////////
42
// --- mountain styles --- //
53
/////////////////////////////
6-
74
#mtn-wrapper {
8-
font-family: 'Lato';
9-
position: absolute;
10-
top: 50%;
11-
left: 50%;
12-
width: 80vw;
13-
height: 80vh;
14-
transform: translate(-50%, -50%);
15-
display: flex;
16-
flex-direction: column;
17-
align-items: center;
5+
font-family: 'Lato';
6+
position: absolute;
7+
top: 50%;
8+
left: 50%;
9+
width: 80vw;
10+
height: 80vh;
11+
transform: translate(-50%, -50%);
12+
display: flex;
13+
flex-direction: column;
14+
align-items: center;
1815
}
1916
#home-top {
20-
position: absolute;
21-
width: 0;
22-
height: 0;
23-
left: calc(50vw - 20em);
24-
top: calc(50vw - 20em);
25-
border-left: 20em solid transparent;
26-
border-right: 20em solid transparent;
27-
border-bottom: 21em solid #FFE3A8;
28-
margin-bottom: 8vh;
29-
margin-top: 8vh;
30-
z-index: -3;
31-
div {
32-
font-weight: bold;
3317
position: absolute;
34-
top: 50%;
35-
transform: translate(-50%);
36-
}
18+
width: 0;
19+
height: 0;
20+
left: calc(40vw - 20em);
21+
border-left: 20em solid transparent;
22+
border-right: 20em solid transparent;
23+
border-bottom: 21em solid #FFE3A8;
24+
margin-bottom: 8vh;
25+
margin-top: 8vh;
26+
z-index: -3;
27+
div {
28+
font-weight: bold;
29+
position: absolute;
30+
top: 50%;
31+
transform: translate(-50%);
32+
}
33+
}
34+
.home-bottom {
35+
width: 150px;
36+
height: 70px;
37+
position: relative;
38+
top: 385px;
39+
left: 0;
40+
font-weight: bold;
41+
text-align: center;
42+
color: #FFF;
43+
background: $darkBlue;
44+
border-radius: 5px;
45+
display: flex;
46+
align-items: center;
47+
span {
48+
margin: 20px;
49+
}
50+
}
51+
.spawnTreesBtn{
52+
padding-top: 0px;
53+
position: absolute;
54+
top: 40px;
3755
}

main/mountain/mountainTemplate.html

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<div id="mtn-wrapper">
2-
<button type="button" name="spawnTrees" class="spawnTreesBtn" ng-click="spawnTrees(400)">Spawn Trees</button>
2+
<button type="button" name="spawnTrees" class="spawnTreesBtn" ng-click="spawnTrees(3)">Spawn Trees</button>
33
<div id="home-top">
4-
<div>Placeholder Pyramid/Triangle</div>
4+
<div>Placeholder Pyramid/Triangle</div>
55
</div>
66
<!-- <button type="button" name="spawnClimber" class="spawnClimber" ng-click="spawnClimber(1)">Spawn Climber</button> -->
77

88
<!-- <i class="climber"> -->
9-
<!-- <i></i> head -->
10-
<!-- <i></i> backpack -->
11-
<!-- <i></i> bottocks -->
12-
<!-- <i></i> left-arm -->
13-
<!-- <i></i> torso -->
14-
<!-- <i></i> shoulder -->
15-
<!-- <i></i> -->
16-
<!-- <i></i> -->
9+
<!-- <i></i> head -->
10+
<!-- <i></i> backpack -->
11+
<!-- <i></i> bottocks -->
12+
<!-- <i></i> left-arm -->
13+
<!-- <i></i> torso -->
14+
<!-- <i></i> shoulder -->
15+
<!-- <i></i> -->
16+
<!-- <i></i> -->
1717

1818
<!-- </i> -->
19-
<!--
19+
<!--
2020
<div id="trees">
2121
<i id="my-trees">
2222
<i></i>
@@ -25,6 +25,14 @@
2525
<i></i>
2626
</i>
2727
</div> -->
28+
29+
<a ui-sref="lessons">
30+
<div class="home-bottom">
31+
<span>
32+
Start your journey!
33+
</span>
34+
</div>
35+
</a>
2836
</div>
2937

3038
<!-- .html jquery thing

main/mountain/trees.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
left: 0em;
66
top: 1em;
77
}
8-
.spawnTreesBtn{
9-
padding-top: 0px;
10-
position: absolute;
11-
top: 350px;
12-
}
8+
139
.my-trees {
1410
position: relative;
1511
}

public/html/home/homeTemplate.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,4 @@
66
<mountain-directive></mountain-directive>
77

88

9-
<a ui-sref="lessons">
10-
<div class="home-bottom">
11-
<span>
12-
Start your journey!
13-
</span>
14-
</div>
15-
</a>
16-
179
</div>

public/html/mountain/mountainTemplate.html

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<div id="mtn-wrapper">
2-
<button type="button" name="spawnTrees" class="spawnTreesBtn" ng-click="spawnTrees(400)">Spawn Trees</button>
2+
<button type="button" name="spawnTrees" class="spawnTreesBtn" ng-click="spawnTrees(3)">Spawn Trees</button>
33
<div id="home-top">
4-
<div>Placeholder Pyramid/Triangle</div>
4+
<div>Placeholder Pyramid/Triangle</div>
55
</div>
66
<!-- <button type="button" name="spawnClimber" class="spawnClimber" ng-click="spawnClimber(1)">Spawn Climber</button> -->
77

88
<!-- <i class="climber"> -->
9-
<!-- <i></i> head -->
10-
<!-- <i></i> backpack -->
11-
<!-- <i></i> bottocks -->
12-
<!-- <i></i> left-arm -->
13-
<!-- <i></i> torso -->
14-
<!-- <i></i> shoulder -->
15-
<!-- <i></i> -->
16-
<!-- <i></i> -->
9+
<!-- <i></i> head -->
10+
<!-- <i></i> backpack -->
11+
<!-- <i></i> bottocks -->
12+
<!-- <i></i> left-arm -->
13+
<!-- <i></i> torso -->
14+
<!-- <i></i> shoulder -->
15+
<!-- <i></i> -->
16+
<!-- <i></i> -->
1717

1818
<!-- </i> -->
19-
<!--
19+
<!--
2020
<div id="trees">
2121
<i id="my-trees">
2222
<i></i>
@@ -25,6 +25,14 @@
2525
<i></i>
2626
</i>
2727
</div> -->
28+
29+
<a ui-sref="lessons">
30+
<div class="home-bottom">
31+
<span>
32+
Start your journey!
33+
</span>
34+
</div>
35+
</a>
2836
</div>
2937

3038
<!-- .html jquery thing

public/scripts/all.js

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,34 @@ angular.module('myApp')
153153

154154
}) // end lessonsSideBarDirective
155155

156+
angular.module('myApp')
157+
158+
.controller('lessonTestsController', ["$scope", function($scope) {
159+
160+
}])
161+
162+
angular.module('myApp')
163+
164+
.directive('lessonTestsDirective', function() {
165+
166+
return {
167+
restrict: 'A',
168+
controller: 'lessonTestsController',
169+
link: function(scope, ele, attr) {
170+
171+
$('.lesson-test').click(function() {
172+
let testsParents = this.parentNode.parentNode.parentNode.parentNode;
173+
// console.log(testsParents.id); // id of parent lesson name
174+
// $('.lesson-tests-wrapper').html('<span>' + testsParents.id + '</span>');
175+
$('.lesson-tests-wrapper').load('./html/lessonTests/lessonFiles/' + testsParents.id + '.html');
176+
$('html, body').animate({ scrollTop: 0 }, 300);
177+
})
178+
179+
}
180+
}
181+
182+
})
183+
156184
angular.module('myApp')
157185
.controller('loginController', ["$scope", "loginService", function($scope, loginService){
158186

@@ -247,31 +275,35 @@ angular.module("myApp")
247275

248276
angular.module('myApp')
249277

250-
.controller('lessonTestsController', ["$scope", function($scope) {
278+
.controller('navigationController', ["$scope", "loginService", function($scope, loginService) {
279+
280+
$scope.logoutUser = function() {
281+
loginService.logoutUser();
282+
};
251283

252284
}])
253285

254286
angular.module('myApp')
255287

256-
.directive('lessonTestsDirective', function() {
288+
.directive('navigationDirective', function() {
257289

258290
return {
259-
restrict: 'A',
260-
controller: 'lessonTestsController',
291+
restrict: 'E',
292+
templateUrl: './html/navigation/navigationTemplate.html',
261293
link: function(scope, ele, attr) {
294+
let profileMenu = $('#menu-navigation');
262295

263-
$('.lesson-test').click(function() {
264-
let testsParents = this.parentNode.parentNode.parentNode.parentNode;
265-
// console.log(testsParents.id); // id of parent lesson name
266-
// $('.lesson-tests-wrapper').html('<span>' + testsParents.id + '</span>');
267-
$('.lesson-tests-wrapper').load('./html/lessonTests/lessonFiles/' + testsParents.id + '.html');
268-
$('html, body').animate({ scrollTop: 0 }, 300);
296+
$('#profile-wrapper').click(function() {
297+
profileMenu.toggle('expand')
269298
})
270299

300+
profileMenu.click(function() {
301+
profileMenu.toggle('expand');
302+
})
271303
}
272304
}
273305

274-
})
306+
}) // end navigationDirective
275307

276308
angular.module( 'myApp' )
277309
.controller( 'mountainController', [ '$scope', 'loginService', function ( $scope, loginService ) {
@@ -379,35 +411,3 @@ angular.module( 'myApp' )
379411
return dirDefinition;
380412

381413
} ) // end mountainDirective
382-
383-
angular.module('myApp')
384-
385-
.controller('navigationController', ["$scope", "loginService", function($scope, loginService) {
386-
387-
$scope.logoutUser = function() {
388-
loginService.logoutUser();
389-
};
390-
391-
}])
392-
393-
angular.module('myApp')
394-
395-
.directive('navigationDirective', function() {
396-
397-
return {
398-
restrict: 'E',
399-
templateUrl: './html/navigation/navigationTemplate.html',
400-
link: function(scope, ele, attr) {
401-
let profileMenu = $('#menu-navigation');
402-
403-
$('#profile-wrapper').click(function() {
404-
profileMenu.toggle('expand')
405-
})
406-
407-
profileMenu.click(function() {
408-
profileMenu.toggle('expand');
409-
})
410-
}
411-
}
412-
413-
}) // end navigationDirective

0 commit comments

Comments
 (0)