Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

update og styles to match generic og image

Blue Mousef48608152cb4
diff --git a/backend/apps/cloud/src/og-image/og-image.service.ts b/backend/apps/cloud/src/og-image/og-image.service.ts
index 452ff698f..260ffa7b4 100644
--- a/backend/apps/cloud/src/og-image/og-image.service.ts
+++ b/backend/apps/cloud/src/og-image/og-image.service.ts
@@ -103,7 +103,6 @@ main {
overflow-wrap: anywhere;
hyphens: auto;
max-width: 1000px;
- text-shadow: 0 8px 24px rgba(0,0,0,.35);
color: #ffffff;
}
`
diff --git a/backend/apps/cloud/src/project/project.service.ts b/backend/apps/cloud/src/project/project.service.ts
index ae5dac912..b1ca88913 100644
--- a/backend/apps/cloud/src/project/project.service.ts
+++ b/backend/apps/cloud/src/project/project.service.ts
@@ -159,7 +159,6 @@ const previewHTML = `
<body id='body'>
<main>
<div class='gradient'>
- <div class='gradient__inner'></div>
</div>
<div>
<div class='title'>{{title}}</div>
@@ -169,12 +168,8 @@ const previewHTML = `
<div class='logo'>
<img src='${WHITE_LOGO_BASE64}' alt='' />
</div>
- <span class='separator'>
- |
- </span>
- <span class='swetrix_desc'>
- Privacy friendly web analytics
- </span>
+ <span class='separator'>•</span>
+ <span class='swetrix_desc'>Privacy-friendly web analytics</span>
</div>
</main>
</body>
@@ -190,10 +185,11 @@ const previewStyles = `
font-family: Inter, Ubuntu, sans-serif;
}
body {
- padding: 2.5rem;
- background: linear-gradient(to right, #0f172a, #1c2649);
- height: 90vh;
- color: white;
+ padding: 3.5rem 4rem;
+ height: 100vh;
+ position: relative;
+ margin: 0;
+ background: linear-gradient(145deg in oklab, oklch(0.446 0.043 257.281) 28%, oklch(0.627 0.265 303.9) 70%, oklch(0.511 0.262 276.966) 100%);
}
main {
height: 100%;
@@ -206,40 +202,30 @@ main {
}
.gradient {
position: absolute;
- filter: blur(64px);
- padding-left: 9rem;
- padding-right: 9rem;
+ inset: 0;
overflow: hidden;
- z-index: -10;
- left: 0;
- right: 0;
- top: -20px;
-}
-.gradient__inner {
- margin-left: auto;
- margin-right: auto;
- aspect-ratio: 1155/678;
- width: 72.1875rem;
- background-image: linear-gradient(to top right, #ff80b5, #9089fc);
- opacity: .3;
- clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%);
+ z-index: -1;
+ filter: blur(56px);
+ background: radial-gradient(900px 600px at 20% 25%, rgba(0, 0, 0, .28), transparent 60%);
}
.footer {
position: relative;
display: flex;
align-items: center;
- gap: 1rem;
- font-size: 2rem;
- font-weight: 200;
+ gap: .75rem;
+ font-size: 1.85rem;
+ font-weight: 400;
+ color: white;
}
+.separator { opacity: .4; }
.swetrix_desc {
- position: absolute;
- top: 7px;
- left: calc(205px + 2rem);
+ position: static;
+ font-weight: 400;
}
.logo {
width: 200px;
height: 44px;
+ margin-top: -0.5rem;
}
.logo img {
width: 100%;
@@ -247,14 +233,24 @@ main {
}
.title {
font-size: {{fontSize}};
- text-transform: capitalize;
+ text-transform: none;
+ line-height: 1.05;
margin: 0.25rem 0;
- font-weight: bold;
+ font-weight: 800;
+ letter-spacing: -0.02em;
+ text-wrap: balance;
+ white-space: pre-wrap;
+ overflow-wrap: anywhere;
+ hyphens: auto;
+ max-width: 1000px;
+ color: #ffffff;
}
.description {
margin-top: 3rem;
- font-size: 2.5rem;
+ font-size: 2.7rem;
letter-spacing: 0.05em;
+ font-weight: 500;
+ color: #ffffff;
}
`