Skip to content

Commit f89d07e

Browse files
committed
added notifications
1 parent 2e23218 commit f89d07e

File tree

3 files changed

+43
-22
lines changed

3 files changed

+43
-22
lines changed

public/stylesheets/app.css

+31-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
html{
22
height: 100%;
33
-webkit-font-smoothing: antialiased;
4-
-moz-osx-font-smoothing: grayscale;
4+
-moz-osx-font-smoothing: grayscale;
55
}
66
body {
77
margin: 0;
@@ -23,7 +23,7 @@ a:hover{
2323
border-bottom: 1px solid #3fa9f5;
2424
}
2525
.wrapper{
26-
height: 100%;
26+
max-height: 100%;
2727
overflow: hidden;
2828
}
2929
.top-section{
@@ -62,7 +62,6 @@ h1 span{
6262
float: left;
6363
width: 100%;
6464
height: 100%;
65-
overflow: hidden;
6665
}
6766
.tabs-section{
6867
background-color: #e6e6e6;
@@ -104,9 +103,10 @@ h1 span{
104103
float: left;
105104
width: 100%;
106105
max-height: 100%;
106+
min-height: 100%;
107107
}
108108
.notifications{
109-
display: none; /* TODO find a place*/
109+
110110
}
111111
.code-container.left:after{
112112
content: "";
@@ -122,6 +122,7 @@ h1 span{
122122
float: left;
123123
position: relative;
124124
max-height: 100%;
125+
height: 100%;
125126
overflow: hidden;
126127
}
127128
.code-container label{
@@ -136,17 +137,15 @@ h1 span{
136137
}
137138
.code-container textarea{
138139
width: 100%;
139-
height: 80%;
140-
overflow: hidden;
140+
height: 100%;
141141
padding: 60px 30px 20px 30px;
142142
font-family: inherit;
143143
font-size: 14px;
144144
color: #eee;
145145
background: none;
146146
border: 0;
147-
max-height: 100%;
148147
-webkit-font-smoothing: antialiased;
149-
-moz-osx-font-smoothing: grayscale;
148+
-moz-osx-font-smoothing: grayscale;
150149
}
151150
.code-actions{
152151
width: 50px;
@@ -164,7 +163,6 @@ h1 span{
164163
margin: auto;
165164
border-radius: 50%;
166165
text-align: center;
167-
overflow: hidden;
168166
-webkit-transition: all 0.3s ease;
169167
-moz-transition: all 0.3s ease;
170168
transition: all 0.3s ease;
@@ -226,6 +224,30 @@ h1 span{
226224
.code-actions .type.scss:after{
227225

228226
}
227+
.notifications{
228+
position: absolute;
229+
background-color: #333;
230+
top: 20px;
231+
left: 0;
232+
width: 99%;
233+
margin: auto;
234+
z-index: 2;
235+
padding: 0;
236+
height: auto;
237+
font-size: 14px;
238+
}
239+
.notifications span{
240+
padding: 0 10px;
241+
}
242+
.notice{
243+
color: orange;
244+
}
245+
.error{
246+
color: red;
247+
}
248+
.success{
249+
color: green;
250+
}
229251

230252
/*
231253
h6 { float:right; }

views/index.haml

+7-11
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,17 @@
55
.tab.sass
66
%h2 sass / scss
77
.code-section
8-
.notifications
9-
- if flash[:notice]
10-
%p.notice
11-
= flash[:notice]
12-
- if flash[:error]
13-
%p.error
14-
= flash[:error]
15-
- if flash[:success]
16-
%p.success
17-
= flash[:success]
18-
198
%form{:method => "POST", :action => "/", :id => "page"}
209
.code-container.left
2110
%label{:for => "page_css"}
2211
CSS (paste your CSS code and convert!)
12+
.notifications
13+
- if flash[:notice]
14+
%span.notice= flash[:notice]
15+
- if flash[:error]
16+
%span.error= flash[:error]
17+
- if flash[:success]
18+
%span.success= flash[:success]
2319
%textarea{:id => "page_css", :name => "page[css]"}=h @css || ""
2420
.code-container.right
2521
%label{:for => "page_sass"}

views/layout.haml

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
= Sass.version[:string]
2929
.author-info
3030
%p
31-
%span Created by Jose Pablo Barrantes @
32-
%a{ :href => "http://jpablobr.com"} http://jpablobr.com
31+
%span Idea & code:
32+
%a{ :href => "http://jpablobr.com"} Jose Pablo Barrantes
33+
%span /
34+
%span Design & frontend:
35+
%a{ :href => "http://hihayk.com"} Hayk
3336
= yield

0 commit comments

Comments
 (0)