Setup different backgrounds.
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 10 Aug 2015 18:27:02 +0000 (14:27 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 10 Aug 2015 18:27:02 +0000 (14:27 -0400)
For client viewing.

assets/big-rock-and-bridge.jpg [new file with mode: 0644]
assets/shoreline-1.jpg [new file with mode: 0644]
assets/shoreline-2.jpg [new file with mode: 0644]
assets/trees-and-lighthouse.jpg [new file with mode: 0644]
front-page.php
header.php
js/app.js
js/custom/pageSetup.js
page.php

diff --git a/assets/big-rock-and-bridge.jpg b/assets/big-rock-and-bridge.jpg
new file mode 100644 (file)
index 0000000..60d176b
Binary files /dev/null and b/assets/big-rock-and-bridge.jpg differ
diff --git a/assets/shoreline-1.jpg b/assets/shoreline-1.jpg
new file mode 100644 (file)
index 0000000..50bf04b
Binary files /dev/null and b/assets/shoreline-1.jpg differ
diff --git a/assets/shoreline-2.jpg b/assets/shoreline-2.jpg
new file mode 100644 (file)
index 0000000..693f64e
Binary files /dev/null and b/assets/shoreline-2.jpg differ
diff --git a/assets/trees-and-lighthouse.jpg b/assets/trees-and-lighthouse.jpg
new file mode 100644 (file)
index 0000000..f8cddb9
Binary files /dev/null and b/assets/trees-and-lighthouse.jpg differ
index a49b4fc..67ecf97 100644 (file)
@@ -3,6 +3,11 @@
     <div id="content-wrapper">
         <div class="row">
             <div id="main-content" class="small-12 small-centered medium-11 columns">
+                <button id="switchOne">Background 1</button>
+                <button id="switchTwo">Background 2</button>
+                <button id="switchThree">Background 3</button>
+                <button id="switchFour">Background 4</button>
+                <button id="switchFive">Background 5</button>
                 <?php if(have_posts()) : while(have_posts()): the_post();?>
                 <?php the_content();?>
                 <?php endwhile; else:?>
index 8ef08dd..d311fa4 100644 (file)
@@ -6,8 +6,11 @@
     <title><?php wp_title(); ?></title>
     <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css">
     <link href='http://fonts.googleapis.com/css?family=Cinzel:400,700' rel='stylesheet' type='text/css'>
-    <link href='http://fonts.googleapis.com/css?family=Pinyon+Script' rel='stylesheet' type='text/css'>  
+    <link href='http://fonts.googleapis.com/css?family=Pinyon+Script' rel='stylesheet' type='text/css'>
     <?php wp_head(); ?>
+    <script>
+        var themeUrl = '<?php echo get_bloginfo('template_url');?>';
+    </script>
   </head>
   <body>
       <div class="off-canvas-wrap" data-offcanvas>
@@ -25,4 +28,4 @@
                             <?php get_template_part('parts/slide-show');?>
                         </div>
                     </header>
-                </div><!--End of shadow-->
\ No newline at end of file
+                </div><!--End of shadow-->
index 501680c..ba4215a 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -17,4 +17,24 @@ $(document).ready(function () {
         $(this).toggleClass('open');
         $(this).siblings('ul').toggleClass('open');
     });
+    $('#switchOne').click(function(e){
+        e.preventDefault();
+        $('body').css('background-image', 'url("' + themeUrl + '/assets/shoreline-1.jpg")');
+    });
+    $('#switchTwo').click(function(e){
+        e.preventDefault();
+        $('body').css('background-image', 'url("' + themeUrl + '/assets/shoreline-2.jpg")');
+    });
+    $('#switchThree').click(function(e){
+        e.preventDefault();
+        $('body').css('background-image', 'url("' + themeUrl + '/assets/big-rock-and-bridge.jpg")');
+    });
+    $('#switchFour').click(function(e){
+        e.preventDefault();
+        $('body').css('background-image', 'url("' + themeUrl + '/assets/tree-bkgrd-image.jpg")');
+    });
+    $('#switchFive').click(function(e){
+        e.preventDefault();
+        $('body').css('background', 'rgba(0, 0, 0, 0) url("' + themeUrl + '/assets/trees-and-lighthouse.jpg") no-repeat fixed 0 0 / cover');
+    });
 });
index 741d565..035a70b 100644 (file)
@@ -8,4 +8,24 @@ $(document).ready(function () {
         $(this).toggleClass('open');
         $(this).siblings('ul').toggleClass('open');
     });
+    $('#switchOne').click(function(e){
+        e.preventDefault();
+        $('body').css('background-image', 'url("' + themeUrl + '/assets/shoreline-1.jpg")');
+    });
+    $('#switchTwo').click(function(e){
+        e.preventDefault();
+        $('body').css('background-image', 'url("' + themeUrl + '/assets/shoreline-2.jpg")');
+    });
+    $('#switchThree').click(function(e){
+        e.preventDefault();
+        $('body').css('background-image', 'url("' + themeUrl + '/assets/big-rock-and-bridge.jpg")');
+    });
+    $('#switchFour').click(function(e){
+        e.preventDefault();
+        $('body').css('background-image', 'url("' + themeUrl + '/assets/tree-bkgrd-image.jpg")');
+    });
+    $('#switchFive').click(function(e){
+        e.preventDefault();
+        $('body').css('background', 'rgba(0, 0, 0, 0) url("' + themeUrl + '/assets/trees-and-lighthouse.jpg") no-repeat fixed 0 0 / cover');
+    });
 });
index 969a08f..2533a1d 100644 (file)
--- a/page.php
+++ b/page.php
             </div>
             <div class="row">
                 <div id="main-content" class="small-12 small-centered medium-11 columns">
+                <button id="switchOne">Background 1</button>
+                <button id="switchTwo">Background 2</button>
+                <button id="switchThree">Background 3</button>
+                <button id="switchFour">Background 4</button>
+                <button id="switchFive">Background 5</button>
                         <?php if(have_posts()) : while(have_posts()): the_post();?>
                         <?php the_content();?>
                         <?php endwhile; else:?>