Skip to content

Commit 814b62d

Browse files
committed
style for small browsers
1 parent 3aeeae4 commit 814b62d

File tree

5 files changed

+112
-44
lines changed

5 files changed

+112
-44
lines changed

data.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ lastTwitterFetchResult = {}
1818
determineDate = (start, end) ->
1919
start = moment(start)
2020
end = moment(end)
21-
date = start.format('dddd, MMM Do')
21+
date = start.format('ddd, MMM D')
2222

2323
return date if start.diff(end, 'days') == -1
2424

public/css/app.css

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,15 @@ a {
1212
color: #8cc84b;
1313
}
1414
#wrapper {
15-
width: 1024px;
16-
margin: 0 auto;
1715
height: 100%;
16+
margin: 0 auto;
1817
font-weight: bold;
1918
color: #d2d8ba;
2019
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
2120
text-align: center;
2221
}
2322
#wrapper h1 {
24-
margin: 20px 0 10px 0;
25-
height: 200px;
2623
max-width: 100%;
27-
min-width: 900px;
28-
background: url("images/nodekc-dark.png") no-repeat center center;
2924
text-indent: -90000px;
3025
}
3126
form.node-out {
@@ -68,15 +63,6 @@ form.node-out input {
6863
#panels {
6964
list-style-type: none;
7065
}
71-
#panels li.panel {
72-
float: left;
73-
width: 329px;
74-
text-align: left;
75-
margin-top: 15px;
76-
}
77-
#panels li.panel li {
78-
clear: both;
79-
}
8066
#panels li.panel .title {
8167
font-size: 14px;
8268
}
@@ -97,7 +83,7 @@ form.node-out input {
9783
text-align: center;
9884
}
9985
#panels li.panel .time {
100-
font-size: 11px;
86+
font-size: 10px;
10187
color: #888;
10288
font-style: italic;
10389
float: right;
@@ -112,6 +98,7 @@ form.node-out input {
11298
}
11399
#panels .tweets li {
114100
margin-bottom: 5px;
101+
clear: both;
115102
}
116103
#panels .tweets li p.teaser {
117104
word-wrap: break-word;
@@ -126,4 +113,53 @@ form.node-out input {
126113
-moz-border-radius: 3px;
127114
border-radius: 3px;
128115
margin-top: 6px;
116+
border: none;
117+
}
118+
@media only screen and (max-width: 480px) {
119+
#wrapper {
120+
width: 350px;
121+
}
122+
#wrapper h1 {
123+
margin-top: 5px;
124+
background: url("images/nodekc-dark-small.png") no-repeat center center;
125+
min-width: 350px;
126+
width: 350px;
127+
height: 104px;
128+
}
129+
form.node-out input[type=text] {
130+
width: 200px;
131+
}
132+
form.node-out input[type=submit] {
133+
padding-left: 3px;
134+
padding-right: 3px;
135+
}
136+
#panels li.panel {
137+
text-align: left;
138+
margin: 0;
139+
margin-top: 15px;
140+
width: 350px;
141+
max-width: 350px;
142+
float: none;
143+
clear: both;
144+
}
145+
}
146+
@media only screen and (min-width: 481px) {
147+
#wrapper {
148+
width: 95%;
149+
}
150+
#wrapper h1 {
151+
margin: 20px 0 10px 0;
152+
height: 200px;
153+
min-width: 600px;
154+
background: url("images/nodekc-dark.png") no-repeat center center;
155+
}
156+
#panels li.panel {
157+
float: left;
158+
width: 30%;
159+
text-align: left;
160+
margin-top: 15px;
161+
}
162+
#panels li.panel li {
163+
clear: both;
164+
}
129165
}

public/css/app.styl

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,18 @@ body
88
background-color #262721
99
background url('images/bgpattern.png')
1010
height 100%
11-
1211
a
1312
color #8CC84B
1413

