Skip to content

Commit b8d7f56

Browse files
committed
make mobile tweaks
1 parent bde458f commit b8d7f56

File tree

3 files changed

+54
-12
lines changed

3 files changed

+54
-12
lines changed

_styles/_header.sass

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ header
1414
h1 img
1515
height: 4em
1616
float: left
17+
1718
h1 span
1819
color: rgb(255,233,94)
1920
+dimensionalise-text( rgb(209,191,77) )
21+
22+
@include breakpoint($mobile)
23+
header
24+
padding: 0 1em
25+
height: 6em
26+
h1 img
27+
height: 2em
28+
h1
29+
line-height: 2em

_styles/default.sass

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ html, body
1414
color: black
1515
text-decoration: underline
1616

17+
$mobile: max-width 476px
18+
$other: min-width 476px
19+
1720
@import 'header'
1821
@import 'page'
1922
@import 'footer'
@@ -26,12 +29,12 @@ html, body
2629
#work, #contact
2730
@include span-columns(12)
2831
#about
29-
@include breakpoint(min-width 476px 12)
30-
@include shift(3)
31-
@include span-columns(6)
32-
@include breakpoint(max-width 476px)
32+
@include breakpoint($mobile)
3333
@include shift(1)
3434
@include span-columns(10)
35+
@include breakpoint($other)
36+
@include shift(3)
37+
@include span-columns(6)
3538
#about, #work, #contact
3639
@include omega()
3740

@@ -45,14 +48,21 @@ html, body
4548
font-size: 2.4em
4649
#contact
4750
font-size: 1.5em
51+
@include breakpoint($mobile)
52+
padding: 1em
4853

4954
#work
5055
ul
5156
list-style: none
5257
margin: 0
5358
padding: 0
5459
li
55-
height: 560px
60+
@include background-size(100%,auto)
61+
background-size: 100% auto
62+
@include breakpoint($mobile)
63+
height: 400px
64+
@include breakpoint($other)
65+
height: 560px
5666
h2
5767
background: white
5868
float: left

styles/default.css

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,14 @@ header {
358358
color: #ffe95e;
359359
text-shadow: -1px -1px 0px #d1bf4d, -2px -2px 0px #d1bf4d, -3px -3px 0px #d1bf4d, -4px -4px 0px #aaaaaa; }
360360

361+
@media screen and (max-width: 476px) {
362+
header {
363+
padding: 0 1em;
364+
height: 6em; }
365+
header h1 img {
366+
height: 2em; }
367+
header h1 {
368+
line-height: 2em; } }
361369
#page1 {
362370
margin-top: -15em;
363371
padding-top: 15em; }
@@ -422,22 +430,22 @@ footer {
422430
width: 100%; }
423431
#page1 #work:last-child, #page1 #contact:last-child, #page2 #work:last-child, #page2 #contact:last-child {
424432
margin-right: 0; }
425-
@media screen and (min-width: 476px) {
433+
@media screen and (max-width: 476px) {
426434
#page1 #about, #page2 #about {
427-
margin-left: 25.58941%;
435+
margin-left: 8.5298%;
428436
display: block;
429437
float: left;
430438
margin-right: 2.35765%;
431-
width: 48.82117%; }
439+
width: 82.94039%; }
432440
#page1 #about:last-child, #page2 #about:last-child {
433441
margin-right: 0; } }
434-
@media screen and (max-width: 476px) {
442+
@media screen and (min-width: 476px) {
435443
#page1 #about, #page2 #about {
436-
margin-left: 8.5298%;
444+
margin-left: 25.58941%;
437445
display: block;
438446
float: left;
439447
margin-right: 2.35765%;
440-
width: 82.94039%; }
448+
width: 48.82117%; }
441449
#page1 #about:last-child, #page2 #about:last-child {
442450
margin-right: 0; } }
443451
#page1 #about, #page1 #work, #page1 #contact, #page2 #about, #page2 #work, #page2 #contact {
@@ -451,12 +459,26 @@ footer {
451459
font-size: 2.4em; }
452460
#page1 #contact, #page2 #contact {
453461
font-size: 1.5em; }
462+
@media screen and (max-width: 476px) {
463+
#page1 #contact, #page2 #contact {
464+
padding: 1em; } }
454465
#page1 #work ul, #page2 #work ul {
455466
list-style: none;
456467
margin: 0;
457468
padding: 0; }
458469
#page1 #work li, #page2 #work li {
459-
height: 560px; }
470+
-webkit-background-size: 100%, auto;
471+
-moz-background-size: 100%, auto;
472+
-ms-background-size: 100%, auto;
473+
-o-background-size: 100%, auto;
474+
background-size: 100%, auto;
475+
background-size: 100% auto; }
476+
@media screen and (max-width: 476px) {
477+
#page1 #work li, #page2 #work li {
478+
height: 400px; } }
479+
@media screen and (min-width: 476px) {
480+
#page1 #work li, #page2 #work li {
481+
height: 560px; } }
460482
#page1 #work li h2, #page2 #work li h2 {
461483
background: white;
462484
float: left;

0 commit comments

Comments
 (0)