mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-12 05:20:26 +00:00
Rename Omnipresent to Common
This commit is contained in:
parent
b81650fef7
commit
95c95d2467
@ -9,12 +9,9 @@ HeaderLinksHypha = header-links
|
||||
[Network]
|
||||
HTTPPort = 8080
|
||||
URL = https://wiki
|
||||
GeminiCertificatePath = /home/wiki/gemcerts
|
||||
|
||||
[Authorization]
|
||||
UseFixedAuth = true
|
||||
FixedAuthCredentialsPath = /home/wiki/mycocredentials.json
|
||||
|
||||
UseRegistration = true
|
||||
RegistrationCredentialsPath = /home/wiki/mycoregistration.json
|
||||
LimitRegistration = 10
|
||||
|
@ -12,8 +12,6 @@ URL = http://localhost:1737
|
||||
|
||||
[Authorization]
|
||||
UseFixedAuth = true
|
||||
FixedAuthCredentialsPath = mycocredentials.json
|
||||
|
||||
UseRegistration = true
|
||||
RegistrationCredentialsPath = mycoregistration.json
|
||||
LimitRegistration = 3
|
||||
|
@ -30,7 +30,7 @@ var (
|
||||
UseRegistration bool
|
||||
LimitRegistration int
|
||||
|
||||
OmnipresentScripts []string
|
||||
CommonScripts []string
|
||||
ViewScripts []string
|
||||
EditScripts []string
|
||||
)
|
||||
@ -68,8 +68,8 @@ type Network struct {
|
||||
// CustomScripts is a section with paths to JavaScript files that are loaded on
|
||||
// specified pages.
|
||||
type CustomScripts struct {
|
||||
// OmnipresentScripts: everywhere...
|
||||
OmnipresentScripts []string `delim:"," comment:"These scripts are loaded from anywhere."`
|
||||
// CommonScripts: everywhere...
|
||||
CommonScripts []string `delim:"," comment:"These scripts are loaded from anywhere."`
|
||||
// ViewScripts: /hypha, /rev
|
||||
ViewScripts []string `delim:"," comment:"These scripts are only loaded on view pages."`
|
||||
// Edit: /edit
|
||||
@ -106,7 +106,7 @@ func ReadConfigFile(path string) error {
|
||||
LimitRegistration: 0,
|
||||
},
|
||||
CustomScripts: CustomScripts{
|
||||
OmnipresentScripts: []string{},
|
||||
CommonScripts: []string{},
|
||||
ViewScripts: []string{},
|
||||
EditScripts: []string{},
|
||||
},
|
||||
@ -167,7 +167,7 @@ func ReadConfigFile(path string) error {
|
||||
UseFixedAuth = cfg.UseFixedAuth
|
||||
UseRegistration = cfg.UseRegistration
|
||||
LimitRegistration = int(cfg.LimitRegistration)
|
||||
OmnipresentScripts = cfg.OmnipresentScripts
|
||||
CommonScripts = cfg.CommonScripts
|
||||
ViewScripts = cfg.ViewScripts
|
||||
EditScripts = cfg.EditScripts
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
<div class="dialog__content"></div>
|
||||
</div>
|
||||
</template>
|
||||
{%= omnipresentScripts() %}
|
||||
{%= CommonScripts() %}
|
||||
</body>
|
||||
</html>
|
||||
{% endfunc %}
|
||||
@ -130,8 +130,8 @@ for u := range user.YieldUsers() {
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func omnipresentScripts() %}
|
||||
{% for _, scriptPath := range cfg.OmnipresentScripts %}
|
||||
{% func CommonScripts() %}
|
||||
{% for _, scriptPath := range cfg.CommonScripts %}
|
||||
<script src="{%s scriptPath %}"></script>
|
||||
{% endfor %}
|
||||
{% endfunc %}
|
||||
|
@ -106,7 +106,7 @@ func StreamBaseHTML(qw422016 *qt422016.Writer, title, body string, u *user.User,
|
||||
</template>
|
||||
`)
|
||||
//line views/stuff.qtpl:42
|
||||
streamomnipresentScripts(qw422016)
|
||||
StreamCommonScripts(qw422016)
|
||||
//line views/stuff.qtpl:42
|
||||
qw422016.N().S(`
|
||||
</body>
|
||||
@ -461,12 +461,12 @@ func AboutHTML() string {
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:133
|
||||
func streamomnipresentScripts(qw422016 *qt422016.Writer) {
|
||||
func StreamCommonScripts(qw422016 *qt422016.Writer) {
|
||||
//line views/stuff.qtpl:133
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/stuff.qtpl:134
|
||||
for _, scriptPath := range cfg.OmnipresentScripts {
|
||||
for _, scriptPath := range cfg.CommonScripts {
|
||||
//line views/stuff.qtpl:134
|
||||
qw422016.N().S(`
|
||||
<script src="`)
|
||||
@ -484,22 +484,22 @@ func streamomnipresentScripts(qw422016 *qt422016.Writer) {
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:137
|
||||
func writeomnipresentScripts(qq422016 qtio422016.Writer) {
|
||||
func WriteCommonScripts(qq422016 qtio422016.Writer) {
|
||||
//line views/stuff.qtpl:137
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/stuff.qtpl:137
|
||||
streamomnipresentScripts(qw422016)
|
||||
StreamCommonScripts(qw422016)
|
||||
//line views/stuff.qtpl:137
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/stuff.qtpl:137
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:137
|
||||
func omnipresentScripts() string {
|
||||
func CommonScripts() string {
|
||||
//line views/stuff.qtpl:137
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/stuff.qtpl:137
|
||||
writeomnipresentScripts(qb422016)
|
||||
WriteCommonScripts(qb422016)
|
||||
//line views/stuff.qtpl:137
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/stuff.qtpl:137
|
||||
|
Loading…
Reference in New Issue
Block a user