mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-01-05 07:09:56 +01:00
Apply user-defined CSS after plugins' JavaScript runs (#3661)
This commit is contained in:
@@ -192,6 +192,16 @@ trait IndexControllerBase extends ControllerBase {
|
||||
Ok()
|
||||
}
|
||||
|
||||
get("/user.css") {
|
||||
context.settings.userDefinedCss match {
|
||||
case Some(css) =>
|
||||
contentType = "text/css"
|
||||
css
|
||||
case None =>
|
||||
NotFound()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set account information into HttpSession and redirect.
|
||||
*/
|
||||
|
||||
@@ -159,5 +159,10 @@
|
||||
@Html(script)
|
||||
</script>
|
||||
}
|
||||
@if(context.settings.userDefinedCss.isDefined) {
|
||||
<script>
|
||||
$('head').append($('<link rel="stylesheet" type="text/css" href="@context.baseUrl/user.css">'))
|
||||
</script>
|
||||
}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user