1514
#wrapper
16-
width 1024px
15+
height 100%
1716
margin 0 auto
18-
height 100%
1917
font-weight bold
2018
color #D2D8BA
2119
font-family 'Helvetica Neue', Helvetica, Arial, sans-serif
2220
text-align center
2321
h1
24-
margin 20px 0 10px 0
25-
height 200px
2622
max-width 100%
27-
min-width 900px
28-
background url('images/nodekc-dark.png') no-repeat center center
2923
text-indent -90000px
3024
form.node-out
3125
margin 25px 0 15px 0
@@ -55,15 +49,10 @@ form.node-out
5549
font-size 100%
5650
border none
5751
outline none
52+
5853
#panels
5954
list-style-type none
6055
li.panel
61-
float left
62-
width 329px
63-
text-align left
64-
margin-top 15px
65-
li
66-
clear both
6756
.title
6857
font-size 14px
6958
ul
@@ -77,7 +66,7 @@ form.node-out
7766
font-size 20px
7867
text-align center
7968
.time
80-
font-size 11px
69+
font-size 10px
8170
color #888
8271
font-style italic
8372
float right
@@ -89,6 +78,7 @@ form.node-out
8978
margin 0 15px
9079
li
9180
margin-bottom 5px
81+
clear both
9282
p.teaser
9383
word-wrap break-word
9484
overflow hidden
@@ -98,3 +88,45 @@ form.node-out
9888
img
9989
border-radius(3px)
10090
margin-top 6px
91+
border none
92+
@media only screen and (max-width: 480px)
93+
#wrapper
94+
width 350px
95+
h1
96+
margin-top 5px
97+
background url('images/nodekc-dark-small.png') no-repeat center center
98+
min-width 350px
99+
width 350px
100+
height 104px
101+
form.node-out
102+
input[type=text]
103+
width 200px
104+
input[type=submit]
105+
padding-left 3px
106+
padding-right 3px
107+
#panels
108+
li.panel
109+
text-align left
110+
margin 0
111+
margin-top 15px
112+
width 350px
113+
max-width 350px
114+
float none
115+
clear both
116+
@media only screen and (min-width: 481px)
117+
#wrapper
118+
width 95%
119+
120+
h1
121+
margin 20px 0 10px 0
122+
height 200px
123+
min-width 600px
124+
background url('images/nodekc-dark.png') no-repeat center center
125+
#panels
126+
li.panel
127+
float left
128+
width 30%
129+
text-align left
130+
margin-top 15px
131+
li
132+
clear both
10.5 KB
Loading

views/layout.jade

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ html(lang="en")
2525
input(type='submit', value='join nodekc')
2626

2727
ul#panels
28-
li.panel.messages
29-
h2 messages
28+
li.panel.events
29+
h2 events
3030
ul
31-
each item in messages
31+
each item in events
3232
li
33-
a.title(href=item.url)#{item.subject}
34-
p.teaser= item.body
35-
.time #{item.timeago}
33+
a.title(href=item.url)#{item.title}
34+
if item.details
35+
p.teaser #{item.details}
36+
.time #{item.when}
3637
li.panel.tweets
3738
h2 tweets
3839

@@ -44,12 +45,11 @@ html(lang="en")
4445
img(src='http://api.twitter.com/1/users/profile_image/' + item.created_by + '.png', title=item.created_by, target='_blank')
4546
p.teaser #{item.tweet}
4647
.time #{item.timeago}
47-
li.panel.events
48-
h2 events
48+
li.panel.messages
49+
h2 messages
4950
ul
50-
each item in events
51+
each item in messages
5152
li
52-
a.title(href=item.url)#{item.title}
53-
if item.details
54-
p.teaser #{item.details}
55-
.time #{item.when}
53+
a.title(href=item.url)#{item.subject}
54+
p.teaser= item.body
55+
.time #{item.timeago}

0 commit comments

Comments
 (0)