summaryrefslogtreecommitdiff
path: root/src/public
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-05-20 17:11:38 -0400
committerFreya Murphy <freya@freyacat.org>2024-05-20 17:11:38 -0400
commit708594d32ffe779cf547c816fa7cdd19d095be2e (patch)
tree30d28553316db02bc027664e17b76d58f2e352ff /src/public
parentadd en_CAT makefile and use ucfirst/ucwords (diff)
downloadxssbook2-708594d32ffe779cf547c816fa7cdd19d095be2e.tar.gz
xssbook2-708594d32ffe779cf547c816fa7cdd19d095be2e.tar.bz2
xssbook2-708594d32ffe779cf547c816fa7cdd19d095be2e.zip
v2 done
Diffstat (limited to 'src/public')
-rw-r--r--src/public/css/common.css15
-rw-r--r--src/public/css/people.css2
-rw-r--r--src/public/css/post.css5
-rw-r--r--src/public/css/profile.css7
-rw-r--r--src/public/css/settings.css13
-rw-r--r--src/public/js/lib.js7
6 files changed, 38 insertions, 11 deletions
diff --git a/src/public/css/common.css b/src/public/css/common.css
index de9dedb..b950ebe 100644
--- a/src/public/css/common.css
+++ b/src/public/css/common.css
@@ -310,13 +310,7 @@ input.btn:focus {
display: block;
}
-@keyframes shimmer {
- to {
- background-position-x: 0%;
- }
-}
-
-.pfp, .pfp img {
+.pfp, .pfp .inner {
height: 2.5rem;
border-radius: 2.5rem;
aspect-ratio: 1;
@@ -324,15 +318,18 @@ input.btn:focus {
display: block;
}
-.pfp-sm, .pfp-sm img {
+.pfp-sm, .pfp-sm .inner {
height: 1.75rem;
}
+object.inner {
+ pointer-events: none;
+}
+
.image-loading {
background: linear-gradient(-45deg, var(--surface0) 0%, var(--base) 25%, var(--surface0) 50%);
background-size: 500%;
background-position-x: 150%;
- animation: shimmer 1s linear infinite;
}
.image-loaded {
diff --git a/src/public/css/people.css b/src/public/css/people.css
index 6b07eff..d36e5e8 100644
--- a/src/public/css/people.css
+++ b/src/public/css/people.css
@@ -35,7 +35,7 @@
font-size: 1.5rem;
}
-.profile .pfp, .profile .pfp img {
+.profile .pfp, .profile .pfp .inner {
padding: none;
margin: none;
width: 100%;
diff --git a/src/public/css/post.css b/src/public/css/post.css
index 47106a9..254e82b 100644
--- a/src/public/css/post.css
+++ b/src/public/css/post.css
@@ -8,6 +8,11 @@
justify-content: center;
}
+#post-container {
+ max-width: 40rem;
+ width: 100%;
+}
+
.post, #new-post {
margin-bottom: 1rem;
max-width: 40rem;
diff --git a/src/public/css/profile.css b/src/public/css/profile.css
index a6f2ef4..d043b84 100644
--- a/src/public/css/profile.css
+++ b/src/public/css/profile.css
@@ -25,6 +25,11 @@
aspect-ratio: 5;
}
+.banner object.inner {
+ width: 100%;
+ height: 100%;
+}
+
#profile-header .banner img {
height: 100%;
width: 100%;
@@ -32,7 +37,7 @@
}
#profile-header .info .pfp-wrapper .pfp,
-#profile-header .info .pfp-wrapper .pfp img {
+#profile-header .info .pfp-wrapper .pfp .inner {
height: 12.5rem;
}
diff --git a/src/public/css/settings.css b/src/public/css/settings.css
new file mode 100644
index 0000000..8c3e9f7
--- /dev/null
+++ b/src/public/css/settings.css
@@ -0,0 +1,13 @@
+
+#main-content {
+ display: flex;
+ justify-content: center;
+}
+
+#settings {
+ margin: 0 1rem;
+ margin-bottom: 1rem;
+ max-width: 800px;
+ min-width: 400px;
+ width: 100%;
+}
diff --git a/src/public/js/lib.js b/src/public/js/lib.js
index 95f83b7..4d08bab 100644
--- a/src/public/js/lib.js
+++ b/src/public/js/lib.js
@@ -94,6 +94,13 @@ var errorToast = (msg) => {
})
}
+var successToast = (msg) => {
+ let url = '/template/toast?type=success&msg=' + msg;
+ $.get(url, function (data) {
+ $('#toast-container').prepend(data);
+ })
+}
+
$$('.action-close-toast').on('click', function() {
$(this).parent().remove();
});