Add option for user CSS

This commit is contained in:
r 2021-04-03 09:22:43 +00:00
parent a82745175e
commit 76c5baef6a
6 changed files with 18 additions and 0 deletions

View file

@ -25,6 +25,9 @@
{{if $.Ctx.FluorideMode}}
<script src="/static/fluoride.js"></script>
{{end}}
{{if $.Ctx.UserCSS}}
<style>{{$.Ctx.UserCSS}}</style>
{{end}}
</head>
<body {{if $.Ctx.DarkMode}}class="dark"{{end}}>
{{end}}

View file

@ -63,6 +63,12 @@
<input id="dark-mode" name="dark_mode" type="checkbox" value="true" {{if .Settings.DarkMode}}checked{{end}}>
<label for="dark-mode"> Use dark theme </label>
</div>
<div class="settings-form-field">
<label for="css"> Custom CSS: </label>
</div>
<div>
<textarea id="css" name="css" cols="80" rows="8">{{.Settings.CSS}}</textarea>
</div>
<button type="submit"> Save </button>
</form>