mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 15:16:15 -06:00
cheeky bit cheaper
This commit is contained in:
parent
8d37d1efcc
commit
46eeef9df8
2 changed files with 7 additions and 5 deletions
|
|
@ -240,10 +240,12 @@ func templatePage(
|
||||||
// Render given template inside the page.
|
// Render given template inside the page.
|
||||||
obj["pageContent"] = template
|
obj["pageContent"] = template
|
||||||
|
|
||||||
// Inject specific page class by replacing
|
// Inject specific page class by trimming
|
||||||
// ".tmpl" with "-page", so "index.tmpl" for
|
// ".tmpl" suffix. In the page template
|
||||||
// example gets class "page index-page".
|
// (see page.tmpl) this will be appended
|
||||||
obj["pageClass"] = template[0:len(template)-5] + "-page"
|
// with "-page", so "index.tmpl" for example
|
||||||
|
// ends up with class "page index-page".
|
||||||
|
obj["pageClass"] = template[:len(template)-5]
|
||||||
|
|
||||||
c.HTML(code, pageTmpl, obj)
|
c.HTML(code, pageTmpl, obj)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ image/webp
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<title>{{- template "instanceTitle" . -}}</title>
|
<title>{{- template "instanceTitle" . -}}</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="page{{- if .pageClass }} {{ .pageClass }}{{- end -}}">
|
<body class="page{{- if .pageClass }} {{ .pageClass }}-page{{- end -}}">
|
||||||
{{- include "login_button.tmpl" . | indent 3 }}
|
{{- include "login_button.tmpl" . | indent 3 }}
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
{{- include "page_header.tmpl" . | indent 3 }}
|
{{- include "page_header.tmpl" . | indent 3 }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue