summaryrefslogtreecommitdiff
path: root/web/public/css
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-03-30 12:14:42 -0400
committerFreya Murphy <freya@freyacat.org>2024-03-30 12:14:42 -0400
commit1f04b83be337cc91a3fabcf4e574e2306f3d2eaa (patch)
tree74d7d65a7047e60d1877384e3c7b0d70c7b0e49a /web/public/css
parentstart database (user and post), and initial barebones home page (diff)
downloadxssbook2-1f04b83be337cc91a3fabcf4e574e2306f3d2eaa.tar.gz
xssbook2-1f04b83be337cc91a3fabcf4e574e2306f3d2eaa.tar.bz2
xssbook2-1f04b83be337cc91a3fabcf4e574e2306f3d2eaa.zip
refactor
Diffstat (limited to 'web/public/css')
-rw-r--r--web/public/css/common.css57
1 files changed, 57 insertions, 0 deletions
diff --git a/web/public/css/common.css b/web/public/css/common.css
index 05f429f..84aabfc 100644
--- a/web/public/css/common.css
+++ b/web/public/css/common.css
@@ -52,6 +52,8 @@ body {
}
header {
+ top: 0;
+ position: sticky;
height: 3.5rem;
background-color: var(--primary);
display: flex;
@@ -145,6 +147,10 @@ input:focus {
align-items: center;
}
+.nav {
+ position: sticky;
+}
+
.nav-right {
flex: 1;
justify-content: flex-end;
@@ -333,6 +339,30 @@ input:focus {
border-radius: .5rem;
display: flex;
flex-direction: column;
+ animation: fadeIn .1s, slideInModal .1s linear;
+}
+
+@keyframes slideInModal {
+ 0% {
+ animation-timing-function: ease-in;
+ transform: translate(-50%, -60%);
+ }
+}
+
+@keyframes slideIn {
+ 0% {
+ animation-timing-function: ease-out;
+ transform: translate(0, -50%);
+ }
+}
+
+@keyframes fadeIn {
+ 0% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
}
.modal>form {
@@ -402,3 +432,30 @@ button[type="submit"]:hover {
background-color: var(--logo);
}
+#toast-container {
+ position: fixed;
+ top: 4rem;
+ left: 100%;
+ transform: translateX(-110%);
+ margin-top: 1rem;
+ z-index: 10000;
+}
+
+.toast {
+ padding: .75rem;
+ margin: .5rem;
+ border-radius: .5rem;
+ min-width: 15rem;
+ font-family: sfpro;
+ animation: fadeIn .1s, slideIn .25s linear;
+ display: flex;
+ justify-content: space-between;
+}
+
+.toast.error {
+ background-color: var(--error);
+}
+
+.toast.success {
+ background-color: var(--success);
+}