Skip to content

Commit aa1c60f

Browse files
committed
Add styles, content security policy
1 parent 7b2780d commit aa1c60f

File tree

6 files changed

+191
-13
lines changed

6 files changed

+191
-13
lines changed

app/routes/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import Ember from 'ember';
22

33
export default Ember.Route.extend({
4-
model: function () {
5-
return [
6-
{ description: 'First log event' },
7-
{ description: 'Second log event' },
8-
{ description: 'Third log event' }
9-
];
4+
beforeModel: function() {
5+
this.transitionTo('events');
106
}
117
});

app/styles/app.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
11
@import "bourbon";
2+
@import "typography";
3+
4+
body, html {
5+
padding: 1em;
6+
}
7+
.row {
8+
}
9+
10+
.column {
11+
width: 32%;
12+
float: left;
13+
}
14+
15+
.events {
16+
list-style: none;
17+
}

app/styles/typography.scss

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
2+
/* OPEN SANS */
3+
@import url('https://fonts.googleapis.com/css?family=Open+Sans: 300italic,400italic,600italic,700italic,300,400,600,700');
4+
5+
/*
6+
** FONT STACK MIXINS
7+
*/
8+
9+
@mixin open-sans {
10+
font-family: "Open Sans", sans-serif;
11+
}
12+
13+
14+
/* DEFAULT TO OPEN SANS / DEFAULT SANS-SERIF */
15+
body { @include open-sans; }
16+
17+
/*
18+
** ~ Headings
19+
*/
20+
21+
h1, .alpha {
22+
margin: 1em 0;
23+
font: {
24+
size: 1.875em;
25+
weight: 300;
26+
}
27+
line-height: 1.2857em;
28+
color: #2a4870;
29+
}
30+
31+
h2, .beta {
32+
font: {
33+
size: 1.5em;
34+
weight: 300;
35+
}
36+
line-height: 1.25em;
37+
margin: 1em 0;
38+
color: #2a4870;
39+
}
40+
41+
h3, .gamma {
42+
font: {
43+
size: 1.25em;
44+
weight: 600;
45+
}
46+
line-height: 1.3333em;
47+
margin: 0.9em 0 0.6em 0;
48+
color: #2a4870;
49+
}
50+
51+
h4, .delta {
52+
font: {
53+
size: 1.125em;
54+
weight: 700;
55+
}
56+
line-height: 1.5em;
57+
margin: 1em 0 0.375em 0;
58+
color: #2a4870;
59+
}
60+
61+
h5, .epsilon {
62+
font: {
63+
size: 1em;
64+
weight: 600;
65+
}
66+
line-height: 1.5;
67+
margin: 0.75em 0;
68+
color: #2a4870;
69+
}
70+
71+
p {
72+
font-size: 0.875em;
73+
line-height: 1.7143em;
74+
margin-bottom: 1.5em;
75+
color: #444;
76+
a {
77+
border-bottom: 1px dotted #ccc;
78+
}
79+
}
80+
81+
a { color: #3b69a7; }
82+
83+
em { font-weight: 400; font-style: italic; }
84+
85+
ins {
86+
padding: 0 2px;
87+
background-color: #e2ecf9;
88+
color: #222;
89+
text-decoration: none;
90+
}
91+
92+
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
93+
94+
del { text-decoration: line-through; }
95+
96+
abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
97+
98+
.small-text {
99+
display: inline-block;
100+
font-size: 0.875em;
101+
}
102+
103+
ul, ol {
104+
list-style-position: outside;
105+
font-size: 0.875em;
106+
line-height: 1.2857em;
107+
margin-bottom: 1.5em;
108+
padding-left: 24px;
109+
color: #444;
110+
}
111+
112+
pre {
113+
display: block;
114+
margin: 0;
115+
padding: 0;
116+
font-family: "Consolas", "Liberation Mono", "Courier", monospace;
117+
white-space: pre-wrap;
118+
white-space: -moz-pre-wrap;
119+
white-space: -o-pre-wrap;
120+
word-wrap: break-word;
121+
code {
122+
border-radius: 3px;
123+
display: block;
124+
margin: 1.8462em 0;
125+
padding: 0.8571em 1.8462em;
126+
font-size: 0.8125em;
127+
line-height: 1.8462em;
128+
background: #f1f1f1 url('/assets/images/code-bg.gif') repeat left -13px;
129+
border: 1px solid #eee;
130+
}
131+
}
132+
133+
code {
134+
padding: 2px;
135+
font-family: "Consolas", "Liberation Mono", "Courier", monospace;
136+
font-size: 1.0714em;
137+
background: #efefef;
138+
}
139+
140+
141+
/*
142+
** ~ Data-Tables
143+
*/
144+
145+
dl {
146+
margin-bottom: 1em;
147+
font-size: 0.875em;
148+
line-height: 1.5em;
149+
color: #444;
150+
}
151+
152+
dt {
153+
font-weight: bold;
154+
}
155+
156+
dd {
157+
margin-bottom: 1.5em;
158+
}
159+
160+
dl > dd,
161+
dl > dt {
162+
min-height: 18px;
163+
}

app/templates/events.hbs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
<ul class="events">
2+
{{#each event in model}}
3+
<li>{{event.description}}</li>
4+
{{/each}}
5+
</ul>
16
{{outlet}}

app/templates/index.hbs

Lines changed: 0 additions & 7 deletions
This file was deleted.

config/environment.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,10 @@ module.exports = function(environment) {
4343

4444
}
4545

46+
ENV.contentSecurityPolicy = {
47+
'font-src': "'self' https://fonts.gstatic.com", // Allow fonts to be loaded from http://fonts.gstatic.com
48+
'style-src': "'self' 'unsafe-inline' https://fonts.googleapis.com" // Allow inline styles and loaded CSS from http://fonts.googleapis.com
49+
}
50+
4651
return ENV;
4752
};

0 commit comments

Comments
 (0)