added controls for the auto-refresh tag in the page header, which was the ONLY use for the metadata mechanism in Venice...
This commit is contained in:
@@ -48,6 +48,7 @@ func (*AmCLI) Version() string {
|
||||
type AmConfig struct {
|
||||
Site struct {
|
||||
Title string `yaml:"title"`
|
||||
TopRefresh int `yaml:"topRefresh"`
|
||||
} `yaml:"site"`
|
||||
Database struct {
|
||||
Driver string `yaml:"driver"`
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#
|
||||
site:
|
||||
title: "Amsterdam Web Communities System"
|
||||
topRefresh: 300
|
||||
database:
|
||||
driver: "mysql"
|
||||
dsn: "amsdb:x00yes2k@tcp(localhost)/amsterdam?parseTime=true&loc=Local"
|
||||
|
||||
@@ -138,8 +138,10 @@ func TopPage(ctxt ui.AmContext) (string, any, error) {
|
||||
return "string", "Unable to render sideboxes", err
|
||||
}
|
||||
}
|
||||
|
||||
ctxt.VarMap().Set("sideboxes", rc)
|
||||
|
||||
// Final data set.
|
||||
ctxt.VarMap().Set("amsterdam_genRefresh", true)
|
||||
return "framed_template", "top.jet", nil
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -14,7 +14,9 @@
|
||||
<title>{{ amsterdam_pageTitle }} - {{ GlobalConfig.Site.Title }}</title>
|
||||
<link rel="icon" href="/img/builtin/AmsterdamIcon32.png" type="image/png" />
|
||||
<link rel="shortcut icon" href="/img/builtin/AmsterdamIcon32.ico" />
|
||||
<meta http-equiv="refresh" content="300">
|
||||
{{ if isset(amsterdam_genRefresh) && GlobalConfig.Site.TopRefresh > 0 }}
|
||||
<meta http-equiv="refresh" content="{{ GlobalConfig.Site.TopRefresh }}">
|
||||
{{ end }}
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user