windhamdavid 1 year ago
parent
commit
936bd6c969
6 changed files with 89 additions and 48 deletions
  1. 2 1
      functions.php
  2. 1 1
      header.php
  3. 8 8
      js/art.js
  4. 72 30
      page-art.php
  5. 6 8
      style.css
  6. 0 0
      v4-style.min.css

+ 2 - 1
functions.php

@@ -17,6 +17,7 @@ function dw_setup() {
 	set_post_thumbnail_size( 150, 150, true );
 	add_image_size( 'post-large', 770, 577, true );
 	add_image_size( 'studio', 400, 300, true );
+  add_filter( 'big_image_size_threshold', '__return_false' );
 	add_theme_support( 'align-wide' );
   remove_action( 'init', 'wp_sitemaps_get_server' );
 }
@@ -67,7 +68,7 @@ function dw_scripts() {
 	}
 
 	elseif ( is_page('art') ) {
-		wp_enqueue_script( 'scriptmin', get_template_directory_uri() . '/js/v3-script.min.js', '', '', true );
+		wp_enqueue_script( 'scriptmin', get_template_directory_uri() . '/js/v4-script.min.js', '', '', true );
 		wp_enqueue_script( 'art', get_template_directory_uri() . '/js/art.js', '', '', true );
 	}
 

+ 1 - 1
header.php

@@ -17,7 +17,7 @@
 	<div class="navbar fixed-top">
 		<div class="container">
 			<div class="site-title">
-      <a href="#offcanvasNav" class="navbar-brand navbar-right light"  data-bs-toggle="offcanvas" data-bs-target="#offcanvasNav" aria-controls="offcanvasNav" title="David A. Windham" rel="home">David A. Windham</a>
+        <a href="#offcanvasNav" class="navbar-brand navbar-right light"  data-bs-toggle="offcanvas" data-bs-target="#offcanvasNav" aria-controls="offcanvasNav" title="David A. Windham" rel="home">David A. Windham</a>
 			</div>
 		</div>
 	</div>

+ 8 - 8
js/art.js

@@ -1,7 +1,7 @@
 new WOW().init();
 
 jQuery(document).ready(function($) {
-	
+
 	$(window).bind('load', function() {
 		$('#loader').fadeOut(100);
 	});
@@ -23,21 +23,21 @@ jQuery(document).ready(function($) {
 					} else {
 						$('.navbar').removeClass('visible fixed');
 					}
-			} 
+			}
 			else {
 				$('.navbar').removeClass('visible');
 				if (currentTop > headerHeight && !$('.navbar').hasClass('fixed')) $('.navbar').addClass('fixed');
 			}
 			this.previousTop = currentTop;
-			}  
+			}
 		);
 	});
 
 	$('#gallery').carousel({
-		interval: false,
+		interval: 5000,
 		wrap: true,
 	});
-	
+
 	$(document).bind('keyup', function(e) {
 	    if(e.which === 39){
 			$('#gallery').carousel('next');
@@ -46,7 +46,7 @@ jQuery(document).ready(function($) {
 			$('#gallery').carousel('prev');
 	    }
 	});
-	
+
 	$('.prev').click(function() {
 	  $('#gallery').carousel('prev');
 	});
@@ -54,5 +54,5 @@ jQuery(document).ready(function($) {
 	$('.next').click(function() {
 	  $('#gallery').carousel('next');
 	});
-			
-});
+
+});

+ 72 - 30
page-art.php

@@ -1,34 +1,76 @@
 <?php get_header(); ?>
