gosora/templates/panel_themes_widgets.html
Azareal 660f24acff Experimenting with Nox's Control Panel.
Experimenting with better cache busting for static resources.
HTTPSRedirect requests are now counted in the route analytics.
More scripts are loaded asynchronously now.
Upped the default ReadTimeout to eight seconds.
Reduce the number of unneccesary NewAcc calls.
Added panel_before_head as an injection point for themes.
Themes can now declare scripts to be loaded asynchronously.
Tweaked the WS resumption algorithm to mae the backoffs a little less aggressive.
Fixed an ordering issue in the WS resumption algorithm where backoffs weren't expiring as fast as they should have.
Fixed a bug where template logs weren't being written due to a panic.
You can now use byte slices in more places in the transpiled templates.
Fixed a bug where Cosora's misc.js seemed to be erroring out.
Fixed a bug where YT embeds were getting blocked by the CSP.

Added the panel_back_to_site phrase.
Added the panel_welcome phrase.
2019-03-22 08:59:41 +10:00

61 lines
2.5 KiB
HTML

{{/**
type Widget struct {
Enabled bool
Location string // Coming Soon: overview, topics, topic / topic_view, forums, forum, global
Position int
Body string
Side string
Type string
Literal bool
}
**/}}
{{template "header.html" . }}
<div class="colstack panel_stack">
{{template "panel_menu.html" . }}
<main class="colstack_right">
{{template "panel_before_head.html" . }}
<div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{lang "panel_themes_widgets_head"}}</h1></div>
</div>
{{range $name, $dock := .Docks}}
<div class="colstack_item colstack_head colstack_sub_head">
<div class="rowitem"><h2>{{$name}}</h2></div>
</div>
<div id="panel_widgets_{{$name}}" class="colstack_item rowlist panel_widgets">
{{range $widget := $dock}}
<div id="widget_{{$widget.ID}}" class="rowitem panel_compactrow editable_parent widget_item {{if not .Enabled}}bg_red{{end}}">
<div class="widget_normal editable_block hide_on_block_edit">
<a href="/panel/themes/widgets/edit/{{$widget.ID}}" class="panel_upshift">{{$widget.Type}} <span class="widget_disabled">({{lang "panel_themes_widgets_disabled"}})</span></a>
<a class="panel_compacttext to_right">{{$widget.Location}}</a>
</div>
<div class="widget_edit show_on_block_edit">
<form action="/panel/themes/widgets/edit/submit/{{$widget.ID}}" method="post">
<input class="wside" name="wside" value="{{$name}}" type="hidden" />
{{template "panel_themes_widgets_widget.html" $widget }}
</form>
</div>
</div>
{{end}}
<div class="rowitem panel_compactrow editable_parent widget_new">
<a href="#" data-dock="{{$name}}" class="editable_block panel_upshift">{{lang "panel_themes_widgets_new"}}</a>
</div>
</div>
{{end}}
<div id="widgetTmpl">
<div class="rowitem panel_compactrow editable_parent widget_item blank_widget bg_red">
<div class="widget_normal editable_block hide_on_block_edit">
<a href="#" class="panel_upshift">{{.BlankWidget.Type}} <span class="widget_disabled">({{lang "panel_themes_widgets_disabled"}})</span></a>
<a class="panel_compacttext to_right">{{.BlankWidget.Location}}</a>
</div>
<div class="widget_edit show_on_block_edit">
<form action="/panel/themes/widgets/create/submit/" method="post">
<input name="session" value="{{.CurrentUser.Session}}" type="hidden" />
<input class="wside" name="wside" value="" type="hidden" />
{{template "panel_themes_widgets_widget.html" .BlankWidget }}
</form>
</div>
</div>
</div>
</main>
</div>
{{template "footer.html" . }}