1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

updated website

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-11-05 12:35:33 -07:00
parent 97bf17556c
commit c0822c0427
9 changed files with 42 additions and 464 deletions

View File

@ -29,19 +29,21 @@ import (
func main() {
e := echo.New()
e.Use(func(handler echo.HandlerFunc) echo.HandlerFunc {
// Extract the credentials from HTTP request header and perform a security
// check
// For invalid credentials
e.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
return 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)
// For valid credentials call next
// return next(c)
}
})
e.GET("/welcome", welcome)
e.GET("/", welcome)
if err := e.Start(":1323"); err != nil {
e.Logger.Fatal(err.Error())
e.Logger.Fatal(err)
}
}

View File

@ -3,7 +3,7 @@
{{ partial "navbar.html" . }}
{{ partial "sidenav.html" . }}
{{ partial "search.html" . }}
<div class="w3-main w3-padding-128">
<div class="w3-main w3-padding-64">
{{ partial "ad.html" }}
<div class="w3-row-padding">
<div class="w3-col m9 l9">

View File

@ -3,7 +3,7 @@
{{ partial "navbar.html" . }}
{{ partial "sidenav.html" . }}
{{ partial "search.html" . }}
<div class="w3-main w3-padding-128">
<div class="w3-main w3-padding-64">
{{ partial "ad.html" }}
<div class="w3-row-padding">
<div class="w3-col m9 l9">

View File

@ -39,5 +39,5 @@
</script> -->
<script async defer id="github-bjs" src="//buttons.github.io/buttons.js"></script>
{{ template "_internal/google_analytics_async.html" . }}
<script src="{{ .Site.BaseURL }}/scripts/prism.js"></script>
<script src="{{ .Site.BaseURL }}/scripts/echo.js"></script>
<script src="https://cdn.labstack.com/scripts/prism.js"></script>
<script src="https://cdn.labstack.com/scripts/doc.js"></script>

View File

@ -1,22 +1,28 @@
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="{{ .Description }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@echo">
<meta name="twitter:title" content="{{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }}">
<meta name="twitter:description" content="{{ .Description }}">
<meta name="twitter:image" content="{{ .Site.Params.image }}">
<meta property="og:title" content="{{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }}">
<meta property="og:site_name" content="echo">
<meta property="og:og:description" content="{{ .Description }}">
<meta property="og:url" content="{{ .Site.BaseURL }}">
<meta property="og:image" content="{{ .Site.Params.image }}">
<title>
{{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }}
</title>
<link rel="stylesheet" href="https://unpkg.com/font-awesome@4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css">
<link rel="stylesheet" href="https://cdn.labstack.com/css/w3.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/styles/prism.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/styles/main.css">
<!doctype html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="{{ .Description }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@echo">
<meta name="twitter:title" content="{{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }}">
<meta name="twitter:description" content="{{ .Description }}">
<meta name="twitter:image" content="{{ .Site.Params.image }}">
<meta property="og:title" content="{{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }}">
<meta property="og:site_name" content="echo">
<meta property="og:og:description" content="{{ .Description }}">
<meta property="og:url" content="{{ .Site.BaseURL }}">
<meta property="og:image" content="{{ .Site.Params.image }}">
<title>
{{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }}
</title>
<link rel="stylesheet" href="https://unpkg.com/font-awesome@4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css">
<link rel="stylesheet" href="https://cdn.labstack.com/styles/w3.css">
<link rel="stylesheet" href="https://cdn.labstack.com/styles/prism.css">
<link rel="stylesheet" href="https://cdn.labstack.com/styles/base.css">
<link rel="stylesheet" href="https://cdn.labstack.com/styles/doc.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/styles/main.css">
</head>

View File

@ -1,37 +0,0 @@
(function() {
// Add table class
var tables = document.getElementsByTagName('table');
for (var i = 0; i < tables.length; i++) {
var t = tables[i];
t.classList.add('w3-table-all');
}
// Add blockquote class
var blockquotes = document.getElementsByTagName('blockquote');
for (var i = 0; i < blockquotes.length; i++) {
var bq = blockquotes[i];
bq.classList.add('w3-panel');
bq.classList.add('w3-leftbar');
bq.classList.add('w3-light-grey');
}
// Add code class
var codes = document.getElementsByTagName('code');
for (var i = 0; i < codes.length; i++) {
var c = codes[i];
if (c.parentElement.nodeName !== 'PRE') {
c.classList.add('w3-codespan');
}
}
// Prism
Prism.languages.sh = Prism.languages.bash;
})();
function openSidenav() {
document.getElementById("sidenav").style.display = 'block';
}
function closeSidenav() {
document.getElementById("sidenav").style.display = 'none';
}

File diff suppressed because one or more lines are too long

View File

