mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-01 20:55:12 +01:00
index templates
This commit is contained in:
parent
784475124f
commit
01174fd648
@ -54,7 +54,7 @@ func (m *Module) aboutGETHandler(c *gin.Context) {
|
|||||||
Template: "about.tmpl",
|
Template: "about.tmpl",
|
||||||
Instance: instance,
|
Instance: instance,
|
||||||
OGMeta: apiutil.OGBase(instance),
|
OGMeta: apiutil.OGBase(instance),
|
||||||
Stylesheets: []string{cssAbout},
|
Stylesheets: []string{},
|
||||||
Extra: map[string]any{
|
Extra: map[string]any{
|
||||||
"showStrap": true,
|
"showStrap": true,
|
||||||
"blocklistExposed": config.GetInstanceExposeSuspendedWeb(),
|
"blocklistExposed": config.GetInstanceExposeSuspendedWeb(),
|
||||||
|
@ -67,7 +67,7 @@ func (m *Module) domainBlockListGETHandler(c *gin.Context) {
|
|||||||
Template: "domain-blocklist.tmpl",
|
Template: "domain-blocklist.tmpl",
|
||||||
Instance: instance,
|
Instance: instance,
|
||||||
OGMeta: apiutil.OGBase(instance),
|
OGMeta: apiutil.OGBase(instance),
|
||||||
Stylesheets: []string{cssFA},
|
Stylesheets: []string{},
|
||||||
Javascript: []string{jsFrontend},
|
Javascript: []string{jsFrontend},
|
||||||
Extra: map[string]any{"blocklist": domainBlocks},
|
Extra: map[string]any{"blocklist": domainBlocks},
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ func (m *Module) indexHandler(c *gin.Context) {
|
|||||||
Template: "index.tmpl",
|
Template: "index.tmpl",
|
||||||
Instance: instance,
|
Instance: instance,
|
||||||
OGMeta: apiutil.OGBase(instance),
|
OGMeta: apiutil.OGBase(instance),
|
||||||
Stylesheets: []string{cssAbout, cssIndex},
|
Stylesheets: []string{},
|
||||||
Extra: map[string]any{"showStrap": true},
|
Extra: map[string]any{"showStrap": true},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,18 +132,7 @@ func (m *Module) profileGETHandler(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prepare stylesheets for profile.
|
// Prepare stylesheets for profile.
|
||||||
stylesheets := make([]string, 0, 6)
|
stylesheets := make([]string, 0, 2)
|
||||||
|
|
||||||
// Basic profile stylesheets.
|
|
||||||
stylesheets = append(
|
|
||||||
stylesheets,
|
|
||||||
[]string{
|
|
||||||
cssFA,
|
|
||||||
cssStatus,
|
|
||||||
cssThread,
|
|
||||||
cssProfile,
|
|
||||||
}...,
|
|
||||||
)
|
|
||||||
|
|
||||||
// User-selected theme if set.
|
// User-selected theme if set.
|
||||||
if theme := targetAccount.Theme; theme != "" {
|
if theme := targetAccount.Theme; theme != "" {
|
||||||
|
@ -49,9 +49,6 @@ func (m *Module) SettingsPanelHandler(c *gin.Context) {
|
|||||||
Template: "settings.tmpl",
|
Template: "settings.tmpl",
|
||||||
Instance: instance,
|
Instance: instance,
|
||||||
Stylesheets: []string{
|
Stylesheets: []string{
|
||||||
cssFA,
|
|
||||||
cssProfile, // Used for rendering stub/fake profiles.
|
|
||||||
cssStatus, // Used for rendering stub/fake statuses.
|
|
||||||
cssSettings,
|
cssSettings,
|
||||||
},
|
},
|
||||||
Javascript: []string{jsSettings},
|
Javascript: []string{jsSettings},
|
||||||
|
@ -59,7 +59,7 @@ func (m *Module) tagGETHandler(c *gin.Context) {
|
|||||||
Template: "tag.tmpl",
|
Template: "tag.tmpl",
|
||||||
Instance: instance,
|
Instance: instance,
|
||||||
OGMeta: apiutil.OGBase(instance),
|
OGMeta: apiutil.OGBase(instance),
|
||||||
Stylesheets: []string{cssFA, cssThread, cssTag},
|
Stylesheets: []string{},
|
||||||
Extra: map[string]any{"tagName": tagName},
|
Extra: map[string]any{"tagName": tagName},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,17 +115,7 @@ func (m *Module) threadGETHandler(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prepare stylesheets for thread.
|
// Prepare stylesheets for thread.
|
||||||
stylesheets := make([]string, 0, 5)
|
stylesheets := make([]string, 0, 2)
|
||||||
|
|
||||||
// Basic thread stylesheets.
|
|
||||||
stylesheets = append(
|
|
||||||
stylesheets,
|
|
||||||
[]string{
|
|
||||||
cssFA,
|
|
||||||
cssStatus,
|
|
||||||
cssThread,
|
|
||||||
}...,
|
|
||||||
)
|
|
||||||
|
|
||||||
// User-selected theme if set.
|
// User-selected theme if set.
|
||||||
if theme := targetAccount.Theme; theme != "" {
|
if theme := targetAccount.Theme; theme != "" {
|
||||||
|
@ -58,14 +58,7 @@
|
|||||||
eTagHeader = "ETag" // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
|
eTagHeader = "ETag" // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
|
||||||
lastModifiedHeader = "Last-Modified" // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified
|
lastModifiedHeader = "Last-Modified" // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified
|
||||||
|
|
||||||
cssFA = assetsPathPrefix + "/Fork-Awesome/css/fork-awesome.min.css"
|
|
||||||
cssAbout = distPathPrefix + "/about.css"
|
|
||||||
cssIndex = distPathPrefix + "/index.css"
|
|
||||||
cssStatus = distPathPrefix + "/status.css"
|
|
||||||
cssThread = distPathPrefix + "/thread.css"
|
|
||||||
cssProfile = distPathPrefix + "/profile.css"
|
|
||||||
cssSettings = distPathPrefix + "/settings-style.css"
|
cssSettings = distPathPrefix + "/settings-style.css"
|
||||||
cssTag = distPathPrefix + "/tag.css"
|
|
||||||
|
|
||||||
jsFrontend = distPathPrefix + "/frontend.js" // Progressive enhancement frontend JS.
|
jsFrontend = distPathPrefix + "/frontend.js" // Progressive enhancement frontend JS.
|
||||||
jsSettings = distPathPrefix + "/settings.js" // Settings panel React application.
|
jsSettings = distPathPrefix + "/settings.js" // Settings panel React application.
|
||||||
|
@ -26,10 +26,10 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- with . }}
|
{{- with . }}
|
||||||
<main class="about">
|
<main class="sectioned">
|
||||||
<section class="about-section" role="region" aria-labelledby="about">
|
<section role="region" aria-labelledby="about">
|
||||||
<h2 id="about">About this instance</h2>
|
<h2 id="about">About this instance</h2>
|
||||||
<div class="about-section-contents">
|
<div>
|
||||||
{{- include "shortDescription" . | indent 3 }}
|
{{- include "shortDescription" . | indent 3 }}
|
||||||
<a href="/about">See more details</a>
|
<a href="/about">See more details</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
*/ -}}
|
*/ -}}
|
||||||
|
|
||||||
{{- with . }}
|
{{- with . }}
|
||||||
<section role="region" class="about-section apps" aria-labelledby="apps">
|
<section role="region" class="apps" aria-labelledby="apps">
|
||||||
<h2 id="apps">Client applications</h2>
|
<h2 id="apps">Client applications</h2>
|
||||||
<div class="about-section-contents">
|
<div>
|
||||||
<p>
|
<p>
|
||||||
Have an account on this instance and want to log in?
|
Have an account on this instance and want to log in?
|
||||||
GoToSocial does not provide its own webclient, but implements the Mastodon client API.
|
GoToSocial does not provide its own webclient, but implements the Mastodon client API.
|
||||||
|
@ -27,9 +27,9 @@ New account registration is currently
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- with . }}
|
{{- with . }}
|
||||||
<section class="about-section" role="region" aria-labelledby="signup">
|
<section role="region" aria-labelledby="signup">
|
||||||
<h2 id="signup">Register an Account on {{ .instance.Title -}}</h2>
|
<h2 id="signup">Register an Account on {{ .instance.Title -}}</h2>
|
||||||
<div class="about-section-contents">
|
<div>
|
||||||
<p>{{- template "registrationLimits" . -}}</p>
|
<p>{{- template "registrationLimits" . -}}</p>
|
||||||
{{- if .instance.Registrations }}
|
{{- if .instance.Registrations }}
|
||||||
<p>To register a new account, please first read the <a href="/about#rules">rules</a> and <a
|
<p>To register a new account, please first read the <a href="/about#rules">rules</a> and <a
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
*/ -}}
|
*/ -}}
|
||||||
|
|
||||||
{{- with . }}
|
{{- with . }}
|
||||||
<section role="region" class="about-section what-is-this" aria-labelledby="what-is-this">
|
<section role="region" class="what-is-this" aria-labelledby="what-is-this">
|
||||||
<h2 id="what-is-this">What is this?</h2>
|
<h2 id="what-is-this">What is this?</h2>
|
||||||
<div class="about-section-contents">
|
<div>
|
||||||
<p>
|
<p>
|
||||||
The web page you're reading right now is served by an instance of GoToSocial,
|
The web page you're reading right now is served by an instance of GoToSocial,
|
||||||
a federated, distributed, open-source microblogging software which connects
|
a federated, distributed, open-source microblogging software which connects
|
||||||
|
@ -28,15 +28,11 @@
|
|||||||
<link rel="preload" href="/assets/fonts/noto-sans-v27-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
|
<link rel="preload" href="/assets/fonts/noto-sans-v27-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
|
||||||
<link rel="preload" href="/assets/fonts/noto-sans-v27-latin-700.woff2" as="font" type="font/woff2" crossorigin>
|
<link rel="preload" href="/assets/fonts/noto-sans-v27-latin-700.woff2" as="font" type="font/woff2" crossorigin>
|
||||||
{{- with . }}
|
{{- with . }}
|
||||||
<link rel="preload" href="/assets/dist/_colors.css" as="style">
|
|
||||||
<link rel="preload" href="/assets/dist/base.css" as="style">
|
|
||||||
<link rel="preload" href="/assets/dist/page.css" as="style">
|
|
||||||
{{- range .stylesheets }}
|
{{- range .stylesheets }}
|
||||||
<link rel="preload" href="{{- . -}}" as="style">
|
<link rel="preload" href="{{- . -}}" as="style">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<link rel="stylesheet" href="/assets/dist/_colors.css">
|
<link rel="stylesheet" href="/assets/dist/default.css">
|
||||||
<link rel="stylesheet" href="/assets/dist/base.css">
|
<link rel="stylesheet" href="/assets/dist/style.css">
|
||||||
<link rel="stylesheet" href="/assets/dist/page.css">
|
|
||||||
{{- range .stylesheets }}
|
{{- range .stylesheets }}
|
||||||
<link rel="stylesheet" href="{{- . -}}">
|
<link rel="stylesheet" href="{{- . -}}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user