summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-11-30 15:53:32 +0300
committerAndrew Dolgov <[email protected]>2020-11-30 15:53:32 +0300
commit81c52b4b1e73bcc44cbe93fa926036277a961208 (patch)
tree9f0de5a34f470df55f63a4bb233424bf71ed03c3 /include
parent8089fcc7622590dc93d427532ec35f3644214ed0 (diff)
add support for an override stylesheet which applies to all users
Diffstat (limited to 'include')
-rw-r--r--include/functions.php4
-rwxr-xr-xinclude/login_form.php4
2 files changed, 8 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php
index 538239218..ceb7fbd9e 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -7,6 +7,10 @@
define('COOKIE_LIFETIME_LONG', 86400*365);
+ // this CSS file is included for everyone (if it exists in themes.local)
+ // on login, registration, and main (index and prefs) pages
+ define('LOCAL_OVERRIDE_STYLESHEET', '.local-overrides.css');
+
$fetch_last_error = false;
$fetch_last_error_code = false;
$fetch_last_content_type = false;
diff --git a/include/login_form.php b/include/login_form.php
index d2688d0ec..586d6fe78 100755
--- a/include/login_form.php
+++ b/include/login_form.php
@@ -18,6 +18,10 @@
} ?>
+ <?php if (theme_exists(LOCAL_OVERRIDE_STYLESHEET)) {
+ echo stylesheet_tag(get_theme_path(LOCAL_OVERRIDE_STYLESHEET));
+ } ?>
+
<style type="text/css">
@media (prefers-color-scheme: dark) {
body {