Browse Source

modified contact form

tags/v1.0.0
somrat 4 years ago
parent
commit
3980b7c528

+ 1
- 1
exampleSite/config.toml View File



#### external / static link #### #### external / static link ####
[[menu.static]] [[menu.static]]
name = "Themefisher"
name = "themefisher"
URL = "https://themefisher.com/" URL = "https://themefisher.com/"
weight = 8 weight = 8



+ 14
- 3
exampleSite/data/en/contact.yml View File

title : Contact Us title : Contact Us
subtitle : Contact Details subtitle : Contact Details
content : Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, vero, provident, eum eligendi blanditiis ex explicabo vitae nostrum facilis asperiores dolorem illo officiis ratione vel fugiat dicta laboriosam labore adipisci. content : Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, vero, provident, eum eligendi blanditiis ex explicabo vitae nostrum facilis asperiores dolorem illo officiis ratione vel fugiat dicta laboriosam labore adipisci.
form_action: "#" #contact form works with https://formspree.io


contact_details :
# Contact details
contact_list:
- icon : ti-location-pin # themify icon pack : https://themify.me/themify-icons - icon : ti-location-pin # themify icon pack : https://themify.me/themify-icons
info : "Khaja Road, Bayzid, Chittagong, Bangladesh" info : "Khaja Road, Bayzid, Chittagong, Bangladesh"
info : "Fax: +880-31-000-000" info : "Fax: +880-31-000-000"
- icon : ti-email # themify icon pack : https://themify.me/themify-icons - icon : ti-email # themify icon pack : https://themify.me/themify-icons
info : "Email: hello@meghna.com"
info : "Email: hello@meghna.com"


# Contact form
contact_form:
enable : true
form_action : "#" #contact form works with https://formspree.io
name : "Your Name"
email : "Your Email"
subject : "Subject"
message : "Message"
submit : "Submit"

+ 14
- 8
exampleSite/data/fr/contact.yml View File

title : Contact Us title : Contact Us
subtitle : Contact Details subtitle : Contact Details
content : Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, vero, provident, eum eligendi blanditiis ex explicabo vitae nostrum facilis asperiores dolorem illo officiis ratione vel fugiat dicta laboriosam labore adipisci. content : Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, vero, provident, eum eligendi blanditiis ex explicabo vitae nostrum facilis asperiores dolorem illo officiis ratione vel fugiat dicta laboriosam labore adipisci.
form_action: "#" #contact form works with https://formspree.io
map:
enable : true
gmap_api : "https://maps.googleapis.com/maps/api/js?key=AIzaSyCcABaamniA6OL5YvYSpB3pFMNrXwXnLwU&libraries=places"
map_latitude : 51.5223477
map_longitude: -0.1622023


contact_details :
# Contact details
contact_list:
- icon : ti-location-pin # themify icon pack : https://themify.me/themify-icons - icon : ti-location-pin # themify icon pack : https://themify.me/themify-icons
info : "Khaja Road, Bayzid, Chittagong, Bangladesh" info : "Khaja Road, Bayzid, Chittagong, Bangladesh"
info : "Fax: +880-31-000-000" info : "Fax: +880-31-000-000"
- icon : ti-email # themify icon pack : https://themify.me/themify-icons - icon : ti-email # themify icon pack : https://themify.me/themify-icons
info : "Email: hello@meghna.com"
info : "Email: hello@meghna.com"


# Contact form
contact_form:
enable : true
form_action : "#" #contact form works with https://formspree.io
name : "votre nom"
email : "Votre email"
subject : "Matière"
message : "Message"
submit : "Soumettre"

+ 2
- 2
exampleSite/i18n/en.yaml View File

translation: About author translation: About author
- id: authorsPosts - id: authorsPosts
translation: Author's posts translation: Author's posts
- id: submit
translation: Submit
- id: all - id: all
translation: All translation: All
- id: about - id: about
translation: Blog translation: Blog
- id: contact - id: contact
translation: Contact translation: Contact
- id: themefisher
translation: Themefisher

