Core

/views/Debug.html (481 B)

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{% import (
"{{{ .Package }}}/app"
"{{{ .Package }}}/app/controller/cutil"
"{{{ .Package }}}/views/components"
"{{{ .Package }}}/views/layout"
) %}

{% code type Debug struct { layout.Basic } %}

{% func (p *Debug) Body(as *app.State, ps *cutil.PageState) %}
<div class="card">
<h3>{%s ps.Title %}</h3>
{%- if s, ok := ps.Data.(string); ok -%}
<pre>{%s s %}</pre>
{%- else -%}
{%s= components.JSON(ps.Data) %}
{%- endif -%}
</div>
{% endfunc %}