Browse Source

Finalize about page parallax styling.

Add:
        templates/about.html, static/js/about.js
                -Add a `speed` attribute to all image divs, which is used to
                determine the rate at which an image moves upward.

        static/img/about/bg2.png
                -Change image to another source-code screenshot.
tags/v1.0^2
Severyn Kozak 10 years ago
parent
commit
14695368de
4 changed files with 20 additions and 11 deletions
  1. BIN
     
  2. +2
    -1
      static/js/about.js
  3. +8
    -4
      static/sass/about.sass
  4. +10
    -6
      templates/about.html

BIN
View File


+ 2
- 1
static/js/about.js View File

@@ -4,7 +4,8 @@ function parallax(){
var currVertPos = $(window).scrollTop();
var delta = currVertPos - lastVertPos;
$(".bg").each(function(){
$(this).css("top", parseFloat($(this).css("top")) - delta * 1.8 + "px");
$(this).css("top", parseFloat($(this).css("top")) -
delta * $(this).attr("speed") + "px");
});
lastVertPos = currVertPos;
}


+ 8
- 4
static/sass/about.sass View File

@@ -12,18 +12,19 @@
background: url(../img/about/bg1.png) no-repeat
background-size: cover
height: 400px
top: 0px
top: -200px

&#img-2
background: url(../img/about/bg2.png) no-repeat
height: $img-height + 250px
top: 520px
width: 100%
height: $img-height + 530
top: 550px

&#img-3
background: url(../img/about/bg3.png) no-repeat
background-size: cover
height: $img-height + 250
top: 1800px
top: 1600px

div.section
background-color: white
@@ -44,3 +45,6 @@ div.section

h1
color: $baseColor1

span
color: $baseColor2

+ 10
- 6
templates/about.html View File

@@ -1,5 +1,9 @@
= extends "layout.html"

= block title
about
= endblock

= block head
{{ assets.tag("lib/jquery.min.js") }}
{{ assets.tag("main.css") }}
@@ -8,27 +12,27 @@
= endblock

= block after_body
<div id="img-1" class="bg"></div>
<div id="img-2" class="bg"></div>
<div id="img-3" class="bg"></div>
<div id="img-1" class="bg" speed="-1.25"></div>
<div id="img-2" class="bg" speed="1.8"></div>
<div id="img-3" class="bg" speed="1.6"></div>

<div id="top" class="section">
<div class="centered">
<h1>What?</h1>
<h1><span>&raquo;</span> What?</h1>
Lorizzle dolor sit fo shizzle my nizzle, consectetuer adipiscing gizzle. Nullizzle sapizzle velizzle, dizzle dang, the bizzle dang, doggy own yo', dawg. Pellentesque egizzle tortizzle. Fo shizzle mah nizzle fo rizzle, mah home g-dizzle eros. Away hizzle dolizzle dapibus izzle tempizzle tempizzle. Maurizzle pellentesque nibh et turpis. Sure ass fo shizzle. Pellentesque eleifend rhoncus nisi. In rizzle i saw beyonces tizzles and my pizzle went crizzle break it down dictumst. Donec dapibizzle. Curabitizzle tellus sizzle, pretizzle gizzle, mattizzle , we gonna chung vitae, nunc. Sure suscipizzle. Integizzle owned velit check out this yo mamma.
</div>
</div>

<div class="section">
<div class="centered">
<h1>How?</h1>
<h1><span>&raquo;</span> How?</h1>
Curabitizzle et dizzle that's the shizzle nisi fo mollizzle. Fo shizzle potenti. Morbi odio. Crackalackin neque. Izzle ma nizzle. You son of a bizzle mauris rizzle, ma nizzle, feugiat doggy amizzle, phat in, pede. Pellentesque fo shizzle mah nizzle fo rizzle, mah home g-dizzle. Vestibulizzle shut the shizzle up mi, volutpat in, yo mamma sizzle, adipiscing sempizzle, velizzle. Crizzle hizzle ipsizzle. Gangster volutpizzle felis vizzle fo shizzle. Shizzlin dizzle for sure justo in fo shizzle sodales fizzle. Own yo' venenatis my shizz check out this i'm in the shizzle. Nunc funky fresh. Suspendisse venenatis fo shizzle boom shackalack. Curabitur fo shizzle ante. Nunc shut the shizzle up, fo shizzle eu ass hendrerizzle, dawg felizzle elementizzle sizzle, fizzle aliquizzle magna felis luctus pede. Nam a pot. Class fo shizzle taciti shizzle my nizzle crocodizzle ad litora for sure bizzle conubia fizzle, dang inceptos shit. Aliquam interdizzle, nizzle nizzle elementizzle nonummy, da bomb fo shizzle stuff leo, shizzlin dizzle semper shiznit arcu crazy sem.
</div>
</div>

<div class="section">
<div class="centered">
<h1>Who?</h1>
<h1><span>&raquo;</span> Who?</h1>
Praesent gangster fo shizzle sizzle maurizzle posuere funky fresh. Aliquam lacinia viverra fo shizzle my nizzle. Crizzle crazy dawg leo sodales shizzlin dizzle. Fo shizzle mah nizzle fo rizzle, mah home g-dizzle crackalackin, crunk vitae boofron convallizzle, nulla ligula shizzlin dizzle metizzle, gangsta venenatis augue dui izzle arcu. Shut the shizzle up gravida lacizzle izzle bling bling. Vivamus arcu magna, cool ghetto, faucibizzle mah nizzle, placerat izzle, maurizzle. Sizzle vehicula laorizzle my shizz. Bow wow wow erizzle dizzle, hendrerizzle pizzle, condimentizzle ac, shiz away, arcu. Morbi aliquizzle placerat nulla. Maecenas uhuh ... yih! funky fresh mammasay mammasa mamma oo sa da bomb. Fusce metus sizzle, egestas eu, get down get down quizzle, elementum eget, we gonna chung. Shizznit dawg nunc a for sure shizzle my nizzle crocodizzle go to hizzle. Fusce sagittizzle, nulla eget sollicitudin mollis, lacizzle quam tellivizzle erizzle, vitae vehicula boofron we gonna chung vitae arcu. Phat vehicula gangster. Shiz sizzle mi. Pizzle eu turpis. Vestibulum a magna. Away fizzle erat, tellivizzle funky fresh, tempizzle fo shizzle, facilisizzle in, pede. For sure tellizzle. Black nisi erizzle, crazy mammasay mammasa mamma oo sa amizzle, ultricies izzle, dope nizzle, augue.
</div>
</div>


Loading…
Cancel
Save