Skip to content

Instantly share code, notes, and snippets.

@iammuho
Created December 13, 2019 11:58
Show Gist options
  • Save iammuho/830de2b7115dd1b4bf7c206fece0bb98 to your computer and use it in GitHub Desktop.
Save iammuho/830de2b7115dd1b4bf7c206fece0bb98 to your computer and use it in GitHub Desktop.
{% interface
Base {
CSS()
JS()
Title()
Body()
}
%}
{% func BaseLayout(b Base) %}
<!DOCTYPE html>
<html lang="en">
<!-- begin::Head -->
<head>
<base href="">
<meta charset="utf-8" />
<title>{%= b.Title() %} | Muhammet Arslan</title>
<meta name="description" content="Latest updates and statistic charts">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{%= b.CSS() %}
</head>
<!-- end::Head -->
<!-- begin::Body -->
<body>
{%= b.Body() %}
</body>
{%= b.JS() %}
{% endfunc %}
{% import "github.com/valyala/fasthttp" %}
{% code
type IndexPage struct {
CTX *fasthttp.RequestCtx
}
%}
{% func (p *IndexPage) CSS() %} {% endfunc %}
{% func (p *IndexPage) Title() %} HomePage {% endfunc %}
{% func (p *IndexPage) Body() %}
Muhammet Arslan
{% endfunc %}
{% func (p *IndexPage) JS() %} {% endfunc %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment