summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Mills <james@mills.io>2024-12-24 15:53:21 +1000
committerJames Mills <james@mills.io>2024-12-24 15:53:29 +1000
commit2b2b477b1c8887076defe6cce7d914db224dcede (patch)
tree2cebb8ac6e561ae70787a64691d0d91dc93f28d9
parent0f4ee60246f918a8a704a7e8a726a948b93f2999 (diff)
Add alert styles and default alert banner to warn of illegal content and abuseHEADmaster
-rw-r--r--static/theme.css47
-rw-r--r--templates/base.html4
2 files changed, 51 insertions, 0 deletions
diff --git a/static/theme.css b/static/theme.css
index c013f3e..17bc6d8 100644
--- a/static/theme.css
+++ b/static/theme.css
@@ -557,3 +557,50 @@ footer p a:hover {
display: block;
text-align: left;
}
+
+/* Alert styles */
+
+alert {
+ /* grid-area: alert;*/
+ /* display: flex;*/
+ display: block;
+ width: 100%;
+ margin: 0;
+ padding: 0.5rem;
+ text-align: center;
+ font-weight: bold;
+ color: white;
+ align-items: center;
+ justify-content: center;
+ /* border-radius: var(--border-radius);*/
+}
+
+alert a {
+ color: white;
+ text-decoration: underline;
+}
+
+alert.float {
+ top: 0;
+ left: 0;
+ /* position: fixed;*/
+ position: sticky;
+ z-index: 9999;
+}
+
+
+alert.safe {
+ background-color: #4f8811;
+}
+
+alert.warn {
+ background-color: #ff5500;
+}
+
+alert.panic {
+ background-color: #ee1515;
+}
+
+alert.update {
+ background-color: #2986cc;
+}
diff --git a/templates/base.html b/templates/base.html
index 65fa38d..980e993 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -28,6 +28,10 @@
<title>Tube</title>
</head>
<body>
+ <alert class="warn">
+ This is a public instance. Abuse will not be tolerated. Uploading illegal content
+ will be deleted and repeated abuse will result in your access permanently terminated.
+ </alert>
<nav>
<a href="/">Tube</a>
<a class="centered" style="text-indent: 0;" href="/upload">Upload</a>