mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-09 23:28:07 -06:00
consolidate stylesheets
This commit is contained in:
parent
7e1e57321c
commit
6aa580a470
12 changed files with 183 additions and 50 deletions
|
|
@ -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 @@ const (
|
|||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue