mirror of
				https://github.com/labstack/echo.git
				synced 2025-10-30 23:57:38 +02:00 
			
		
		
		
	| @@ -1,2 +1,2 @@ | ||||
| build: | ||||
| 	rm -rf public/v3 && hugo | ||||
| 	rm -rf public && hugo | ||||
|   | ||||
| @@ -4,39 +4,11 @@ | ||||
|   "title": "Echo - Fast and unfancy HTTP server framework for Go (Golang)", | ||||
|   "canonifyurls": true, | ||||
|   "googleAnalytics": "UA-85059636-2", | ||||
|   "publishdir": "public/v3", | ||||
|   "permalinks": { | ||||
|     "guide": "/guide/:filename", | ||||
|     "middleware": "/middleware/:filename", | ||||
|     "recipes": "/recipes/:filename" | ||||
|   }, | ||||
|   "menu": { | ||||
|     "side": [{ | ||||
|       "name": "Guide", | ||||
|       "pre": "<i class='fa fa-book'></i>", | ||||
|       "weight": 1, | ||||
|       "identifier": "guide", | ||||
|       "url": "guide" | ||||
|     },{ | ||||
|       "name": "Middleware", | ||||
|       "pre": "<i class='fa fa-filter'></i>", | ||||
|       "weight": 1, | ||||
|       "identifier": "middleware", | ||||
|       "url": "middleware" | ||||
|     }, { | ||||
|       "name": "Recipes", | ||||
|       "pre": "<i class='fa fa-code'></i>", | ||||
|       "weight": 2, | ||||
|       "identifier": "recipes", | ||||
|       "url": "recipes" | ||||
|     }, { | ||||
|       "name": "Godoc", | ||||
|       "pre": "<i class='fa fa-file-text-o'></i>", | ||||
|       "weight": 3, | ||||
|       "identifier": "godoc", | ||||
|       "url": "godoc" | ||||
|     }] | ||||
|   }, | ||||
|   "params": { | ||||
|     "image": "https://echo.labstack.com/images/logo.png", | ||||
|     "description": "Echo is a high performance, extensible, minimalist web framework for Go (Golang)." | ||||
|   | ||||
							
								
								
									
										11
									
								
								website/content/godoc.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								website/content/godoc.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| +++ | ||||
| title = "Godoc" | ||||
| description = "Godoc" | ||||
| type = "godoc" | ||||
| [menu.main] | ||||
|   name = "Godoc" | ||||
|   pre = "<i class='fa fa-file-text-o'></i>" | ||||
|   weight = 3 | ||||
|   identifier = "godoc" | ||||
|   url = "/godoc" | ||||
| +++ | ||||
| @@ -1,6 +1,6 @@ | ||||
| +++ | ||||
| title = "echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "echo" | ||||
|   parent = "godoc" | ||||
|   weight = 1 | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| +++ | ||||
| title = "middleware" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "middleware" | ||||
|   identifier = "godoc-middleware" | ||||
|   parent = "godoc" | ||||
|   | ||||
| @@ -2,6 +2,12 @@ | ||||
| title = "Guide" | ||||
| description = "Guide" | ||||
| type = "guide" | ||||
| [menu.main] | ||||
|   name = "Guide" | ||||
|   pre = "<i class='fa fa-book'></i>" | ||||
|   weight = 1 | ||||
|   identifier = "guide" | ||||
|   url = "/guide" | ||||
| +++ | ||||
|  | ||||
| ## Quick Start | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Context" | ||||
| description = "Context in Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Context" | ||||
|   identifier = "context" | ||||
|   parent = "guide" | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Cookies" | ||||
| description = "Handling cookie in Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Cookies" | ||||
|   parent = "guide" | ||||
|   weight = 6 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Customization" | ||||
| description = "Customizing Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Customization" | ||||
|   parent = "guide" | ||||
|   weight = 3 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Error Handling" | ||||
| description = "Error handling in Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Error Handling" | ||||
|   parent = "guide" | ||||
|   weight = 8 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "FAQ" | ||||
| description = "Frequently asked questions in Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "FAQ" | ||||
|   parent = "guide" | ||||
|   weight = 20 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Installation" | ||||
| description = "Installing Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Installation" | ||||
|   parent = "guide" | ||||
|   weight = 1 | ||||
| @@ -15,7 +15,7 @@ $ go get -u github.com/labstack/echo | ||||
|  | ||||
| > Ideally you should rely on a [package manager](https://github.com/avelino/awesome-go#package-management) like glide or govendor to use a specific [version](https://github.com/labstack/echo/releases) of Echo. | ||||
|  | ||||
| ### [Migrating Guide](/guide/migration) | ||||
| ## [Migrating Guide](/guide/migration) | ||||
|  | ||||
| Echo follows [semantic versioning](http://semver.org) managed through GitHub releases. | ||||
| Specific version of Echo can be installed using a [package manager](https://github.com/avelino/awesome-go#package-management). | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Migration" | ||||
| description = "Migration" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Migration" | ||||
|   parent = "guide" | ||||
|   weight = 2 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Request" | ||||
| description = "Handling HTTP request in Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Request" | ||||
|   parent = "guide" | ||||
|   weight = 6 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Routing" | ||||
| description = "Routing HTTP request in Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Routing" | ||||
|   parent = "guide" | ||||
|   weight = 4 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Static Files" | ||||
| description = "Serving static files in Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Static Files" | ||||
|   parent = "guide" | ||||
|   weight = 3 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Templates" | ||||
| description = "How to use templates in Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Templates" | ||||
|   parent = "guide" | ||||
|   weight = 3 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Testing" | ||||
| description = "Testing handler and middleware in Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Testing" | ||||
|   parent = "guide" | ||||
|   weight = 9 | ||||
|   | ||||
| @@ -2,6 +2,12 @@ | ||||
| title = "Middleware" | ||||
| description = "Middleware" | ||||
| type = "middleware" | ||||
| [menu.main] | ||||
|   name = "Middleware" | ||||
|   pre = "<i class='fa fa-filter'></i>" | ||||
|   weight = 2 | ||||
|   identifier = "middleware" | ||||
|   url = "/middleware" | ||||
| +++ | ||||
|  | ||||
| ## Overview | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "BasicAuth Middleware" | ||||
| description = "Basic auth middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "BasicAuth" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "BodyLimit Middleware" | ||||
| description = "Body limit middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "BodyLimit" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "CORS Middleware" | ||||
| description = "CORS middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "CORS" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "CSRF Middleware" | ||||
| description = "CSRF middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "CSRF" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Gzip Middleware" | ||||
| description = "Gzip middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Gzip" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "JWT Middleware" | ||||
| description = "JWT middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "JWT" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Logger Middleware" | ||||
| description = "Logger middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Logger" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "MethodOverride Middleware" | ||||
| description = "Method override middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "MethodOverride" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Recover Middleware" | ||||
| description = "Recover middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Recover" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Redirect Middleware" | ||||
| description = "Redirect middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Redirect" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Secure Middleware" | ||||
| description = "Secure middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Secure" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "TrailingSlash Middleware" | ||||
| description = "Trailing slash middleware for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "TrailingSlash" | ||||
|   parent = "middleware" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -2,6 +2,12 @@ | ||||
| title = "Recipes" | ||||
| description = "Recipes" | ||||
| type = "recipes" | ||||
| [menu.main] | ||||
|   name = "Recipes" | ||||
|   pre = "<i class='fa fa-code'></i>" | ||||
|   weight = 2 | ||||
|   identifier = "recipes" | ||||
|   url = "/recipes" | ||||
| +++ | ||||
|  | ||||
| ## Echo Examples | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "CORS Example" | ||||
| description = "CORS example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "CORS" | ||||
|   identifier = "cors-middleware" | ||||
|   parent = "recipes" | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "CRUD Example" | ||||
| description = "CRUD (Create, read, update and delete) example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "CRUD" | ||||
|   parent = "recipes" | ||||
|   weight = 2 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Embed Resources Example" | ||||
| description = "Embed resources example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Embed Resources" | ||||
|   parent = "recipes" | ||||
|   weight = 14 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "File Upload Example" | ||||
| description = "File upload example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "File Upload" | ||||
|   parent = "recipes" | ||||
|   weight = 7 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Google App Engine Example" | ||||
| description = "Google App Engine example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Google App Engine" | ||||
|   parent = "recipes" | ||||
|   weight = 12 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Graceful Shutdown Example" | ||||
| description = "Graceful shutdown example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Graceful Shutdown" | ||||
|   parent = "recipes" | ||||
|   weight = 13 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Hello World Example" | ||||
| description = "Hello world example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Hello World" | ||||
|   parent = "recipes" | ||||
|   weight = 1 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "HTTP/2 Example" | ||||
| description = "HTTP/2 example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "HTTP/2" | ||||
|   parent = "recipes" | ||||
|   weight = 3 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "JSONP Example" | ||||
| description = "JSONP example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "JSONP" | ||||
|   parent = "recipes" | ||||
|   weight = 6 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "JWT Example" | ||||
| description = "JWT example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "JWT" | ||||
|   identifier = "jwt-recipe" | ||||
|   parent = "recipes" | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Middleware Example" | ||||
| description = "Middleware example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Middleware" | ||||
|   parent = "recipes" | ||||
|   weight = 3 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Streaming Response Example" | ||||
| description = "Streaming response example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Streaming Response" | ||||
|   parent = "recipes" | ||||
|   weight = 3 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "Subdomains Example" | ||||
| description = "Subdomains example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "Subdomains" | ||||
|   parent = "recipes" | ||||
|   weight = 10 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| +++ | ||||
| title = "WebSocket Example" | ||||
| description = "WebSocket example for Echo" | ||||
| [menu.side] | ||||
| [menu.main] | ||||
|   name = "WebSocket" | ||||
|   parent = "recipes" | ||||
|   weight = 5 | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| +++ | ||||
| title = "Support Echo" | ||||
| description = "Support Echo" | ||||
| type = "single" | ||||
| +++ | ||||
|  | ||||
| <p> | ||||
|   | ||||
| @@ -1,9 +1,8 @@ | ||||
| {{ partial "head.html" . }} | ||||
| <body> | ||||
| 	{{ partial "navbar.html" . }} | ||||
| 	{{ partial "topnav.html" . }} | ||||
| 	{{ partial "sidenav.html" . }} | ||||
| 	{{ partial "search.html" . }} | ||||
| 	<div class="w3-main w3-padding-64"> | ||||
|   <div class="w3-main w3-padding-64"> | ||||
| 		{{ partial "ad.html" }} | ||||
| 	  <div class="w3-row-padding"> | ||||
| 			<div class="w3-col m9 l9"> | ||||
| @@ -14,7 +13,7 @@ | ||||
|             {{ .Content }} | ||||
|           </section> | ||||
|           <footer> | ||||
|             <div class="w3-panel w3-pale-yellow w3-leftbar w3-border-yellow"> | ||||
|             <div class="w3-panel w3-pale-blue w3-leftbar w3-border-blue"> | ||||
|               <p> | ||||
|                 <i class="fa fa-pencil" aria-hidden="true"></i> | ||||
|                 <a href="https://github.com/labstack/echo/blob/master/website/content/{{ .File.Path }}"> | ||||
|   | ||||
| @@ -1,8 +1,10 @@ | ||||
| {{ partial "head.html" . }} | ||||
| <body> | ||||
| 	{{ partial "navbar.html" . }} | ||||
| 	{{ partial "search.html" . }} | ||||
| 	<div class="w3-content w3-padding-64"> | ||||
| 	{{ partial "topnav.html" . }} | ||||
|   <div class="w3-hide-large"> | ||||
|     {{ partial "sidenav.html" . }} | ||||
|   </div> | ||||
| 	<div class="w3-container w3-content w3-padding-64"> | ||||
| 		{{ partial "ad.html" }} | ||||
| 	  <div class="w3-row-padding"> | ||||
| 			<div class="w3-col m9 l9"> | ||||
|   | ||||
| @@ -20,16 +20,13 @@ | ||||
|     </a> | ||||
|   </p> | ||||
| </footer> | ||||
| <script type="text/javascript" src="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script> | ||||
| <script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script> | ||||
| <script type="text/javascript"> | ||||
|   docsearch({ | ||||
|     apiKey: '69dfc65b57ccba29ec34b68aa5b274ed', | ||||
|     indexName: 'labstack', | ||||
|     inputSelector: '#search-box', | ||||
|     autocompleteOptions: { | ||||
|       dropdownMenuContainer: '#search-menu' | ||||
|     } | ||||
|   }); | ||||
| docsearch({ | ||||
|   apiKey: '69dfc65b57ccba29ec34b68aa5b274ed', | ||||
|   indexName: 'labstack', | ||||
|   inputSelector: '#search-box' | ||||
| }); | ||||
| </script> | ||||
| <script src="https://cdn.labstack.com/scripts/prism.js"></script> | ||||
| <script src="https://cdn.labstack.com/scripts/doc.js"></script> | ||||
|   | ||||
| @@ -19,7 +19,7 @@ | ||||
|     {{ 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.jsdelivr.net/docsearch.js/2/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"> | ||||
|   | ||||
| @@ -1,14 +0,0 @@ | ||||
| <nav class="navbar"> | ||||
|   <a href="/"><img class="logo" src="/images/logo.png" alt="Echo"></a> | ||||
|   <span class="w3-hide-small w3-hide-medium"> | ||||
|     <input id="search-box" type="text" class="w3-input" placeholder="Search..."> | ||||
|     <i class="fa fa-search"></i> | ||||
|   </span> | ||||
|   <span class="links"> | ||||
|     <a href="/guide">Guide</a> | ||||
|     <a href="/middleware">Middleware</a> | ||||
|     <a href="/recipes">Recipes</a> | ||||
|     </ul> | ||||
|   </span> | ||||
|   <span class="w3-xxlarge w3-hide-large" onclick="openSidenav()">☰</span> | ||||
| </nav> | ||||
| @@ -1 +0,0 @@ | ||||
| <div id="search-menu"></div> | ||||
| @@ -2,23 +2,27 @@ | ||||
|   <span class="w3-closenav w3-xxlarge w3-hide-large" onclick="closeSidenav()"> | ||||
|     × | ||||
|   </span> | ||||
|   <a class="support w3-btn w3-white w3-border w3-border-theme w3-round-xlarge" href="/support-echo"> | ||||
|   <a class="w3-btn w3-white w3-border w3-border-theme w3-round-xlarge support-us" href="/support-echo"> | ||||
|     <i class="fa fa-heart" aria-hidden="true"></i> Support Echo | ||||
|   </a> | ||||
|   {{ $currentNode := . }} | ||||
|   {{ range where .Site.Menus.side "Identifier" .Type }} | ||||
|     <h3>{{ .Pre }} {{ .Name }}</h3> | ||||
|       {{ range .Children }} | ||||
|         <a{{ if $currentNode.IsMenuCurrent "side" . }} class="active"{{ end }} href="{{ .URL }}"> | ||||
|           {{ .Name }} | ||||
|         </a> | ||||
|         {{ if .HasChildren }} | ||||
|           {{ range .Children }} | ||||
|             <a {{ if $currentNode.IsMenuCurrent "side" . }} class="active"{{ end }} href="{{ .URL }}"> | ||||
|               {{ .Name }} | ||||
|             </a> | ||||
|           {{ end }} | ||||
|   <div class="w3-hide-large menu"> | ||||
|     {{ 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> | ||||
|       </a> | ||||
|     {{ end }} | ||||
|   </div> | ||||
|   <div class="sub-menu"> | ||||
|     {{ if .IsPage }} | ||||
|       {{ range where .Site.Menus.main "Identifier" .Type }} | ||||
|         <div class="w3-xlarge w3-padding-top">{{ .Pre }} {{ .Name }}</div> | ||||
|         {{ range .Children }} | ||||
|           <a{{ if $currentNode.IsMenuCurrent "main" . }} class="active"{{ end }} href="{{ .URL }}"> | ||||
|             {{ .Name }} | ||||
|           </a> | ||||
|         {{ end }} | ||||
|       {{ end }} | ||||
|   {{ end }} | ||||
|   </div> | ||||
| </nav> | ||||
|   | ||||
							
								
								
									
										14
									
								
								website/layouts/partials/topnav.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								website/layouts/partials/topnav.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| <nav class="topnav"> | ||||
|   <a href="/"><img class="logo" src="/images/logo.png" alt="Echo"></a> | ||||
|   <span class="w3-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"> | ||||
|     {{ $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()">☰</span> | ||||
| </nav> | ||||
							
								
								
									
										14
									
								
								website/layouts/single/single.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								website/layouts/single/single.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| {{ partial "head.html" . }} | ||||
| <body> | ||||
| 	{{ partial "topnav.html" . }} | ||||
| 	<div class="w3-container w3-content w3-padding-64"> | ||||
| 	  <div class="w3-row-padding"> | ||||
| 			<div class="w3-col m9 l9"> | ||||
|         <h1>{{ .Title }}</h1> | ||||
|         {{ .Content }} | ||||
| 			</div> | ||||
| 	  </div> | ||||
| 	</div> | ||||
| 	{{ partial "footer.html" . }} | ||||
| </body> | ||||
| </html> | ||||
| @@ -1,8 +1 @@ | ||||
| .navbar .links a { | ||||
|   text-decoration: none; | ||||
|   color: inherit; | ||||
|   margin-left: 12px; | ||||
| } | ||||
| .navbar .links a:hover { | ||||
|   border-bottom: 4px solid #00AFD1; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user