Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. <?php if (have_posts()) : ?>
  2. <?php while (have_posts()) : the_post(); ?>
  3. <section id="<?php $x=1; do { echo "slide-$x"; $x++; } while ($x<=1); ?>" class="homeSlide">
  4. <div class="bcg"
  5. data-center="background-position: 50% 0px;"
  6. data-top-bottom="background-position: 50% -100px;"
  7. data-anchor-target="#<?php $x=1; do { echo "slide-$x"; $x++; } while ($x<=1); ?>">
  8. <div class="hsContainer">
  9. <div class="hsContent" data-center="opacity: 1" data-106-top="opacity: 0" data-anchor-target="#<?php $x=1; do { echo "slide-$x"; $x++; } while ($x<=1); ?> h2">
  10. <h2>Fade out elements before<br />they leave viewport</h2>
  11. <p>This slide moves background image at a slower speed then the page scroll.</p>
  12. </div>
  13. </div>
  14. </div>
  15. </section>
  16. <?php endwhile; endif; ?>
  17.  
  18. $x=1; do { echo "slide-$x"; $x++; } while ($x<=1);
  19.  
  20. <?php if (have_posts()) :
  21. /* set $slide_id to "1" for first slide */
  22. $slide_id = 1;
  23. while (have_posts()) : the_post(); ?>
  24. <section id="<?php echo "slide-" . $slide_id; /* output "slide-{x}" */ ?>" class="homeSlide">
  25. <div class="bcg"
  26. data-center="background-position: 50% 0px;"
  27. data-top-bottom="background-position: 50% -100px;"
  28. data-anchor-target="#<?php echo "slide-" . $slide_id; /* output "slide-{x}" */ ?>">
  29. <div class="hsContainer">
  30. <div class="hsContent" data-center="opacity: 1" data-106-top="opacity: 0" data-anchor-target="#<?php echo "slide-" . $slide_id; // output "slide-{x}" ?> h2">
  31. <h2>Fade out elements before<br />they leave viewport</h2>
  32. <p>This slide moves background image at a slower speed then the page scroll.</p>
  33. </div>
  34. </div>
  35. </div>
  36. </section>
  37. <?php $slide_id++; /* increment $slide_id */?>
  38. <?php endwhile; endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement