Skip to content

Commit

Permalink
Add responsive styles
Browse files Browse the repository at this point in the history
  • Loading branch information
jadnco committed Jul 26, 2015
1 parent ab74423 commit 94b53cc
Show file tree
Hide file tree
Showing 12 changed files with 291 additions and 64 deletions.
10 changes: 6 additions & 4 deletions src/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

<section id="hero">
<div class="inner">
<div class="nine columns offset-by-one">
<h1>Secret Handshake</h1>
<div class="row">
<div class="nine columns offset-by-one">
<h1>Secret Handshake</h1>
</div>
<div class="three columns offset-by-nine"><img src="images/logo-dark.svg"></div>
</div>
<div class="three columns offset-by-nine"><img src="images/logo-dark.svg"></div>
</div>
</section>

Expand Down Expand Up @@ -77,7 +79,7 @@

<section id="next-meetup" class="sec">
<div class="inner">
<h2 class="section-title">Next meetup</h2>
<h2 class="section-title">Next one</h2>
<div class="row">
<div class="eight columns center meetup">
<h3>Secret Handshake #62</h3>
Expand Down
75 changes: 66 additions & 9 deletions src/scss/base/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,44 @@ a {
}
}

h1,
h2,
h3 {
font-weight: bold !important;
}

h1 {
font: font(xx-large);
font-weight: bold;
font: font(large);
}

h2 {
font: font(x-large);
font-weight: bold;
font: font(large);
}

h3 {
font: font(large);
font-weight: bold;
font: font(x-medium);
}

// For tablets
@media (min-width: 750px) {
h1 {
font: font(x-large);
}
}

// For larger screens
@media (min-width: 1000px) {
h1 {
font: font(xx-large);
}

h2 {
font: font(x-large);
}

h3 {
font: font(large);
}
}

.cf {
Expand All @@ -54,20 +79,52 @@ h3 {
}

.sec {
background: color(light);

&:not(:first-of-type) {
margin-top: ws(xxxx-large);
margin-top: ws(xxx-large);
}

.inner {
padding: ws(xxx-large) ws(large) ws(xx-large) ws(large);
padding: ws(x-large) ws(x-small) ws(x-large) ws(x-small);
background: color(light);
}

.section-title {
text-align: center;
left: 0;
right: 0;
position: absolute;
top: - ws(large);
top: - ws(x-medium);
z-index: 9;
}

@media (min-width: 750px) {
.inner {
padding: ws(xxx-large) ws(small) ws(xx-large) ws(small);
}
}

@media (min-width: 1000px) {
& {
background: none;
}

&:not(:first-of-type) {
margin-top: ws(xxxx-large);
}

.inner {
padding: ws(xxx-large) ws(large) ws(xx-large) ws(large);
background: color(light);
}

.section-title {
top: - ws(large);
text-align: left;
margin-left: ws(large);
}
}
}

.btn {
Expand Down
12 changes: 6 additions & 6 deletions src/scss/base/grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,27 +110,27 @@

}

/* Larger than mobile */
// Larger than mobile
@media (min-width: 400px) {

}

/* Larger than phablet (also point when grid becomes active) */
// Larger than phablet (also point when grid becomes active)
@media (min-width: 550px) {

}

/* Larger than tablet */
// Larger than tablet
@media (min-width: 750px) {

}

/* Larger than desktop */
// Larger than desktop
@media (min-width: 1000px) {

}

/* Larger than Desktop HD */
// Larger than Desktop HD
@media (min-width: 1200px) {

}
3 changes: 2 additions & 1 deletion src/scss/base/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $whitespace: (
xx-large: 5rem,
x-large: 4rem,
large: 3rem,
x-medium: 2.15rem,
x-medium: 2.25rem,
medium: 2rem,
small: 1.2rem,
x-small: 0.7rem,
Expand All @@ -27,6 +27,7 @@ $font-size: (
xx-large: 8rem/1.05,
x-large: 5rem/1.0,
large: 3rem/1.2,
x-medium: 2.2rem/1.2,
medium: 1.2rem/1.4,
small: 1rem/1.6,
tiny: 0.8rem/1.0
Expand Down
22 changes: 21 additions & 1 deletion src/scss/components/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,28 @@
font: font(medium) !important;

&:not(:first-of-type) {
margin-left: ws(medium);
margin-left: ws(small);
}
}
}

.sponsor {
margin-top: ws(small);
}
}

@media (min-width: 1000px) {
#main-footer {
ul.social {
li {
&:not(:first-of-type) {
margin-left: ws(medium);
}
}
}

.sponsor {
margin-top: 0;
}
}
}
60 changes: 48 additions & 12 deletions src/scss/pages/home/hero.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,59 @@
#hero {
margin-top: ws(x-large);

background: color(yellow);

.inner {
padding: ws(medium) ws(x-small) ws(medium) ws(x-small);
}

.nine.columns {
background: color(yellow);
padding: ws(medium);
position: relative;
z-index: 9;
}

.three.columns {
position: absolute;
opacity: 0.1;
margin-top: ws(xxx-large);
z-index: 4;

img {
width: 100%;
height: auto;
transform: rotate(12deg);
display: none;
}
}

// Larger than tablet
@media (min-width: 750px) {
#hero {
.inner {
padding-top: ws(x-large);
padding-bottom: ws(x-large);
}
}
}

// For larger screens
@media (min-width: 1000px) {
#hero {
background: none;
margin-top: ws(x-large);

.inner {
padding: 0;
}

.nine.columns {
background: color(yellow);
padding: ws(medium);
position: relative;
z-index: 9;
}

.three.columns {
position: absolute;
opacity: 0.1;
margin-top: ws(xxx-large);
z-index: 4;

img {
width: 100%;
height: auto;
transform: rotate(12deg);
}
}
}
}
31 changes: 25 additions & 6 deletions src/scss/pages/home/intro.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
#intro {
margin-top: - ws(xx-large);
text-align: center;
position: relative;
z-index: 2;
margin-top: 0;

.inner {
border-top: ws(xx-large) solid color(light);
padding-top: ws(x-large);
}
}
}


@media (min-width: 750px) {
#intro {
.inner {
padding-top: ws(xx-large);
}
}
}

@media (min-width: 1000px) {
#intro {
text-align: center;
margin-top: - ws(xx-large);
position: relative;
z-index: 2;

.inner {
border-top: ws(xx-large) solid color(light);
padding-top: ws(xx-large);
}
}
}
20 changes: 18 additions & 2 deletions src/scss/pages/home/next-meetup.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#next-meetup {
.inner {
border-bottom: ws(xx-large) solid color(light);
text-align: center;
text-align: left;
}

.section-title {
Expand All @@ -16,4 +15,21 @@
display: inline-block;
margin-top: ws(large);
}
}

@media (min-width: 750px) {
#next-meetup {
.inner {
text-align: center;
}
}
}

@media (min-width: 1000px) {
#next-meetup {
.inner {
text-align: center;
border-bottom: ws(xx-large) solid color(light);
}
}
}
Loading

0 comments on commit 94b53cc

Please sign in to comment.