Skip to content

Commit 1852056

Browse files
committed
Align banner correctly
1 parent 86fc2f8 commit 1852056

File tree

2 files changed

+59
-46
lines changed

2 files changed

+59
-46
lines changed

css/ssl.scss

Lines changed: 59 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,73 +3,88 @@
33
@import "vendor/breakpoint";
44
@import "vendor/breakpoint-slicer";
55

6-
$slicer-breakpoint-names: 'xs' 's' 'm' 'l' 'xl';
6+
// 0 400 600 800 1050
7+
$slicer-breakpoint-names: 'xs' 's' 'm' 'l' 'xl';
8+
9+
$s-sidebar-width: 100%;
10+
$m-sidebar-width: 13rem;
11+
$l-sidebar-width: 17rem;
12+
$side-pad-left: 1rem;
713

814
html {
915
font-family: "PT Sans", Helvetica, Arial, sans-serif;
10-
}
11-
12-
// 48em - 768 - 4
13-
// 58em - 928 - 5
14-
// 64em - 1024 - 5
1516

16-
@include from('m') {
17-
html {
17+
@include from('s') {
18+
background-color: orange;
19+
}
20+
@include from('m') {
1821
background-color: yellow;
1922
}
20-
}
21-
@include from('l') {
22-
html {
23+
@include from('l') {
2324
font-size: 16px;
2425
background-color: green;
2526
}
26-
}
27-
@include from('xl') {
28-
html {
27+
@include from('xl') {
2928
font-size: 20px;
3029
background-color: blue;
3130
}
3231
}
3332

34-
.outer {
33+
body {
34+
margin: 0;
3535
}
3636

3737
.sidebar {
38-
top: 0;
39-
left: 0;
40-
background-color: #202020;
38+
background-color: #aa759f;
4139
color: rgba(255,255,255,.5);
42-
width: 100%;
40+
padding: 2em $side-pad-left;
4341

44-
@include to('l') {
45-
position: fixed;
46-
text-align: center;
47-
padding: 2rem 1rem;
42+
@include to('m') {
43+
text-align: center;
44+
width: calc(#{$s-sidebar-width} - 2*#{$side-pad-left});
4845
}
49-
@include from('l') {
46+
@include from('m') {
5047
position: fixed;
48+
top: 0;
49+
left: 0;
50+
bottom: 0;
5151
height: 100%;
52-
width: 18rem;
5352
text-align: left;
54-
}
5553

56-
a {
57-
color: #fff;
54+
width: calc(#{$m-sidebar-width} - 2*#{$side-pad-left});
55+
}
56+
@include from('l') {
57+
width: calc(#{$l-sidebar-width} - 2*#{$side-pad-left});
5858
}
5959

60+
61+
62+
a { color: #fff; }
6063
}
6164

62-
/* About section */
6365
.sidebar-about h1 {
6466
color: #fff;
6567
margin-top: 0;
6668
font-family: "PT Sans", Arial, sans-serif;
67-
font-size: 3.5rem;
6869
font-weight: bold;
6970
line-height: 1.15;
71+
72+
73+
74+
@include to('s') {
75+
font-size: 1.5rem;
76+
}
77+
@include from('s') {
78+
font-size: 2.5rem;
79+
}
80+
@include from('m') {
81+
font-size: 3.0rem;
82+
}
83+
@include from('l') {
84+
font-size: 3.5rem;
85+
}
7086
}
7187

72-
/* Sidebar nav */
7388
.sidebar-nav {
7489
margin-bottom: 1rem;
7590
}
@@ -109,29 +124,28 @@ a.sidebar-nav-item {
109124
}
110125

111126
.content {
112-
padding-top: 4rem;
113-
padding-bottom: 4rem;
114-
115-
@include from('l') {
116-
margin-left: 20rem;
117-
margin-right: 2rem;
118-
}
119-
120-
@include from('xl') {
121-
margin-left: 22rem;
122-
margin-right: 4rem;
123-
}
127+
@include to('m') { margin-left: 0; }
128+
@include from('m') { margin-left: #{$m-sidebar-width}; }
129+
@include from('l') { margin-left: #{$l-sidebar-width}; }
124130
}
125131

126132
.banner {
127-
height: 20em;
128133
background-color: #dfdfdf;
134+
135+
padding: 4rem 10% 4rem 10%;
129136
}
130137

131138
.mission-statement {
132139
//color: black;
133140
text-align: center;
134141
}
135142

136-
@import "theme";
143+
.sidebar {
144+
}
145+
.content a,
146+
.related-posts li a:hover {
147+
color: #aa759f;
148+
}
149+
150+
//@import "theme";
137151
//@import "index";

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ <h4 class='mission-statement'>
2020

2121
</div>
2222
</div>
23-
2423
</body>
2524
</html>

0 commit comments

Comments
 (0)