Skip to content

Commit d11de37

Browse files
committed
Program page updates
* Refactored list markup into a few helpers * Updated program page styles * Removed dead CSS * Refactored bad FAQ/title CSS, tweaked other areas
1 parent ab8422b commit d11de37

15 files changed

Lines changed: 109 additions & 141 deletions

File tree

app/assets/stylesheets/application.css.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
@import "content.css.scss";
1515
@import "home.css.scss";
1616
@import "questions.css.scss";
17+
@import "programs.css.scss";
1718

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
11
p {
2-
margin: 0;
3-
padding-bottom: 0.5em;
2+
margin-bottom: 1em;
43
}
54

6-
#faq {
7-
h2 {
8-
line-height: 1.15;
9-
padding: 0.5em 0;
10-
margin: 0.5em 0;
11-
border-bottom: 1px solid #DDD;
12-
}
13-
h1 {
14-
margin-top: 1em;
15-
color: $heading;
16-
}
17-
}
5+
h1 {
186

19-
.page-title {
20-
margin-bottom: 17px;
21-
border-bottom: 1px solid #DDD;
22-
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
23-
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
24-
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
257
}
268

27-
.page-title h1 {
28-
margin-bottom: 0px;
9+
h2 {
10+
font-size: 1.75em;
11+
margin-bottom: 0.5em;
2912
}
3013

3114
.block-message {
32-
margin-top: 18px;
33-
}
15+
margin-bottom: 0.5em;
16+
p {
17+
margin-bottom: 1em;
18+
}
19+
}

app/assets/stylesheets/home.css.scss

Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
.container {
2424
padding-top: 0;
2525
}
26-
26+
2727
border-top: none;
2828
section {
2929
@include clearfix;
3030
background: white;
3131
padding-bottom: 1em;
32-
32+
3333
p {
3434
font-size: 1.25em;
3535
line-height: 1.75em;
@@ -45,7 +45,7 @@
4545
}
4646

4747
}
48-
48+
4949
#download {
5050
background: white url("download.png") 0 4em no-repeat;
5151
h1 {
@@ -58,7 +58,7 @@
5858
text-align: center;
5959
margin-top: 1em;
6060
margin-bottom: 1em;
61-
61+
6262
.download {
6363
text-transform: uppercase;
6464
margin-bottom: 1em;
@@ -72,7 +72,7 @@
7272
@include offset(5);
7373
}
7474
}
75-
75+
7676
#explore {
7777
background: white url("explore.png") 95% 7em no-repeat;
7878
h1 {
@@ -84,7 +84,7 @@
8484
margin-left: 2em;
8585
}
8686
}
87-
87+
8888
#ask {
8989
background: white url("ask.png") 0 7em no-repeat;
9090
min-height: 340px;
@@ -98,41 +98,4 @@
9898
@include offset(5);
9999
}
100100
}
101-
}
102-
103-
/*.body-home #content-wrap {
104-
border-top: none;*/
105-
/* section {
106-
@include clearfix;
107-
margin: 0 36px 36px 18px;
108-
padding-bottom: 36px;
109-
border-bottom: 6px dotted $linkColor;
110-
111-
font-size: 1.7em;
112-
113-
h1 {
114-
font-size: 1.6em;
115-
}
116-
p {
117-
font-size: 1em;
118-
line-height: 1.5em;
119-
margin-bottom: 1em;
120-
}
121-
122-
img.new_program {
123-
@include columns(5);
124-
}
125-
img.lesson {
126-
@include columns(8);
127-
float: right;
128-
margin-right: 0;
129-
margin-left: $gridGutterWidth*2;
130-
131-
}
132-
}
133-
134-
section.last {
135-
border: none;
136-
margin-bottom: 0;
137-
}
138-
}*/
101+
}

app/assets/stylesheets/layout.css.scss

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ body {
77
}
88

99
.topbar {
10-
position: relative;
10+
position: relative;
1111
height: auto;
1212
@include box-shadow(0px 1px 10px rgba(0,0,0,0.5));
1313
border-bottom: 1px solid $heading + #444;
1414
}
1515

