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