From 29067035e8efbe4d99b027249bd9e475d69c086f Mon Sep 17 00:00:00 2001
From: Riccardo Senica <46839416+RiccardoSenica@users.noreply.github.com>
Date: Sat, 20 Jan 2024 03:00:31 +0100
Subject: [PATCH] Review adjustments (#11)
---
README.md | 1 +
app/globals.css | 77 ++++++++++++++++++++++++++++++++++++++
app/layout.tsx | 4 +-
app/page.tsx | 24 ++++++++----
app/privacy/page.tsx | 4 +-
app/unsubscribe/page.tsx | 10 +++--
components/custom/card.tsx | 53 +++++++++++---------------
components/ui/button.tsx | 44 ++--------------------
components/ui/card.tsx | 6 +--
package.json | 1 +
postcss.config.js | 6 ++-
yarn.lock | 15 +++++++-
12 files changed, 153 insertions(+), 92 deletions(-)
diff --git a/README.md b/README.md
index 942b259..3d4ecca 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
## Next up
+- Adjust card size
- Batch email (Resend: ETA early 2024)
- Custom url shortener for links in the newsletter
- Cron every 10 minutes: people are more likely to open the newsletter if delivered around the time when they subscribed (if cron becomes not enough, then the cost of sending all the emails might be a bigger issue)
diff --git a/app/globals.css b/app/globals.css
index c0a1ebd..38314ba 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -77,3 +77,80 @@
.styledH4 {
@apply text-base font-medium;
}
+
+/* Card border gradient */
+body {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ background: #222;
+}
+
+.gradient-border {
+ --radius: 5px;
+ position: relative;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ color: white;
+ background: #222;
+ border-radius: var(--radius);
+
+ &::after {
+ position: absolute;
+ content: '';
+ top: calc(-1 * var(--radius));
+ left: calc(-1 * var(--radius));
+ z-index: -1;
+ width: calc(100% + var(--radius) * 2);
+ height: calc(100% + var(--radius) * 2);
+ background: linear-gradient(
+ 60deg,
+ hsl(224, 85%, 66%),
+ hsl(269, 85%, 66%),
+ hsl(314, 85%, 66%),
+ hsl(359, 85%, 66%),
+ hsl(44, 85%, 66%),
+ hsl(89, 85%, 66%),
+ hsl(134, 85%, 66%),
+ hsl(179, 85%, 66%)
+ );
+ background-size: 300% 300%;
+ background-position: 0 50%;
+ border-radius: calc(2 * var(--radius));
+ animation: moveGradient 4s alternate infinite;
+ }
+}
+
+@keyframes moveGradient {
+ 50% {
+ background-position: 100% 50%;
+ }
+}
+
+/* Button gradient */
+.btn-grad {
+ background-image: linear-gradient(
+ to right,
+ #da22ff 0%,
+ #9733ee 51%,
+ #da22ff 100%
+ );
+ padding: 10px;
+ width: 100%;
+ text-align: center;
+ text-transform: uppercase;
+ transition: 0.5s;
+ background-size: 200% auto;
+ color: white;
+ box-shadow: 0 0 20px #eee;
+ border-radius: 10px;
+ display: block;
+}
+
+.btn-grad:hover {
+ background-position: right center;
+ color: #fff;
+ text-decoration: none;
+}
diff --git a/app/layout.tsx b/app/layout.tsx
index 2c9b1dd..f6261e7 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -30,7 +30,9 @@ export default function RootLayout({
fontSans.variable
)}
>
- {children}
+
+ {children}
+