-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
876 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
wp-content/plugins/chris-buys-blocks/src/cw-hero-v2/assets/check-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.08 KB
wp-content/plugins/chris-buys-blocks/src/cw-hero-v2/assets/hero-testimoniels.webp
Binary file not shown.
Binary file added
BIN
+240 KB
wp-content/plugins/chris-buys-blocks/src/cw-hero-v2/assets/life-changes-hero-background.webp
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
wp-content/plugins/chris-buys-blocks/src/cw-hero-v2/assets/star.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions
25
wp-content/plugins/chris-buys-blocks/src/cw-hero-v2/block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "https://schemas.wp.org/trunk/block.json", | ||
"apiVersion": 3, | ||
"name": "chris-buys/cw-hero", | ||
"version": "0.1.0", | ||
"title": "cw Hero", | ||
"category": "widgets", | ||
"icon": "superhero-alt", | ||
"description": "The Hero Section of the cw landing-page.", | ||
"supports": { | ||
"html": false | ||
}, | ||
"textdomain": "chris-buys-blocks", | ||
"editorScript": "file:./index.js", | ||
"editorStyle": "file:./index.css", | ||
"style": "file:./style-index.css", | ||
"render": "file:./render.php", | ||
"viewScript": "file:./view.js", | ||
"attributes": { | ||
"selectedMarket": { | ||
"type": "string", | ||
"default": "St. Louis" | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
wp-content/plugins/chris-buys-blocks/src/cw-hero-v2/edit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { __ } from "@wordpress/i18n"; | ||
import { | ||
InnerBlocks, | ||
useBlockProps, | ||
InspectorControls, | ||
} from "@wordpress/block-editor"; | ||
import { | ||
PanelBody, | ||
SelectControl, | ||
} from "@wordpress/components"; | ||
import "./editor.css"; | ||
|
||
// The edit function, which renders the block in the Gutenberg editor | ||
export default function Edit({ attributes, setAttributes }) { | ||
const { selectedMarket } = attributes; | ||
|
||
const onChangeMarket = (newMarket) => { | ||
setAttributes({ selectedMarket: newMarket }); | ||
}; | ||
|
||
return ( | ||
<div {...useBlockProps()}> | ||
<InspectorControls> | ||
<PanelBody title={__("Select Market", "chris-buys-blocks")}> | ||
<SelectControl | ||
label={__("Choose a Market", "chris-buys-blocks")} | ||
value={selectedMarket} | ||
options={[ | ||
{ label: "St. Louis", value: "St. Louis, Missouri" }, | ||
{ label: "San Francisco", value: "the Bay Area" }, | ||
{ label: "Kansas City", value: "Kansas City" }, | ||
{ label: "Detroit", value: "Metro Detroit" }, | ||
{ label: "Cleveland", value: "Cleveland" }, | ||
{ label: "Indianapolis", value: "Indianapolis" }, | ||
]} | ||
onChange={onChangeMarket} | ||
/> | ||
</PanelBody> | ||
</InspectorControls> | ||
|
||
{/* Block Content */} | ||
<div> | ||
<h3>{__("CW Hero Placeholder", "chris-buys-blocks")}</h3> | ||
<InnerBlocks /> | ||
</div> | ||
</div> | ||
); | ||
} |
10 changes: 10 additions & 0 deletions
10
wp-content/plugins/chris-buys-blocks/src/cw-hero-v2/editor.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.wp-block-chris-buys-cw-hero { | ||
padding-block: 1.5rem !important; | ||
background-color: #004c8d; | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
color: white; | ||
margin-block: 1rem !important; | ||
} |
10 changes: 10 additions & 0 deletions
10
wp-content/plugins/chris-buys-blocks/src/cw-hero-v2/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { registerBlockType } from "@wordpress/blocks"; | ||
import "./style.css"; | ||
import Edit from "./edit"; | ||
import save from "./save"; | ||
import metadata from "./block.json"; | ||
|
||
registerBlockType(metadata.name, { | ||
edit: Edit, | ||
save: save, | ||
}); |
88 changes: 88 additions & 0 deletions
88
wp-content/plugins/chris-buys-blocks/src/cw-hero-v2/render.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?php | ||
// $formId = isset($attributes['formId']) ? esc_html($attributes['formId']) : '1'; | ||
$selectedMarket = isset($attributes['selectedMarket']) ? esc_html($attributes['selectedMarket']) : 'St. Louis, Missouri'; | ||
|
||
// Determine the name based on the selected market | ||
if ($selectedMarket === "the Bay Area") { | ||
$selectedName = "John"; | ||
} else { | ||
$selectedName = "Chris"; | ||
} | ||
?> | ||
|
||
<section class="cw-hero-wrapper" style=" | ||
--background-image-small: url('<?php echo get_image_url('cw-hero/life-changes-hero-background', 768); ?>'); | ||
--background-image-medium: url('<?php echo get_image_url('cw-hero/life-changes-hero-background', 1024); ?>'); | ||
--background-image-large: url('<?php echo get_image_url('cw-hero/life-changes-hero-background', 2048); ?>'); | ||
"> | ||
<div class="cw-hero__content"> | ||
<div class="cw-hero__reviews"> | ||
<div class="cw-hero__reviews-stars-wrapper"> | ||
<?php for ($i = 0; $i < 5; $i++): ?> | ||
<span class="cw-hero__star"><?php echo get_responsive_image('cw-hero/star', 'star'); ?></span> | ||
<?php endfor; ?> | ||
</div> | ||
<div class="cw-hero__reviews-text"> | ||
<p>Rated <strong>4.7/5</strong> | Based on <strong>100+</strong> reviews</p> | ||
</div> | ||
</div> | ||
<h1 class="cw-hero__title">We Buy ANY House In <span>ANY Condition, On YOUR Timeline</span></h1> | ||
<div id="cw-form" class="cw-hero__form"> | ||
<div class="cw-hero__form-title"> | ||
<span>Get Your Offer In Record Time</span> | ||
</div> | ||
<div class="cw-hero__form-subtitle"> | ||
<span>Fill out the form. We’ll contact you ASAP.</span> | ||
</div> | ||
<?php echo $content; ?> | ||
|
||
<div class="lead-form__disclaimer"> | ||
<p>Your Information is safe & secure</p> | ||
</div> | ||
</div> | ||
<h3 class="cw-hero__subtitle">House to sell in <?php echo esc_html($selectedMarket); ?>? <strong>Get a cash offer in just 7 minutes</strong>, and get the sale closed as soon as you want to.</h3> | ||
<ul class="cw-hero__bullet-points"> | ||
<li class="cw-hero__bullet-point"><?php echo get_responsive_image('cw-hero/check-circle', 'checkmark'); ?> | ||
<span><strong>No need for you to clean</strong> or make repairs</span> | ||
</li> | ||
<li class="cw-hero__bullet-point"><?php echo get_responsive_image('cw-hero/check-circle', 'checkmark'); ?> | ||
<span>No realtors, <strong>fees, banks, commissions,</strong> or inspectors</span> | ||
</li> | ||
<li class="cw-hero__bullet-point"><?php echo get_responsive_image('cw-hero/check-circle', 'checkmark'); ?> | ||
<span>We pay all closing costs - <strong>you pay nothing</strong></span> | ||
</li> | ||
</ul> | ||
<div class="cw-hero__content--footer"> | ||
<div class="cw-fresh-start__testimonial"> | ||
<?php echo get_responsive_image('cw-hero/hero-testimoniels', 'Leigh Williams', 'cw-fresh-start__testimonee'); ?> | ||
<div class="cw-fresh-start__testimonial--content"> | ||
<blockquote> | ||
<p>"We are very grateful for <?php echo esc_html($selectedName); ?> and his team's work. They were always professional and reliable, <?php echo esc_html($selectedName); ?> answered my first call right away and kept me updated throughout the whole selling process.”</p> | ||
<cite> | ||
<span>Liv Skyler</span> | ||
<div class="cw-hero__reviews-stars-wrapper"> | ||
<?php for ($i = 0; $i < 5; $i++): ?> | ||
<span class="cw-hero__star"><?php echo get_responsive_image('cw-hero/star', 'star'); ?></span> | ||
<?php endfor; ?> | ||
</div> | ||
</cite> | ||
</blockquote> | ||
</div> | ||
</div> | ||
<ul class="cw-hero__statistic--list"> | ||
<li class="cw-hero__statistic--item"> | ||
<div class="cw-hero__statistic--amunt">36M+</div> | ||
<div class="cw-hero__statistic--text">Saved <span>Fees</span></div> | ||
</li> | ||
<li class="cw-hero__statistic--item"> | ||
<div class="cw-hero__statistic--amunt">1,500+</div> | ||
<div class="cw-hero__statistic--text">HOUSES <span>BOUGHT</span></div> | ||
</li> | ||
<li class="cw-hero__statistic--item"> | ||
<div class="cw-hero__statistic--amunt">96%</div> | ||
<div class="cw-hero__statistic--text">SATISFIED <span>CUSTOMERS</span></div> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { InnerBlocks } from "@wordpress/block-editor"; | ||
|
||
export default function save() { | ||
return <InnerBlocks.Content />; | ||
} |
Oops, something went wrong.