Skip to content

Commit a145b0c

Browse files
committed
Added style to default page
1 parent a73c8a3 commit a145b0c

File tree

9 files changed

+109
-5
lines changed

9 files changed

+109
-5
lines changed

app/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
66
<title>_default</title>
7+
8+
<link href='http://fonts.googleapis.com/css?family=Oswald:400,700,300' rel='stylesheet' type='text/css'>
9+
710
<link rel="stylesheet" href="css/app.css" />
811
</head>
912

app/scripts/models/_default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var Backbone = require('backbone');
22

33
module.exports = Backbone.Model.extend({
44
defaults: {
5-
_default: 'WHOA'
5+
_default: 'HOLY CRAP'
66
},
77

88
initialize: function() {

app/scripts/templates/_default.ejs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
<div class=""><%= _default %></div>
1+
2+
<div id="wrapper" class="container">
3+
<div class="explantion">
4+
<p><span class="bigger">Wait!</span> Did you remember to rename the <strong>_default</strong> files? You should do it file by file to get a feel for the structure of the project.</p>
5+
</div>
6+
7+
<div class="exclamation">
8+
<h1><%= _default %></h1>
9+
<h6>It worked</h6>
10+
</div>
11+
</div>

app/scripts/templates/content.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div id="_default"></div>
1+
<div id="_default" class="section"></div>

app/scripts/views/_default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $._default = require('../lib/_default');
88

99
module.exports = Backbone.View.extend({
1010
el: "#_default",
11-
11+
1212
template: require('../templates/_default'),
1313

1414
initialize: function() {

app/styles/_default.less

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
.section {
2+
display: inline-block;
3+
width: 100%;
4+
height: 100%;
5+
}
6+
7+
#wrapper {
8+
padding: 10% 10%;
9+
}
10+
11+
12+
13+
div.explantion {
14+
padding: 30px 20px;
15+
16+
@media (min-width: 768px) {
17+
float: left;
18+
width: 50%;
19+
padding: 18% 50px;
20+
background: #eeeeee;
21+
box-shadow: 1px 1px 7px -2px rgba(0,0,0,0.3) inset;
22+
}
23+
24+
p {
25+
font-family: 'Oswald', sans-serif;
26+
font-weight: 300;
27+
font-size: 20px;
28+
.bigger {
29+
font-weight: 400;
30+
font-size: 1.3em;
31+
}
32+
}
33+
34+
}
35+
36+
37+
38+
39+
div.exclamation {
40+
@media (min-width: 768px) {
41+
float: left;
42+
width: 50%;
43+
}
44+
45+
h1 {
46+
text-align: center;
47+
font-size: 157px;
48+
font-family: 'Oswald', sans-serif;
49+
font-weight: 700;
50+
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
51+
}
52+
53+
h6 {
54+
text-align: center;
55+
font-family: 'Oswald', sans-serif;
56+
font-size: 40px;
57+
text-transform: uppercase;
58+
}
59+
}
60+

app/styles/app.less

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
@import "vars";
66

7+
@import "mixins";
8+
79
// Libs
810
@import "font-awesome/less/font-awesome";
911

10-
@import "main";
12+
@import "_default";

app/styles/main.less

Whitespace-only changes.

app/styles/mixins.less

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.vertical-center-mixin(@pos: absolute) {
2+
position: @pos;
3+
top: 50%;
4+
transform: translateY(-50%);
5+
}
6+
7+
.horizontal-center-mixin(@pos: absolute) {
8+
position: @pos;
9+
left: 50%;
10+
transform: translateX(-50%);
11+
}
12+
13+
.horizontal-vertical-center-mixin(@pos: absolute) {
14+
position: @pos;
15+
top: 50%; left: 50%;
16+
transform: translateX(-50%) translateY(-50%);
17+
}
18+
19+
.cf() {
20+
&:before,
21+
&:after {
22+
content: " "; /* 1 */
23+
display: table; /* 2 */
24+
}
25+
26+
&:after {
27+
clear: both;
28+
}
29+
}

0 commit comments

Comments
 (0)