Skip to content

Commit

Permalink
Adding Contact Page and Contact form 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Moraes committed Sep 20, 2018
1 parent cc1a7ca commit 7827c4a
Show file tree
Hide file tree
Showing 13 changed files with 1,073 additions and 491 deletions.
39 changes: 39 additions & 0 deletions resources/assets/sass/components/_contact-form.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

.wpcf7-form
> p
@extend .field

label
@extend .label

.wpcf7-form-control-wrap
@extend .control

input
&:not([type="submit"])
@extend .input

&.wpcf7-submit
@extend .button
@extend .is-link
@extend .is-rounded
font-family: $font-text
letter-spacing: 1.75px
text-align: center
padding: 0 25px
text-transform: uppercase
font-weight: 700
font-size: 14px

textarea
@extend .textarea

span.wpcf7-not-valid-tip
color: #f00
font-size: 13px
margin-top: 10px

div.wpcf7-validation-errors, div.wpcf7-acceptance-missing
border: 2px solid $yellow
background: $yellow
color: $gray-dark
13 changes: 7 additions & 6 deletions resources/assets/sass/components/index.sass
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import "article"
@import "comment"
@import "navbar"
@import "social-media"
@import "buttons"
@import "custom-slick-slider"
@import article
@import comment
@import navbar
@import social-media
@import buttons
@import custom-slick-slider
@import contact-form
13 changes: 13 additions & 0 deletions resources/assets/sass/woocommerce/_common.sass
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,16 @@ span.onsale

.woocommerce-product-details__short-description
margin-bottom: 0.5em


.button
&:disabled,
&.disabled,
&:disabled[disabled]
color: inherit
cursor: not-allowed
opacity: 0.5
padding: 0 1em!important

&:hover
color: inherit
18 changes: 18 additions & 0 deletions resources/views/template-contact.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% extends "base.twig" %}

{% block content %}

<section class="section-contact section">
<div class="container">
<div class="columns">
<div class="column">
{{ post.content }}
</div>
<div class="column">
{{ contact_shortcode }}
</div>
</div>
</div>
</section>

{% endblock %}
File renamed without changes.

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 9 additions & 7 deletions static/manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"admin.css": "css/admin.8d4eb6c5c80423d5b099.css",
"admin.js": "js/admin.8d4eb6c5c80423d5b099.js",
"app.css": "css/app.8d4eb6c5c80423d5b099.css",
"app.js": "js/app.8d4eb6c5c80423d5b099.js",
"login.css": "css/login.8d4eb6c5c80423d5b099.css",
"login.js": "js/login.8d4eb6c5c80423d5b099.js",
"vendor.js": "js/vendor.8d4eb6c5c80423d5b099.js",
"admin.css": "css/admin.61efea1639febaf14b78.css",
"admin.js": "js/admin.61efea1639febaf14b78.js",
"app.css": "css/app.61efea1639febaf14b78.css",
"app.js": "js/app.61efea1639febaf14b78.js",
"login.css": "css/login.61efea1639febaf14b78.css",
"login.js": "js/login.61efea1639febaf14b78.js",
"vendor.js": "js/vendor.61efea1639febaf14b78.js",
"images/icon-cart-white.png": "images/icon-cart-white.png",
"images/texture-blue-carnival.jpg": "images/texture-blue-carnival.jpg",
"images/base-camp-logo.png": "images/base-camp-logo.png"
}
12 changes: 12 additions & 0 deletions template-contact.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/*
* Template Name: Contact
*/

$context = Timber::get_context();
$post = new TimberPost();
$context['post'] = $post;

$context['contact_shortcode'] = do_shortcode(get_field('contact_form_shortcode'));

Timber::render('template-contact.twig', $context);

0 comments on commit 7827c4a

Please sign in to comment.