-<div id="gallery" class="carousel carousel-fade ">
-	<div class="container leader art-gallery">
-		<div class="row">
-			<div class="col-sm-2">
-				<h4><a href="#figures">Figures</a></h4>
-				<h4><a href="#landscapes">Landscapes</a></h4>
-				<h4><a href="#still">Still Life</a></h4>
-				<h4><a href="#abstract">Abstract</a></h4>
-				<div class="controls">
-					<div class="prev-next">
-						<a class="prev" data-slide="prev">&lsaquo; Prev</a> -
-						<a class="next" data-slide="next"> Next &rsaquo;</a>
-					</div>
-				</div>
-			</div>
-			<div class="col-sm-10">
-				<div class="carousel-inner">
-					<div class="carousel-item active gallery-image">
-						<img class="art-image" src="<?php echo get_template_directory_uri(); ?>/img/lemon-mater.jpg" alt="<?php the_title(); ?>"/>
-					</div>
-				<?php query_posts('category_name=paintings&showposts=12'); ?>
-				<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
-					<div class="carousel-item gallery-image">
-						<?php $img_url = wp_get_attachment_image_src(get_post_thumbnail_id(),'studio'); ?>
-						<img class="art-image" src="<?php echo $img_url[0];?>" alt="<?php the_title(); ?>"/>
-					</div>
-				<?php endwhile; ?>
-				</div>
-			</div>
+<div id="gallery-wrap" class="container-fluid overflow-hidden art-gallery">
+  <div id="gallery" class="carousel slide" data-bs-ride="carousel">
+    <div class="leader pb-5">
+      <div class="row mt-5">
+        <div class="carousel-inner">
+          <div class="carousel-item active gallery-image">
+            <div class="d-flex justify-content-center">
+              <img class="art-image" src="<?php echo get_template_directory_uri(); ?>/img/lemon-mater.jpg" alt="<?php the_title(); ?>"/>
+            </div>
+          </div>
+          <?php query_posts('category_name=paintings&showposts=12'); ?>
+          <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
+          <div class="carousel-item gallery-image">
+            <div class="d-flex justify-content-center">
+              <?php $img_url = wp_get_attachment_image_src(get_post_thumbnail_id(),'full'); ?>
+              <img class="art-image img-fluid" src="<?php echo $img_url[0];?>" alt="<?php the_title(); ?>"/>
+            </div>
+          </div>
+          <?php endwhile; ?>
+        </div>
+        <button class="carousel-control-prev" type="button" data-bs-target="#gallery" data-bs-slide="prev">
+          <span class="carousel-control-prev-icon" aria-hidden="true"></span>
+          <span class="visually-hidden">Previous</span>
+        </button>
+        <button class="carousel-control-next" type="button" data-bs-target="#gallery" data-bs-slide="next">
+          <span class="carousel-control-next-icon" aria-hidden="true"></span>
+          <span class="visually-hidden">Next</span>
+        </button>
+      </div>
+    </div>
+  </div>
+</div>
+<div class="container">
+		<div class="row my-5">
+			<h3><em>Art Projects</em></h3>
 		</div>
-	</div>
+    <div class="row">
+    <div class="col-lg-3">
+      <h4><a href="#figures">Figures</a></h4>
+      <h4><a href="#landscapes">Landscapes</a></h4>
+      <h4><a href="#still">Still Life</a></h4>
+      <h4><a href="#abstract">Abstract</a></h4>
+    </div>
+    <div class="col-lg-9">
+        <div class="row art-gallery py-3">
+          <?php $i = 0; $query = new WP_Query(array('category_name' => 'paintings', 'posts_per_page' => -1));  while ( $query->have_posts() ) : $query->the_post(); ?>
+            <div class="col-lg-4">
+              <div class="studio-thumbnail">
+                <?php
+                  if (has_post_thumbnail()) {
+                    $img_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
+                  } else {
+                    $img_url = get_post_meta( get_the_ID(), 'featured_image_url');
+                  }
+                ?>
+                <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img class="studio-thumb" src="<?php echo $img_url[0];?>" width="100%" alt="<?php the_title(); ?>"/></a>
+              </div>
+              <article class="studio">
+                <div class="entry-content">
+                  <h4><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h4>
+                  <?php dw_good_excerpt(110); ?>
+                </div>
+              </article>
+            </div>
+          <?php if((++$i % 3) == 0): ?>
+        </div>
+        <div class="row art-gallery">
+          <?php endif; ?>
+          <?php endwhile; $i++;?>
+        </div>
+      </div>
+    </div>
+  </div>
 </div>
 <?php get_footer(); ?>

+ 6 - 8
style.css

@@ -1447,8 +1447,8 @@ img.studio-thumb:hover {
 /*============================================
 		Art
 ==============================================*/
-body.art {
-	background: #737373;
+.art-gallery {
+	background: #313131;
 }
 body.art .site-title a {
 	color: #FFFFFF;
@@ -1466,12 +1466,10 @@ body.art .site-title a {
 }
 .art-image {
 	border: 10px solid #FFFFFF;
-	max-height: 500px;
-	height: auto;
-	width: auto\9; /* ie8 */
+	max-height: 800px;
+  margin: auto;
 }
 .art-gallery .controls {
-	margin: 300px 0 0;
 	position: relative;
 	bottom: 0;
 }
@@ -1491,8 +1489,8 @@ body.art .site-title a {
 .art-gallery .carousel-indicators .active {
 	background-color: #555;
 }
-.art-image {
-	margin: 0 auto;
+.studio .entry-content {
+  height: 120px;
 }
 
 /*============================================

File diff suppressed because it is too large
+ 0 - 0
v4-style.min.css


Some files were not shown because too many files changed in this diff