mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-22 08:13:42 +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",
|
||||
Instance: instance,
|
||||
OGMeta: apiutil.OGBase(instance),
|
||||
Stylesheets: []string{cssAbout},
|
||||
Stylesheets: []string{},
|
||||
Extra: map[string]any{
|
||||
"showStrap": true,
|
||||
"blocklistExposed": config.GetInstanceExposeSuspendedWeb(),
|
||||
|
@ -67,7 +67,7 @@ func (m *Module) domainBlockListGETHandler(c *gin.Context) {
|
||||
Template: "domain-blocklist.tmpl",
|
||||
Instance: instance,
|
||||
OGMeta: apiutil.OGBase(instance),
|
||||
Stylesheets: []string{cssFA},
|
||||
Stylesheets: []string{},
|
||||
Javascript: []string{jsFrontend},
|
||||
Extra: map[string]any{"blocklist": domainBlocks},
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ func (m *Module) indexHandler(c *gin.Context) {
|
||||
Template: "index.tmpl",
|
||||
Instance: instance,
|
||||
OGMeta: apiutil.OGBase(instance),
|
||||
Stylesheets: []string{cssAbout, cssIndex},
|
||||
Stylesheets: []string{},
|
||||
Extra: map[string]any{"showStrap": true},
|
||||
}
|
||||
|
||||
|
@ -132,18 +132,7 @@ func (m *Module) profileGETHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
// Prepare stylesheets for profile.
|
||||
stylesheets := make([]string, 0, 6)
|
||||
|
||||
// Basic profile stylesheets.
|
||||
stylesheets = append(
|
||||
stylesheets,
|
||||
[]string{
|
||||
cssFA,
|
||||
cssStatus,
|
||||
cssThread,
|
||||
cssProfile,
|
||||
}...,
|
||||
)
|
||||
stylesheets := make([]string, 0, 2)
|
||||
|
||||
// User-selected theme if set.
|
||||
if theme := targetAccount.Theme; theme != "" {
|
||||
|
@ -49,9 +49,6 @@ func (m *Module) SettingsPanelHandler(c *gin.Context) {
|
||||
Template: "settings.tmpl",
|
||||
Instance: instance,
|
||||
Stylesheets: []string{
|
||||
cssFA,
|
||||
cssProfile, // Used for rendering stub/fake profiles.
|
||||
cssStatus, // Used for rendering stub/fake statuses.
|
||||
cssSettings,
|
||||
},
|
||||
Javascript: []string{jsSettings},
|
||||
|
@ -59,7 +59,7 @@ func (m *Module) tagGETHandler(c *gin.Context) {
|
||||
Template: "tag.tmpl",
|
||||
Instance: instance,
|
||||
OGMeta: apiutil.OGBase(instance),
|
||||
Stylesheets: []string{cssFA, cssThread, cssTag},
|
||||
Stylesheets: []string{},
|
||||
Extra: map[string]any{"tagName": tagName},
|
||||
}
|
||||
|
||||
|
@ -115,17 +115,7 @@ func (m *Module) threadGETHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
// Prepare stylesheets for thread.
|
||||
stylesheets := make([]string, 0, 5)
|
||||
|
||||
// Basic thread stylesheets.
|
||||
stylesheets = append(
|
||||
stylesheets,
|
||||
[]string{
|
||||
cssFA,
|
||||
cssStatus,
|
||||
cssThread,
|
||||
}...,
|
||||
)
|
||||
stylesheets := make([]string, 0, 2)
|
||||
|
||||
// User-selected theme if set.
|
||||
if theme := targetAccount.Theme; theme != "" {
|
||||
|
@ -58,14 +58,7 @@
|
||||
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
|
||||
|
||||
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"
|
||||
cssTag = distPathPrefix + "/tag.css"
|
||||
|
||||
jsFrontend = distPathPrefix + "/frontend.js" // Progressive enhancement frontend JS.
|
||||
jsSettings = distPathPrefix + "/settings.js" // Settings panel React application.
|
||||
|
@ -26,10 +26,10 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- with . }}
|
||||
<main class="about">
|
||||
<section class="about-section" role="region" aria-labelledby="about">
|
||||
<main class="sectioned">
|
||||
<section role="region" aria-labelledby="about">
|
||||
<h2 id="about">About this instance</h2>
|
||||
<div class="about-section-contents">
|
||||
<div>
|
||||
{{- include "shortDescription" . | indent 3 }}
|
||||
<a href="/about">See more details</a>
|
||||
</div>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/ -}}
|
||||
|
||||
{{- 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>
|
||||
<div class="about-section-contents">
|
||||
<div>
|
||||
<p>
|
||||
Have an account on this instance and want to log in?
|
||||
GoToSocial does not provide its own webclient, but implements the Mastodon client API.
|
||||
|
@ -27,9 +27,9 @@ New account registration is currently
|
||||
{{- end -}}
|
||||
|
||||
{{- 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>
|
||||
<div class="about-section-contents">
|
||||
<div>
|
||||
<p>{{- template "registrationLimits" . -}}</p>
|
||||
{{- if .instance.Registrations }}
|
||||
<p>To register a new account, please first read the <a href="/about#rules">rules</a> and <a
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/ -}}
|
||||
|
||||
{{- 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>
|
||||
<div class="about-section-contents">
|
||||
<div>
|
||||
<p>
|
||||
The web page you're reading right now is served by an instance of GoToSocial,
|
||||
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-700.woff2" as="font" type="font/woff2" crossorigin>
|
||||
{{- 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 }}
|
||||
<link rel="preload" href="{{- . -}}" as="style">
|
||||
{{- end }}
|
||||
<link rel="stylesheet" href="/assets/dist/_colors.css">
|
||||
<link rel="stylesheet" href="/assets/dist/base.css">
|
||||
<link rel="stylesheet" href="/assets/dist/page.css">
|
||||
<link rel="stylesheet" href="/assets/dist/default.css">
|
||||
<link rel="stylesheet" href="/assets/dist/style.css">
|
||||
{{- range .stylesheets }}
|
||||
<link rel="stylesheet" href="{{- . -}}">
|
||||
{{- end }}
|
||||
|
Loading…
Reference in New Issue
Block a user