Переглянути джерело

modified contact form map rendering

tags/v1.0.0
somrat 5 роки тому
джерело
коміт
29d665a3db

+ 1
- 1
exampleSite/data/contact.yml Переглянути файл

@@ -3,7 +3,7 @@ heading : Get In
headingSpan : Touch
title : 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.
enable_maps : false
enable_maps : true
mapLatitude : 51.5223477
mapLongitude: -0.1622023
contactDetails :

+ 10
- 14
layouts/partials/contact.html Переглянути файл

@@ -1,12 +1,13 @@
{{ if .Site.Data.contact.enable }}
{{"<!-- Start Contact Us -->" | safeHTML}}
<section id="contact-us" class="contact-us section-bg">
<div class="container">
<div class="container pb-5">
<div class="row">
<div class="col-lg-12">
{{"<!-- section title -->" | safeHTML}}
<div class="title text-center wow fadeIn" data-wow-duration="500ms">
<h2>{{ with .Site.Data.contact.heading }} {{ . }} {{ end }} <span class="color">{{ with .Site.Data.contact.headingSpan }} {{ . }} {{ end }}</span></h2>
<h2>{{ with .Site.Data.contact.heading }} {{ . }} {{ end }} <span
class="color">{{ with .Site.Data.contact.headingSpan }} {{ . }} {{ end }}</span></h2>
<div class="border-meghna"></div>
</div>
</div>
@@ -31,44 +32,39 @@
<form id="contact-form" class="form-meghna" method="post" action="sendmail.php" role="form">

<input name="e-mail" type="text" id="e-mail" autocomplete="off">

<div class="form-group">
<input type="text" placeholder="Your 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">
</div>

<div class="form-group">
<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="mail-success" class="success">
Thank you. The Mailman is on His Way :)
</div>

<div id="mail-fail" class="error">
Sorry, don't know what happened. Try later :(
</div>

<div id="cf-submit">
<input type="submit" id="contact-submit" class="btn btn-transparent" value="Submit">
</div>

</form>
</div>
</div>
</div>

{{ if .Site.Data.contact.enable_maps }}
{{"<!-- Google Map -->" | safeHTML}}
<div class="google-map">
<div id="map-canvas" {{ with .Site.Data.contact.mapLatitude }} data-latitude="{{ . }}" {{ end }}
{{ with .Site.Data.contact.mapLongitude }} data-longitude="{{ . }}" {{ end }}></div>
<div id="map-canvas" {{ with .Site.Data.contact.mapLatitude }} data-latitude="{{ . }}" {{ end }} {{ with .Site.Data.contact.mapLongitude }} data-longitude="{{ . }}" {{ end }}></div>
</div>
{{ end }}
</section>
{{"<!-- /contact -->" | safeHTML}}
{{ end }}

+ 1
- 1
layouts/partials/head.html Переглянути файл

@@ -5,7 +5,7 @@

{{ "<!-- Mobile Specific Meta -->" | safeHTML }}
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ .Hugo.Generator }}
{{ hugo.Generator }}

<title>{{ if .IsHome }}{{ .Site.Title }}{{" | "}}{{ .Site.Params.Description }}{{ else if .IsPage}}{{ .Title }}{{" | "}}{{ .CurrentSection.Title }}{{else if eq .Section "author" }}{{if .Params.name}}{{.Params.name}} | {{ i18n "authorOfPostsOnBlog" }} „{{.Site.Title}}" {{else}}{{ i18n "authorsOfPostsOnBlog" }} „{{.Site.Title}}"{{end}}{{else if eq .Section "blog" }}{{ i18n "blogs" }} | {{ .Site.Title}}{{else}}{{ .Title }}{{with .Params.Description}}{{" | " .}}{{ end }}{{ end }}</title>


Завантаження…
Відмінити
Зберегти