Polish UI copy and notifications

This commit is contained in:
chris 2026-01-03 16:44:32 -05:00
parent 8686e7b965
commit 9a6dc26786
4 changed files with 25 additions and 5 deletions

View File

@ -1,4 +1,4 @@
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Karla:wght@400;600&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Sora:wght@400;500;600&display=swap');
:root { :root {
--ink: #1b1513; --ink: #1b1513;
@ -12,7 +12,7 @@
} }
body { body {
font-family: 'Karla', sans-serif; font-family: 'Sora', sans-serif;
color: var(--ink); color: var(--ink);
background: radial-gradient(circle at top left, #f2fbff 0%, #f4f1ea 35%, #f8e5e7 100%); background: radial-gradient(circle at top left, #f2fbff 0%, #f4f1ea 35%, #f8e5e7 100%);
min-height: 100vh; min-height: 100vh;
@ -41,7 +41,7 @@ body {
.brand-logo { .brand-logo {
width: 52px; width: 52px;
height: 52px; height: 52px;
border-radius: 0; border-radius: 12px;
} }
.back-button { .back-button {

View File

@ -4,7 +4,7 @@
<div class="hero-body"> <div class="hero-body">
<p class="title">Find the right fit</p> <p class="title">Find the right fit</p>
<p class="subtitle"> <p class="subtitle">
Browse pads, compare comfort, and share honest reviews with photos. Build your own pad list, add photos, and rate fit, comfort, and absorbency over time.
</p> </p>
<% if (currentUser && currentUser.is_approved) { %> <% if (currentUser && currentUser.is_approved) { %>
<a class="button is-primary is-large" href="/pads/new">Add a pad</a> <a class="button is-primary is-large" href="/pads/new">Add a pad</a>

View File

@ -13,6 +13,23 @@
} }
}); });
}); });
document.querySelectorAll('[data-dismissible="true"] .delete').forEach(function (button) {
button.addEventListener('click', function () {
var notice = button.closest('[data-dismissible="true"]');
if (notice) {
notice.remove();
}
});
});
document.querySelectorAll('[data-dismissible="true"]').forEach(function (notice) {
setTimeout(function () {
if (notice.isConnected) {
notice.remove();
}
}, 5000);
});
})(); })();
</script> </script>
</body> </body>

View File

@ -50,5 +50,8 @@
<section class="section"> <section class="section">
<div class="container"> <div class="container">
<% if (flash) { %> <% if (flash) { %>
<div class="notification is-<%= flash.type %>"><%= flash.message %></div> <div class="notification is-<%= flash.type %>" data-dismissible="true">
<button class="delete" type="button" aria-label="Dismiss notification"></button>
<%= flash.message %>
</div>
<% } %> <% } %>