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:
+2
-1
@@ -47,7 +47,8 @@ func (*AmCLI) Version() string {
|
|||||||
// AmConfig holds the configuration of the application as read from YAML.
|
// AmConfig holds the configuration of the application as read from YAML.
|
||||||
type AmConfig struct {
|
type AmConfig struct {
|
||||||
Site struct {
|
Site struct {
|
||||||
Title string `yaml:"title"`
|
Title string `yaml:"title"`
|
||||||
|
TopRefresh int `yaml:"topRefresh"`
|
||||||
} `yaml:"site"`
|
} `yaml:"site"`
|
||||||
Database struct {
|
Database struct {
|
||||||
Driver string `yaml:"driver"`
|
Driver string `yaml:"driver"`
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#
|
#
|
||||||
site:
|
site:
|
||||||
title: "Amsterdam Web Communities System"
|
title: "Amsterdam Web Communities System"
|
||||||
|
topRefresh: 300
|
||||||
database:
|
database:
|
||||||
driver: "mysql"
|
driver: "mysql"
|
||||||
dsn: "amsdb:x00yes2k@tcp(localhost)/amsterdam?parseTime=true&loc=Local"
|
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
|
return "string", "Unable to render sideboxes", err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ctxt.VarMap().Set("sideboxes", rc)
|
ctxt.VarMap().Set("sideboxes", rc)
|
||||||
|
|
||||||
|
// Final data set.
|
||||||
|
ctxt.VarMap().Set("amsterdam_genRefresh", true)
|
||||||
return "framed_template", "top.jet", nil
|
return "framed_template", "top.jet", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -14,7 +14,9 @@
|
|||||||
<title>{{ amsterdam_pageTitle }} - {{ GlobalConfig.Site.Title }}</title>
|
<title>{{ amsterdam_pageTitle }} - {{ GlobalConfig.Site.Title }}</title>
|
||||||
<link rel="icon" href="/img/builtin/AmsterdamIcon32.png" type="image/png" />
|
<link rel="icon" href="/img/builtin/AmsterdamIcon32.png" type="image/png" />
|
||||||
<link rel="shortcut icon" href="/img/builtin/AmsterdamIcon32.ico" />
|
<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>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user