16-
header .topbar-inner {
16+
header .topbar-inner {
1717
background: $heading;
1818
.container {
1919
padding: 0.6em 0;
2020
}
21-
21+
2222
li a {
2323
border-radius: 8px;
2424
font-size: 14px;
2525
padding: 11px 11px 10px;
2626
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
2727
}
28-
28+
2929
li a:hover {
3030
background-color: $heading + #111;
3131
text-shadow: none;
@@ -36,7 +36,7 @@ header .topbar-inner {
3636
margin-left: -40px;
3737
width: 185px;
3838
height: 40px;
39-
39+
4040
a {
4141
position: absolute;
4242
top: -2px;
@@ -53,13 +53,13 @@ header .topbar-inner {
5353
#content-wrap {
5454
border-top: 1px solid ($heading + #444);
5555
margin: auto;
56-
56+
5757
.container {
5858
position: relative;
59-
}
59+
}
6060
}
6161

62-
#content-wrap > .container {
62+
#content-wrap > .container {
6363
background: white;
6464
border-radius: 0 0 8px 8px;
6565
padding: 40px 18px 18px;
@@ -70,7 +70,7 @@ header .topbar-inner {
7070
#content {
7171
@include columns(11);
7272
}
73-
73+
7474
#sidebar {
7575
@include columns(5, true);
7676
.edit, .delete {
@@ -83,11 +83,11 @@ header .topbar-inner {
8383
padding: 1.5em;
8484
}
8585
}
86-
86+
8787
}
8888

89-
p, h1,h2,h3,h4,h5 {
90-
color: #555;
89+
p,h1,h2,h3,h4,h5 {
90+
color: $text-color;
9191
}
9292

9393
.alert-message {
@@ -98,7 +98,7 @@ p, h1,h2,h3,h4,h5 {
9898
footer {
9999
background: $heading;
100100
padding: 0.5em 0;
101-
101+
102102
.pills {
103103
margin: 0;
104104
a {
@@ -108,5 +108,5 @@ footer {
108108
a:hover {
109109
background-color: #444;
110110
}
111-
}
111+
}
112112
}

app/assets/stylesheets/lib/bootstrap/preboot.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ $analog2: spin($baseColor, -22);
131131
width: ($gridColumnWidth * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1));
132132
display: inline;
133133
float: left;
134-
134+
135135
@if $last {
136136
margin-right: 0;
137137
}
@@ -203,7 +203,7 @@ $analog2: spin($baseColor, -22);
203203
background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
204204
background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
205205
background-image: linear-gradient(left, $startColor, $endColor); // Le standard
206-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1); // IE9 and down
206+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1); // IE9 and down
207207
}
208208
@mixin gradient-vertical ($startColor: #555, $endColor: #333) {
209209
background-color: $endColor;
@@ -215,7 +215,7 @@ $analog2: spin($baseColor, -22);
215215
background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
216216
background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
217217
background-image: linear-gradient(top, $startColor, $endColor); // The standard
218-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down
218+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down
219219
}
220220
@mixin gradient-directional ($startColor: #555, $endColor: #333, $deg: 45deg) {
221221
background-color: $endColor;
@@ -235,7 +235,7 @@ $analog2: spin($baseColor, -22);
235235
background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor);
236236
background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
237237
background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
238-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
238+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
239239
}
240240

241241
// Gradient Bar Colors for buttons and allerts

app/assets/stylesheets/lib/shared.css.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
$heading: #253E59;
22
$background: $heading + #999;
3+
$text-color: #555;
34

45
$orangered: #BF4904;
56

app/assets/stylesheets/programs.css.scss

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,23 @@
2828
padding-top: 1em;
2929

3030
li {
31-
@include columns(4);
31+
@include columns(5);
3232
padding: 0.75em 0;
3333
border-top: 1px solid #ddd;
34+
35+
.title {
36+
font-weight: bold;
37+
margin-bottom: 0.1em;
38+
}
39+
40+
.author {
41+
a {
42+
font-style: italic;
43+
color: lighten($text-color, 20%);
44+
}
45+
}
3446
}
35-
li:nth-child(4n) {
36-
margin-right: 0;
37-
}
38-
li:nth-child(4n+1) {
47+
li:nth-child(3n+1) {
3948
clear: both;
4049
}
4150
}

app/assets/stylesheets/questions.css.scss

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
margin-bottom: 0.15em;
55
}
66
.meta {
7-
a {
7+
a {
88
font-style: italic;
99
}
1010
font-style: italic;
@@ -32,10 +32,10 @@
3232
}
3333
@include columns(1);
3434
padding: 6px
35-
}
35+
}
3636
.summary {
3737
@include columns(9, last);
38-
38+
3939
h2 {
4040
line-height: 1;
4141
margin-bottom: 0.15em;
@@ -45,7 +45,7 @@
4545
}
4646
}
4747
}
48-
48+
4949
.unanswered {
5050
.answer-count, .answer-count h3 {
5151
color: $orangered;
@@ -59,17 +59,16 @@
5959
.accepted {
6060
background-image: url("accepted.png");
6161
}
62-
62+
6363
}
6464

6565
.question {
66-
color: #555;
6766
p {
6867
font-size: 1.15em;
6968
line-height: 1.5;
7069
margin-bottom: 1.25em;
7170
}
72-
71+
7372
h2 {
7473
margin-top: 0.5em;
7574
padding-bottom: 0.5em;
@@ -83,8 +82,8 @@
8382
position: relative;
8483
list-style-type: none;
8584
padding: 1em 1em;
86-
border-bottom: 1px solid #ddd;
87-
85+
border-bottom: 1px solid #ddd;
86+
8887
.choose {
8988
float: left;
9089
opacity: 0.5;
@@ -106,5 +105,5 @@
106105
}
107106
.selected-answer {
108107
background: rgba(158, 183,68, 0.1) url("accepted.png") 99% 0.5em no-repeat;
109-
}
108+
}
110109
}

app/controllers/programs_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ class ProgramsController < InheritedController
44
belongs_to :user, :optional => true
55
respond_to :html, :only => [:index, :show]
66

7-
def show
8-
# @program = Program.find_by_slug(params[:slug])
9-
show!
7+
def index
8+
@featured = Program.featured
9+
index!
1010
end
1111

1212
#################

0 commit comments

Comments
 (0)