1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-01 22:09:21 +02:00

docs: updated

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-12-13 23:15:44 -08:00
parent fa280ce882
commit 561f15ccf1
4 changed files with 11 additions and 7 deletions

View File

@ -35,6 +35,10 @@ func(c echo.Context) error {
`Context#HTMLBlob(code int, b []byte)` can be used to send HTML blob with status
code. You may find it handy using with a template engine which outputs `[]byte`.
## Render Template
[Learn more](/guide/templates)
## Send JSON
`Context#JSON(code int, i interface{})` can be used to encode a provided Go type into

View File

@ -1,7 +1,7 @@
{{ partial "head.html" . }}
<body class="index">
{{ partial "topnav.html" . }}
<div class="w3-hide-large">
<div class="hide-large">
{{ partial "sidenav.html" . }}
</div>
<div class="w3-container w3-content main">

View File

@ -1,12 +1,12 @@
<nav id="sidenav" class="w3-sidenav w3-collapse w3-border-right">
<span class="w3-closenav w3-xxlarge w3-hide-large" onclick="closeSidenav()">
<nav id="sidenav" class="w3-sidenav w3-border-right collapse">
<span class="w3-closenav w3-xxlarge hide-large" onclick="closeSidenav()">
&times;
</span>
<button class="w3-btn w3-white w3-border w3-border-theme w3-round-xlarge" onclick="location.href='/support-echo';">
<i class="fa fa-heart" aria-hidden="true"></i> Support Echo
</button>
{{ $currentNode := . }}
<div class="w3-hide-large menu">
<div class="menu hide-large">
{{ range .Site.Menus.main }}
<a{{ if or ($currentNode.HasMenuCurrent "main" .) ($currentNode.IsMenuCurrent "main" .) }} class="active"{{ end }} href="{{ .URL }}">
<div class="w3-xlarge w3-padding-top">{{ .Name }}</div>

View File

@ -1,16 +1,16 @@
<div class="topnav">
<nav class="w3-content">
<a href="/"><img class="logo" src="/images/logo.png" alt="Echo"></a>
<span class="w3-hide-small">
<span class="hide-small">
<input id="search-box" type="text" class="w3-input" placeholder="Search...">
<i class="fa fa-search"></i>
</span>
<span class="w3-hide-small w3-hide-medium menu">
<span class="menu hide-small hide-medium">
{{ $currentNode := . }}
{{ range .Site.Menus.main }}
<a{{ if or ($currentNode.HasMenuCurrent "main" .) ($currentNode.IsMenuCurrent "main" .) }} class="active"{{ end }} href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</span>
<span class="w3-xxlarge w3-hide-large" onclick="openSidenav()">&#9776;</span>
<span class="w3-xxlarge hide-large" onclick="openSidenav()">&#9776;</span>
</nav>
</div>