+ 2
- 2
exampleSite/i18n/fr.yaml View File

translation: À propos de l'auteur translation: À propos de l'auteur
- id: authorsPosts - id: authorsPosts
translation: Articles de l'auteur translation: Articles de l'auteur
- id: submit
translation: Soumettre
- id: all - id: all
translation: All translation: All
- id: about - id: about
translation: Blog translation: Blog
- id: contact - id: contact
translation: Contact translation: Contact
- id: themefisher
translation: Themefisher

+ 23
- 8
layouts/partials/contact.html View File

<div class="contact-info col-lg-6 wow fadeInUp" data-wow-duration="500ms"> <div class="contact-info col-lg-6 wow fadeInUp" data-wow-duration="500ms">
<h3>{{ .subtitle | markdownify }}</h3> <h3>{{ .subtitle | markdownify }}</h3>
<p> {{ .content | markdownify }} </p> <p> {{ .content | markdownify }} </p>
{{ if .contact_form.enable }}
<div class="contact-details"> <div class="contact-details">
{{ range .contact_details }}
{{ range .contact_list }}
<div class="con-info clearfix"> <div class="con-info clearfix">
<i class="{{ .icon }}"></i> <i class="{{ .icon }}"></i>
<span>{{ .info }}</span> <span>{{ .info }}</span>
</div> </div>
{{ end }} {{ end }}
</div> </div>
{{ end }}
</div> </div>


{{"<!-- Contact Form -->" | safeHTML}} {{"<!-- Contact Form -->" | safeHTML}}
{{ if .contact_form.enable }}
{{ with .contact_form }}
<div class="col-lg-6 wow fadeInUp" data-wow-duration="500ms" data-wow-delay="300ms"> <div class="col-lg-6 wow fadeInUp" data-wow-duration="500ms" data-wow-delay="300ms">
<form id="contact-form" class="form-meghna" method="post" action="{{ .form_action | safeURL }}" role="form">
<input name="e-mail" type="text" id="e-mail" autocomplete="off">
<form id="contact-form" class="form-meghna" method="post" action="{{ .form_action }}" role="form">
<div class="form-group"> <div class="form-group">
<input type="text" placeholder="Your Name" class="form-control" name="name" id="name">
<input type="text" placeholder="{{ .name }}" class="form-control" name="name" id="name">
</div> </div>
<div class="form-group"> <div class="form-group">
<input type="email" placeholder="Your Email" class="form-control" name="email" id="email">
<input type="email" placeholder="{{ .email }}" class="form-control" name="email" id="email">
</div> </div>
<div class="form-group"> <div class="form-group">
<input type="text" placeholder="Subject" class="form-control" name="subject" id="subject">
<input type="text" placeholder="{{ .subject }}" class="form-control" name="subject" id="subject">
</div> </div>
<div class="form-group"> <div class="form-group">
<textarea rows="6" placeholder="Message" class="form-control" name="message" id="message"></textarea>
<textarea rows="6" placeholder="{{ .message }}" class="form-control" name="message" id="message"></textarea>
</div> </div>
<div id="cf-submit"> <div id="cf-submit">
<button type="submit" id="contact-submit" class="btn btn-transparent btn-block" value="Submit">{{ i18n "submit" }}</button>
<button type="submit" id="contact-submit" class="btn btn-transparent btn-block" value="{{ .submit }}">{{ .submit }}</button>
</div> </div>
</form> </form>
</div> </div>
{{ end }}
{{ else }}
<div class="contact-details">
{{ range .contact_list }}
<div class="con-info clearfix">
<i class="{{ .icon }}"></i>
<span>{{ .info }}</span>
</div>
{{ end }}
</div>
{{ end }}
</div> </div>
</div> </div>
</section> </section>

Loading…
Cancel
Save