소스 검색

modified contact form

tags/v1.0.0
somrat 4 년 전
부모
커밋
3980b7c528
6개의 변경된 파일56개의 추가작업 그리고 24개의 파일을 삭제
  1. 1
    1
      exampleSite/config.toml
  2. 14
    3
      exampleSite/data/en/contact.yml
  3. 14
    8
      exampleSite/data/fr/contact.yml
  4. 2
    2
      exampleSite/i18n/en.yaml
  5. 2
    2
      exampleSite/i18n/fr.yaml
  6. 23
    8
      layouts/partials/contact.html

+ 1
- 1
exampleSite/config.toml 파일 보기

@@ -78,7 +78,7 @@ weight = 7

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


+ 14
- 3
exampleSite/data/en/contact.yml 파일 보기

@@ -4,9 +4,9 @@ contact:
title : Contact Us
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.
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
info : "Khaja Road, Bayzid, Chittagong, Bangladesh"
@@ -17,4 +17,15 @@ contact:
info : "Fax: +880-31-000-000"
- 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 파일 보기

@@ -4,14 +4,9 @@ contact:
title : Contact Us
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.
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
info : "Khaja Road, Bayzid, Chittagong, Bangladesh"
@@ -22,4 +17,15 @@ contact:
info : "Fax: +880-31-000-000"
- 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 파일 보기

@@ -10,8 +10,6 @@
translation: About author
- id: authorsPosts
translation: Author's posts
- id: submit
translation: Submit
- id: all
translation: All
- id: about
@@ -28,3 +26,5 @@
translation: Blog
- id: contact
translation: Contact
- id: themefisher
translation: Themefisher

+ 2
- 2
exampleSite/i18n/fr.yaml 파일 보기

@@ -10,8 +10,6 @@
translation: À propos de l'auteur
- id: authorsPosts
translation: Articles de l'auteur
- id: submit
translation: Soumettre
- id: all
translation: All
- id: about
@@ -28,3 +26,5 @@
translation: Blog
- id: contact
translation: Contact
- id: themefisher
translation: Themefisher

+ 23
- 8
layouts/partials/contact.html 파일 보기

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

{{"<!-- 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">
<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">
<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 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 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 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 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>
</form>
</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>
</section>

Loading…
취소
저장