Commit 5f41aade by nabin kunwar

home page done

parent dd1dbd15
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php if(get_field('enable_section')):?>
<section class="container-fluid py-80 HOME BLOG-SECTION">
<div class="container">
<div class="row">
<div class="col-lg-5 col-md-5 text-center col-12 m-auto pb-80 title-wrapper">
<h2><?php the_field('title');?></h2>
<?php the_field('description');?>
</div>
</div>
<?php $cats = array_filter((array) get_field('categories'));
$args = ['post_type'=>'post',
'post_status' => 'publish',
'posts_per_page'=>'6',
];
if(!empty($cats)){
$args['tax_query']=array(
'taxonomy'=>'category',
// 'operator'=>'IN',
'field'=>'term_id',
'terms'=>[]
);
}
$new_query = new WP_Query($args);
?>
<?php if($new_query->have_posts()):?>
<div class="row">
<div class="blog-carousel owl-carousel owl-theme">
<?php while($new_query->have_posts()): $new_query->the_post();?>
<div class="item">
<a href="<?php the_permalink();?>">
<div class="blog-card-wrapper">
<div class="blog-image-wrapper">
<?php the_post_thumbnail();?>
</div>
<div class="text-wrapper">
<p>Design, Illustrations, UI/UX</p>
<h6><?php the_title();?></h6>
<?php the_excerpt();?>
<div class="d-flex align-items-center justify-content-between bottom-section">
<div class="left">
<span><?php echo get_the_date('d, M Y',get_the_ID());?></span>
</div>
<div class="right">
<p>Read More <svg width="17" height="16" viewBox="0 0 17 16" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path d="M3 8H14" stroke="#005AFF" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round" />
<path d="M9.5 3.5L14 8L9.5 12.5" stroke="#005AFF" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round" />
</svg>
</p>
</div>
</div>
</div>
</div>
</a>
</div>
<?php endwhile; wp_reset_postdata(); ?>
</div>
<button class="btn btn-start-project btn-primary">View All Blogs <svg width="25" height="24"
viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M4.5 13L16.67 13L11.08 18.59L12.5 20L20.5 12L12.5 4L11.09 5.41L16.67 11L4.5 11L4.5 13Z"
fill="white" />
</svg>
</button>
</div>
<?php endif;?>
</div>
</section>
<?php endif;?>
\ No newline at end of file
<?php if(get_field('enable_section')):?>
<section class="container-fluid py-80 HOME FAQS-SECTION">
<div class="container">
<div class="row">
<span><?php the_field('subtitle');?></span>
<div class="col-lg-4 col-md-4 col-12 left-section">
<h2><?php the_field('title');?></h2>
<?php the_field('description');?>
<div class="image-wrapper">
<?php if($image = get_field('image')): echo wp_get_attachment_image($image); endif;?>
</div>
</div>
<?php $faqs = get_field('faqs'); if($faqs):?>
<div class="accordion-wrapper col-lg-7 col-md-7 col-12">
<div class="accordion" id="accordionPanelsStayOpenExample">
<?php foreach($faqs as $key=>$faq):?>
<div class="accordion-item">
<h2 class="accordion-header" id="panelsStayOpen-heading<?php echo $faq->ID;?>">
<button class="accordion-button" type="button" data-bs-toggle="collapse"
data-bs-target="#panelsStayOpen-collapse<?php echo $faq->ID;?>" aria-expanded="<?php echo $key==0?'true':'false';?>"
aria-controls="panelsStayOpen-collapse<?php echo $faq->ID;?>">
<?php echo get_the_title($faq);?>
</button>
</h2>
<div id="panelsStayOpen-collapse<?php echo $faq->ID;?>" class="accordion-collapse collapse <?php echo $key==0?'show':'';?>"
aria-labelledby="panelsStayOpen-heading<?php echo $faq->ID;?>">
<div class="accordion-body">
<?php echo get_the_content(null,false,$faq);?>
</div>
</div>
</div>
<?php endforeach;?>
</div>
<?php if ($link = get_field('link')) : $link_target = $link['target'] ? $link['target'] : '_self';?>
<a href="<?php echo $link['url']; ?>" target="<?php echo esc_attr( $link_target ); ?>" class="btn m-auto d-flex align-items-center btn-start-project-white"><?php echo $link['title']; ?>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M4 13L16.17 13L10.58 18.59L12 20L20 12L12 4L10.59 5.41L16.17 11L4 11L4 13Z"
fill="white" />
</svg>
</a>
<?php endif;?>
</div>
<?php endif;?>
</div>
</div>
</section>
<?php endif;?>
\ No newline at end of file
<?php if(get_field('enable_section')):?>
<section class="container-fluid HOME OUR-MOST-RECENT-WORKS mb-60">
<div class="container">
<div class="row">
<div class="main-wrapper">
<div class="row justify-content-between">
<div class="col-lg-6 top-title-wrapper">
<span><?php the_field('subtitle');?></span>
<h2><?php the_field('title');?></h2>
<?php the_field('description');?>
</div>
<div class="col-lg-4 top-title-wrapper">
<?php if($image=get_field('image')): echo wp_get_attachment_image($image,'full'); endif;?>
</div>
</div>
</div>
</div>
<?php $categories = get_field('categories');
if($categories):
?>
<div class="row">
<div class="tabs-wrapper">
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
<?php foreach($categories as $key=>$cat): ?>
<li class="nav-item" role="presentation">
<button class="nav-link <?php echo $key==0?'active':'';?>" id="pills-<?php echo $cat->slug;?>-tab" data-bs-toggle="pill"
data-bs-target="#pills-<?php echo $cat->slug;?>" type="button" role="tab" aria-controls="pills-<?php echo $cat->slug;?>"
aria-selected="true"><?php echo $cat->name;?></button>
</li>
<?php endforeach;?>
</ul>
<div class="tab-content" id="pills-tabContent">
<?php foreach($categories as $key=>$cat):?>
<div class="tab-pane fade <?php echo $key==0?'show active':''; ?>" id="pills-<?php echo $cat->slug;?>" role="tabpanel"
aria-labelledby="pills-home-tab" tabindex="0">
<div class="row pb-60">
<?php $wp_query = new WP_Query([
'post_type'=>'portfolio',
'post_status' => 'publish',
'posts_per_page'=>'6',
'tax_query'=>array(array(
'taxonomy'=>'portfolio-category',
'field'=>'slug',
'terms'=>[$cat->slug]
))
]);
if($wp_query->have_posts()):
while($wp_query->have_posts()): $wp_query->the_post();
?>
<div class="col-lg-4 col-12 recent-card-wrapper m-auto">
<a href="<?php the_permalink();?>">
<?php the_post_thumbnail();?>
<div class="bottom-text">
<div class="d-flex align-items-center justify-content-between title">
<div class="heading">
<h3><?php the_title();?></h3>
</div>
<div class="site-link">
<p>View Site <svg width="16" height="16" viewBox="0 0 16 16" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path d="M4 12L12 4" stroke="#58595A" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round" />
<path d="M5.5 4H12V10.5" stroke="#58595A" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round" />
</svg>
</p>
</div>
</div>
<ul class="list-unstyled d-flex">
<li>#Website</li>
<li>#ui/ux</li>
<li>#Development</li>
</ul>
</div>
</a>
</div>
<?php endwhile; wp_reset_postdata(); endif;?>
</div>
<button class="btn m-auto d-flex align-items-center start-project btn-start-project-white">View
All Works
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M4 13L16.17 13L10.58 18.59L12 20L20 12L12 4L10.59 5.41L16.17 11L4 11L4 13Z"
fill="white" />
</svg>
</button>
</div>
<?php endforeach;?>
</div>
</div>
</div>
<?php endif;?>
</div>
</section>
<?php endif;?>
\ No newline at end of file
<?php if(get_field('enable_section')):?>
<section class="container-fluid">
<div class="row">
<div class="pb-30 bg-secondary upper-footer">
<div class="col-lg-6 col-md-6 col-12 m-auto text-center pt-120 inner-text-wrapper">
<div class="inner-wrapper">
<h2><?php the_field('title');?></h2>
</div>
<?php if ($link = get_field('link')) : $link_target = $link['target'] ? $link['target'] : '_self';?>
<a href="<?php echo $link['url']; ?>" target="<?php echo esc_attr( $link_target ); ?>">
<h3><?php echo $link['title']; ?></h3>
</a>
<?php endif;?>
</div>
<div class="left-img">
<?php if($image=get_field('left_image')): echo wp_get_attachment_image($image); endif;?>
</div>
<div class="right-img">
<?php if($image=get_field('right_image')): echo wp_get_attachment_image($image); endif;?>
</div>
</div>
</div>
</section>
<?php endif;?>
\ No newline at end of file
<?php if(get_field('enable_section')):?>
<section class="container-fluid background-dark py-80 HOME OUR-CUSTOMERS-SAY-SECTION">
<div class="container">
<div class="row top-title pb-60 justify-content-between">
<div class="col-lg-5 col-md-6 col-12">
<h2>
<?php the_field('title');?>
</h2>
</div>
<div class="col-lg-5 col-md-5 col-12">
<?php the_field('description');?>
</div>
</div>
<?php $testimonials = get_field('testimonials'); if($testimonials):?>
<div class="row">
<div class="customer-feedback owl-carousel owl-theme">
<?php foreach($testimonials as $testimonial):?>
<div class="item feedback-wrapper p-40">
<svg width="29" height="25" viewBox="0 0 29 25" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M28.6018 0.0012207V5.52334H26.9027C25.5339 5.52334 24.4484 5.73573 23.646 6.16051C22.8437 6.58529 22.2537 7.31685 21.8761 8.3552C21.4985 9.34635 21.3097 10.6915 21.3097 12.3906V17.6295L19.2566 13.6649C19.587 13.4289 20.059 13.2402 20.6726 13.0986C21.2861 12.9098 21.9233 12.8154 22.5841 12.8154C24.1416 12.8154 25.4395 13.311 26.4779 14.3021C27.5162 15.2461 28.0354 16.5676 28.0354 18.2667C28.0354 19.8714 27.5398 21.2402 26.5487 22.3729C25.5575 23.4584 24.1416 24.0012 22.3009 24.0012C21.1209 24.0012 20.0118 23.7416 18.9735 23.2225C17.9823 22.6561 17.1799 21.7121 16.5664 20.3906C15.9528 19.0219 15.646 17.1576 15.646 14.7977V13.5941C15.646 10.2431 16.0944 7.57644 16.9912 5.59414C17.9351 3.61184 19.2802 2.19591 21.0265 1.34635C22.7729 0.449598 24.8968 0.0012207 27.3982 0.0012207H28.6018ZM12.9558 0.0012207V5.52334H11.2566C9.88791 5.52334 8.80236 5.73573 8 6.16051C7.19764 6.58529 6.60767 7.31685 6.23009 8.3552C5.85251 9.34635 5.66372 10.6915 5.66372 12.3906V17.6295L3.61062 13.6649C3.941 13.4289 4.41298 13.2402 5.02655 13.0986C5.64012 12.9098 6.27729 12.8154 6.93805 12.8154C8.49558 12.8154 9.79351 13.311 10.8319 14.3021C11.8702 15.2461 12.3894 16.5676 12.3894 18.2667C12.3894 19.8714 11.8938 21.2402 10.9027 22.3729C9.91151 23.4584 8.49558 24.0012 6.65487 24.0012C5.47493 24.0012 4.36578 23.7416 3.32743 23.2225C2.33628 22.6561 1.53392 21.7121 0.920354 20.3906C0.306785 19.0219 0 17.1576 0 14.7977V13.5941C0 10.2431 0.448378 7.57644 1.34513 5.59414C2.28909 3.61184 3.63422 2.19591 5.38053 1.34635C7.12684 0.449598 9.25074 0.0012207 11.7522 0.0012207H12.9558Z"
fill="#005AFF" />
</svg>
<?php echo get_the_content(null,false,$testimonial);?>
<hr>
<div class="author-info d-flex align-items-center">
<?php echo get_the_post_thumbnail($testimonial);?>
<div class="detail">
<div><?php the_field('name',$testimonial);?></div>
<span><?php the_field('profession',$testimonial);?></span>
</div>
</div>
</div>
<?php endforeach;?>
</div>
</div>
<?php endif;?>
</div>
</section>
<?php endif;?>
\ No newline at end of file
<?php if(get_field('enable_section')):?>
<section class="container-fluid py-80 HOME WHAT-WE-DO-SECTION">
<section class="container-fluid py-80 HOME WHAT-WE-DO-SECTION">
<div class="container">
<div class="row">
<div class="col-lg-8 top-title">
<h2><?php the_field('title');?></h2>
<?php the_field('subtitle');?>
<?php the_field('description');?>
</div>
</div>
<?php if(have_rows('content')):?>
<div class="row">
<?php while(have_rows('content')):the_row();?>
<div class="col-lg-4">
<div class="card-wrapper p-40">
<img src="assets/img/c1.png" alt="">
<h4>Branding and Design</h4>
<?php if($image = get_sub_field('image')): echo wp_get_attachment_image($image,'full'); endif;?>
<h4><?php the_sub_field('title');?></h4>
<div class="tags-wrapper">
<div class="tag">Logo</div>
<div class="tag">Brand Guidelines</div>
<div class="tag">Infographics</div>
<div class="tag">Packaging</div>
<div class="tag">Banner</div>
<div class="tag">Mockup</div>
<div class="tag">Icon</div>
<div class="tag">Booklet</div>
<div class="tag">Social Media</div>
<div class="tag">Booklet</div>
<div class="tag">Social Media</div>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="card-wrapper p-40">
<img src="assets/img/c22.png" alt="">
<h4>Web & Mobile App Development</h4>
<div class="tags-wrapper">
<div class="tag">Logo</div>
<div class="tag">Brand Guidelines</div>
<div class="tag">Infographics</div>
<div class="tag">Packaging</div>
<div class="tag">Banner</div>
<div class="tag">Mockup</div>
<div class="tag">Icon</div>
<div class="tag">Booklet</div>
<div class="tag">Social Media</div>
<div class="tag">Booklet</div>
<div class="tag">Social Media</div>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="card-wrapper p-40">
<img src="assets/img/c22.png" alt="">
<h4>Marketing and Promotions</h4>
<div class="tags-wrapper">
<div class="tag">Logo</div>
<div class="tag">Brand Guidelines</div>
<div class="tag">Infographics</div>
<div class="tag">Packaging</div>
<div class="tag">Banner</div>
<div class="tag">Mockup</div>
<div class="tag">Icon</div>
<div class="tag">Booklet</div>
<div class="tag">Social Media</div>
<div class="tag">Booklet</div>
<div class="tag">Social Media</div>
<?php the_sub_field('description');?>
</div>
</div>
</div>
<?php endwhile;?>
</div>
<?php endif;?>
</div>
</section>
<?php endif; ?>
\ No newline at end of file
<?php
require 'includes/enqueuer.php';
require 'includes/custom-fields.php';
require 'includes/gutenberg/blocks.php';
function construction_theme_support()
{
......
......@@ -101,5 +101,85 @@ function my_acf_init_block_types()
]
],
));
acf_register_block_type(array(
'name' => 'Portfolio Block',
'title' => __('Portfolio Block'),
'description' => __('Portfolio Block'),
'render_template' => 'blocks/portfolio-block.php',
'category' => 'formatting',
'icon' => 'admin-comments',
'keywords' => array('Portfolio Block'),
'example' => [
'attributes' => [
'mode' => 'preview',
'data' => []
]
],
));
acf_register_block_type(array(
'name' => 'Testimonials Block',
'title' => __('Testimonials Block'),
'description' => __('Testimonials Block'),
'render_template' => 'blocks/testimonial-block.php',
'category' => 'formatting',
'icon' => 'admin-comments',
'keywords' => array('Testimonials Block'),
'example' => [
'attributes' => [
'mode' => 'preview',
'data' => []
]
],
));
acf_register_block_type(array(
'name' => 'Blogs Block',
'title' => __('Blogs Block'),
'description' => __('Blogs Block'),
'render_template' => 'blocks/blogs-block.php',
'category' => 'formatting',
'icon' => 'admin-comments',
'keywords' => array('Blogs Block'),
'example' => [
'attributes' => [
'mode' => 'preview',
'data' => []
]
],
));
acf_register_block_type(array(
'name' => 'FAQs Block',
'title' => __('FAQs Block'),
'description' => __('FAQs Block'),
'render_template' => 'blocks/faqs-block.php',
'category' => 'formatting',
'icon' => 'admin-comments',
'keywords' => array('FAQs Block'),
'example' => [
'attributes' => [
'mode' => 'preview',
'data' => []
]
],
));
acf_register_block_type(array(
'name' => 'Start Project CTA',
'title' => __('Start Project CTA'),
'description' => __('Start Project CTA'),
'render_template' => 'blocks/start-project-cta.php',
'category' => 'formatting',
'icon' => 'admin-comments',
'keywords' => array('Start Project CTA'),
'example' => [
'attributes' => [
'mode' => 'preview',
'data' => []
]
],
));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment