├── functions.php ├── template-parts ├── blocks │ ├── ctaButton │ │ ├── block.json │ │ └── ctaButton.php │ ├── formspreeForm │ │ ├── block.json │ │ └── formspreeForm.php │ ├── propertyFeatures │ │ ├── block.json │ │ └── propertyFeatures.php │ ├── propertySearch │ │ ├── block.json │ │ └── propertySearch.php │ └── tickItem │ │ ├── block.json │ │ └── tickItem.php ├── fontawesome.zip └── fontawesome │ └── all.min.js └── theme.json /functions.php: -------------------------------------------------------------------------------- 1 | 'ctaButton', 41 | 'title' => 'CTA Button', 42 | 'description' => 'A call to action block', 43 | 'render_template' => 'template-parts/blocks/ctaButton/ctaButton.php', 44 | 'category' => 'design', 45 | 'icon' => 'button', 46 | 'keywords' => array('button', 'cta', 'call to action') 47 | )); 48 | acf_register_block_type(array( 49 | 'name' => 'formspreeForm', 50 | 'title' => 'Formspree Form', 51 | 'description' => 'A block to render a form', 52 | 'render_template' => 'template-parts/blocks/formspreeForm/formspreeForm.php', 53 | 'category' => 'design', 54 | 'icon' => 'format-aside', 55 | 'keywords' => array('form', 'formspree', 'contact form') 56 | )); 57 | acf_register_block_type(array( 58 | 'name' => 'tickItem', 59 | 'title' => 'Tick Item', 60 | 'description' => 'A block to render a tick item', 61 | 'render_template' => 'template-parts/blocks/tickItem/tickItem.php', 62 | 'category' => 'design', 63 | 'supports' => array('jsx' => true), 64 | 'icon' => 'yes-alt', 65 | //'enqueue_style' => get_template_directory_uri() . "/template-parts/fontawesome/all.min.css", 66 | //'enqueue_script' => get_template_directory_uri() . "/template-parts/fontawesome/all.min.js", 67 | 'keywords' => array('check item', 'tick item', 'correct') 68 | )); 69 | acf_register_block_type(array( 70 | 'name' => 'propertySearch', 71 | 'title' => 'Property Search', 72 | 'description' => 'A widget to search for properties', 73 | 'render_template' => 'template-parts/blocks/propertySearch/propertySearch.php', 74 | 'category' => 'design', 75 | 'icon' => 'search', 76 | 'keywords' => array('property search', 'property', 'property filter') 77 | )); 78 | acf_register_block_type(array( 79 | 'name' => 'propertyFeatures', 80 | 'title' => 'Property Features', 81 | 'description' => 'A widget to display the property features', 82 | 'render_template' => 'template-parts/blocks/propertyFeatures/propertyFeatures.php', 83 | 'category' => 'design', 84 | 'icon' => 'star-filled', 85 | 'keywords' => array('property features', 'features'), 86 | 'enqueue_style' => get_template_directory_uri() . "/template-parts/fontawesome/all.min.css", 87 | 'enqueue_script' => get_template_directory_uri() . "/template-parts/fontawesome/all.min.js", 88 | 'post_types' => array('property') 89 | )); 90 | }*/ 91 | } 92 | 93 | if(function_exists('acf_add_options_page')){ 94 | acf_add_options_page(array( 95 | 'page_title' => 'Main menu', 96 | 'menu_title' => 'Main menu', 97 | 'show_in_graphql' => true, 98 | 'icon_url' => 'dashicons-menu' 99 | )); 100 | } 101 | 102 | 103 | if ( ! function_exists( 'twentytwentytwo_support' ) ) : 104 | 105 | /** 106 | * Sets up theme defaults and registers support for various WordPress features. 107 | * 108 | * @since Twenty Twenty-Two 1.0 109 | * 110 | * @return void 111 | */ 112 | function twentytwentytwo_support() { 113 | 114 | // Add support for block styles. 115 | add_theme_support( 'wp-block-styles' ); 116 | 117 | // Enqueue editor styles. 118 | add_editor_style( 'style.css' ); 119 | 120 | } 121 | 122 | endif; 123 | 124 | add_action( 'after_setup_theme', 'twentytwentytwo_support' ); 125 | 126 | if ( ! function_exists( 'twentytwentytwo_styles' ) ) : 127 | 128 | /** 129 | * Enqueue styles. 130 | * 131 | * @since Twenty Twenty-Two 1.0 132 | * 133 | * @return void 134 | */ 135 | function twentytwentytwo_styles() { 136 | // Register theme stylesheet. 137 | $theme_version = wp_get_theme()->get( 'Version' ); 138 | 139 | $version_string = is_string( $theme_version ) ? $theme_version : false; 140 | wp_register_style( 141 | 'twentytwentytwo-style', 142 | get_template_directory_uri() . '/style.css', 143 | array(), 144 | $version_string 145 | ); 146 | 147 | // Enqueue theme stylesheet. 148 | wp_enqueue_style( 'twentytwentytwo-style' ); 149 | 150 | } 151 | 152 | endif; 153 | 154 | add_action( 'wp_enqueue_scripts', 'twentytwentytwo_styles' ); 155 | 156 | // Add block patterns 157 | require get_template_directory() . '/inc/block-patterns.php'; 158 | -------------------------------------------------------------------------------- /template-parts/blocks/ctaButton/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "acf/ctabutton", 3 | "title": "CTA Button", 4 | "description": "A call to action button", 5 | "category": "design", 6 | "keywords": ["cta", "button", "cta button"], 7 | "icon": "button", 8 | "apiVersion": 2, 9 | "acf": { 10 | "renderTemplate": "./ctaButton.php", 11 | "mode": "preview" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /template-parts/blocks/ctaButton/ctaButton.php: -------------------------------------------------------------------------------- 1 | 6 |
7 |
8 | 9 |
10 |
11 | -------------------------------------------------------------------------------- /template-parts/blocks/formspreeForm/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "acf/formspreeform", 3 | "title": "Formspree Form", 4 | "description": "A block to render a form", 5 | "category": "design", 6 | "keywords": ["form", "formspree form", "contact form"], 7 | "icon": "format-aside", 8 | "apiVersion": 2, 9 | "acf": { 10 | "renderTemplate": "./formspreeForm.php", 11 | "mode": "preview" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /template-parts/blocks/formspreeForm/formspreeForm.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |

Formspree form

7 |
8 | Check your form submissions here 9 |
10 |
-------------------------------------------------------------------------------- /template-parts/blocks/propertyFeatures/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "acf/propertyfeatures", 3 | "title": "Property Features", 4 | "description": "A block to render the property features", 5 | "category": "design", 6 | "keywords": ["property", "features"], 7 | "icon": "star-filled", 8 | "apiVersion": 2, 9 | "acf": { 10 | "renderTemplate": "./propertyFeatures.php", 11 | "mode": "preview", 12 | "postTypes": ["property"] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /template-parts/blocks/propertyFeatures/propertyFeatures.php: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 |
13 |
14 | bedrooms 15 |
16 |
17 | bathrooms 18 |
19 |
20 | parking available"; } ?> 21 |
22 |
23 | pet friendly"; } ?> 24 |
25 |
26 |
27 | £ 28 |
29 |
30 |
-------------------------------------------------------------------------------- /template-parts/blocks/propertySearch/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "acf/propertysearch", 3 | "title": "Property Search", 4 | "description": "A widget to search for properties", 5 | "category": "widget", 6 | "keywords": ["property search", "property", "property filter"], 7 | "icon": "search", 8 | "apiVersion": 2, 9 | "acf": { 10 | "renderTemplate": "./propertySearch.php", 11 | "mode": "preview" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /template-parts/blocks/propertySearch/propertySearch.php: -------------------------------------------------------------------------------- 1 |
2 | Property search 3 |
This block has no configuration. It will display the property search widget.
4 |
-------------------------------------------------------------------------------- /template-parts/blocks/tickItem/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "acf/tickitem", 3 | "title": "Tick Item", 4 | "description": "A block to render a tick item", 5 | "category": "design", 6 | "keywords": ["checkmark", "tick", "correct"], 7 | "icon": "yes-alt", 8 | "apiVersion": 2, 9 | "acf": { 10 | "renderTemplate": "./tickItem.php", 11 | "mode": "preview" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /template-parts/blocks/tickItem/tickItem.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 | 7 |
8 |
-------------------------------------------------------------------------------- /template-parts/fontawesome.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomphill/nextjs-wp-files/192b1d44e087eba2772e417212c978ce0f5755f6/template-parts/fontawesome.zip -------------------------------------------------------------------------------- /theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "customTemplates": [ 4 | { 5 | "name": "blank", 6 | "title": "Blank", 7 | "postTypes": ["page", "post"] 8 | }, 9 | { 10 | "name": "page-large-header", 11 | "title": "Page (Large Header)", 12 | "postTypes": ["page"] 13 | }, 14 | { 15 | "name": "single-no-separators", 16 | "title": "Single Post (No Separators)", 17 | "postTypes": ["post"] 18 | }, 19 | { 20 | "name": "page-no-separators", 21 | "title": "Page (No Separators)", 22 | "postTypes": ["page"] 23 | } 24 | ], 25 | "settings": { 26 | "appearanceTools": true, 27 | "color": { 28 | "duotone": [ 29 | { 30 | "colors": ["#000000", "#ffffff"], 31 | "slug": "foreground-and-background", 32 | "name": "Foreground and background" 33 | }, 34 | { 35 | "colors": ["#000000", "#ffe2c7"], 36 | "slug": "foreground-and-secondary", 37 | "name": "Foreground and secondary" 38 | }, 39 | { 40 | "colors": ["#000000", "#f6f6f6"], 41 | "slug": "foreground-and-tertiary", 42 | "name": "Foreground and tertiary" 43 | }, 44 | { 45 | "colors": ["#1a4548", "#ffffff"], 46 | "slug": "primary-and-background", 47 | "name": "Primary and background" 48 | }, 49 | { 50 | "colors": ["#1a4548", "#ffe2c7"], 51 | "slug": "primary-and-secondary", 52 | "name": "Primary and secondary" 53 | }, 54 | { 55 | "colors": ["#1a4548", "#f6f6f6"], 56 | "slug": "primary-and-tertiary", 57 | "name": "Primary and tertiary" 58 | } 59 | ], 60 | "gradients": [ 61 | { 62 | "slug": "vertical-secondary-to-tertiary", 63 | "gradient": "linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--tertiary) 100%)", 64 | "name": "Vertical secondary to tertiary" 65 | }, 66 | { 67 | "slug": "vertical-secondary-to-background", 68 | "gradient": "linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--background) 100%)", 69 | "name": "Vertical secondary to background" 70 | }, 71 | { 72 | "slug": "vertical-tertiary-to-background", 73 | "gradient": "linear-gradient(to bottom,var(--wp--preset--color--tertiary) 0%,var(--wp--preset--color--background) 100%)", 74 | "name": "Vertical tertiary to background" 75 | }, 76 | { 77 | "slug": "diagonal-primary-to-foreground", 78 | "gradient": "linear-gradient(to bottom right,var(--wp--preset--color--primary) 0%,var(--wp--preset--color--foreground) 100%)", 79 | "name": "Diagonal primary to foreground" 80 | }, 81 | { 82 | "slug": "diagonal-secondary-to-background", 83 | "gradient": "linear-gradient(to bottom right,var(--wp--preset--color--secondary) 50%,var(--wp--preset--color--background) 50%)", 84 | "name": "Diagonal secondary to background" 85 | }, 86 | { 87 | "slug": "diagonal-background-to-secondary", 88 | "gradient": "linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--secondary) 50%)", 89 | "name": "Diagonal background to secondary" 90 | }, 91 | { 92 | "slug": "diagonal-tertiary-to-background", 93 | "gradient": "linear-gradient(to bottom right,var(--wp--preset--color--tertiary) 50%,var(--wp--preset--color--background) 50%)", 94 | "name": "Diagonal tertiary to background" 95 | }, 96 | { 97 | "slug": "diagonal-background-to-tertiary", 98 | "gradient": "linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--tertiary) 50%)", 99 | "name": "Diagonal background to tertiary" 100 | } 101 | ], 102 | "palette": [ 103 | { 104 | "slug": "foreground", 105 | "color": "#000000", 106 | "name": "Foreground" 107 | }, 108 | { 109 | "slug": "background", 110 | "color": "#ffffff", 111 | "name": "Background" 112 | }, 113 | { 114 | "slug": "primary", 115 | "color": "#1a4548", 116 | "name": "Primary" 117 | }, 118 | { 119 | "slug": "secondary", 120 | "color": "#ffe2c7", 121 | "name": "Secondary" 122 | }, 123 | { 124 | "slug": "tertiary", 125 | "color": "#F6F6F6", 126 | "name": "Tertiary" 127 | }, 128 | { 129 | "slug": "slate", 130 | "color": "#1E293B", 131 | "name": "Slate" 132 | } 133 | ] 134 | }, 135 | "custom": { 136 | "spacing": { 137 | "small": "max(1.25rem, 5vw)", 138 | "medium": "clamp(2rem, 8vw, calc(4 * var(--wp--style--block-gap)))", 139 | "large": "clamp(4rem, 10vw, 8rem)", 140 | "outer": "var(--wp--custom--spacing--small, 1.25rem)" 141 | }, 142 | "typography": { 143 | "font-size": { 144 | "huge": "clamp(2.25rem, 4vw, 2.75rem)", 145 | "gigantic": "clamp(2.75rem, 6vw, 3.25rem)", 146 | "colossal": "clamp(3.25rem, 8vw, 6.25rem)" 147 | }, 148 | "line-height": { 149 | "tiny": 1.15, 150 | "small": 1.2, 151 | "medium": 1.4, 152 | "normal": 1.6 153 | } 154 | } 155 | }, 156 | "spacing": { 157 | "units": ["%", "px", "em", "rem", "vh", "vw"] 158 | }, 159 | "typography": { 160 | "dropCap": false, 161 | "fontFamilies": [ 162 | { 163 | "fontFamily": "-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif", 164 | "name": "System Font", 165 | "slug": "system-font" 166 | }, 167 | { 168 | "fontFamily": "\"Source Serif Pro\", serif", 169 | "name": "Source Serif Pro", 170 | "slug": "source-serif-pro", 171 | "fontFace": [ 172 | { 173 | "fontFamily": "Source Serif Pro", 174 | "fontWeight": "200 900", 175 | "fontStyle": "normal", 176 | "fontStretch": "normal", 177 | "src": [ 178 | "file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Roman.ttf.woff2" 179 | ] 180 | }, 181 | { 182 | "fontFamily": "Source Serif Pro", 183 | "fontWeight": "200 900", 184 | "fontStyle": "italic", 185 | "fontStretch": "normal", 186 | "src": [ 187 | "file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Italic.ttf.woff2" 188 | ] 189 | } 190 | ] 191 | } 192 | ], 193 | "fontSizes": [ 194 | { 195 | "size": "1rem", 196 | "slug": "small" 197 | }, 198 | { 199 | "size": "1.125rem", 200 | "slug": "medium" 201 | }, 202 | { 203 | "size": "1.75rem", 204 | "slug": "large" 205 | }, 206 | { 207 | "size": "clamp(1.75rem, 3vw, 2.25rem)", 208 | "slug": "x-large" 209 | } 210 | ] 211 | }, 212 | "layout": { 213 | "contentSize": "1200px", 214 | "wideSize": "1200px" 215 | } 216 | }, 217 | "styles": { 218 | "blocks": { 219 | "core/button": { 220 | "border": { 221 | "radius": "0" 222 | }, 223 | "color": { 224 | "background": "var(--wp--preset--color--primary)", 225 | "text": "var(--wp--preset--color--background)" 226 | }, 227 | "typography": { 228 | "fontSize": "var(--wp--preset--font-size--medium)" 229 | } 230 | }, 231 | "core/post-title": { 232 | "typography": { 233 | "fontFamily": "var(--wp--preset--font-family--source-serif-pro)", 234 | "fontWeight": "300", 235 | "lineHeight": "var(--wp--custom--typography--line-height--tiny)", 236 | "fontSize": "var(--wp--custom--typography--font-size--gigantic)" 237 | } 238 | }, 239 | "core/post-comments": { 240 | "spacing": { 241 | "padding": { 242 | "top": "var(--wp--custom--spacing--small)" 243 | } 244 | } 245 | }, 246 | "core/pullquote": { 247 | "border": { 248 | "width": "1px 0" 249 | } 250 | }, 251 | "core/query-title": { 252 | "typography": { 253 | "fontFamily": "var(--wp--preset--font-family--source-serif-pro)", 254 | "fontWeight": "300", 255 | "lineHeight": "var(--wp--custom--typography--line-height--small)", 256 | "fontSize": "var(--wp--custom--typography--font-size--gigantic)" 257 | } 258 | }, 259 | "core/quote": { 260 | "border": { 261 | "width": "1px" 262 | } 263 | }, 264 | "core/site-title": { 265 | "typography": { 266 | "fontFamily": "var(--wp--preset--font-family--system-font)", 267 | "lineHeight": "var(--wp--custom--typography--line-height--normal)", 268 | "fontSize": "var(--wp--preset--font-size--medium)", 269 | "fontStyle": "italic", 270 | "fontWeight": "normal" 271 | } 272 | } 273 | }, 274 | "color": { 275 | "background": "var(--wp--preset--color--background)", 276 | "text": "var(--wp--preset--color--foreground)" 277 | }, 278 | "elements": { 279 | "h1": { 280 | "typography": { 281 | "fontFamily": "var(--wp--preset--font-family--source-serif-pro)", 282 | "fontWeight": "300", 283 | "lineHeight": "var(--wp--custom--typography--line-height--tiny)", 284 | "fontSize": "var(--wp--custom--typography--font-size--colossal)" 285 | } 286 | }, 287 | "h2": { 288 | "typography": { 289 | "fontFamily": "var(--wp--preset--font-family--source-serif-pro)", 290 | "fontWeight": "300", 291 | "lineHeight": "var(--wp--custom--typography--line-height--small)", 292 | "fontSize": "var(--wp--custom--typography--font-size--gigantic)" 293 | } 294 | }, 295 | "h3": { 296 | "typography": { 297 | "fontFamily": "var(--wp--preset--font-family--source-serif-pro)", 298 | "fontWeight": "300", 299 | "lineHeight": "var(--wp--custom--typography--line-height--tiny)", 300 | "fontSize": "var(--wp--custom--typography--font-size--huge)" 301 | } 302 | }, 303 | "h4": { 304 | "typography": { 305 | "fontFamily": "var(--wp--preset--font-family--source-serif-pro)", 306 | "fontWeight": "300", 307 | "lineHeight": "var(--wp--custom--typography--line-height--tiny)", 308 | "fontSize": "var(--wp--preset--font-size--x-large)" 309 | } 310 | }, 311 | "h5": { 312 | "typography": { 313 | "fontFamily": "var(--wp--preset--font-family--system-font)", 314 | "fontWeight": "700", 315 | "textTransform": "uppercase", 316 | "lineHeight": "var(--wp--custom--typography--line-height--normal)", 317 | "fontSize": "var(--wp--preset--font-size--medium)" 318 | } 319 | }, 320 | "h6": { 321 | "typography": { 322 | "fontFamily": "var(--wp--preset--font-family--system-font)", 323 | "fontWeight": "400", 324 | "textTransform": "uppercase", 325 | "lineHeight": "var(--wp--custom--typography--line-height--normal)", 326 | "fontSize": "var(--wp--preset--font-size--medium)" 327 | } 328 | }, 329 | "link": { 330 | "color": { 331 | "text": "var(--wp--preset--color--foreground)" 332 | } 333 | } 334 | }, 335 | "spacing": { 336 | "blockGap": "1.5rem" 337 | }, 338 | "typography": { 339 | "fontFamily": "var(--wp--preset--font-family--system-font)", 340 | "lineHeight": "var(--wp--custom--typography--line-height--normal)", 341 | "fontSize": "var(--wp--preset--font-size--medium)" 342 | } 343 | }, 344 | "templateParts": [ 345 | { 346 | "name": "header", 347 | "title": "Header", 348 | "area": "header" 349 | }, 350 | { 351 | "name": "header-large-dark", 352 | "title": "Header (Dark, large)", 353 | "area": "header" 354 | }, 355 | { 356 | "name": "header-small-dark", 357 | "title": "Header (Dark, small)", 358 | "area": "header" 359 | }, 360 | { 361 | "name": "footer", 362 | "title": "Footer", 363 | "area": "footer" 364 | } 365 | ] 366 | } 367 | --------------------------------------------------------------------------------