@ -1,261 +0,0 @@
a {
color: #c05b4d;
text-decoration: none
}
a:hover, a:focus {
color: #a5473a;
text-decoration: underline
}
textarea:focus, input:focus{
outline: none;
}
blockquote {
margin-left: 0;
}
/* Theme */
.w3-theme-l5 {color:#000 !important; background-color:#edfcff !important}
.w3-theme-l4 {color:#000 !important; background-color:#c3f5ff !important}
.w3-theme-l3 {color:#000 !important; background-color:#87ebff !important}
.w3-theme-l2 {color:#000 !important; background-color:#4ae1ff !important}
.w3-theme-l1 {color:#fff !important; background-color:#0ed7ff !important}
.w3-theme-d1 {color:#fff !important; background-color:#009dbc !important}
.w3-theme-d2 {color:#fff !important; background-color:#008ba7 !important}
.w3-theme-d3 {color:#fff !important; background-color:#007a92 !important}
.w3-theme-d4 {color:#fff !important; background-color:#00697d !important}
.w3-theme-d5 {color:#fff !important; background-color:#005769 !important}
.w3-theme-light {color:#000 !important; background-color:#edfcff !important}
.w3-theme-dark {color:#fff !important; background-color:#005769 !important}
.w3-theme-action {color:#fff !important; background-color:#005769 !important}
.w3-theme {color:#fff !important; background-color:#00afd1 !important}
.w3-text-theme {color:#00afd1 !important}
.w3-border-theme {border-color:#00afd1 !important}
.w3-hover-theme:hover {color:#fff !important; background-color:#00afd1 !important}
.w3-hover-text-theme {color:#00afd1 !important}
.w3-hover-border-theme:hover {border-color:#00afd1 !important}
.w3-navbar {
z-index: 2;
/*padding: 0 16px;
padding-top: 8px;*/
}
.w3-sidenav {
width: 250px;
padding: 72px 32px 32px;
}
.w3-sidenav a {
color: #000;
}
.w3-main {
margin-left: 250px;
padding: 0 16px;
}
.navbar {
top: 0;
position: fixed;
z-index: 2;
background: #FFF;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 32px;
border-bottom: 1px solid #F1F1F1;
}
.logo {
height: 30px;
}
/* Footer */
.footer {
color: grey;
font-weight: 300;
border-top: 1px solid #F1F1F1;
}
a.icon {
text-decoration: none;
}
.icon {
padding: 4px;
font-size: 20px;
}
.icon>i {
color: grey;
}
/* Gitter */
.gitter-open-chat-button {
background-color: #00AFD1;
transition: all .2s ease;
}
.gitter-open-chat-button:hover {
background-color: #009DBC;
}
/* Algolia */
/* http://vuejs.org/css/page.css */
.aa-dropdown-menu {
margin-top: 40px;
border-color: #999;
}
.algolia-docsearch-footer {
border-color: #DDD;
}
.algolia-docsearch-suggestion--subcategory-column {
border-color: #DDD;
}
.algolia-docsearch-suggestion--category-header {
background-color: #00AFD1;
}
.algolia-docsearch-suggestion--highlight {
color: #008BA7;
}
.algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--highlight {
background-color: #009DBC;
}
.aa-cursor .algolia-docsearch-suggestion--content {
color: #D44C70;
}
.aa-cursor .algolia-docsearch-suggestion {
background: #F5F5F5;
}
.w3-sidenav a:not(.active):hover {
background: #CCC;
color: #000;
}
.w3-sidenav a:hover,
.w3-sidenav .active {
background: #00AFD1;
color: #FFF;
}
#search-menu {
position: fixed !important;
top: 10%;
left: 25%;
}
.ad {
width: 130px;
position: fixed;
bottom: 8px;
right: 32px;
margin: 0;
font-size: 12px;
}
.ad a {
color: #7F8C8D;
}
#carbonads {
display: block;
overflow: hidden;
/*padding: 1em;*/
}
#carbonads span {
display: block;
overflow: hidden;
}
.carbon-img {
display: block;
margin: 0 auto 1em;
text-align: center;
}
.carbon-text {
display: block;
margin-bottom: 1em;
text-align: left;
}
.carbon-poweredby {
display: block;
text-align: right;
font-size: .8em;
}
@media (max-width: 600px) {
h1 {
font-size: 28px;
}
h2 {
font-size: 24px;
}
h3 {
font-size: 20px;
}
h4 {
font-size: 16px;
}
.ad {
position: relative;
width: 100%;
right: 0;
padding: 0 16px;
}
#carbonads span {
position: relative;
display: block;
overflow: hidden;
}
.carbon-img {
float: left;
margin-right: 1em;
}
.carbon-img img {
display: block;
}
.carbon-text {
display: block;
float: left;
max-width: calc(100% - 130px - 1em);
text-align: left;
}
.carbon-poweredby {
position: absolute;
right: 0;
bottom: 0;
display: block;
font-size: .8em;
}
}
a.support {
display: inline-block;
padding: 6px 16px;
}
/* Notice*/
.notice a {
color: inherit;
text-decoration: underline;
}
.notice a:hover, .notice a:focus {
color: inherit;
text-decoration: underline;
}

View File

@ -1,123 +0,0 @@
/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+bash+go&plugins=file-highlight */
/**
* okaidia theme for JavaScript, CSS and HTML
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
* @author ocodia
*/
code[class*="language-"],
pre[class*="language-"] {
color: #f8f8f2;
background: none;
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
border-radius: 0.3em;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #272822;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #f8f8f2;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
color: #f92672;
}
.token.boolean,
.token.number {
color: #ae81ff;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #a6e22e;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
color: #f8f8f2;
}
.token.atrule,
.token.attr-value,
.token.function {
color: #e6db74;
}
.token.keyword {
color: #66d9ef;
}
.token.regex,
.token.important {
color: #fd971f;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}