From fbce3daade239d34a70a47b9463829211b9b6cc6 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Mon, 31 Oct 2016 22:03:34 -0700 Subject: [PATCH] updated website Signed-off-by: Vishal Rana --- website/content/guide/error-handling.md | 9 +- website/layouts/_default/single.html | 2 +- website/layouts/index.html | 2 +- website/layouts/partials/footer.html | 4 +- website/layouts/partials/head.html | 50 +++-- website/layouts/partials/sidenav.html | 2 +- website/static/scripts/echo.js | 37 ---- website/static/scripts/prism.js | 9 - website/static/styles/main.css | 256 ------------------------ website/static/styles/prism.css | 123 ------------ 10 files changed, 38 insertions(+), 456 deletions(-) delete mode 100644 website/static/scripts/echo.js delete mode 100644 website/static/scripts/prism.js delete mode 100644 website/static/styles/prism.css diff --git a/website/content/guide/error-handling.md b/website/content/guide/error-handling.md index 7aa5448f..ab9c054c 100644 --- a/website/content/guide/error-handling.md +++ b/website/content/guide/error-handling.md @@ -25,19 +25,20 @@ import ( "net/http" "github.com/labstack/echo" + "github.com/labstack/echo/engine/standard" ) func main() { e := echo.New() - e.Use(func(c echo.Context) error { + e.Use(echo.WrapMiddleware(func(c echo.Context) error { // Extract the credentials from HTTP request header and perform a security // check // For invalid credentials return echo.NewHTTPError(http.StatusUnauthorized) - }) - e.GET("/welcome", welcome) - e.Run(":1323") + })) + e.GET("/", welcome) + e.Run(standard.New(":1323")) } func welcome(c echo.Context) error { diff --git a/website/layouts/_default/single.html b/website/layouts/_default/single.html index a251d929..059a88aa 100644 --- a/website/layouts/_default/single.html +++ b/website/layouts/_default/single.html @@ -3,7 +3,7 @@ {{ partial "navbar.html" . }} {{ partial "sidenav.html" . }} {{ partial "search.html" . }} -
+
{{ partial "ad.html" }}
diff --git a/website/layouts/index.html b/website/layouts/index.html index d4474254..8123ee1b 100644 --- a/website/layouts/index.html +++ b/website/layouts/index.html @@ -3,7 +3,7 @@ {{ partial "navbar.html" . }} {{ partial "sidenav.html" . }} {{ partial "search.html" . }} -
+
{{ partial "ad.html" }}
diff --git a/website/layouts/partials/footer.html b/website/layouts/partials/footer.html index 0149bbb2..15b30a4c 100644 --- a/website/layouts/partials/footer.html +++ b/website/layouts/partials/footer.html @@ -39,5 +39,5 @@ --> {{ template "_internal/google_analytics_async.html" . }} - - + + diff --git a/website/layouts/partials/head.html b/website/layouts/partials/head.html index 50e564c0..6808ae7d 100644 --- a/website/layouts/partials/head.html +++ b/website/layouts/partials/head.html @@ -1,22 +1,28 @@ - - - - - - - - - - - - - - - - {{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }} - - - - - - + + + + + + + + + + + + + + + + + + + {{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }} + + + + + + + + + diff --git a/website/layouts/partials/sidenav.html b/website/layouts/partials/sidenav.html index bb98e7a1..1647eb72 100644 --- a/website/layouts/partials/sidenav.html +++ b/website/layouts/partials/sidenav.html @@ -1,4 +1,4 @@ -