Skip to content

Instantly share code, notes, and snippets.

@sharu725
Last active May 2, 2019 17:16
Show Gist options
  • Save sharu725/b8bc09d8a6bb57c637df0b5ae958c155 to your computer and use it in GitHub Desktop.
Save sharu725/b8bc09d8a6bb57c637df0b5ae958c155 to your computer and use it in GitHub Desktop.

Revisions

  1. sharu725 revised this gist Aug 18, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion contact-form.html
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    <!-- After implementing this contact form make sure
    <!--
    After implementing this contact form make sure
    1. you have defined "email: [email protected]" in _config.yml file.
    2. you verify your form on formspree.io.
    -->
  2. sharu725 revised this gist Aug 18, 2017. No changes.
  3. sharu725 revised this gist Aug 18, 2017. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions contact-form.html
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    <!-- Before implementing this contact form make sure
    1. you have defined "email: [email protected]" in _config.yml file
    <!-- After implementing this contact form make sure
    1. you have defined "email: [email protected]" in _config.yml file.
    2. you verify your form on formspree.io.
    -->

    <form class="wj-contact" action="https://formspree.io/{{site.email}}" method="POST">
  4. sharu725 created this gist Aug 18, 2017.
    41 changes: 41 additions & 0 deletions contact-form.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    <!-- Before implementing this contact form make sure
    1. you have defined "email: [email protected]" in _config.yml file
    -->

    <form class="wj-contact" action="https://formspree.io/{{site.email}}" method="POST">
    <input type="text" name="email" placeholder="Email Address">
    <textarea type="text" name="content" rows="10" placeholder="Message"></textarea>
    <input type="hidden" name="_next" value="<REDIRECTION LINK> ">
    <input type="hidden" name="_subject" value="New Contact Form Submission">
    <input type="text" name="_gotcha" style="display:none">
    <input type="submit" value="Submit">
    </form>

    <style>
    form.wj-contact input[type="text"], form.wj-contact textarea[type="text"] {
    width: 100%;
    vertical-align: middle;
    margin-top: 0.25em;
    margin-bottom: 0.5em;
    padding: 0.75em;
    font-family: monospace, sans-serif;
    font-weight: lighter;
    border-style: solid;
    border-color: #444;
    outline-color: #2e83e6;
    border-width: 1px;
    border-radius: 3px;
    transition: box-shadow .2s ease;
    }

    form.wj-contact input[type="submit"] {
    outline: none;
    color: white;
    background-color: #2e83e6;
    border-radius: 3px;
    padding: 0.5em;
    margin: 0.25em 0 0 0;
    border: 1px solid transparent;
    height: auto;
    }
    </style>