frontend: Rework asset generation
This commit reworks frontend asset generation to not need manually written html files, but instead generate them automatically.
This commit is contained in:
parent
ebdbe9fabd
commit
ccab2883a6
42 changed files with 408 additions and 177 deletions
|
|
@ -13,7 +13,6 @@
|
|||
<p>
|
||||
<a class="pure-button" href="/dis/index">Control</a> >
|
||||
<a class="pure-button pure-button-primary" href="/dis/instance/{{ .Info.Slug }}">Instance</a>
|
||||
|
||||
</p>
|
||||
</header>
|
||||
|
||||
|
|
@ -79,7 +78,7 @@
|
|||
<tr>
|
||||
<th colspan="2">
|
||||
Build
|
||||
<button class="remote-action pure-button pure-button-action" data-action="rebuild" data-param="{{ .Instance.Slug }}" data-buffer="1000">Rebuild</button>
|
||||
<button class="remote-action pure-button pure-button-action" data-action="rebuild" data-param="{{ .Instance.Slug }}" data-buffer="1000" data-force-reload="true">Rebuild</button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -255,7 +254,7 @@
|
|||
<div class="pure-u-1-1">
|
||||
<h2 id="snapshots">Snapshots</h2>
|
||||
<p>
|
||||
<button class="remote-action pure-button pure-button-action" data-action="snapshot" data-param="{{ .Instance.Slug }}" data-buffer="1000">Take a snapshot</button>
|
||||
<button class="remote-action pure-button pure-button-action" data-action="snapshot" data-param="{{ .Instance.Slug }}" data-buffer="1000" data-force-reload="true">Take a snapshot</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import (
|
|||
|
||||
//go:embed "html/index.html"
|
||||
var indexTemplateStr string
|
||||
var indexTemplate = static.EntryControlIndex.MustParse(indexTemplateStr)
|
||||
var indexTemplate = static.AssetsControlIndex.MustParse(indexTemplateStr)
|
||||
|
||||
type indexPageContext struct {
|
||||
Time time.Time
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
|
||||
//go:embed "html/instance.html"
|
||||
var instanceTemplateString string
|
||||
var instanceTemplate = static.EntryControlInstance.MustParse(instanceTemplateString)
|
||||
var instanceTemplate = static.AssetsControlInstance.MustParse(instanceTemplateString)
|
||||
|
||||
type instancePageContext struct {
|
||||
Time time.Time
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue