Browse Source

changes to get PHP contact form working, but call back to js not functional yet

tags/v1.0.0
Frank (inchiostro0 6 years ago
parent
commit
780da44508

static/css/style.css → assets/css/style.css View File


static/js/script.js → assets/js/script.js View File

/* Portfolio Filtering Hook /* Portfolio Filtering Hook
/* ========================================================================= */ /* ========================================================================= */


var mixer = mixitup('.portfolio-items-wrapper');
if ($('.portfolio-items-wrapper').length)
mixitup('.portfolio-items-wrapper');


/* ========================================================================= */ /* ========================================================================= */
/* Testimonial Carousel /* Testimonial Carousel
to determine if there was an error or not */ to determine if there was an error or not */
var error = false; var error = false;
var name = $('#name').val(); var name = $('#name').val();
var email_real = $('#email_real').val();
var email = $('#email').val();
var subject = $('#subject').val(); var subject = $('#subject').val();
var message = $('#message').val(); var message = $('#message').val();


} }
if (email.length == 0 || email.indexOf('@') == '-1') { if (email.length == 0 || email.indexOf('@') == '-1') {
var error = true; var error = true;
$('#email_real').css("border-color", "#D8000C");
$('#email').css("border-color", "#D8000C");
} else { } else {
$('#email_real').css("border-color", "#666");
$('#email').css("border-color", "#666");
} }
if (subject.length == 0) { if (subject.length == 0) {
var error = true; var error = true;
/* using the jquery's post(ajax) function and a lifesaver /* using the jquery's post(ajax) function and a lifesaver
function serialize() which gets all the data from the form function serialize() which gets all the data from the form
we submit it to send_email.php */ we submit it to send_email.php */
$.post("php/mailer.php", $("#contact-form").serialize(), function (result) {
//log the result from the script
console.log(result);
$.post("sendmail.php", $("#contact-form").serialize(), function (result) {
//and after the ajax request ends we check the text returned //and after the ajax request ends we check the text returned
if (result == 'sent') { if (result == 'sent') {
//if the mail is sent remove the submit paragraph //if the mail is sent remove the submit paragraph
map.setMapTypeId('roadatlas'); map.setMapTypeId('roadatlas');
} }


google.maps.event.addDomListener(window, "load", initialize);
// Check init google maps only if "google" has been defined.
if("google" in window)
google.maps.event.addDomListener(window, "load", initialize);

+ 6
- 1
exampleSite/config.toml View File

[params] [params]
home= "Home" home= "Home"
logo = "images/logo.png" logo = "images/logo.png"
gmapAPI = "https://maps.googleapis.com/maps/api/js?key=AIzaSyBI14J_PNWVd-m0gnUBkjmhoQyNyd7nllA"
gmapAPI = "https://maps.googleapis.com/maps/api/js?key=AIzaSyCcABaamniA6OL5YvYSpB3pFMNrXwXnLwU&libraries=places"
# Meta data
description = "Airspace Hugo theme"
author = "Themefisher"
# Google Analitycs
googleAnalitycsID = "Your ID"
custom_css = ["css/custom.css"] custom_css = ["css/custom.css"]


# Banner Section # Banner Section

+ 1
- 0
exampleSite/content/blog/are-you-doing-the-right-way.md View File

date: 2018-09-12T14:51:12+06:00 date: 2018-09-12T14:51:12+06:00
author: John Doe author: John Doe
image: images/blog/blog-post-3.jpg image: images/blog/blog-post-3.jpg
description : "This is meta description"
--- ---


Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a.

+ 1
- 0
exampleSite/content/blog/simple-image-post.md View File

date: 2018-09-12T12:52:36+06:00 date: 2018-09-12T12:52:36+06:00
image: images/blog/blog-post-1.jpg image: images/blog/blog-post-1.jpg
author: Jamica Jock author: Jamica Jock
description : "This is meta description"
--- ---


Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a.

+ 1
- 0
exampleSite/content/blog/simple-post-title.md View File

date: 2018-09-12T14:39:16+06:00 date: 2018-09-12T14:39:16+06:00
author: Somrat author: Somrat
image: images/blog/blog-post-2.jpg image: images/blog/blog-post-2.jpg
description : "This is meta description"
--- ---





+ 12
- 9
layouts/_default/baseof.html View File

<!DOCTYPE html> <!DOCTYPE html>
<html>
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
<html class="no-js" lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
{{- partial "header.html" . -}}

{{"<!-- body start -->" | safeHTML}}

<body id="body" data-spy="scroll" data-target=".navbar" data-offset="50">
<div id="content">
{{- block "main" . }}{{- end }} {{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>
</div>
{{- partial "footer.html" . -}}
</body>

</html>

+ 3
- 1
layouts/_default/list.html View File

{{ define "main" }}

{{ partial "header.html" . }} {{ partial "header.html" . }}


{{ partial "navigation.html" . }} {{ partial "navigation.html" . }}
</section> </section>
{{"<!-- /blog -->" | safeHTML}} {{"<!-- /blog -->" | safeHTML}}


{{ partial "footer.html" . }}
{{ end }}

+ 3
- 1
layouts/_default/single.html View File

{{ define "main" }}

{{ partial "header.html" . }} {{ partial "header.html" . }}


{{ partial "navigation.html" . }} {{ partial "navigation.html" . }}
</div> </div>
</section> </section>


{{ partial "footer.html" . }}
{{ end }}

+ 23
- 21
layouts/index.html View File

{{ partial "header.html" . }}
{{ partial "preloader.html" . }}
{{ partial "hero-area.html" . }}
{{ define "main" }}


{{ partial "navigation.html" . }}
{{ partial "header.html" . }}
{{ partial "preloader.html" . }}
{{ partial "hero-area.html" . }}


{{ partial "about.html" . }}
{{ partial "navigation.html" . }}


{{ partial "cta.html" . }}
{{ partial "about.html" . }}


{{ partial "service.html" . }}
{{ partial "skill.html" . }}
{{ partial "cta.html" . }}


{{ partial "portfolio.html" . }}
{{ partial "service.html" . }}
{{ partial "skill.html" . }}


{{ partial "counter.html" . }}
{{ partial "portfolio.html" . }}


{{ partial "team.html" . }}
{{ partial "pricing.html" . }}
{{ partial "counter.html" . }}


{{ partial "testimonial.html" . }}
{{ partial "team.html" . }}
{{ partial "pricing.html" . }}


{{ partial "blog.html" . }}
{{ partial "contact.html" . }}
{{ partial "testimonial.html" . }}


{{ partial "footer.html" . }}
{{ partial "blog.html" . }}
{{ partial "contact.html" . }}

{{ end }}

+ 11
- 1
layouts/partials/footer.html View File

{{"<!-- wow.min Script -->" | safeHTML}} {{"<!-- wow.min Script -->" | safeHTML}}
<script type="text/javascript" src="{{ "plugins/wow/dist/wow.min.js" | absURL}}"></script> <script type="text/javascript" src="{{ "plugins/wow/dist/wow.min.js" | absURL}}"></script>
{{"<!-- Custom js -->" | safeHTML}} {{"<!-- Custom js -->" | safeHTML}}
<script type="text/javascript" src="{{ "js/script.js" | absURL}}"></script>
{{ $script := resources.Get "js/script.js" | minify}}
<script src="{{ $script.Permalink }}"></script>
{{ "<!-- google analitycs -->" | safeHTML }}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ .Site.Params.googleAnalitycsID }}', 'auto');
ga('send', 'pageview');
</script>
</body> </body>
</html> </html>

+ 0
- 0
layouts/partials/head.html View File


+ 7
- 6
layouts/partials/header.html View File

<!DOCTYPE html> <!DOCTYPE html>
<html class="no-js" lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}"> <html class="no-js" lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}">
<meta name="author" content="{{ $.Site.Params.author }}">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ "<!-- Mobile Specific Meta -->" | safeHTML }} {{ "<!-- Mobile Specific Meta -->" | safeHTML }}
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
{{ .Hugo.Generator }} {{ .Hugo.Generator }}
<link rel="stylesheet" href="{{"plugins/slick-carousel/slick/slick.css"|absURL}}"> <link rel="stylesheet" href="{{"plugins/slick-carousel/slick/slick.css"|absURL}}">
<link rel="stylesheet" href="{{"plugins/slick-carousel/slick/slick-theme.css"|absURL}}"> <link rel="stylesheet" href="{{"plugins/slick-carousel/slick/slick-theme.css"|absURL}}">
{{"<!-- Main Stylesheet -->"|safeHTML}} {{"<!-- Main Stylesheet -->"|safeHTML}}
<link rel="stylesheet" href="{{"css/style.css"|absURL}}">
{{ "<!-- Custom CSS -->" | safeHTML }}
{{ $styles := resources.Get "css/style.css" | minify}}
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
{{ range .Site.Params.custom_css }} {{ range .Site.Params.custom_css }}
<link rel="stylesheet" href="{{ . | absURL }}"> <link rel="stylesheet" href="{{ . | absURL }}">
{{ end }} {{ end }}

+ 1
- 1
theme.toml View File

licenselink = "https://creativecommons.org/licenses/by/3.0/" licenselink = "https://creativecommons.org/licenses/by/3.0/"
description = "Hugo port of the Themefisher’s Meghna Template" description = "Hugo port of the Themefisher’s Meghna Template"
homepage = "https://github.com/themefisher/meghna-hugo" homepage = "https://github.com/themefisher/meghna-hugo"
tags = ['landing-page', 'business', 'agency-template', 'themefisher', 'hugo-theme', 'hugo-templates', 'bootstrap', 'blog', 'responsive', 'portfolio', 'single-page', 'dark', 'clean', 'simple', 'company', 'creative', 'contact-form', 'custom-themes', 'mobile']
tags = ['landing-page', 'google-analytics', 'fast', 'modern', 'minimal', 'minimalistic', 'business', 'agency-template', 'themefisher', 'hugo-theme', 'hugo-templates', 'bootstrap', 'blog', 'responsive', 'portfolio', 'single-page', 'dark', 'clean', 'simple', 'company', 'creative', 'contact-form', 'custom-themes', 'mobile']
features = ['bootstrap','responsive'] features = ['bootstrap','responsive']
min_version = "0.48" min_version = "0.48"



Loading…
Cancel
Save