Commit d4baa7a6 authored by Lee Brown's avatar Lee Brown

Merge branch 'issue16/web-app-signup' of...

Merge branch 'issue16/web-app-signup' of gitlab.com:geeks-accelerator/oss/saas-starter-kit into issue16/web-app-signup
parents 32cb554d c76744a8
......@@ -40,8 +40,35 @@ func (h *Root) indexDashboard(ctx context.Context, w http.ResponseWriter, r *htt
// indexDefault loads the root index page when a user has no authentication.
func (u *Root) indexDefault(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
http.Redirect(w, r, "/user/login", http.StatusFound)
return nil
return u.Renderer.Render(ctx, w, r, tmplLayoutSite, "site-index.gohtml", web.MIMETextHTMLCharsetUTF8, http.StatusOK, nil)
}
// indexDefault loads the root index page when a user has no authentication.
func (u *Root) SitePage(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
var tmpName string
switch r.RequestURI {
case "/":
tmpName = "site-index.gohtml"
case "/api":
tmpName = "site-api.gohtml"
case "/features":
tmpName = "site-features.gohtml"
case "/support":
tmpName = "site-support.gohtml"
case "/legal/privacy":
tmpName = "legal-privacy.gohtml"
case "/legal/terms":
tmpName = "legal-terms.gohtml"
default:
http.Redirect(w, r, "/", http.StatusFound)
return nil
}
return u.Renderer.Render(ctx, w, r, tmplLayoutSite, tmpName, web.MIMETextHTMLCharsetUTF8, http.StatusOK, nil)
}
// IndexHtml redirects /index.html to the website root page.
......
......@@ -20,6 +20,7 @@ import (
const (
tmplLayoutBase = "base.gohtml"
tmplLayoutSite = "site.gohtml"
tmplContentErrorGeneric = "error-generic.gohtml"
)
......@@ -100,7 +101,13 @@ func APP(shutdown chan os.Signal, log *log.Logger, env webcontext.Env, staticDir
Renderer: renderer,
ProjectRoutes: projectRoutes,
}
// This route is not authenticated
// These routes is not authenticated
app.Handle("GET", "/api", r.SitePage)
app.Handle("GET", "/features", r.SitePage)
app.Handle("GET", "/support", r.SitePage)
app.Handle("GET", "/legal/privacy", r.SitePage)
app.Handle("GET", "/legal/terms", r.SitePage)
app.Handle("GET", "/", r.Index, mid.AuthenticateSessionOptional(authenticator))
app.Handle("GET", "/index.html", r.IndexHtml)
app.Handle("GET", "/robots.txt", r.RobotTxt)
......
......@@ -12071,3 +12071,4 @@ footer.sticky-footer .copyright {
body.sidebar-toggled footer.sticky-footer {
width: 100%;
}
......@@ -19,15 +19,22 @@ function hideDuplicateValidationFieldErrors() {
vnode = $(this).parent().parent().find('div.invalid-feedback');
}
var feedback_count = 0;
var formField = $(vnode).attr('data-field');
$(document).find('div.validation-error').find('li').each(function(){
if ($(this).attr('data-form-field') == formField) {
if ($(vnode).is(":visible") || $(vnode).css('display') === 'none') {
$(this).hide();
feedback_count++;
} else {
console.log('form validation feedback for '+fname+' is not visable, display main.');
}
}
});
if (feedback_count == 0) {
$(document).find('div.validation-error').find('ul').hide();
}
});
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{{define "title"}}API{{end}}
{{define "style"}}
{{end}}
{{ define "content" }}
<div class="container" id="page-content">
<h1 class="h1 mt-5 mb-3 text-dark">API</h1>
</div>
{{end}}
{{define "js"}}
<script>
$(document).ready(function() {
});
</script>
{{end}}
{{define "title"}}API{{end}}
{{define "style"}}
{{end}}
{{ define "content" }}
<div class="container" id="page-content">
<h1 class="h1 mt-5 mb-3 text-dark">Features</h1>
<!-- Start the Pricing Cards -->
<div class="card-deck mb-3 text-center">
<div class="card mb-4 shadow-sm">
<div class="card-header">
<h4 class="my-0 font-weight-normal">Free</h4>
</div>
<div class="card-body">
<h1 class="card-title pricing-card-title">$0 <small class="text-muted">/ mo</small></h1>
<ul class="list-unstyled mt-3 mb-4">
<li>10 users included</li>
<li>2 GB of storage</li>
<li>Email support</li>
<li>Help center access</li>
</ul>
<a class="btn btn-lg btn-block btn-outline-primary" href="/signup">Sign up for free</a>
</div>
</div>
<div class="card mb-4 shadow-sm">
<div class="card-header">
<h4 class="my-0 font-weight-normal">Pro</h4>
</div>
<div class="card-body">
<h1 class="card-title pricing-card-title">$15 <small class="text-muted">/ mo</small></h1>
<ul class="list-unstyled mt-3 mb-4">
<li>20 users included</li>
<li>10 GB of storage</li>
<li>Priority email support</li>
<li>Help center access</li>
</ul>
<button type="button" class="btn btn-lg btn-block btn-primary">Contact us</button>
</div>
</div>
<div class="card mb-4 shadow-sm">
<div class="card-header">
<h4 class="my-0 font-weight-normal">Enterprise</h4>
</div>
<div class="card-body">
<h1 class="card-title pricing-card-title">$29 <small class="text-muted">/ mo</small></h1>
<ul class="list-unstyled mt-3 mb-4">
<li>30 users included</li>
<li>15 GB of storage</li>
<li>Phone and email support</li>
<li>Help center access</li>
</ul>
<button type="button" class="btn btn-lg btn-block btn-primary">Contact us</button>
</div>
</div>
</div>
<!-- /End the Pricing Cards -->
<!-- Start the Featurettes -->
<hr class="featurette-divider mt-5 mb-5">
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">First featurette heading. <span class="text-muted">It'll blow your mind.</span></h2>
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
</div>
<div class="col-md-5">
<img class="featurette-image img-fluid mx-auto" data-src="holder.js/500x500/auto" alt="Generic placeholder image">
</div>
</div>
<hr class="featurette-divider mt-5 mb-5">
<div class="row featurette">
<div class="col-md-7 order-md-2">
<h2 class="featurette-heading">Oh yeah, it's that good. <span class="text-muted">See for yourself.</span></h2>
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
</div>
<div class="col-md-5 order-md-1">
<img class="featurette-image img-fluid mx-auto" data-src="holder.js/500x500/auto" alt="Generic placeholder image">
</div>
</div>
<hr class="featurette-divider mt-5 mb-5">
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">And lastly, this one. <span class="text-muted">Checkmate.</span></h2>
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
</div>
<div class="col-md-5">
<img class="featurette-image img-fluid mx-auto" data-src="holder.js/500x500/auto" alt="Generic placeholder image">
</div>
</div>
<hr class="featurette-divider mt-5 mb-5">
<!-- /End the Featurettes -->
</div>
<!-- Start the Signup Container -->
<div class="container ">
<div class="row">
<div class="col-sm-8">
<h3 class="h2 text-success">Interested in our Service?</h3>
<p>Simplify your business processes with our innovative solution. Signup for your free trial now!</p>
</div>
<div class="col-sm-4 text-right">
<a class="btn btn-info" href="/signup">Try it Now</a>
</div>
</div>
</div>
<!-- /End the Featurettes -->
{{end}}
{{define "js"}}
<script>
$(document).ready(function() {
});
</script>
{{end}}
{{define "title"}}Terms of Service{{end}}
{{define "style"}}
{{end}}
{{ define "content" }}
<div class="container" id="page-content">
</div>
{{end}}
{{define "js"}}
<script>
$(document).ready(function() {
});
</script>
{{end}}
{{define "title"}}Support{{end}}
{{define "style"}}
{{end}}
{{ define "content" }}
<div class="container" id="page-content">
<h1 class="h1 mt-5 mb-3 text-dark">Support</h1>
<div class="row">
<div class="col">
<p>We are excited to help our client’s transform their paper or manual processes into digital workflows. We are as passionate as you to drive innovative change in various industries to raise the bar on what defines organizational excellence. We are leaders in our space, providing best practices for digitizing standard operating procedures. Like you, we are building, learning, and iterating. If we can't answer your question in the Knowledge Base below, contact us 24/7 for support via email, phone or chat.
</p>
<h2>Contact us 24/7 for support via email, phone and chat!
</h2>
</div>
</div>
<div class="row mt-5 mb-5">
<div class="col">
</div>
</div>
<div class="row mt-5 mb-5">
<div class="col-sm-6 text-center">
<h3 class="h2"><i class="fal fa-envelope"></i>Email Us</h3>
<a href="mailto:[email protected]">[email protected]</a>
</div>
<div class="col-sm-6 text-center">
<h3 class="h2"><i class="fal fa-phone"></i>Call Us</h3>
<a href="tel:1-601-885-3364">+1 (601) 885-3364‬</a>
</div>
</div>
</div>
{{end}}
{{define "js"}}
<script>
$(document).ready(function() {
});
</script>
{{end}}
{{ define "base" }}
<!DOCTYPE html>
<html lang="en">
<head>
<title>
{{block "title" .}}{{end}} Web App
</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="{{block "description" .}}{{end}} ">
<meta name="author" content="{{block "author" .}}{{end}}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ SiteAssetUrl "/assets/images/favicon.png" }}">
<!-- ============================================================== -->
<!-- Custom fonts for this template -->
<!-- ============================================================== -->
<script src="https://kit.fontawesome.com/670ea91c67.js"></script>
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
<link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css integrity=sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm crossorigin=anonymous>
<!-- ============================================================== -->
<!-- Base styles for Start Bootstrap template SB Admin 2 -->
<!-- ============================================================== -->
{{ if eq $._Service.ENV "dev" }}
<link href="{{ SiteAssetUrl "/assets/css/sb-admin-2.css" }}" rel="stylesheet">
{{ else }}
<link href="{{ SiteAssetUrl "/assets/css/sb-admin-2.min.css" }}" rel="stylesheet">
{{ end }}
<!-- ============================================================== -->
<!-- Custom styles for this service applied to all pages -->
<!-- ============================================================== -->
<link href="{{ SiteAssetUrl "/assets/css/custom.css" }}" id="theme" rel="stylesheet">
<!-- ============================================================== -->
<!-- Page specific CSS -->
<!-- ============================================================== -->
{{block "style" .}} {{end}}
</head>
<body id="page-top">
<!-- ============================================================== -->
<!-- Page Wrapper -->
<!-- ============================================================== -->
<div id="wrapper">
<!-- ============================================================== -->
<!-- Content Wrapper -->
<!-- ============================================================== -->
<div id="content-wrapper" class="d-flex flex-column bg-white">
<!-- ============================================================== -->
<!-- Main Content -->
<!-- ============================================================== -->
<div id="content">
<!-- ============================================================== -->
<!-- Topbar -->
<!-- ============================================================== -->
{{ template "partials/site-topbar" . }}
<!-- End of Topbar -->
<!-- ============================================================== -->
<!-- Page Content -->
<!-- ============================================================== -->
<div class="container-fluid" id="page-content">
{{ template "content" . }}
</div>
<!-- End Page Content -->
</div>
<!-- End of Main Content -->
<!-- ============================================================== -->
<!-- Footer -->
<!-- ============================================================== -->
<footer class="bg-white mt-5 pt-5">
<div class="container mt-5 pt-5">
<div class="row">
<div class="col-sm-9 col-lg-6 mb-7">
<a class="d-inline-flex align-items-center mb-3" href="/" aria-label="Startup Venture Studio">
<img src="https://dzuyel7n94hma.cloudfront.net/venturestudio/img/geeks-venture-startup-studio-software-alaska-icon-200x150.png?v=1564780012" height="100" alt="Startup Venture Studio Building and Investing in Software Startups"></a>
<p class="small text-white-70">Our Startup Studio partners with entrepreneurs to create global software-as-a-service (SaaS) startups from Alaska.</p>
</div>
<div class="col-6 col-sm-6 col-lg-3 ml-lg-auto mb-4">
<h3 class="h6 text-white">Build &amp; Invest</h3>
<ul class="list-unstyled">
<li><a href="/">Home</a></li>
<li><a href="/features">Features</a></li>
<li><a href="/support">Support</a></li>
<li><a href="/api">API</a></li>
</ul>
</div>
<div class="col-6 col-sm-6 col-lg-3 mb-4">
<h3 class="h6 text-white">Startup Studio</h3>
<ul class="list-unstyled">
<li><a href="/legal/privacy">Privacy Policy</a></li>
<li><a href="/legal/terms">Terms of Service</a></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-sm-6 mb-5">
<ul class="list-inline mb-0">
<li class="list-inline-item"><a class="btn btn-sm btn-icon btn-secondary" href="https://www.linkedin.com/company/geeks-accelerator"><span class="fab fa-linkedin-in"></span></a></li>
<li class="list-inline-item"><a class="btn btn-sm btn-icon btn-secondary" href="https://gitlab.com/geeks-accelerator"><span class="fab fa-gitlab"></span></a></li>
</ul>
</div>
<div class="col-sm-6 text-sm-right">
<p class="small text-white-70 mb-0">&copy; Copyright 2019 Geeks Accelerator.</p>
</div>
</div>
<div class="row align-items-center">
<div class="col-sm-6 mb-5">
{{ template "partials/buildinfo" . }}
</div>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<!-- ============================================================== -->
<!-- Javascript Bootstrap core JavaScript -->
<!-- ============================================================== -->
<script src="{{ SiteAssetUrl "/assets/vendor/jquery/jquery.min.js" }}"></script>
<script src="{{ SiteAssetUrl "/assets/vendor/bootstrap/js/bootstrap.bundle.min.js" }}"></script>
<!-- ============================================================== -->
<!-- Core plugin JavaScript -->
<!-- ============================================================== -->
<script src="{{ SiteAssetUrl "/assets/vendor/jquery-easing/jquery.easing.min.js" }}"></script>
<!-- ============================================================== -->
<!-- Javascript for Start Bootstrap template SB Admin 2 -->
<!-- ============================================================== -->
{{ if eq $._Service.ENV "dev" }}
<script src="{{ SiteAssetUrl "/assets/js/sb-admin-2.js" }}"></script>
{{ else }}
<script src="{{ SiteAssetUrl "/assets/js/sb-admin-2.min.js" }}"></script>
{{ end }}
<!-- ============================================================== -->
<!-- Page specific Javascript -->
<!-- ============================================================== -->
{{block "js" .}} {{end}}
</body>
</html>
{{end}}
\ No newline at end of file
{{ define "partials/buildinfo" }}
<p style="{{if eq ._Service.ENV "prod"}}display: none;{{end}}">
<p style="font-size: 12px;{{if eq ._Service.ENV "prod"}}display: none;{{end}}">
{{if ne ._Service.BuildInfo.CiCommitTag ""}}
Tag: {{ ._Service.BuildInfo.CiCommitRefName }}@{{ ._Service.BuildInfo.CiCommitSha }}<br/>
{{else}}
......
......@@ -43,7 +43,7 @@
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>
Copyright &copy; Geeks Accelerator 2019<br/>
&copy; Copyright 2019 Geeks Accelerator<br/>
{{ template "partials/buildinfo" . }}
</span>
</div>
......
{{ define "partials/site-topbar" }}
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-dark bg-primary topbar mb-4 static-top shadow">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav justify-content-center" style="justify-content: center!important;float:right;">
<li class="nav-item">
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/features">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/support">Support</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/api">API</a>
</li>
</div>
</nav>
<!-- End of Topbar -->
{{ end }}
\ No newline at end of file
......@@ -71,6 +71,7 @@ github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/schema v1.1.0 h1:CamqUDOFUBqzrvxuz2vEwo8+SUdwsluFh7IlzJh30LY=
github.com/gorilla/schema v1.1.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU=
github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYbQ=
github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
......@@ -130,6 +131,7 @@ github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sethgrid/pester v0.0.0-20190127155807-68a33a018ad0 h1:X9XMOYjxEfAYSy3xK1DzO5dMkkWhs9E9UCcS1IERx2k=
github.com/sethgrid/pester v0.0.0-20190127155807-68a33a018ad0/go.mod h1:Ad7IjTpvzZO8Fl0vh9AzQ+j/jYZfyp2diGwI8m5q+ns=
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 h1:pntxY8Ary0t43dCZ5dqY4YTJCObLY1kIXl0uzMv+7DE=
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment